Skip to content

Commit 370e16f

Browse files
committed
Get rid of __STDC_FORMAT_MACROS, __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS
This went into glibc 2.18, and posttypes.h from gcc >= 12.0 no longer defines them. See https://sourceware.org/bugzilla/show_bug.cgi?id=15366
1 parent b61299e commit 370e16f

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

include/inttypes.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@
2929
#include <stdint.h>
3030

3131

32-
/* The ISO C 9X standard specifies that these macros must only be
33-
defined if explicitly requested. */
34-
#if !defined __cplusplus || defined __STDC_FORMAT_MACROS
35-
3632
/* Macros for printing format specifiers. */
3733

3834
/* Decimal notation. */
@@ -479,8 +475,6 @@
479475
# define SCNxPTR "x"
480476
#endif
481477

482-
#endif /* C++ && format macros */
483-
484478

485479
__BEGIN_DECLS
486480

include/stdint.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,6 @@ typedef unsigned long int uintmax_t;
156156
#endif
157157

158158

159-
/* The ISO C 9X standard specifies that in C++ implementations these
160-
macros should only be defined if explicitly requested. */
161-
#if !defined __cplusplus || defined __STDC_LIMIT_MACROS
162-
163159
/* Limits of integral types. */
164160

165161
/* Minimum of signed integral types. */
@@ -337,12 +333,6 @@ typedef unsigned long int uintmax_t;
337333
# define WINT_MIN (__WINT_MIN__)
338334
# define WINT_MAX (__WINT_MAX__)
339335

340-
#endif /* C++ && limit macros */
341-
342-
343-
/* The ISO C 9X standard specifies that in C++ implementations these
344-
should only be defined if explicitly requested. */
345-
#if !defined __cplusplus || defined __STDC_CONSTANT_MACROS
346336

347337
/* Signed. */
348338
# define INT8_C(c) c
@@ -377,6 +367,4 @@ typedef unsigned long int uintmax_t;
377367
# define UINTMAC_C(c) c ## UL
378368
#endif
379369

380-
#endif /* C++ && constant macros */
381-
382370
#endif /* stdint.h */

0 commit comments

Comments
 (0)