Update to dash-0.5.11.5.

This commit is contained in:
Juhani Krekelä 2022-08-03 22:21:36 +03:00 committed by Jonas 'Sortie' Termansen
parent cc9c031e5e
commit 212539c9de
2 changed files with 77 additions and 31 deletions

View File

@ -1,7 +1,7 @@
diff -Paur --no-dereference -- dash.upstream/src/cd.c dash/src/cd.c diff -Paur --no-dereference -- dash.upstream/src/cd.c dash/src/cd.c
--- dash.upstream/src/cd.c --- dash.upstream/src/cd.c
+++ dash/src/cd.c +++ dash/src/cd.c
@@ -252,7 +252,7 @@ @@ -268,7 +268,7 @@
STATIC char * STATIC char *
getpwd() getpwd()
{ {
@ -30,7 +30,24 @@ diff -Paur --no-dereference -- dash.upstream/src/exec.c dash/src/exec.c
+#endif +#endif
} }
static const char *legal_pathopt(const char *opt, const char *term, int magic)
diff -Paur --no-dereference -- dash.upstream/src/expand.c dash/src/expand.c
--- dash.upstream/src/expand.c
+++ dash/src/expand.c
@@ -44,6 +44,13 @@
#include <stdio.h>
#include <inttypes.h>
#include <limits.h>
+/* PATCH: Sortix does not currently have maximum filename or path length */
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+#ifndef NAME_MAX
+#define NAME_MAX 255
+#endif
#include <string.h>
#ifdef HAVE_FNMATCH
#include <fnmatch.h>
diff -Paur --no-dereference -- dash.upstream/src/histedit.c dash/src/histedit.c diff -Paur --no-dereference -- dash.upstream/src/histedit.c dash/src/histedit.c
--- dash.upstream/src/histedit.c --- dash.upstream/src/histedit.c
+++ dash/src/histedit.c +++ dash/src/histedit.c
@ -53,7 +70,7 @@ diff -Paur --no-dereference -- dash.upstream/src/jobs.c dash/src/jobs.c
#ifdef BSD #ifdef BSD
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/time.h> #include <sys/time.h>
@@ -207,7 +206,7 @@ @@ -212,7 +211,7 @@
mflag = on = 0; mflag = on = 0;
goto close; goto close;
} }
@ -62,7 +79,7 @@ diff -Paur --no-dereference -- dash.upstream/src/jobs.c dash/src/jobs.c
break; break;
killpg(0, SIGTTIN); killpg(0, SIGTTIN);
} while (1); } while (1);
@@ -457,7 +456,7 @@ @@ -461,7 +460,7 @@
if (mode & SHOW_PGID) { if (mode & SHOW_PGID) {
/* just output process (group) id of pipeline */ /* just output process (group) id of pipeline */
@ -71,7 +88,7 @@ diff -Paur --no-dereference -- dash.upstream/src/jobs.c dash/src/jobs.c
return; return;
} }
@@ -470,7 +469,7 @@ @@ -474,7 +473,7 @@
s[col - 2] = '-'; s[col - 2] = '-';
if (mode & SHOW_PID) if (mode & SHOW_PID)
@ -80,7 +97,7 @@ diff -Paur --no-dereference -- dash.upstream/src/jobs.c dash/src/jobs.c
psend = ps + jp->nprocs; psend = ps + jp->nprocs;
@@ -490,7 +489,7 @@ @@ -494,7 +493,7 @@
do { do {
/* for each process */ /* for each process */
@ -89,31 +106,58 @@ diff -Paur --no-dereference -- dash.upstream/src/jobs.c dash/src/jobs.c
start: start:
outfmt( outfmt(
@@ -1136,7 +1135,7 @@ @@ -971,7 +970,7 @@
sigblockall(NULL);
vforked++;
- pid = vfork();
+ pid = fork();
if (!pid) {
forkchild(jp, n, FORK_FG);
@@ -1179,7 +1178,7 @@
do { do {
gotsigchld = 0; gotsigchld = 0;
- err = wait3(status, flags, NULL); do
+ err = waitpid(-1, status, flags); - err = wait3(status, flags, NULL);
if (err || !block) + err = waitpid(-1, status, flags);
break; while (err < 0 && errno == EINTR);
if (err || (err = -!block))
diff -Paur --no-dereference -- dash.upstream/src/Makefile.in dash/src/Makefile.in diff -Paur --no-dereference -- dash.upstream/src/Makefile.in dash/src/Makefile.in
--- dash.upstream/src/Makefile.in --- dash.upstream/src/Makefile.in
+++ dash/src/Makefile.in +++ dash/src/Makefile.in
@@ -170,9 +170,9 @@ @@ -669,12 +669,14 @@
AM_CFLAGS = $(COMMON_CFLAGS) -rm -f ./$(DEPDIR)/alias.Po
AM_CPPFLAGS = $(COMMON_CPPFLAGS) -rm -f ./$(DEPDIR)/arith_yacc.Po
AM_CFLAGS_FOR_BUILD = -g -O2 $(COMMON_CFLAGS) -rm -f ./$(DEPDIR)/arith_yylex.Po
-AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS) + -rm -f ./$(DEPDIR)/builtins.Po
+AM_CPPFLAGS_FOR_BUILD = -DBSD=1 -DSHELL -DIFS_BROKEN -rm -f ./$(DEPDIR)/cd.Po
COMPILE_FOR_BUILD = \ -rm -f ./$(DEPDIR)/error.Po
- $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS_FOR_BUILD) \ -rm -f ./$(DEPDIR)/eval.Po
+ unset HOST_SYSTEM_ROOT && $(CC_FOR_BUILD) $(DEFAULT_INCLUDES) $(AM_CPPFLAGS_FOR_BUILD) \ -rm -f ./$(DEPDIR)/exec.Po
$(CPPFLAGS_FOR_BUILD) \ -rm -f ./$(DEPDIR)/expand.Po
$(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -rm -f ./$(DEPDIR)/histedit.Po
+ -rm -f ./$(DEPDIR)/init.Po
@@ -542,7 +542,11 @@ -rm -f ./$(DEPDIR)/input.Po
-rm -f ./$(DEPDIR)/jobs.Po
-rm -f ./$(DEPDIR)/mail.Po
@@ -682,11 +684,14 @@
-rm -f ./$(DEPDIR)/memalloc.Po
-rm -f ./$(DEPDIR)/miscbltin.Po
-rm -f ./$(DEPDIR)/mystring.Po
+ -rm -f ./$(DEPDIR)/nodes.Po
-rm -f ./$(DEPDIR)/options.Po
-rm -f ./$(DEPDIR)/output.Po
-rm -f ./$(DEPDIR)/parser.Po
-rm -f ./$(DEPDIR)/redir.Po
-rm -f ./$(DEPDIR)/show.Po
+ -rm -f ./$(DEPDIR)/signames.Po
+ -rm -f ./$(DEPDIR)/syntax.Po
-rm -f ./$(DEPDIR)/system.Po
-rm -f ./$(DEPDIR)/trap.Po
-rm -f ./$(DEPDIR)/var.Po
@@ -709,7 +714,11 @@
info-am: info-am:
@ -151,18 +195,18 @@ diff -Paur --no-dereference -- dash.upstream/src/output.c dash/src/output.c
diff -Paur --no-dereference -- dash.upstream/src/parser.c dash/src/parser.c diff -Paur --no-dereference -- dash.upstream/src/parser.c dash/src/parser.c
--- dash.upstream/src/parser.c --- dash.upstream/src/parser.c
+++ dash/src/parser.c +++ dash/src/parser.c
@@ -32,10 +32,6 @@ @@ -32,10 +32,7 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
-#if HAVE_ALLOCA_H -#if HAVE_ALLOCA_H
-#include <alloca.h> #include <alloca.h>
-#endif -#endif
- -
#include <stdlib.h> #include <stdlib.h>
#include "shell.h" #include "shell.h"
@@ -1090,10 +1086,12 @@ @@ -1137,10 +1134,12 @@
if (len) { if (len) {
char *str; char *str;
@ -176,7 +220,7 @@ diff -Paur --no-dereference -- dash.upstream/src/parser.c dash/src/parser.c
} }
} }
} }
@@ -1300,7 +1298,7 @@ @@ -1373,7 +1372,7 @@
str = NULL; str = NULL;
savelen = out - (char *)stackblock(); savelen = out - (char *)stackblock();
if (savelen > 0) { if (savelen > 0) {
@ -185,7 +229,7 @@ diff -Paur --no-dereference -- dash.upstream/src/parser.c dash/src/parser.c
memcpy(str, stackblock(), savelen); memcpy(str, stackblock(), savelen);
} }
if (oldstyle) { if (oldstyle) {
@@ -1400,6 +1398,7 @@ @@ -1463,6 +1462,7 @@
if (str) { if (str) {
memcpy(out, str, savelen); memcpy(out, str, savelen);
STADJUST(savelen, out); STADJUST(savelen, out);

View File

@ -1,10 +1,12 @@
NAME=dash NAME=dash
BUILD_LIBRARIES= BUILD_LIBRARIES=
VERSION=0.5.7 VERSION=0.5.11.5
DISTNAME=$NAME-$VERSION DISTNAME=$NAME-$VERSION
COMPRESSION=tar.gz COMPRESSION=tar.gz
ARCHIVE=$DISTNAME.$COMPRESSION ARCHIVE=$DISTNAME.$COMPRESSION
SHA256SUM=ae89fa9f1145b7748cf0740e1df04cd52fdf8a285da4911dd0f04983efba4e39 SHA256SUM=db778110891f7937985f29bf23410fe1c5d669502760f584e54e0e7b29e123bd
UPSTREAM_SITE='http://gondor.apana.org.au/~herbert/dash/files' UPSTREAM_SITE='http://gondor.apana.org.au/~herbert/dash/files'
UPSTREAM_ARCHIVE=$ARCHIVE UPSTREAM_ARCHIVE=$ARCHIVE
LICENSE=BSD-3-Clause
BUILD_SYSTEM=configure BUILD_SYSTEM=configure
MAKE_VARS='V=1'