]>
Commit | Line | Data |
---|---|---|
261e3538 JR |
1 | >From 50eb0a03e7109e3a772bcb9fb6ff5af2649fd3e1 Mon Sep 17 00:00:00 2001 |
2 | From: Eray Aslan <address@hidden> | |
3 | Date: Tue, 9 Oct 2012 08:27:57 +0000 | |
4 | Subject: [PATCH] Fix build failure with glibc-2.16.0. gets is removed in C11 | |
5 | ||
6 | ||
7 | Signed-off-by: Eray Aslan <address@hidden> | |
8 | --- | |
9 | gl/stdio.in.h | 7 +++++-- | |
10 | 1 file changed, 5 insertions(+), 2 deletions(-) | |
11 | ||
12 | diff --git a/gl/stdio.in.h b/gl/stdio.in.h | |
13 | index 06d9780..fa04a10 100644 | |
14 | --- a/gl/stdio.in.h | |
15 | +++ b/gl/stdio.in.h | |
16 | @@ -713,10 +713,13 @@ _GL_CXXALIAS_SYS (gets, char *, (char *s)); | |
17 | # endif | |
18 | _GL_CXXALIASWARN (gets); | |
19 | /* It is very rare that the developer ever has full control of stdin, | |
20 | - so any use of gets warrants an unconditional warning. Assume it is | |
21 | - always declared, since it is required by C89. */ | |
22 | + so any use of gets warrants an unconditional warning; besides C11 | |
23 | + removed it. */ | |
24 | +#ifdef gets | |
25 | +#undef gets | |
26 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); | |
27 | #endif | |
28 | +#endif | |
29 | ||
30 | ||
31 | #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ | |
32 | -- | |
33 | 1.7.12 | |
34 |