Support 'j' size specifier on all platforms.
authorBruno Haible <bruno@clisp.org>
Mon, 26 Mar 2007 00:14:00 +0000 (00:14 +0000)
committerBruno Haible <bruno@clisp.org>
Mon, 26 Mar 2007 00:14:00 +0000 (00:14 +0000)
ChangeLog
lib/printf-parse.c
modules/vasnprintf

index 4ca6de2..aeabcc0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-03-25  Bruno Haible  <bruno@clisp.org>
 
+       * lib/printf-parse.c [!IN_LIBINTL]: Include <stdint.h>, for intmax_t.
+       (PRINTF_PARSE): Make the support for size specifier 'j' unconditional.
+       * modules/vasnprintf (Depends-on): Add stdint.
+
+2007-03-25  Bruno Haible  <bruno@clisp.org>
+
        * modules/fpieee: New file.
        * m4/fpieee.m4: New file.
        * modules/isnan-nolibm (Depends-on): Add fpieee.
index f5cdb6e..ff49404 100644 (file)
 #include <stddef.h>
 
 /* Get intmax_t.  */
-#if HAVE_STDINT_H_WITH_UINTMAX
+#ifdef IN_LIBINTL
+# if HAVE_STDINT_H_WITH_UINTMAX
+#  include <stdint.h>
+# endif
+# if HAVE_INTTYPES_H_WITH_UINTMAX
+#  include <inttypes.h>
+# endif
+#else
 # include <stdint.h>
 #endif
-#if HAVE_INTTYPES_H_WITH_UINTMAX
-# include <inttypes.h>
-#endif
 
 /* malloc(), realloc(), free().  */
 #include <stdlib.h>
@@ -326,7 +330,6 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                      flags += 8;
                      cp++;
                    }
-#if HAVE_INTMAX_T
                  else if (*cp == 'j')
                    {
                      if (sizeof (intmax_t) > sizeof (long))
@@ -341,7 +344,6 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                        }
                      cp++;
                    }
-#endif
                  else if (*cp == 'z' || *cp == 'Z')
                    {
                      /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
index ff78604..21e2048 100644 (file)
@@ -22,6 +22,7 @@ m4/vasnprintf.m4
 
 Depends-on:
 alloca-opt
+stdint
 xsize
 
 configure.ac: