From: Michael Olbrich Date: Wed, 12 Dec 2012 17:26:16 +0100 Subject: [PATCH] only undefine 'gets' if it's defined Signed-off-by: Michael Olbrich --- gnu/stdio.in.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/stdio.in.h b/gnu/stdio.in.h index 465a9c9..8968c84 100644 --- a/gnu/stdio.in.h +++ b/gnu/stdio.in.h @@ -163,8 +163,10 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " /* It is very rare that the developer ever has full control of stdin, so any use of gets warrants an unconditional warning. Assume it is always declared, since it is required by C89. */ +#ifdef gets #undef gets _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); +#endif #if @GNULIB_FOPEN@ # if @REPLACE_FOPEN@