This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.5 C] Provide <stdint.h> (bug 448)
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, bkorb at gnu dot org
- Date: Thu, 30 Apr 2009 12:09:36 +0200
- Subject: Re: [4.5 C] Provide <stdint.h> (bug 448)
- References: <Pine.LNX.4.64.0811080004030.19936@digraph.polyomino.org.uk>
> I have included definitions of the types for glibc/uClibc, newlib and
> Solaris. For Solaris, I have presumed that Solaris 9 is like Solaris
> 8 in not having a system <stdint.h> header (I only have access to 8
> and 10, not 9).
Another glitch on Solaris 8 and 9, visible as libstdc++ failures:
/nile.build/botcazou/gcc-head/sparc-sun-solaris2.8/./gcc/include/stdint.h:91:
error: conflicting declaration 'typedef long long int intmax_t'^M
/nile.build/botcazou/gcc-head/sparc-sun-solaris2.8/./gcc/include-fixed/sys/int_\
types.h:106: error: 'intmax_t' has a previous declaration as 'typedef int32_t
intmax_t'^M
The latter file has:
/*
* intmax_t and uintmax_t are to be the longest (in number of bits) signed
* and unsigned integer types supported by the implementation.
*/
#if defined(_LP64) || ( !defined(__STRICT_ANSI__) && !defined(_NO_LONGLONG))
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
#else
typedef int32_t intmax_t;
typedef uint32_t uintmax_t;
#endif
What's the proper solution?
--
Eric Botcazou