mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 22:33:08 +00:00
glibc patch: add backwards compatibility for strtol-family functions
following suit from b40943e253c079ec3de1b149dd2ef0ccc3da38a4, add a version guard in addition to the ISOC2X check.
This commit is contained in:
parent
78f2ae7f29
commit
0afead5651
8
lib/libc/include/generic-glibc/features.h
vendored
8
lib/libc/include/generic-glibc/features.h
vendored
@ -469,6 +469,11 @@
|
|||||||
# define __GLIBC_USE_DEPRECATED_SCANF 0
|
# define __GLIBC_USE_DEPRECATED_SCANF 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* support for ISO C2X strtol was added in 2.38
|
||||||
|
* glibc commit 64924422a99690d147a166b4de3103f3bf3eaf6c
|
||||||
|
*/
|
||||||
|
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 38) || __GLIBC__ > 2
|
||||||
/* ISO C2X added support for a 0b or 0B prefix on binary constants as
|
/* ISO C2X added support for a 0b or 0B prefix on binary constants as
|
||||||
inputs to strtol-family functions (base 0 or 2). This macro is
|
inputs to strtol-family functions (base 0 or 2). This macro is
|
||||||
used to condition redirection in headers to allow that redirection
|
used to condition redirection in headers to allow that redirection
|
||||||
@ -479,6 +484,9 @@
|
|||||||
#else
|
#else
|
||||||
# define __GLIBC_USE_C2X_STRTOL 0
|
# define __GLIBC_USE_C2X_STRTOL 0
|
||||||
#endif
|
#endif
|
||||||
|
#else /* glibc 2.37 or lower */
|
||||||
|
# define __GLIBC_USE_C2X_STRTOL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Get definitions of __STDC_* predefined macros, if the compiler has
|
/* Get definitions of __STDC_* predefined macros, if the compiler has
|
||||||
not preincluded this header automatically. */
|
not preincluded this header automatically. */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user