From: Jim Meyering Date: Tue, 17 Sep 2002 14:41:43 +0000 (+0000) Subject: (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Define if necessary. X-Git-Tag: v4.5.2~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32af38ad7ffdf2f075390041848fca4feb8cb254;p=thirdparty%2Fcoreutils.git (PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX): Define if necessary. From gettext's intl/loadmsgcat.c. --- diff --git a/src/sys2.h b/src/sys2.h index 0ba910eb9e..0c1cef6e04 100644 --- a/src/sys2.h +++ b/src/sys2.h @@ -264,6 +264,23 @@ char *alloca (); # include /* for the definition of UINTMAX_MAX */ #endif +#if !defined PRIdMAX || PRI_MACROS_BROKEN +# undef PRIdMAX +# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld") +#endif +#if !defined PRIoMAX || PRI_MACROS_BROKEN +# undef PRIoMAX +# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo") +#endif +#if !defined PRIuMAX || PRI_MACROS_BROKEN +# undef PRIuMAX +# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu") +#endif +#if !defined PRIxMAX || PRI_MACROS_BROKEN +# undef PRIxMAX +# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx") +#endif + #include /* Jim Meyering writes: