1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../findutils/compile.patch.dietlibc
5 # Copyright (C) 2004 - 2016 The T2 SDE Project
6 # Copyright (C) 1998 - 2004 ROCK Linux Project
8 # More information can be found in the files COPYING and README.
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
16 # --- T2-COPYRIGHT-NOTE-END ---
18 The getline stuff should be made in a more clean way ... perhups it will be
19 then upstreamable ... who knows ;)
21 putw and getw could also be put in a __dietlibc__ conditional ...
23 --- ./locate/code.c.orig 2005-06-07 18:18:41.000000000 -0400
24 +++ ./locate/code.c 2005-10-31 13:37:17.000000000 -0300
26 if (diffcount < -LOCATEDB_OLD_OFFSET || diffcount > LOCATEDB_OLD_OFFSET)
28 putc (LOCATEDB_OLD_ESCAPE, stdout);
29 - putw (diffcount + LOCATEDB_OLD_OFFSET, stdout);
31 + int a = diffcount + LOCATEDB_OLD_OFFSET;
32 + fwrite(&a,sizeof(a),1,stdout);
34 +// putw (diffcount + LOCATEDB_OLD_OFFSET, stdout);
37 putc (diffcount + LOCATEDB_OLD_OFFSET, stdout);
38 --- ./locate/locate.c.orig 2005-06-12 17:25:31.000000000 -0400
39 +++ ./locate/locate.c 2005-10-31 15:25:35.000000000 -0300
42 /* Get the offset in the path where this path info starts. */
43 if (procdata->c == LOCATEDB_OLD_ESCAPE)
44 - procdata->count += getw (procdata->fp) - LOCATEDB_OLD_OFFSET;
47 + fread(&a,sizeof(a),1,procdata->fp);
48 + procdata->count += a - LOCATEDB_OLD_OFFSET;
51 procdata->count += procdata->c - LOCATEDB_OLD_OFFSET;
53 --- ./gnulib/lib/getline.c.orig 2005-05-17 04:41:00.000000000 -0400
54 +++ ./gnulib/lib/getline.c 2005-10-31 15:26:27.000000000 -0300
60 #if ! (defined __GNU_LIBRARY__ && HAVE_GETDELIM)
62 # include "getndelim2.h"
70 getline (char **lineptr, size_t *linesize, FILE *stream)
71 --- ./gnulib/lib/getline.h.orig 2005-05-17 04:41:00.000000000 -0400
72 +++ ./gnulib/lib/getline.h 2005-10-31 15:27:00.000000000 -0300
74 /* glibc2 has these functions declared in <stdio.h>. Avoid redeclarations. */
78 extern ssize_t getline (char **_lineptr, size_t *_linesize, FILE *_stream);
80 extern ssize_t getdelim (char **_lineptr, size_t *_linesize, int _delimiter,