diff options
author | knu <knu@FreeBSD.org> | 2003-04-23 18:20:11 +0800 |
---|---|---|
committer | knu <knu@FreeBSD.org> | 2003-04-23 18:20:11 +0800 |
commit | b3f82a7a9ac0d58cf7706e81c40e76851e8b0abc (patch) | |
tree | 57701d7f29e4e26010008f1a0e7511e4f65c23e2 | |
parent | 675bd3e66da2fb24af7966622e52f960bb866c8e (diff) | |
download | freebsd-ports-gnome-b3f82a7a9ac0d58cf7706e81c40e76851e8b0abc.tar.gz freebsd-ports-gnome-b3f82a7a9ac0d58cf7706e81c40e76851e8b0abc.tar.zst freebsd-ports-gnome-b3f82a7a9ac0d58cf7706e81c40e76851e8b0abc.zip |
Apply a fix against a macro expansion problem and bump PORTREVISION
accordingly.
-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; |