authorgravatar for markus@oberhumer.comMarkus F.X.J. Oberhumer <markus@oberhumer.com> 2024-01-25 15:29:36+01:00
committergravatar for markus@oberhumer.comMarkus F.X.J. Oberhumer <markus@oberhumer.com> 2024-01-25 15:29:36+01:00
logfc72630d0f86499ea154f985b8588999dc47c53d
tree1bcbd0638e102ce70168c17a4bf081a9209b2c06
parentc63216441c1eda65197581f1c0260e5ccdb970b8

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
...@@ -468,7 +468,10 @@...@@ -468,7 +468,10 @@
468 instance, with GCC, -std=gnu11 will have C99-compliant scanf with468 instance, with GCC, -std=gnu11 will have C99-compliant scanf with
469 or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the469 or without -D_GNU_SOURCE, but -std=c89 -D_GNU_SOURCE will have the
470 old extension. */470 old extension. */
471#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 \
472 && (defined __cplusplus \475 && (defined __cplusplus \
473 ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \476 ? (__cplusplus < 201103L && !defined __GXX_EXPERIMENTAL_CXX0X__) \
474 : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L)))477 : (!defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L)))