You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

86 lines
2.5 KiB

# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: package/.../dietlibc/patches/pkg_kiss.patch
# Copyright (C) 2004 - 2006 The T2 SDE Project
# Copyright (C) 1998 - 2004 Clifford Wolf
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- T2-COPYRIGHT-NOTE-END ---
The dietlibc getcwd function does not (yet) support the GNU extension to
allocate the string on-the-fly. So we use some sub-optimal aolution and
additional checks. WAIT_ANY should also be added to the dietlibc ...
Rene Rebe <rene@exactcode.de>
diff -ur kiss-0.21/src/getprompt.c src.kiss.-1.25906.3396530713/kiss-0.21/src/getprompt.c
--- kiss-0.21/src/getprompt.c 1998-09-25 14:07:10.000000000 +0200
+++ kiss-0.21/src/getprompt.c 2003-08-18 02:12:51.000000000 +0200
@@ -3,14 +3,14 @@
char *getprompt ()
{
register char
- *prompt,
- *cwd;
+ *prompt;
static char
- buf [LINELEN];
+ buf [LINELEN],
+ cwd [LINELEN];
char
twobuf [2] = { 0, 0 };
- cwd = getcwd (NULL, 0);
+ getcwd (cwd, LINELEN);
if (! flags.noenviron)
addtoenv ("PWD", cwd);
@@ -33,22 +33,22 @@
strcat (buf, username);
break;
case 'p':
- strcat (buf, cwd);
+ if (cwd)
+ strcat (buf, cwd);
break;
default:
- twobuf [0] = *prompt;
- strcat (buf, twobuf);
+ strcat (buf, prompt);
}
}
else
{
- twobuf [0] = *prompt;
+ twobuf [0] = *prompt;
strcat (buf, twobuf);
}
prompt++;
}
- free (cwd);
+ /*free (cwd);*/
return (buf);
}
diff -ur kiss-0.21/src/waitforchild.c src.kiss.-1.25906.3396530713/kiss-0.21/src/waitforchild.c
--- kiss-0.21/src/waitforchild.c 1998-09-25 14:07:10.000000000 +0200
+++ kiss-0.21/src/waitforchild.c 2003-08-17 23:16:10.000000000 +0200
@@ -31,7 +31,7 @@
reportstatus (childname, status, background);
/* let's see how generic kids are doing */
- while ( (pid = waitpid (WAIT_ANY, &status, WNOHANG)) > 0 )
+ while ( (pid = waitpid (-1, &status, WNOHANG)) > 0 )
{
sprintf (buf, "pid %d", pid);
reportstatus (buf, status, 1);