diff --git a/libmissing/stdio.in.h b/libmissing/stdio.in.h index f5d5d88..90542e9 100644 --- a/libmissing/stdio.in.h +++ b/libmissing/stdio.in.h @@ -113,11 +113,16 @@ _GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " "use gnulib module fflush for portable POSIX compliance"); #endif +/* Since gcc 4.6, ISOC11 is implemented and no longer defined gets. */ +#if !defined __ISOC11 \ +|| (defined __cplusplus && __cplusplus <= 201103L) /* 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. */ #undef gets _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); +#endif #if @GNULIB_FOPEN@ # if @REPLACE_FOPEN@