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