diff options
author | Eric Blake <eblake@redhat.com> | 2010-12-24 13:39:50 -0700 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2010-12-24 13:39:50 -0700 |
commit | 7c98a69028588fa133a9ea1b1fdae8e121b06f9d (patch) | |
tree | 49d1ced6c6e50654b2e055a5e47ff9dff80b9f61 /lib/stdint.in.h | |
parent | ef974c7b427cfd907f960ac68f598ad1f712353f (diff) | |
download | gnulib-7c98a69028588fa133a9ea1b1fdae8e121b06f9d.tar.gz |
stdint: avoid HP-UX 10.20 preprocessor bug
* lib/stdint.in.h (INT64_MAX, UINT64_MAX): Check via #ifdef rather
than #if.
* tests/test-floor2.c (main): Likewise.
Reported by Peter O'Gorman.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'lib/stdint.in.h')
-rw-r--r-- | lib/stdint.in.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 70822b82d9..7270ad0b84 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -137,9 +137,10 @@ typedef unsigned int gl_uint32_t; /* If the system defines INT64_MAX, assume int64_t works. That way, if the underlying platform defines int64_t to be a 64-bit long long int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. */ + int, which would mess up C++ name mangling. We must use #ifdef + rather than #if, to avoid an error with HP-UX 10.20 cc. */ -#if INT64_MAX +#ifdef INT64_MAX # define GL_INT64_T #else /* Do not undefine int64_t if gnulib is not being used with 64-bit @@ -162,7 +163,7 @@ typedef long long int gl_int64_t; # endif #endif -#if UINT64_MAX +#ifdef UINT64_MAX # define GL_UINT64_T #else # if ULONG_MAX >> 31 >> 31 >> 1 == 1 |