Use 'defined _LP64'.
authorBruno Haible <bruno@clisp.org>
Fri, 27 Feb 2009 15:49:01 +0000 (16:49 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 27 Feb 2009 15:49:01 +0000 (16:49 +0100)
ChangeLog
lib/inttypes.in.h
lib/stdint.in.h

index 9946a0c..9791df7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-02-27  Bruno Haible  <bruno@clisp.org>
+
+       * lib/inttypes.in.h: Test merely whether _LP64 is defined, not its
+       value.
+       * lib/stdint.in.h: Likewise.
+       Suggested by Eric Blake. Reported by Peter Bray <pdb_ml@yahoo.com.au>.
+
+
 2009-02-27  Eric Blake  <ebb9@byu.net>
 
        doc: mention more functions added in cygwin 1.7.0
@@ -50,7 +58,7 @@
        See http://lists.gnu.org/archive/html/bug-gnulib/2009-02/msg00190.html.
 
 2009-02-26  Eric Blake  <ebb9@byu.net>
-           Bruno Haible  <bruno@clisp.org>
+            Bruno Haible  <bruno@clisp.org>
 
        Work around a *printf bug with %ls on Solaris.
        * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Also test whether, when a
index 33cec2d..7022ebc 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2008 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2009 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Derek Price.
    This file is part of gnulib.
 
 #  endif
 # endif
 # ifdef INT64_MAX
-#  if (@APPLE_UNIVERSAL_BUILD@ ? _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
 #   define _PRI64_PREFIX "l"
 #  elif defined _MSC_VER || defined __MINGW32__
 #   define _PRI64_PREFIX "I64"
 #  endif
 # endif
 # ifdef UINT64_MAX
-#  if (@APPLE_UNIVERSAL_BUILD@ ? _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
 #   define _PRIu64_PREFIX "l"
 #  elif defined _MSC_VER || defined __MINGW32__
 #   define _PRIu64_PREFIX "I64"
 #  endif
 # endif
 # ifdef INT64_MAX
-#  if (@APPLE_UNIVERSAL_BUILD@ ? _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
 #   define _SCN64_PREFIX "l"
 #  elif defined _MSC_VER || defined __MINGW32__
 #   define _SCN64_PREFIX "I64"
 #  endif
 # endif
 # ifdef UINT64_MAX
-#  if (@APPLE_UNIVERSAL_BUILD@ ? _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+#  if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
 #   define _SCNu64_PREFIX "l"
 #  elif defined _MSC_VER || defined __MINGW32__
 #   define _SCNu64_PREFIX "I64"
index 469a599..869bd3a 100644 (file)
@@ -435,7 +435,7 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
 #undef PTRDIFF_MIN
 #undef PTRDIFF_MAX
 #if @APPLE_UNIVERSAL_BUILD@
-# if _LP64
+# ifdef _LP64
 #  define PTRDIFF_MIN  _STDINT_MIN (1, 64, 0l)
 #  define PTRDIFF_MAX  _STDINT_MAX (1, 64, 0l)
 # else
@@ -463,7 +463,7 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
 /* size_t limit */
 #undef SIZE_MAX
 #if @APPLE_UNIVERSAL_BUILD@
-# if _LP64
+# ifdef _LP64
 #  define SIZE_MAX  _STDINT_MAX (0, 64, 0ul)
 # else
 #  define SIZE_MAX  _STDINT_MAX (0, 32, 0ul)