# --- 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_findutils.patch # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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. # # --- ROCK-COPYRIGHT-NOTE-END --- The getline stuff should be made in a more clean way ... perhups it will be then upstreamable ... who knows ;) putw and getw could also be put in a __dietlibc__ conditional ... --- findutils-4.1.orig/locate/code.c 1994-09-26 23:06:09.000000000 +0000 +++ findutils-4.1/locate/code.c 2002-09-18 23:37:03.000000000 +0000 @@ -172,7 +172,11 @@ if (diffcount < -LOCATEDB_OLD_OFFSET || diffcount > LOCATEDB_OLD_OFFSET) { putc (LOCATEDB_OLD_ESCAPE, stdout); - putw (diffcount + LOCATEDB_OLD_OFFSET, stdout); + { + int a = diffcount + LOCATEDB_OLD_OFFSET; + fwrite(&a,sizeof(a),1,stdout); + } +// putw (diffcount + LOCATEDB_OLD_OFFSET, stdout); } else putc (diffcount + LOCATEDB_OLD_OFFSET, stdout); diff -Nur findutils-4.1.orig/locate/locate.c findutils-4.1/locate/locate.c --- findutils-4.1.orig/locate/locate.c 1994-09-26 23:06:14.000000000 +0000 +++ findutils-4.1/locate/locate.c 2002-09-18 23:37:07.000000000 +0000 @@ -246,8 +246,12 @@ if (old_format) { /* Get the offset in the path where this path info starts. */ - if (c == LOCATEDB_OLD_ESCAPE) - count += getw (fp) - LOCATEDB_OLD_OFFSET; + if (c == LOCATEDB_OLD_ESCAPE) { + int a; + fread(&a,sizeof(a),1,fp); + count += a - LOCATEDB_OLD_OFFSET; +// count += getw (fp) - LOCATEDB_OLD_OFFSET; + } else count += c - LOCATEDB_OLD_OFFSET; --- ./gnulib/lib/getline.c.orig Wed Aug 20 14:00:08 2003 +++ ./gnulib/lib/getline.c Wed Aug 20 14:01:39 2003 @@ -33,7 +33,7 @@ #include #include - +#if 0 #if defined __GNU_LIBRARY__ && HAVE_GETDELIM int @@ -145,4 +145,5 @@ { return getdelim2 (lineptr, n, stream, delimiter, 0, 0); } +#endif #endif --- ./gnulib/lib/getline.h.orig Wed Aug 20 13:59:59 2003 +++ ./gnulib/lib/getline.h Wed Aug 20 14:00:34 2003 @@ -30,13 +30,13 @@ /* glibc2 has these functions declared in . Avoid redeclarations. */ # if __GLIBC__ < 2 - +/* int getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream)); int getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream)); - +*/ # endif #endif /* not GETLINE_H_ */