| 1 |
--- libgnu/stdio.in.h.origs 2012-05-24 12:46:13.000000000 -0600
|
| 2 |
+++ libgnu/stdio.in.h 2012-05-24 16:29:54.813734894 -0600
|
| 3 |
@@ -1,12 +1,10 @@
|
| 4 |
-/* -*- buffer-read-only: t -*- vi: set ro: */
|
| 5 |
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
|
| 6 |
/* A GNU-like <stdio.h>.
|
| 7 |
|
| 8 |
Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc.
|
| 9 |
|
| 10 |
This program is free software; you can redistribute it and/or modify
|
| 11 |
it under the terms of the GNU General Public License as published by
|
| 12 |
- the Free Software Foundation; either version 3, or (at your option)
|
| 13 |
+ the Free Software Foundation; either version 2, or (at your option)
|
| 14 |
any later version.
|
| 15 |
|
| 16 |
This program is distributed in the hope that it will be useful,
|
| 17 |
@@ -15,8 +13,7 @@
|
| 18 |
GNU General Public License for more details.
|
| 19 |
|
| 20 |
You should have received a copy of the GNU General Public License
|
| 21 |
- along with this program; if not, write to the Free Software Foundation,
|
| 22 |
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
| 23 |
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
| 24 |
|
| 25 |
#if __GNUC__ >= 3
|
| 26 |
@PRAGMA_SYSTEM_HEADER@
|
| 27 |
@@ -55,7 +52,8 @@
|
| 28 |
#include <stddef.h>
|
| 29 |
|
| 30 |
/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8
|
| 31 |
- and eglibc 2.11.2. */
|
| 32 |
+ and eglibc 2.11.2.
|
| 33 |
+ May also define off_t to a 64-bit type on native Windows. */
|
| 34 |
#include <sys/types.h>
|
| 35 |
|
| 36 |
/* The __attribute__ feature is available in gcc versions 2.5 and later.
|
| 37 |
@@ -701,22 +699,11 @@ _GL_WARN_ON_USE (getline, "getline is un
|
| 38 |
# endif
|
| 39 |
#endif
|
| 40 |
|
| 41 |
-#if @GNULIB_GETS@
|
| 42 |
-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
|
| 43 |
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
| 44 |
-# undef gets
|
| 45 |
-# define gets rpl_gets
|
| 46 |
-# endif
|
| 47 |
-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
|
| 48 |
-_GL_CXXALIAS_RPL (gets, char *, (char *s));
|
| 49 |
-# else
|
| 50 |
-_GL_CXXALIAS_SYS (gets, char *, (char *s));
|
| 51 |
-# undef gets
|
| 52 |
-# endif
|
| 53 |
-_GL_CXXALIASWARN (gets);
|
| 54 |
/* It is very rare that the developer ever has full control of stdin,
|
| 55 |
- so any use of gets warrants an unconditional warning. Assume it is
|
| 56 |
- always declared, since it is required by C89. */
|
| 57 |
+ so any use of gets warrants an unconditional warning; besides, C11
|
| 58 |
+ removed it. */
|
| 59 |
+#undef gets
|
| 60 |
+#if HAVE_RAW_DECL_GETS
|
| 61 |
_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
|
| 62 |
#endif
|
| 63 |
|
| 64 |
@@ -781,7 +768,7 @@ _GL_CXXALIASWARN (pclose);
|
| 65 |
#elif defined GNULIB_POSIXCHECK
|
| 66 |
# undef pclose
|
| 67 |
# if HAVE_RAW_DECL_PCLOSE
|
| 68 |
-_GL_WARN_ON_USE (pclose, "popen is unportable - "
|
| 69 |
+_GL_WARN_ON_USE (pclose, "pclose is unportable - "
|
| 70 |
"use gnulib module pclose for more portability");
|
| 71 |
# endif
|
| 72 |
#endif
|
| 73 |
@@ -1056,9 +1043,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is
|
| 74 |
# endif
|
| 75 |
#endif
|
| 76 |
|
| 77 |
-/* Some people would argue that sprintf should be handled like gets
|
| 78 |
- (for example, OpenBSD issues a link warning for both functions),
|
| 79 |
- since both can cause security holes due to buffer overruns.
|
| 80 |
+/* Some people would argue that all sprintf uses should be warned about
|
| 81 |
+ (for example, OpenBSD issues a link warning for it),
|
| 82 |
+ since it can cause security holes due to buffer overruns.
|
| 83 |
However, we believe that sprintf can be used safely, and is more
|
| 84 |
efficient than snprintf in those safe cases; and as proof of our
|
| 85 |
belief, we use sprintf in several gnulib modules. So this header
|