From 03a718297d64e68efb36069b0cc14c1039f32d89 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 23 Dec 2011 22:59:38 -0500 Subject: [PATCH] Remove gets declaration --- ChangeLog | 3 +++ NEWS | 2 +- libio/stdio.h | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c85afad..6be3d32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -28,6 +28,9 @@ 2011-12-23 Ulrich Drepper + [BZ #13528] + * libio/stdio.h: Do not declare gets for ISO C11 and _GNU_SOURCE. + [BZ #13529] * assert/assert.h (static_assert): Define. diff --git a/NEWS b/NEWS index b276f31..c22df47 100644 --- a/NEWS +++ b/NEWS @@ -9,7 +9,7 @@ Version 2.16 * The following bugs are resolved with this release: - 13526, 13529 + 13526, 13528, 13529 Version 2.15 diff --git a/libio/stdio.h b/libio/stdio.h index 8e23903..3656bb5 100644 --- a/libio/stdio.h +++ b/libio/stdio.h @@ -628,12 +628,18 @@ __BEGIN_NAMESPACE_STD extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) __wur; +#ifndef __USE_ISOC11 /* 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. + The function has been officially removed in ISO C11. This opportunity + is used to also remove it from the GNU feature list. It is now only + available when explicitly using an old ISO C, Unix, or POSIX standard. + This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *gets (char *__s) __wur; +#endif __END_NAMESPACE_STD #ifdef __USE_GNU -- 2.7.4