mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(PRIdMAX, PRIoMAX, PRIuMAX, PRIxMAX):
Define to a concatenation of string literals, not to an expression; needed for concatenation contexts. (INTMAX_MAX, INTMAX_MIN): New macros.
This commit is contained in:
1 parent
4e3640a010
commit
01b9ae45c6
1 file changed
+26
-11
+26
-11
@@ -369,21 +369,28 @@ initialize_exit_failure (int status)
|
||||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#if !defined PRIdMAX || PRI_MACROS_BROKEN
|
||||
#if ULONG_MAX < ULLONG_MAX
|
||||
# define LONGEST_MODIFIER "ll"
|
||||
#else
|
||||
# define LONGEST_MODIFIER "l"
|
||||
#endif
|
||||
#if PRI_MACROS_BROKEN
|
||||
# undef PRIdMAX
|
||||
# define PRIdMAX (sizeof (uintmax_t) == sizeof (long int) ? "ld" : "lld")
|
||||
#endif
|
||||
#if !defined PRIoMAX || PRI_MACROS_BROKEN
|
||||
# undef PRIoMAX
|
||||
# define PRIoMAX (sizeof (uintmax_t) == sizeof (long int) ? "lo" : "llo")
|
||||
#endif
|
||||
#if !defined PRIuMAX || PRI_MACROS_BROKEN
|
||||
# undef PRIuMAX
|
||||
# define PRIuMAX (sizeof (uintmax_t) == sizeof (long int) ? "lu" : "llu")
|
||||
#endif
|
||||
#if !defined PRIxMAX || PRI_MACROS_BROKEN
|
||||
# undef PRIxMAX
|
||||
# define PRIxMAX (sizeof (uintmax_t) == sizeof (long int) ? "lx" : "llx")
|
||||
#endif
|
||||
#ifndef PRIdMAX
|
||||
# define PRIdMAX LONGEST_MODIFIER "d"
|
||||
#endif
|
||||
#ifndef PRIoMAX
|
||||
# define PRIoMAX LONGEST_MODIFIER "o"
|
||||
#endif
|
||||
#ifndef PRIuMAX
|
||||
# define PRIuMAX LONGEST_MODIFIER "u"
|
||||
#endif
|
||||
#ifndef PRIxMAX
|
||||
# define PRIxMAX LONGEST_MODIFIER "x"
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
@@ -683,6 +690,14 @@ enum
|
||||
# define INT_MIN TYPE_MINIMUM (int)
|
||||
#endif
|
||||
|
||||
#ifndef INTMAX_MAX
|
||||
# define INTMAX_MAX TYPE_MAXIMUM (intmax_t)
|
||||
#endif
|
||||
|
||||
#ifndef INTMAX_MIN
|
||||
# define INTMAX_MIN TYPE_MINIMUM (intmax_t)
|
||||
#endif
|
||||
|
||||
#ifndef UINT_MAX
|
||||
# define UINT_MAX TYPE_MAXIMUM (unsigned int)
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user