diff options
author | Akinori MUSHA <knu@FreeBSD.org> | 2003-04-23 10:20:11 +0000 |
---|---|---|
committer | Akinori MUSHA <knu@FreeBSD.org> | 2003-04-23 10:20:11 +0000 |
commit | fa75d09d694fe78e8911f41176995417dc8bf7de (patch) | |
tree | 841c5e0aecf188e7e4835b20b7b70f765d869d68 /shells | |
parent | 74097edf502fcf45d03c8169343e5b8bece19fff (diff) | |
download | ports-fa75d09d694fe78e8911f41176995417dc8bf7de.tar.gz ports-fa75d09d694fe78e8911f41176995417dc8bf7de.zip |
Apply a fix against a macro expansion problem and bump PORTREVISION
accordingly.
Notes
Notes:
svn path=/head/; revision=79503
Diffstat (limited to 'shells')
-rw-r--r-- | shells/fd/Makefile | 1 | ||||
-rw-r--r-- | shells/fd/files/patch-shell.c | 26 | ||||
-rw-r--r-- | shells/fd/files/patch-system.c | 94 | ||||
-rw-r--r-- | shells/fd/files/patch-system.h | 13 |
4 files changed, 134 insertions, 0 deletions
diff --git a/shells/fd/Makefile b/shells/fd/Makefile index 7f6b38bea832..ecf226f68a54 100644 --- a/shells/fd/Makefile +++ b/shells/fd/Makefile @@ -7,6 +7,7 @@ PORTNAME= fd PORTVERSION= 2.03a +PORTREVISION= 1 CATEGORIES= shells MASTER_SITES= http://hp.vector.co.jp/authors/VA012337/soft/fd/ \ ftp://ftp.vector.co.jp/pack/unix/util/file/filer/fd/ diff --git a/shells/fd/files/patch-shell.c b/shells/fd/files/patch-shell.c new file mode 100644 index 000000000000..1bebd66ad982 --- /dev/null +++ b/shells/fd/files/patch-shell.c @@ -0,0 +1,26 @@ +Taken from: [FDclone-users:00145] + +diff -u ../old/FD-2.03a/shell.c ./shell.c +--- ../old/FD-2.03a/shell.c Tue Apr 15 00:00:00 2003 ++++ ./shell.c Tue Apr 22 00:00:00 2003 +@@ -752,6 +752,11 @@ + *argcp = argc = argc2; + *argvp = argv = argv2; + ++ if (iscomm < 0) { ++ free(buf); ++ return(ret); ++ } ++ + min = -1; + for (next = lastptr; next < maxfile; next++) + if (isarg(&(filelist[next]))) { +@@ -767,7 +772,7 @@ + if (!isneedmark(argv[n], i)) buf[j++] = argv[n][i]; + else { + flags = argv[n][++i]; +- cp = (iscomm < 0 || n) ? arg : NULL; ++ cp = (!env || n) ? arg : NULL; + if (min >= 0 && next < maxfile) ret++; + + len = setarg(&buf, j, &size, NULL, cp, flags); diff --git a/shells/fd/files/patch-system.c b/shells/fd/files/patch-system.c new file mode 100644 index 000000000000..523d492206e5 --- /dev/null +++ b/shells/fd/files/patch-system.c @@ -0,0 +1,94 @@ +Taken from: [FDclone-users:00145] + +diff -u ../old/FD-2.03a/system.c ./system.c +--- ../old/FD-2.03a/system.c Tue Apr 15 00:00:00 2003 ++++ ./system.c Tue Apr 22 00:00:00 2003 +@@ -3926,7 +3926,11 @@ + char *tmp; + int type; + +- if (rp -> next && (errp = doredirect(rp -> next))) return(errp); ++ rp -> type &= ~MD_REST; ++ if (rp -> next) { ++ if ((errp = doredirect(rp -> next))) return(errp); ++ if (((rp -> next) -> type) & MD_REST) rp -> type |= MD_REST; ++ } + + type = rp -> type; + if (!(rp -> filename)) tmp = NULL; +@@ -3940,6 +3944,25 @@ + tmp = NULL; + type &= ~MD_FILEDESC; + } ++#ifdef FD ++ else { ++ char **argv; ++ int n, argc; ++ ++ argv = (char **)malloc2(2 * sizeof(char *)); ++ argv[0] = tmp; ++ argv[1] = NULL; ++ argc = 1; ++ n = replaceargs(&argc, &argv, NULL, 0); ++ tmp = argv[0]; ++ free(argv); ++ if (n < 0) { ++ free(tmp); ++ return(rp); ++ } ++ if (n) rp -> type |= MD_REST; ++ } ++#endif /* FD */ + + if (!tmp); + else if (type & MD_HEREDOC) { +@@ -7230,7 +7253,6 @@ + } + else for (i = 0; i < argc; i++) stripquote(argv[i], 1); + #ifdef FD +- replaceargs(NULL, NULL, NULL, 0); + if (replaceargs(&argc, &argv, NULL, -1) < 0) { + freevar(argv); + return(-1); +@@ -9558,9 +9580,6 @@ + fflush(stderr); + } + +-#ifdef FD +- replaceargs(NULL, NULL, NULL, 0); +-#endif + for (;;) { + #ifdef FD + char **dupargv; +@@ -9806,6 +9825,10 @@ + return(-1); + #endif + ++#ifdef FD ++ replaceargs(NULL, NULL, NULL, 0); ++#endif ++ + if (!(trp -> comm) || pipein > 0L) { + #if !MSDOS && !defined (NOJOB) + if (pipein > 0L) stackjob(pipein, 0, trp); +@@ -9822,7 +9845,7 @@ + #endif + ret_status = (ret >= 0) ? ret : RET_FAIL; + } +- else { ++ else for (;;) { + if (!(errp = doredirect((trp -> comm) -> redp))) + #if MSDOS || defined (USEFAKEPIPE) + ret = exec_process(trp); +@@ -9854,6 +9877,11 @@ + } + closeredirect((trp -> comm) -> redp); + ret_status = (ret >= 0) ? ret : RET_FAIL; ++#ifdef FD ++ if (!errp && ((trp -> comm) -> redp) -> type & MD_REST) ++ continue; ++#endif ++ break; + } + trp = tmptr; + diff --git a/shells/fd/files/patch-system.h b/shells/fd/files/patch-system.h new file mode 100644 index 000000000000..37bf608200fd --- /dev/null +++ b/shells/fd/files/patch-system.h @@ -0,0 +1,13 @@ +Taken from: [FDclone-users:00145] + +diff -u ../old/FD-2.03a/system.h ./system.h +--- ../old/FD-2.03a/system.h Tue Apr 15 00:00:00 2003 ++++ ./system.h Tue Apr 22 00:00:00 2003 +@@ -185,6 +185,7 @@ + #define MD_WITHERR 0020 + #define MD_HEREDOC 0040 + #define MD_FORCED 0100 ++#define MD_REST 0200 + + typedef struct _command_t { + hashlist *hash; |