summaryrefslogtreecommitdiff
path: root/lib/printf-parse.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2007-03-26 00:14:00 +0000
committerBruno Haible <bruno@clisp.org>2007-03-26 00:14:00 +0000
commit65ed3a594022f9becd496c5118fbd9b92a80205c (patch)
treeeaa8731dd2cfd978853ae263bfe881b3d4074fff /lib/printf-parse.c
parentcbda7205fd670a9d63b8fbfd02f6fff81c142fd4 (diff)
downloadgnulib-65ed3a594022f9becd496c5118fbd9b92a80205c.tar.gz
Support 'j' size specifier on all platforms.
Diffstat (limited to 'lib/printf-parse.c')
-rw-r--r--lib/printf-parse.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/printf-parse.c b/lib/printf-parse.c
index f5cdb6e5b5..ff494044f5 100644
--- a/lib/printf-parse.c
+++ b/lib/printf-parse.c
@@ -28,12 +28,16 @@
#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'