mirror of the now-defunct rocklinux.org
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.
 
 
 
 
 
 

91 lines
2.7 KiB

# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/dietlibc/pkg_patch/pkg_kiss.patch
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it 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. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-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@rocklinux.org>
diff -ur kiss-0.21/src/getprompt.c src.kiss.-1.25906.3396530713/kiss-0.21/src/getprompt.c
--- kiss-0.21/getprompt.c 1998-09-25 14:07:10.000000000 +0200
+++ kiss-0.21/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/waitforchild.c 1998-09-25 14:07:10.000000000 +0200
+++ kiss-0.21/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);