-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Bruno,
No values are assigned to some of the BITSIZEOF_* macros in the config.h file: /* Define to the number of bits in type 'int_fast16_t'. */ /* #undef BITSIZEOF_INT_FAST16_T */ /* Define to the number of bits in type 'int_fast32_t'. */ /* #undef BITSIZEOF_INT_FAST32_T */ /* Define to the number of bits in type 'int_fast64_t'. */ /* #undef BITSIZEOF_INT_FAST64_T */ /* Define to the number of bits in type 'int_fast8_t'. */ /* #undef BITSIZEOF_INT_FAST8_T */ /* Define to the number of bits in type 'uint_fast16_t'. */ /* #undef BITSIZEOF_UINT_FAST16_T */ /* Define to the number of bits in type 'uint_fast32_t'. */ /* #undef BITSIZEOF_UINT_FAST32_T */ /* Define to the number of bits in type 'uint_fast64_t'. */ /* #undef BITSIZEOF_UINT_FAST64_T */ /* Define to the number of bits in type 'uint_fast8_t'. */ /* #undef BITSIZEOF_UINT_FAST8_T */ which leads to interesting substitutions in the generated Makefile BITSIZEOF_INT16_T = 16 BITSIZEOF_INT32_T = 32 BITSIZEOF_INT64_T = 64 BITSIZEOF_INT8_T = 8 BITSIZEOF_INTMAX_T = 64 BITSIZEOF_INTPTR_T = 32 BITSIZEOF_INT_FAST16_T = BITSIZEOF_INT_FAST32_T = BITSIZEOF_INT_FAST64_T = BITSIZEOF_INT_FAST8_T = BITSIZEOF_INT_LEAST16_T = 16 BITSIZEOF_INT_LEAST32_T = 32 BITSIZEOF_INT_LEAST64_T = 64 BITSIZEOF_INT_LEAST8_T = 8 BITSIZEOF_LONG = 32 BITSIZEOF_PTRDIFF_T = 32 BITSIZEOF_SIG_ATOMIC_T = 32 BITSIZEOF_SIZE_T = 32 BITSIZEOF_UINT16_T = 16 BITSIZEOF_UINT32_T = 32 BITSIZEOF_UINT64_T = 64 BITSIZEOF_UINT8_T = 8 BITSIZEOF_UINTMAX_T = 64 BITSIZEOF_UINTPTR_T = 32 BITSIZEOF_UINT_FAST16_T = BITSIZEOF_UINT_FAST32_T = BITSIZEOF_UINT_FAST64_T = BITSIZEOF_UINT_FAST8_T = BITSIZEOF_UINT_LEAST16_T = 16 BITSIZEOF_UINT_LEAST32_T = 32 BITSIZEOF_UINT_LEAST64_T = 64 BITSIZEOF_UINT_LEAST8_T = 8 BITSIZEOF_UNSIGNED_INT = 32 BITSIZEOF_UNSIGNED_LONG = 32 BITSIZEOF_WCHAR_T = 32 BITSIZEOF_WINT_T = 32 and is propagated into the stdint.h file. For example, on a machine which does not define UINT_FAST16_MAX (Solaris 9), I see the following: #if 0 # ifndef UINT_FAST16_MAX # if < 32 # define UINT_FAST16_MAX (((1 << ( - 1)) - 1) * 2 + 1) # else # define UINT_FAST16_MAX (((1UL << ( - 1)) - 1) * 2 + 1) # endif # endif #else # if _STDINT_H_INT64_FASTER_THAN_INT32 # define UINT_FAST16_MAX UINT64_MAX # else # define UINT_FAST16_MAX UINT32_MAX # endif #endif I am not at all certain that all compilers will ignore illegal preprocessor expressions in a '#if 0' block. So, should some other expression for '# if < 32' be generated? -- Mark Bruno Haible <[EMAIL PROTECTED]> writes: > Mark D. Baushke wrote: > > This rewrite works for FreeBSD 4.2, FreeBSD 5.2, FreeBSD 6.1. > > After > - rewriting it again to produce a standalone stdint.h (that doesn't > need anything from config.h), > - reducing the generated configure shell code, using Ralf's trick, > - adding a test suite module, > - further testing, I committed this rewrite. > > Happy using <stdint.h> ! > > Bruno > > > 2006-06-15 Bruno Haible <[EMAIL PROTECTED]> > > * modules/stdint (Files): Include m4/full-header-path.m4, > m4/size_max.m4, m4/wchar_t.m4. > (Makefile.am): Many more substitutions. > * modules/stdint-tests: New file. > * tests/test-stdint.c: New file. > * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h. > (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES, > gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS, > gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED, > gl_CHECK_TYPE_SAME): New macros. > * lib/stdint_.h: Rewritten to be fully auto-configured. > Fixes bug on HP-UX/IA64. > ... -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFEktfHCg7APGsDnFERAiXMAJ4nL1L7mB4K/p7aCSwTJGFoOV6J7wCfWnQJ ZrzW/jCthAGJpsdAoau34Nw= =X3Pe -----END PGP SIGNATURE-----