Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / patches / grub-gets-undeclared.patch
1 This patch is needed to allow builds with newer versions of
2 the GNU libc (2.16+).
3
4
5 commit 66712c23388e93e5c518ebc8515140fa0c807348
6 Author: Eric Blake <eblake@redhat.com>
7 Date: Thu Mar 29 13:30:41 2012 -0600
8
9 stdio: don't assume gets any more
10
11 Gnulib intentionally does not have a gets module, and now that C11
12 and glibc have dropped it, we should be more proactive about warning
13 any user on a platform that still has a declaration of this dangerous
14 interface.
15
16 * m4/stdio_h.m4 (gl_STDIO_H, gl_STDIO_H_DEFAULTS): Drop gets
17 support.
18 * modules/stdio (Makefile.am): Likewise.
19 * lib/stdio-read.c (gets): Likewise.
20 * tests/test-stdio-c++.cc: Likewise.
21 * m4/warn-on-use.m4 (gl_WARN_ON_USE_PREPARE): Fix comment.
22 * lib/stdio.in.h (gets): Make warning occur in more places.
23 * doc/posix-functions/gets.texi (gets): Update documentation.
24 Reported by Christer Solskogen.
25
26 Signed-off-by: Eric Blake <eblake@redhat.com>
27
28 --- grub-2.00/grub-core/gnulib/stdio.in.h 2013-02-10 16:17:09.000000000 +0100
29 +++ grub-2.00/grub-core/gnulib/stdio.in.h 2013-02-10 16:17:11.000000000 +0100
30 @@ -137,12 +137,6 @@ _GL_WARN_ON_USE (fflush, "fflush is not
31 "use gnulib module fflush for portable POSIX compliance");
32 #endif
33
34 -/* It is very rare that the developer ever has full control of stdin,
35 - so any use of gets warrants an unconditional warning. Assume it is
36 - always declared, since it is required by C89. */
37 -#undef gets
38 -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
39 -
40 #if @GNULIB_FOPEN@
41 # if @REPLACE_FOPEN@
42 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)