Dash:
[t2.git] / package / shells / kiss / posix-fixes.patch
blob0dec57b0b80f20c6ef0525fbca4e7413613abfa1
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../kiss/posix-fixes.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 #
8 # More information can be found in the files COPYING and README.
9 #
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
15 # version.
16 # --- T2-COPYRIGHT-NOTE-END ---
19 This is mainly needed when used with dietlibc - but also more portable
20 and more secure.
22 Rene Rebe <rene@exactcode.de>
24 diff -ur kiss-0.21/src/doread.c src.kiss.-1.25906.3396530713/kiss-0.21/src/doread.c
25 --- kiss-0.21/src/doread.c 1998-09-25 14:07:09.000000000 +0200
26 +++ kiss-0.21/src/doread.c 2003-08-17 23:54:10.000000000 +0200
27 @@ -17,11 +17,11 @@
28 for (cp = s.str [1]; *cp; cp++)
29 if (! isupper (*cp))
30 return (warning ("variable must be in upper case"));
31 - gets (buf);
32 + fgets (buf, FILENAMELEN, stdin);
33 addtoenv (s.str [1], buf);
35 else
36 - gets (buf);
37 + fgets (buf, FILENAMELEN, stdin);
39 return (0);
41 diff -ur kiss-0.21/src/runcmd.c src.kiss.-1.25906.3396530713/kiss-0.21/src/runcmd.c
42 --- kiss-0.21/src/runcmd.c 1998-09-25 14:07:10.000000000 +0200
43 +++ kiss-0.21/src/runcmd.c 2003-08-17 23:11:35.000000000 +0200
44 @@ -1,5 +1,7 @@
45 #include "kiss.h"
47 +#include <getopt.h>
49 /* define DEBUG_ONE_CMD to get one shot at gdb'ing the child process */
50 /* then make a -g version of the command to see and set a trace in the code */