Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > List of differences in headers between C90 and C99?

Reply
Thread Tools

List of differences in headers between C90 and C99?

 
 
Spiro Trikaliotis
Guest
Posts: n/a
 
      03-29-2007
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/
 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      03-29-2007
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.
 
Reply With Quote
 
 
 
 
user923005
Guest
Posts: n/a
 
      03-29-2007
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.

 
Reply With Quote
 
user923005
Guest
Posts: n/a
 
      03-29-2007
Some header differences between C90 and C99 are discussed here under
section "Library":
http://home.tiscalinet.ch/t_wolf/tw/c/c9x_changes.html


 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      03-29-2007
On Thu, 29 Mar 2007 20:49:52 +0200, in comp.lang.c , Spiro Trikaliotis
<news-> 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
 
Reply With Quote
 
P.J. Plauger
Guest
Posts: n/a
 
      03-29-2007
"Spiro Trikaliotis" <news-> wrote in message
news:slrnf0o2ig.ugn.news-...

> 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


 
Reply With Quote
 
Spiro Trikaliotis
Guest
Posts: n/a
 
      03-30-2007
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-> wrote in message
> news:slrnf0o2ig.ugn.news-...


> 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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DEVELOP THE WINNING EDGE, SMALL DIFFERENCES IN YOUR PERFORMANCE CANLEAD TO LARGE DIFFERENCES IN YOUR RESULTS Home_Job_opportunity C Programming 0 01-14-2009 03:51 PM
DEVELOP THE WINNING EDGE, SMALL DIFFERENCES IN YOUR PERFORMANCE CANLEAD TO LARGE DIFFERENCES IN YOUR RESULTS Home_Job_opportunity C Programming 0 01-08-2009 04:31 PM
Difference in horizontal and vertical resolution: 20D, Canon zoom, Celestron C90 jess Digital Photography 11 10-03-2005 12:04 AM
Char difference between C90 and C99 Jason Curl C Programming 11 06-24-2005 03:26 AM
Where I can find a list of differences between C89 and C99 ? Bob C Programming 2 03-22-2005 05:08 PM



Advertisments