authorgravatar for markus@oberhumer.comMarkus F.X.J. Oberhumer <markus@oberhumer.com> 2024-01-25 15:29:36+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-06-05 22:43:53-07:00
log4c2e57d4066692f4e0577cc46925cf7b76222202
tree4c2a960b2af1edd359235eaf845448f54558e4a2
parenta8db261ebb6ffb0ac2145190532cdbeefdc15cb9

glibc: use __GLIBC_USE_DEPRECATED_SCANF for glibc versions < 2.7


1 files changed, 4 insertions(+), 1 deletions(-)

lib/libc/include/generic-glibc/features.h+4-1
......@@ -469,7 +469,10 @@
469469 instance, with GCC, -std=gnu11 will have C99-compliant scanf with
470470 or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
471471 old extension. */
472#if (defined __USE_GNU \
472#if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)
473/* support for ISOC99 was added in glibc-2.7 */
474# define __GLIBC_USE_DEPRECATED_SCANF 1
475#elif (defined __USE_GNU \
473476 && (defined __cplusplus \
474477 ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \
475478 : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L)))