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 9946a0c71a36ae37f60b02d1f9b81ee7cde28254..9791df77d1911eb34dc77a78b17a5f8cbb0ea09f 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
 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>
        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
 
        Work around a *printf bug with %ls on Solaris.
        * m4/printf.m4 (gl_PRINTF_DIRECTIVE_LS): Also test whether, when a
index 33cec2d258c86c7c4fe6a4c92b08dde0d80f8375..7022ebc354cb529b862b2faded233cc6e1b970fd 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.
 
    Written by Paul Eggert, Bruno Haible, Derek Price.
    This file is part of gnulib.
 
 #  endif
 # endif
 # ifdef INT64_MAX
 #  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"
 #   define _PRI64_PREFIX "l"
 #  elif defined _MSC_VER || defined __MINGW32__
 #   define _PRI64_PREFIX "I64"
 #  endif
 # endif
 # ifdef UINT64_MAX
 #  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"
 #   define _PRIu64_PREFIX "l"
 #  elif defined _MSC_VER || defined __MINGW32__
 #   define _PRIu64_PREFIX "I64"
 #  endif
 # endif
 # ifdef INT64_MAX
 #  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"
 #   define _SCN64_PREFIX "l"
 #  elif defined _MSC_VER || defined __MINGW32__
 #   define _SCN64_PREFIX "I64"
 #  endif
 # endif
 # ifdef UINT64_MAX
 #  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"
 #   define _SCNu64_PREFIX "l"
 #  elif defined _MSC_VER || defined __MINGW32__
 #   define _SCNu64_PREFIX "I64"
index 469a599aeb3111b084f2794e8ba8d860698cdebc..869bd3a7fff1e33f61e87b66b2ff3b5a35be3293 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@
 #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
 #  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@
 /* 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)
 #  define SIZE_MAX  _STDINT_MAX (0, 64, 0ul)
 # else
 #  define SIZE_MAX  _STDINT_MAX (0, 32, 0ul)