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.

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