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

  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 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. The dietlibc getcwd function does not (yet) support the GNU extension to
  23. allocate the string on-the-fly. So we use some sub-optimal aolution and
  24. additional checks. WAIT_ANY should also be added to the dietlibc ...
  25. Rene Rebe <rene@rocklinux.org>
  26. diff -ur kiss-0.21/src/getprompt.c src.kiss.-1.25906.3396530713/kiss-0.21/src/getprompt.c
  27. --- kiss-0.21/getprompt.c 1998-09-25 14:07:10.000000000 +0200
  28. +++ kiss-0.21/getprompt.c 2003-08-18 02:12:51.000000000 +0200
  29. @@ -3,14 +3,14 @@
  30. char *getprompt ()
  31. {
  32. register char
  33. - *prompt,
  34. - *cwd;
  35. + *prompt;
  36. static char
  37. - buf [LINELEN];
  38. + buf [LINELEN],
  39. + cwd [LINELEN];
  40. char
  41. twobuf [2] = { 0, 0 };
  42. - cwd = getcwd (NULL, 0);
  43. + getcwd (cwd, LINELEN);
  44. if (! flags.noenviron)
  45. addtoenv ("PWD", cwd);
  46. @@ -33,22 +33,22 @@
  47. strcat (buf, username);
  48. break;
  49. case 'p':
  50. - strcat (buf, cwd);
  51. + if (cwd)
  52. + strcat (buf, cwd);
  53. break;
  54. default:
  55. - twobuf [0] = *prompt;
  56. - strcat (buf, twobuf);
  57. + strcat (buf, prompt);
  58. }
  59. }
  60. else
  61. {
  62. - twobuf [0] = *prompt;
  63. + twobuf [0] = *prompt;
  64. strcat (buf, twobuf);
  65. }
  66. prompt++;
  67. }
  68. - free (cwd);
  69. + /*free (cwd);*/
  70. return (buf);
  71. }
  72. diff -ur kiss-0.21/src/waitforchild.c src.kiss.-1.25906.3396530713/kiss-0.21/src/waitforchild.c
  73. --- kiss-0.21/waitforchild.c 1998-09-25 14:07:10.000000000 +0200
  74. +++ kiss-0.21/waitforchild.c 2003-08-17 23:16:10.000000000 +0200
  75. @@ -31,7 +31,7 @@
  76. reportstatus (childname, status, background);
  77. /* let's see how generic kids are doing */
  78. - while ( (pid = waitpid (WAIT_ANY, &status, WNOHANG)) > 0 )
  79. + while ( (pid = waitpid (-1, &status, WNOHANG)) > 0 )
  80. {
  81. sprintf (buf, "pid %d", pid);
  82. reportstatus (buf, status, 1);