Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   List of differences in headers between C90 and C99? (http://www.velocityreviews.com/forums/t494956-list-of-differences-in-headers-between-c90-and-c99.html)

Spiro Trikaliotis 03-29-2007 06:49 PM

List of differences in headers between C90 and C99?
 
Hello,

does anyone know of any list which presents the headers that differ
between C90 and c99, and where they differ? Searching on the web, I
found many web sites about the differences between C90 and C99, but I
did not find anything specific about the headers (and, thus, library
functions).

Why do I ask this? Here, there was a decision to use the following
headers for a project which should be portable across Posix systems,
only:

fctl.h mqueue.h
pthread.h semaphore.h
shed.h signal.h
stropts.h time.h
unistd.h dirent.h
limits.h netdb.h
utime.h assert.h
ctype.h float.h
iso646.h locale.h
math.h setjmp.h
stdarg.h stddef.h
stdint.h stdio.h
stdlib.h string.h
time.h wchar.h
wctype.h

and, for completeness: Also the following Posix headers are allowed:
arpa/inet.h sys/mman.h
sys/socket.h sys/stat.h
sys/time.h

I want to generate a list of functions and other features to avoid in
order to be able to compile the code on C90 compilers. Thus, a list of
the differences between the different version would be very helpful.

Thanks in advance,
Spiro.

--
Spiro R. Trikaliotis http://opencbm.sf.net/
http://www.trikaliotis.net/ http://www.viceteam.org/

Ian Collins 03-29-2007 07:44 PM

Re: List of differences in headers between C90 and C99?
 
Spiro Trikaliotis wrote:
> Hello,
>
> does anyone know of any list which presents the headers that differ
> between C90 and c99, and where they differ? Searching on the web, I
> found many web sites about the differences between C90 and C99, but I
> did not find anything specific about the headers (and, thus, library
> functions).
>
> Why do I ask this? Here, there was a decision to use the following
> headers for a project which should be portable across Posix systems,
> only:
>

<OT>not answering your question, but POSIX required some C99 features,
so a conforming system will have a compiler that supports (or at least
doesn't barf on) them. Check this out.</OT>

--
Ian Collins.

user923005 03-29-2007 08:08 PM

Re: List of differences in headers between C90 and C99?
 
On Mar 29, 11:49 am, Spiro Trikaliotis <news-200...@trikaliotis.net>
wrote:
> Hello,
>
> does anyone know of any list which presents the headers that differ
> between C90 and c99, and where they differ? Searching on the web, I
> found many web sites about the differences between C90 and C99, but I
> did not find anything specific about the headers (and, thus, library
> functions).
>
> Why do I ask this? Here, there was a decision to use the following
> headers for a project which should be portable across Posix systems,
> only:
>
> fctl.h mqueue.h
> pthread.h semaphore.h
> shed.h signal.h
> stropts.h time.h
> unistd.h dirent.h
> limits.h netdb.h
> utime.h assert.h
> ctype.h float.h
> iso646.h locale.h
> math.h setjmp.h
> stdarg.h stddef.h
> stdint.h stdio.h
> stdlib.h string.h
> time.h wchar.h
> wctype.h
>
> and, for completeness: Also the following Posix headers are allowed:
> arpa/inet.h sys/mman.h
> sys/socket.h sys/stat.h
> sys/time.h
>
> I want to generate a list of functions and other features to avoid in
> order to be able to compile the code on C90 compilers. Thus, a list of
> the differences between the different version would be very helpful.


There are new headers in C99, so that is one major, fundamental
difference:
/*C90*/
<assert.h> <locale.h> <stddef.h>
<ctype.h> <math.h> <stdio.h>
<errno.h> <setjmp.h> <stdlib.h>
<float.h> <signal.h> <string.h>
<limits.h> <stdarg.h> <time.h>

/*C99*/
<assert.h> <inttypes.h> <signal.h> <stdlib.h>
<complex.h> <iso646.h> <stdarg.h> <string.h>
<ctype.h> <limits.h> <stdbool.h> <tgmath.h>
<errno.h> <locale.h> <stddef.h> <time.h>
<fenv.h> <math.h> <stdint.h> <wchar.h>
<float.h> <setjmp.h> <stdio.h> <wctype.h>

I think there was an addendum to C90 that added the wide char headers
at some point.


user923005 03-29-2007 08:13 PM

Re: List of differences in headers between C90 and C99?
 
Some header differences between C90 and C99 are discussed here under
section "Library":
http://home.tiscalinet.ch/t_wolf/tw/c/c9x_changes.html



Mark McIntyre 03-29-2007 09:34 PM

Re: List of differences in headers between C90 and C99?
 
On Thu, 29 Mar 2007 20:49:52 +0200, in comp.lang.c , Spiro Trikaliotis
<news-200605@trikaliotis.net> wrote:

>Hello,
>
>does anyone know of any list which presents the headers that differ
>between C90 and c99, and where they differ?


The clc wiki has links to several pages which tell you this in more
than adequate detail.
http://clc-wiki.net/wiki/The_C_Stand...ompatibilities

>did not find anything specific about the headers (and, thus, library
>functions).


Are you interested in the headers or the library functions? Either
way, the above will get you there.

>Why do I ask this? Here, there was a decision to use the following
>headers for a project which should be portable across Posix systems,
>only:


A lot of these are not C headers.

>mqueue.h
>pthread.h semaphore.h


like eg the above...
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan

P.J. Plauger 03-29-2007 11:47 PM

Re: List of differences in headers between C90 and C99?
 
"Spiro Trikaliotis" <news-200605@trikaliotis.net> wrote in message
news:slrnf0o2ig.ugn.news-200605@news.trikaliotis.net...

> does anyone know of any list which presents the headers that differ
> between C90 and c99, and where they differ? Searching on the web, I
> found many web sites about the differences between C90 and C99, but I
> did not find anything specific about the headers (and, thus, library
> functions).


See our online library reference. It identifies which headers are
added with C99, and which features in older headers are added with
C99.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com



Spiro Trikaliotis 03-30-2007 02:24 PM

Re: List of differences in headers between C90 and C99?
 
Hello,

I am answering to this posting in order to thank everyone who answered.
It was very helpful, thank you for your time.


Ian Collins: Yes, we already know that the newest Posix requires C99.
Anyway, we want to make sure that our programs work even on less than
that.

user923005: Thank you for your list.

Mark McIntyre: Thank you for pointing out the Wiki. I totally forgot
about that. - We are interested in the headers as well as the functions
in them. It seems I was not specific enough about that.


P.J. Plauger wrote:

> "Spiro Trikaliotis" <news-200605@trikaliotis.net> wrote in message
> news:slrnf0o2ig.ugn.news-200605@news.trikaliotis.net...


> See our online library reference. It identifies which headers are
> added with C99, and which features in older headers are added with
> C99.


This online library reference was very helpful. I was able to answer all
my questions. The only disadvantage is that it thought I was using some
tool to download everything, so I had to make a break.

Regards,
Spiro.

--
Spiro R. Trikaliotis http://opencbm.sf.net/
http://www.trikaliotis.net/ http://www.viceteam.org/


All times are GMT. The time now is 05:34 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57