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.

88 lines
2.6 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/dietlibc/pkg_patch/pkg_kiss.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2005 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. The dietlibc getcwd function does not (yet) support the GNU extension to
  20. allocate the string on-the-fly. So we use some sub-optimal aolution and
  21. additional checks. WAIT_ANY should also be added to the dietlibc ...
  22. Rene Rebe <rene@exactcode.de>
  23. diff -ur kiss-0.21/src/getprompt.c src.kiss.-1.25906.3396530713/kiss-0.21/src/getprompt.c
  24. --- kiss-0.21/src/getprompt.c 1998-09-25 14:07:10.000000000 +0200
  25. +++ kiss-0.21/src/getprompt.c 2003-08-18 02:12:51.000000000 +0200
  26. @@ -3,14 +3,14 @@
  27. char *getprompt ()
  28. {
  29. register char
  30. - *prompt,
  31. - *cwd;
  32. + *prompt;
  33. static char
  34. - buf [LINELEN];
  35. + buf [LINELEN],
  36. + cwd [LINELEN];
  37. char
  38. twobuf [2] = { 0, 0 };
  39. - cwd = getcwd (NULL, 0);
  40. + getcwd (cwd, LINELEN);
  41. if (! flags.noenviron)
  42. addtoenv ("PWD", cwd);
  43. @@ -33,22 +33,22 @@
  44. strcat (buf, username);
  45. break;
  46. case 'p':
  47. - strcat (buf, cwd);
  48. + if (cwd)
  49. + strcat (buf, cwd);
  50. break;
  51. default:
  52. - twobuf [0] = *prompt;
  53. - strcat (buf, twobuf);
  54. + strcat (buf, prompt);
  55. }
  56. }
  57. else
  58. {
  59. - twobuf [0] = *prompt;
  60. + twobuf [0] = *prompt;
  61. strcat (buf, twobuf);
  62. }
  63. prompt++;
  64. }
  65. - free (cwd);
  66. + /*free (cwd);*/
  67. return (buf);
  68. }
  69. diff -ur kiss-0.21/src/waitforchild.c src.kiss.-1.25906.3396530713/kiss-0.21/src/waitforchild.c
  70. --- kiss-0.21/src/waitforchild.c 1998-09-25 14:07:10.000000000 +0200
  71. +++ kiss-0.21/src/waitforchild.c 2003-08-17 23:16:10.000000000 +0200
  72. @@ -31,7 +31,7 @@
  73. reportstatus (childname, status, background);
  74. /* let's see how generic kids are doing */
  75. - while ( (pid = waitpid (WAIT_ANY, &status, WNOHANG)) > 0 )
  76. + while ( (pid = waitpid (-1, &status, WNOHANG)) > 0 )
  77. {
  78. sprintf (buf, "pid %d", pid);
  79. reportstatus (buf, status, 1);