1
Description: Avoid assuming that gets is declared
2
Origin: backport, http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=66712c23388e93e5c518ebc8515140fa0c807348
4
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/4611
5
Last-Update: 2012-12-28
7
Index: b/grub-core/gnulib/stdio.in.h
8
===================================================================
9
--- a/grub-core/gnulib/stdio.in.h
10
+++ b/grub-core/gnulib/stdio.in.h
14
/* It is very rare that the developer ever has full control of stdin,
15
- so any use of gets warrants an unconditional warning. Assume it is
16
- always declared, since it is required by C89. */
17
+ so any use of gets warrants an unconditional warning; besides, C11
20
+#if HAVE_RAW_DECL_GETS
21
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
26
Index: b/m4/stdio_h.m4
27
===================================================================
32
dnl Check for declarations of anything we want to poison if the
33
dnl corresponding gnulib module is not in use, and which is not
34
- dnl guaranteed by C89.
35
+ dnl guaranteed by both C89 and C11.
36
gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
37
- ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
38
+ ]], [dprintf fpurge fseeko ftello getdelim getline gets popen renameat
39
snprintf tmpfile vdprintf vsnprintf])