List of differences in headers between C90 and C99?

S

Spiro Trikaliotis

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.
 
I

Ian Collins

Spiro said:
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>
 
U

user923005

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.
 
M

Mark McIntyre

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_Standard#Commentary.2C_differences_and_incompatibilities
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

P.J. Plauger

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
 
S

Spiro Trikaliotis

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 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top