Commit 702edf39 by John David Anglin Committed by Richard Henderson

John David Anglin <dave@hiauly1.hia.nrc.ca>

        * gettext.h (nls_uint32): Choose via INT_MAX instead of UINT_MAX.

From-SVN: r36180
parent 53c5b5d7
2000-09-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
* gettext.h (nls_uint32): Choose via INT_MAX instead of UINT_MAX.
2000-08-02 Zack Weinberg <zack@wolery.cumb.org> 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
* dcgettext.c (find_msg): Initialize act before loop. * dcgettext.c (find_msg): Initialize act before loop.
......
...@@ -39,30 +39,27 @@ ...@@ -39,30 +39,27 @@
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
doing that would require that the configure script compile and *run* doing that would require that the configure script compile and *run*
the resulting executable. Locally running cross-compiled executables the resulting executable. Locally running cross-compiled executables
is usually not possible. */ is usually not possible. We use the maximum values for signed int's
for the test to avoid using `U' suffixes. */
#if __STDC__ #define INT_MAX_32_BITS 2147483647
# define UINT_MAX_32_BITS 4294967295U
#else
# define UINT_MAX_32_BITS 0xFFFFFFFF
#endif
/* If UINT_MAX isn't defined, assume it's a 32-bit type. /* If INT_MAX isn't defined, assume it's a 32-bit type.
This should be valid for all systems GNU cares about because This should be valid for all systems GNU cares about because
that doesn't include 16-bit systems, and only modern systems that doesn't include 16-bit systems, and only modern systems
(that certainly have <limits.h>) have 64+-bit integral types. */ (that certainly have <limits.h>) have 64+-bit integral types. */
#ifndef UINT_MAX #ifndef INT_MAX
# define UINT_MAX UINT_MAX_32_BITS # define INT_MAX INT_MAX_32_BITS
#endif #endif
#if UINT_MAX == UINT_MAX_32_BITS #if INT_MAX == INT_MAX_32_BITS
typedef unsigned nls_uint32; typedef unsigned nls_uint32;
#else #else
# if USHRT_MAX == UINT_MAX_32_BITS # if SHRT_MAX == INT_MAX_32_BITS
typedef unsigned short nls_uint32; typedef unsigned short nls_uint32;
# else # else
# if ULONG_MAX == UINT_MAX_32_BITS # if LONG_MAX == INT_MAX_32_BITS
typedef unsigned long nls_uint32; typedef unsigned long nls_uint32;
# else # else
/* The following line is intended to throw an error. Using #error is /* The following line is intended to throw an error. Using #error is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment