List of differences in headers between C90 and C99?

Discussion in 'C Programming' started by Spiro Trikaliotis, Mar 29, 2007.

  1. 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/
     
    Spiro Trikaliotis, Mar 29, 2007
    #1
    1. Advertising

  2. Spiro Trikaliotis

    Ian Collins Guest

    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.
     
    Ian Collins, Mar 29, 2007
    #2
    1. Advertising

  3. Spiro Trikaliotis

    user923005 Guest

    On Mar 29, 11:49 am, 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:
    >
    > 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, Mar 29, 2007
    #3
  4. Spiro Trikaliotis

    user923005 Guest

    user923005, Mar 29, 2007
    #4
  5. On Thu, 29 Mar 2007 20:49:52 +0200, in comp.lang.c , Spiro Trikaliotis
    <> 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_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
     
    Mark McIntyre, Mar 29, 2007
    #5
  6. Spiro Trikaliotis

    P.J. Plauger Guest

    "Spiro Trikaliotis" <> wrote in message
    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
     
    P.J. Plauger, Mar 30, 2007
    #6
  7. 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" <> wrote in message
    > 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/
     
    Spiro Trikaliotis, Mar 30, 2007
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bernard

    Is these functions C90 and/or C99 ?

    Bernard, Jun 23, 2004, in forum: C Programming
    Replies:
    3
    Views:
    1,236
    E. Robert Tisdale
    Jun 24, 2004
  2. Bob
    Replies:
    2
    Views:
    380
  3. Jason Curl

    Char difference between C90 and C99

    Jason Curl, Jun 21, 2005, in forum: C Programming
    Replies:
    11
    Views:
    801
  4. Pedro Graca

    size_t and C90/C99

    Pedro Graca, Feb 11, 2006, in forum: C Programming
    Replies:
    7
    Views:
    1,719
    Keith Thompson
    Feb 12, 2006
  5. dspfun

    Questions about C90 vs C99

    dspfun, Dec 10, 2007, in forum: C Programming
    Replies:
    15
    Views:
    2,183
    Nick Keighley
    Dec 12, 2007
Loading...

Share This Page