From: Ulrich Drepper Date: Sat, 7 Jan 2012 15:41:00 +0000 (-0500) Subject: Do not declare gets in _GNU_SOURCE mode at all X-Git-Tag: glibc-2.16-tps~1121 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=c3a87236702cb73be1dada3438bbd3c3934e83f8;p=glibc.git Do not declare gets in _GNU_SOURCE mode at all --- diff --git a/ChangeLog b/ChangeLog index 8f9558c565..f089e19b87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2012-01-07 Ulrich Drepper + * libio/stdio.h: Do not declare gets at all for _GNU_SOURCE. + * elf/tst-unique3.cc: Add explicit declaration of gets. * elf/tst-unique3lib.cc: Likewise. * elf/tst-unique3lib2.cc: Likewise. diff --git a/libio/stdio.h b/libio/stdio.h index d9cb573b6b..28c98e9163 100644 --- a/libio/stdio.h +++ b/libio/stdio.h @@ -629,7 +629,7 @@ extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) __wur; #if !defined __USE_ISOC11 \ - || (defined __cplusplus && __cplusplus <= 201103L) + || (defined __cplusplus && __cplusplus <= 201103L && !defined __USE_GNU) /* Get a newline-terminated string from stdin, removing the newline. DO NOT USE THIS FUNCTION!! There is no limit on how much it will read.