| ... | ... | @@ -159,6 +159,14 @@ |
| 159 | 159 | # define __KERNEL_STRICT_NAMES |
| 160 | 160 | #endif |
| 161 | 161 | |
| 162 | /* Major and minor version number of the GNU C library package. Use |
| 163 | these macros to test for features in specific releases. */ |
| 164 | #define	__GLIBC__	2 |
| 165 | /* Zig patch: we pass `-D__GLIBC_MINOR__=XX` depending on the target. */ |
| 166 | |
| 167 | #define __GLIBC_PREREQ(maj, min) \ |
| 168 | 	((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) |
| 169 | |
| 162 | 170 | /* Convenience macro to test the version of gcc. |
| 163 | 171 | Use like this: |
| 164 | 172 | #if __GNUC_PREREQ (2,8) |
| ... | ... | @@ -460,7 +468,10 @@ |
| 460 | 468 | instance, with GCC, -std=gnu11 will have C99-compliant scanf with |
| 461 | 469 | or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the |
| 462 | 470 | old extension. */ |
| 463 | | #if (defined __USE_GNU							\ |
| 471 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7) |
| 472 | /* support for ISOC99 was added in glibc-2.7 */ |
| 473 | # define __GLIBC_USE_DEPRECATED_SCANF 1 |
| 474 | #elif (defined __USE_GNU							\ |
| 464 | 475 | && (defined __cplusplus						\ |
| 465 | 476 | 	 ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \ |
| 466 | 477 | 	 : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L))) |
| ... | ... | @@ -501,14 +512,6 @@ |
| 501 | 512 | #undef __GNU_LIBRARY__ |
| 502 | 513 | #define __GNU_LIBRARY__ 6 |
| 503 | 514 | |
| 504 | | /* Major and minor version number of the GNU C library package. Use |
| 505 | | these macros to test for features in specific releases. */ |
| 506 | | #define	__GLIBC__	2 |
| 507 | | /* Zig patch: we pass `-D__GLIBC_MINOR__=XX` depending on the target. */ |
| 508 | | |
| 509 | | #define __GLIBC_PREREQ(maj, min) \ |
| 510 | | 	((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) |
| 511 | | |
| 512 | 515 | /* This is here only because every header file already includes this one. */ |
| 513 | 516 | #ifndef __ASSEMBLER__ |
| 514 | 517 | # ifndef _SYS_CDEFS_H |