From 65ed3a594022f9becd496c5118fbd9b92a80205c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 26 Mar 2007 00:14:00 +0000 Subject: [PATCH] Support 'j' size specifier on all platforms. --- ChangeLog | 6 ++++++ lib/printf-parse.c | 14 ++++++++------ modules/vasnprintf | 1 + 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4ca6de293..aeabcc00d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-03-25 Bruno Haible + * lib/printf-parse.c [!IN_LIBINTL]: Include , for intmax_t. + (PRINTF_PARSE): Make the support for size specifier 'j' unconditional. + * modules/vasnprintf (Depends-on): Add stdint. + +2007-03-25 Bruno Haible + * modules/fpieee: New file. * m4/fpieee.m4: New file. * modules/isnan-nolibm (Depends-on): Add fpieee. diff --git a/lib/printf-parse.c b/lib/printf-parse.c index f5cdb6e5b..ff494044f 100644 --- a/lib/printf-parse.c +++ b/lib/printf-parse.c @@ -28,12 +28,16 @@ #include /* Get intmax_t. */ -#if HAVE_STDINT_H_WITH_UINTMAX +#ifdef IN_LIBINTL +# if HAVE_STDINT_H_WITH_UINTMAX +# include +# endif +# if HAVE_INTTYPES_H_WITH_UINTMAX +# include +# endif +#else # include #endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -# include -#endif /* malloc(), realloc(), free(). */ #include @@ -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' diff --git a/modules/vasnprintf b/modules/vasnprintf index ff78604d4..21e20480c 100644 --- a/modules/vasnprintf +++ b/modules/vasnprintf @@ -22,6 +22,7 @@ m4/vasnprintf.m4 Depends-on: alloca-opt +stdint xsize configure.ac: -- 2.11.0