diff options
author | joerg <joerg> | 2006-01-09 22:45:08 +0000 |
---|---|---|
committer | joerg <joerg> | 2006-01-09 22:45:08 +0000 |
commit | e62989df8d4e366a0bd34c52e5f5a6add27c554f (patch) | |
tree | f0e6c5d310f05b82c81692a562b5c20273cea34e /sysutils | |
parent | ca5a843fe65670bae67ff757b09aa96c32ee3b6a (diff) | |
download | pkgsrc-e62989df8d4e366a0bd34c52e5f5a6add27c554f.tar.gz |
In ls.c, use d_type field only, if DTTOIF is defined as well.
In paste.c, do real boundary checks and consider NULL FILE pointers as
closed files. This replaces use of global dummy FILEs, which is not
possible on DragonFly, since FILE is incompletly.
In configure, include stdio.h when checking for __fpending, since
the prototype is defined there on DragonFly.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/coreutils/distinfo | 6 | ||||
-rw-r--r-- | sysutils/coreutils/patches/patch-aj | 13 | ||||
-rw-r--r-- | sysutils/coreutils/patches/patch-ak | 73 | ||||
-rw-r--r-- | sysutils/coreutils/patches/patch-ca | 14 |
4 files changed, 101 insertions, 5 deletions
diff --git a/sysutils/coreutils/distinfo b/sysutils/coreutils/distinfo index 439ce72c76b..8a13e98c8bd 100644 --- a/sysutils/coreutils/distinfo +++ b/sysutils/coreutils/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.10 2005/08/28 09:07:21 tron Exp $ +$NetBSD: distinfo,v 1.11 2006/01/09 22:45:08 joerg Exp $ SHA1 (coreutils-5.2.1.tar.bz2) = 1028755ae0fa9be840576e4837004cf5a9981c45 RMD160 (coreutils-5.2.1.tar.bz2) = a72bdb360371c026e77281ae0d543bdcce55a4e6 @@ -12,7 +12,9 @@ SHA1 (patch-af) = cd7deba7a8ecdf17b39668a9d5a80323e1a02c06 SHA1 (patch-ag) = 20deb326e88b2d0a275b4a16b84ea43a9e280d79 SHA1 (patch-ah) = 3f56cd4e1c657551f4967928ebea19df23c0d850 SHA1 (patch-ai) = e9964ba9e3fd6ec8f2728e53439a960a6dd0a32f +SHA1 (patch-aj) = dfa6030d09550133ae83c7d2b316f6ab0431810f +SHA1 (patch-ak) = 2ad4d42f852db0efc9d3dee37bee43dc7d499f8d SHA1 (patch-ba) = 3867a17e0ad8f7c87c91ec8e511972a6255062dd SHA1 (patch-bb) = ade6f8e0aa73478270f568dba25e79f825374c02 -SHA1 (patch-ca) = 414af007d0afe03a0e95f1f26f9e8fdff10702e4 +SHA1 (patch-ca) = 4d99367f5d4b35f6897b4321f2166c94ab93f9d8 SHA1 (patch-cb) = de1896d77504b8fd82da8e2cdf6b8a82a31ba09f diff --git a/sysutils/coreutils/patches/patch-aj b/sysutils/coreutils/patches/patch-aj new file mode 100644 index 00000000000..9e2ae236a7c --- /dev/null +++ b/sysutils/coreutils/patches/patch-aj @@ -0,0 +1,13 @@ +$NetBSD: patch-aj,v 1.1 2006/01/09 22:45:08 joerg Exp $ + +--- src/ls.c.orig 2006-01-03 17:15:34.000000000 +0000 ++++ src/ls.c +@@ -2528,7 +2528,7 @@ gobble_file (const char *name, enum file + else + { + f->filetype = type; +-#if HAVE_STRUCT_DIRENT_D_TYPE ++#if HAVE_STRUCT_DIRENT_D_TYPE && defined(DTTOIF) + f->stat.st_mode = DTTOIF (type); + #endif + blocks = 0; diff --git a/sysutils/coreutils/patches/patch-ak b/sysutils/coreutils/patches/patch-ak new file mode 100644 index 00000000000..967d1846f8b --- /dev/null +++ b/sysutils/coreutils/patches/patch-ak @@ -0,0 +1,73 @@ +$NetBSD: patch-ak,v 1.1 2006/01/09 22:45:08 joerg Exp $ + +--- src/paste.c.orig 2006-01-03 17:23:26.000000000 +0000 ++++ src/paste.c +@@ -52,14 +52,6 @@ + /* Indicates that no delimiter should be added in the current position. */ + #define EMPTY_DELIM '\0' + +-static FILE dummy_closed; +-/* Element marking a file that has reached EOF and been closed. */ +-#define CLOSED (&dummy_closed) +- +-static FILE dummy_endlist; +-/* Element marking end of list of open files. */ +-#define ENDLIST (&dummy_endlist) +- + /* Name this program was run with. */ + char *program_name; + +@@ -76,6 +68,8 @@ static char *delims; + /* A pointer to the character after the end of `delims'. */ + static char const *delim_end; + ++#define CLOSED NULL ++ + static struct option const longopts[] = + { + {"serial", no_argument, 0, 's'}, +@@ -156,7 +150,7 @@ paste_parallel (size_t nfiles, char **fn + store the delimiters for closed files. */ + char *delbuf; + FILE **fileptr; /* Streams open to the files to process. */ +- size_t files_open; /* Number of files still open to process. */ ++ size_t files_open, last_file; /* Number of files still open to process. */ + bool opened_stdin = false; /* true if any fopen got fd == STDIN_FILENO */ + + delbuf = xmalloc (nfiles + 2); +@@ -183,7 +177,7 @@ paste_parallel (size_t nfiles, char **fn + } + } + +- fileptr[files_open] = ENDLIST; ++ last_file = files_open; + + if (opened_stdin && have_read_stdin) + error (EXIT_FAILURE, 0, _("standard input is closed")); +@@ -200,7 +194,7 @@ paste_parallel (size_t nfiles, char **fn + size_t delims_saved = 0; /* Number of delims saved in `delbuf'. */ + size_t i; + +- for (i = 0; fileptr[i] != ENDLIST && files_open; i++) ++ for (i = 0; i < last_file && files_open; i++) + { + int chr IF_LINT (= 0); /* Input character. */ + size_t line_length = 0; /* Number of chars in line. */ +@@ -246,7 +240,7 @@ paste_parallel (size_t nfiles, char **fn + files_open--; + } + +- if (fileptr[i + 1] == ENDLIST) ++ if (i + 1 == last_file) + { + /* End of this output line. + Is this the end of the whole thing? */ +@@ -277,7 +271,7 @@ paste_parallel (size_t nfiles, char **fn + somedone = true; + + /* Except for last file, replace last newline with delim. */ +- if (fileptr[i + 1] != ENDLIST) ++ if (i + 1 != last_file) + { + if (chr != '\n' && chr != EOF) + putc (chr, stdout); diff --git a/sysutils/coreutils/patches/patch-ca b/sysutils/coreutils/patches/patch-ca index 15f40b271f8..7eb29f981e5 100644 --- a/sysutils/coreutils/patches/patch-ca +++ b/sysutils/coreutils/patches/patch-ca @@ -1,6 +1,6 @@ -$NetBSD: patch-ca,v 1.1 2005/03/21 14:44:08 tv Exp $ +$NetBSD: patch-ca,v 1.2 2006/01/09 22:45:08 joerg Exp $ ---- configure.orig Thu Mar 11 03:58:11 2004 +--- configure.orig 2004-03-11 08:58:11.000000000 +0000 +++ configure @@ -27323,6 +27323,10 @@ _ACEOF fi @@ -13,7 +13,15 @@ $NetBSD: patch-ca,v 1.1 2005/03/21 14:44:08 tv Exp $ if test -z "$ac_list_mounted_fs"; then { { echo "$as_me:$LINENO: error: could not determine how to read list of mounted filesystems" >&5 echo "$as_me: error: could not determine how to read list of mounted filesystems" >&2;} -@@ -44983,10 +44987,12 @@ for ac_func in \ +@@ -39680,6 +39684,7 @@ done + + + fp_headers=' ++# include <stdio.h> + # if HAVE_STDIO_EXT_H + # include <stdio_ext.h> + # endif +@@ -44983,10 +44988,12 @@ for ac_func in \ mempcpy \ mkfifo \ realpath \ |