[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stdint_.h vs intmax_t & uintmax_t
From: |
Mark D. Baushke |
Subject: |
stdint_.h vs intmax_t & uintmax_t |
Date: |
Mon, 14 Nov 2005 14:02:33 -0800 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have run into a quirk of GNULIB building CVS on a FreeBSD 4.2 host.
It seems that CVS is using m4/intmax.m4 which generate these lines
into the config.h file:
/* Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>. */
/* The size of a `intmax_t', as computed by sizeof. */
/* Define if intmax_t is the first integer type detected with its size. */
#define intmax_t long long
#define uintmax_t unsigned long long
However, the stdint_.h file has the lines
typedef int32_t intmax_t;
typedef uint32_t uintmax_t;
which can cause a problem...
Observation: On a FreeBSD 4.2-RELEASE host, I get the following warnings
when building the md5.c file on the CVS mainline sources...
The problem arises from these two lines
typedef int32_t intmax_t;
typedef uint32_t uintmax_t;
being expanded into these two lines:
typedef int32_t long long ;
typedef uint32_t unsigned long long ;
which is clearly not going to do the right thing.
I believe this should probably fixed in the GNULIB sources, but I do not
know what the best fix to suggest might be.
Thank you,
-- Mark
source='../../lib/md5.c' object='md5.o' libtool=no \
DEPDIR=.deps depmode=gcc /bin/bash ../../build-aux/depcomp \
gcc -DHAVE_CONFIG_H -I. -I../../lib -I.. -I/usr/local/include -Ino/include
-g -O2 -c ../../lib/md5.c
In file included from ../../lib/md5.h:25,
from ../../lib/md5.c:27:
stdint.h:233: warning: `SIZE_MAX' redefined
../config.h:1002: warning: this is the location of the previous definition
In file included from ../../lib/md5.h:25,
from ../../lib/md5.c:27:
stdint.h:139: warning: useless keyword or type name in empty declaration
stdint.h:139: warning: empty declaration
stdint.h:140: warning: useless keyword or type name in empty declaration
stdint.h:140: warning: empty declaration
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQFDeQl4Cg7APGsDnFERAlaKAKCDLPQUz11oa9r5z3IGXHJcikv6IQCg1z2i
iiYurCyKXy9MTAfP6Xk5CZ0=
=7vDV
-----END PGP SIGNATURE-----
- stdint_.h vs intmax_t & uintmax_t,
Mark D. Baushke <=