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.

92 lines
3.0 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_findutils.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 getline stuff should be made in a more clean way ... perhups it will be
  20. then upstreamable ... who knows ;)
  21. putw and getw could also be put in a __dietlibc__ conditional ...
  22. --- findutils-4.1.orig/locate/code.c 1994-09-26 23:06:09.000000000 +0000
  23. +++ findutils-4.1/locate/code.c 2002-09-18 23:37:03.000000000 +0000
  24. @@ -172,7 +172,11 @@
  25. if (diffcount < -LOCATEDB_OLD_OFFSET || diffcount > LOCATEDB_OLD_OFFSET)
  26. {
  27. putc (LOCATEDB_OLD_ESCAPE, stdout);
  28. - putw (diffcount + LOCATEDB_OLD_OFFSET, stdout);
  29. + {
  30. + int a = diffcount + LOCATEDB_OLD_OFFSET;
  31. + fwrite(&a,sizeof(a),1,stdout);
  32. + }
  33. +// putw (diffcount + LOCATEDB_OLD_OFFSET, stdout);
  34. }
  35. else
  36. putc (diffcount + LOCATEDB_OLD_OFFSET, stdout);
  37. diff -Nur findutils-4.1.orig/locate/locate.c findutils-4.1/locate/locate.c
  38. --- findutils-4.1.orig/locate/locate.c 1994-09-26 23:06:14.000000000 +0000
  39. +++ findutils-4.1/locate/locate.c 2002-09-18 23:37:07.000000000 +0000
  40. @@ -246,8 +246,12 @@
  41. if (old_format)
  42. {
  43. /* Get the offset in the path where this path info starts. */
  44. - if (c == LOCATEDB_OLD_ESCAPE)
  45. - count += getw (fp) - LOCATEDB_OLD_OFFSET;
  46. + if (c == LOCATEDB_OLD_ESCAPE) {
  47. + int a;
  48. + fread(&a,sizeof(a),1,fp);
  49. + count += a - LOCATEDB_OLD_OFFSET;
  50. +// count += getw (fp) - LOCATEDB_OLD_OFFSET;
  51. + }
  52. else
  53. count += c - LOCATEDB_OLD_OFFSET;
  54. --- ./gnulib/lib/getline.c.orig Wed Aug 20 14:00:08 2003
  55. +++ ./gnulib/lib/getline.c Wed Aug 20 14:01:39 2003
  56. @@ -33,7 +33,7 @@
  57. #include <stdio.h>
  58. #include <sys/types.h>
  59. -
  60. +#if 0
  61. #if defined __GNU_LIBRARY__ && HAVE_GETDELIM
  62. int
  63. @@ -145,4 +145,5 @@
  64. {
  65. return getdelim2 (lineptr, n, stream, delimiter, 0, 0);
  66. }
  67. +#endif
  68. #endif
  69. --- ./gnulib/lib/getline.h.orig Wed Aug 20 13:59:59 2003
  70. +++ ./gnulib/lib/getline.h Wed Aug 20 14:00:34 2003
  71. @@ -30,13 +30,13 @@
  72. /* glibc2 has these functions declared in <stdio.h>. Avoid redeclarations. */
  73. # if __GLIBC__ < 2
  74. -
  75. +/*
  76. int
  77. getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
  78. int
  79. getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream));
  80. -
  81. +*/
  82. # endif
  83. #endif /* not GETLINE_H_ */