[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stdint module on SGI
From: |
Larry Jones |
Subject: |
Re: stdint module on SGI |
Date: |
Fri, 23 Jun 2006 17:44:41 -0400 (EDT) |
Bruno Haible writes:
>
> Mark D. Baushke wrote:
> >
> > cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
> > #error directive: This header file is to be used only for c99 mode
> > compilations
> >
> > #error This header file is to be used only for c99 mode compilations
> > ^
> >
> > right now. It might be nice if just the existence of <stdint.h> did not
> > imply that it was useful to the compiler...
>
> Well, that's not the case currently: I assume that when you check
> for <stdint.h> using autoconf's AC_CHECK_HEADERS, it will tell you that
> the file exists?
It does -- since SGI chose to make #error just a warning, autoconf
doesn't notice it.
> Hmm, is it nevertheless safe to leave this file aside
> and do as you propose?
>
> #if @HAVE_STDINT_H@
> /* Other systems may have an incomplete <stdint.h>. */
> -# include @FULL_PATH_STDINT_H@
> +# if !defined(__sgi) || !@HAVE_INTTYPES_H@
> +# include @FULL_PATH_STDINT_H@
> +# endif
> #endif
It is. On SGI, once <inttypes.h> has been included, there's nothing to
be gained by including <stdint.h> as well. (The "|| !@HAVE_INTTYPES_H@"
is probably specious since <inttypes.h> predates <stdint.h> on SGI.)
> "<inttypes.h> is supposed to include# <stdint.h>", but the reality is
> different. <inttypes.h> was introduced several years earlier than
> <stdint.h>.
But <stdint.h> was created by extracting the language-related stuff from
<inttypes.h> and requiring <inttypes.h> to include <stdint.h> so that
existing code would continue to get everything without having to include
an additional header. Given that history, I would be very surprised to
find a system where there's any benefit at all to including <stdint.h>
along with <inttypes.h>. If anyone knows of one, please speak up.
-Larry Jones
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. -- Calvin
- stdint module on SGI, Mark D. Baushke, 2006/06/21
- Re: stdint module on SGI, Bruno Haible, 2006/06/23
- Re: stdint module on SGI,
Larry Jones <=
- Re: stdint module on SGI, Mark D. Baushke, 2006/06/23
- Re: stdint module on SGI, Larry Jones, 2006/06/23
- Re: stdint module on SGI, Bruno Haible, 2006/06/26
- Re: stdint module on SGI, Bruno Haible, 2006/06/26
- Re: stdint module on SGI, Larry Jones, 2006/06/26
- Re: stdint module on SGI, Mark D. Baushke, 2006/06/26
- Re: stdint module on SGI, Bruno Haible, 2006/06/26
- Re: stdint module on SGI, Mark D. Baushke, 2006/06/26
- Re: stdint module on SGI, Bruno Haible, 2006/06/26
- Re: stdint module on SGI, Bruno Haible, 2006/06/26