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_ */