We define this macro after including the systems limits.h header which
may define this macro. Using glibc-2.43, for example, before this patch
every file that included limits.h would emit a warning if
-Wsystem-headers was in use.
PR c/125161
gcc/
* glimits.h (__STDC_VERSION_LIMITS_H__): Only define the macro
if it was not already defined.
Signed-off-by: Collin Funk <collin.funk1@gmail.com>
# define BITINT_MAXWIDTH __BITINT_MAXWIDTH__
# endif
-# define __STDC_VERSION_LIMITS_H__ 202311L
+# ifndef __STDC_VERSION_LIMITS_H__
+# define __STDC_VERSION_LIMITS_H__ 202311L
+# endif
#endif
#endif /* _LIMITS_H___ */