Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan Drewery <bryan@shatow.net>2018-01-27 01:35:23 +0300
committerBryan Drewery <bryan@shatow.net>2018-01-27 01:41:47 +0300
commit6667b2bc875c54667c1ad5f2446b6ed739fc358c (patch)
tree8949174c6391f5acced698b6f3bef6269245b50c /external
parentfe0879a7c02d21e7af99529f1ca51ee3b7f5d2a0 (diff)
Update sh from FreeBSD r327475
Diffstat (limited to 'external')
-rw-r--r--external/sh/bltin/bltin.h4
-rw-r--r--external/sh/bltin/echo.c4
-rw-r--r--external/sh/cd.c13
-rw-r--r--external/sh/eval.c9
-rw-r--r--external/sh/jobs.c44
-rw-r--r--external/sh/jobs.h37
-rw-r--r--external/sh/kill.c4
-rw-r--r--external/sh/mail.h4
-rw-r--r--external/sh/main.c4
-rw-r--r--external/sh/main.h4
-rw-r--r--external/sh/memalloc.c4
-rw-r--r--external/sh/memalloc.h4
-rw-r--r--external/sh/miscbltin.c4
-rw-r--r--external/sh/myhistedit.h4
-rw-r--r--external/sh/mystring.c4
-rw-r--r--external/sh/mystring.h4
-rw-r--r--external/sh/options.c13
-rw-r--r--external/sh/options.h4
-rw-r--r--external/sh/output.c4
-rw-r--r--external/sh/output.h4
-rw-r--r--external/sh/parser.c4
-rw-r--r--external/sh/parser.h4
-rw-r--r--external/sh/printf.c4
-rw-r--r--external/sh/redir.c4
-rw-r--r--external/sh/redir.h4
-rw-r--r--external/sh/shell.h4
-rw-r--r--external/sh/show.c4
-rw-r--r--external/sh/show.h4
-rw-r--r--external/sh/trap.c4
-rw-r--r--external/sh/trap.h4
-rw-r--r--external/sh/var.c4
-rw-r--r--external/sh/var.h4
32 files changed, 143 insertions, 81 deletions
diff --git a/external/sh/bltin/bltin.h b/external/sh/bltin/bltin.h
index 8a1375a6..b8c20875 100644
--- a/external/sh/bltin/bltin.h
+++ b/external/sh/bltin/bltin.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)bltin.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/bltin/bltin.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/bltin/bltin.h 326025 2017-11-20 19:49:47Z pfg $
*/
/*
diff --git a/external/sh/bltin/echo.c b/external/sh/bltin/echo.c
index 0d37aa36..1bb64c6d 100644
--- a/external/sh/bltin/echo.c
+++ b/external/sh/bltin/echo.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -33,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/bltin/echo.c 314436 2017-02-28 23:42:47Z imp $");
+__FBSDID("$FreeBSD: head/bin/sh/bltin/echo.c 326025 2017-11-20 19:49:47Z pfg $");
/*
* Echo command.
diff --git a/external/sh/cd.c b/external/sh/cd.c
index 9ac25602..cf63681f 100644
--- a/external/sh/cd.c
+++ b/external/sh/cd.c
@@ -36,7 +36,7 @@ static char sccsid[] = "@(#)cd.c 8.2 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/cd.c 314436 2017-02-28 23:42:47Z imp $");
+__FBSDID("$FreeBSD: head/bin/sh/cd.c 320340 2017-06-25 21:53:08Z jilles $");
#include <sys/types.h>
#include <sys/stat.h>
@@ -164,8 +164,17 @@ docd(char *dest, int print, int phys)
if ((phys || (rc = cdlogical(dest)) < 0) && (rc = cdphysical(dest)) < 0)
return (-1);
- if (print && iflag && curdir)
+ if (print && iflag && curdir) {
out1fmt("%s\n", curdir);
+ /*
+ * Ignore write errors to preserve the invariant that the
+ * current directory is changed iff the exit status is 0
+ * (or 1 if -e was given and the full pathname could not be
+ * determined).
+ */
+ flushout(out1);
+ outclearerror(out1);
+ }
return (rc);
}
diff --git a/external/sh/eval.c b/external/sh/eval.c
index 459c17e5..bb5f3ccc 100644
--- a/external/sh/eval.c
+++ b/external/sh/eval.c
@@ -36,14 +36,13 @@ static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/eval.c 319576 2017-06-04 21:02:48Z bdrewery $");
+__FBSDID("$FreeBSD: head/bin/sh/eval.c 327212 2017-12-26 16:23:18Z jilles $");
#include <paths.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/resource.h>
-#include <sys/wait.h> /* For WIFSIGNALED(status) */
#include <errno.h>
/*
@@ -840,7 +839,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd)
struct parsefile *savetopfile;
volatile int e;
char *lastarg;
- int realstatus;
+ int signaled;
int do_clearcmdentry;
const char *path = pathval();
int i;
@@ -1163,9 +1162,9 @@ cmddone:
parent: /* parent process gets here (if we forked) */
if (mode == FORK_FG) { /* argument to fork */
INTOFF;
- exitstatus = waitforjob(jp, &realstatus);
+ exitstatus = waitforjob(jp, &signaled);
INTON;
- if (iflag && loopnest > 0 && WIFSIGNALED(realstatus)) {
+ if (iflag && loopnest > 0 && signaled) {
evalskip = SKIPBREAK;
skipcount = loopnest;
}
diff --git a/external/sh/jobs.c b/external/sh/jobs.c
index 2d5a76cb..999c2519 100644
--- a/external/sh/jobs.c
+++ b/external/sh/jobs.c
@@ -36,7 +36,7 @@ static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/jobs.c 314436 2017-02-28 23:42:47Z imp $");
+__FBSDID("$FreeBSD: head/bin/sh/jobs.c 327475 2018-01-01 22:31:52Z jilles $");
#include <sys/ioctl.h>
#include <sys/param.h>
@@ -75,6 +75,42 @@ __FBSDID("$FreeBSD: head/bin/sh/jobs.c 314436 2017-02-28 23:42:47Z imp $");
#include "builtins.h"
+/*
+ * A job structure contains information about a job. A job is either a
+ * single process or a set of processes contained in a pipeline. In the
+ * latter case, pidlist will be non-NULL, and will point to a -1 terminated
+ * array of pids.
+ */
+
+struct procstat {
+ pid_t pid; /* process id */
+ int status; /* status flags (defined above) */
+ char *cmd; /* text of command being run */
+};
+
+
+/* states */
+#define JOBSTOPPED 1 /* all procs are stopped */
+#define JOBDONE 2 /* all procs are completed */
+
+
+struct job {
+ struct procstat ps0; /* status of process */
+ struct procstat *ps; /* status or processes when more than one */
+ short nprocs; /* number of processes */
+ pid_t pgrp; /* process group of this job */
+ char state; /* true if job is finished */
+ char used; /* true if this entry is in used */
+ char changed; /* true if status has changed */
+ char foreground; /* true if running in the foreground */
+ char remembered; /* true if $! referenced */
+#if JOBS
+ char jobctl; /* job running under job control */
+ struct job *next; /* job used after this one */
+#endif
+};
+
+
static struct job *jobtab; /* array of jobs */
static int njobs; /* size of array */
static pid_t backgndpid = -1; /* pid of last background process */
@@ -1016,7 +1052,7 @@ vforkexecshell(struct job *jp, char **argv, char **envp, const char *path, int i
*/
int
-waitforjob(struct job *jp, int *origstatus)
+waitforjob(struct job *jp, int *signaled)
{
#if JOBS
int propagate_int = jp->jobctl && jp->foreground;
@@ -1039,8 +1075,8 @@ waitforjob(struct job *jp, int *origstatus)
setcurjob(jp);
#endif
status = jp->ps[jp->nprocs - 1].status;
- if (origstatus != NULL)
- *origstatus = status;
+ if (signaled != NULL)
+ *signaled = WIFSIGNALED(status);
/* convert to 8 bits */
if (WIFEXITED(status))
st = WEXITSTATUS(status);
diff --git a/external/sh/jobs.h b/external/sh/jobs.h
index 4d7b64f2..f6d90a8b 100644
--- a/external/sh/jobs.h
+++ b/external/sh/jobs.h
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* @(#)jobs.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/jobs.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/jobs.h 327475 2018-01-01 22:31:52Z jilles $
*/
/* Mode argument to forkshell. Don't change FORK_FG or FORK_BG. */
@@ -40,40 +40,7 @@
#include <signal.h> /* for sig_atomic_t */
-/*
- * A job structure contains information about a job. A job is either a
- * single process or a set of processes contained in a pipeline. In the
- * latter case, pidlist will be non-NULL, and will point to a -1 terminated
- * array of pids.
- */
-
-struct procstat {
- pid_t pid; /* process id */
- int status; /* status flags (defined above) */
- char *cmd; /* text of command being run */
-};
-
-
-/* states */
-#define JOBSTOPPED 1 /* all procs are stopped */
-#define JOBDONE 2 /* all procs are completed */
-
-
-struct job {
- struct procstat ps0; /* status of process */
- struct procstat *ps; /* status or processes when more than one */
- short nprocs; /* number of processes */
- pid_t pgrp; /* process group of this job */
- char state; /* true if job is finished */
- char used; /* true if this entry is in used */
- char changed; /* true if status has changed */
- char foreground; /* true if running in the foreground */
- char remembered; /* true if $! referenced */
-#if JOBS
- char jobctl; /* job running under job control */
- struct job *next; /* job used after this one */
-#endif
-};
+struct job;
enum {
SHOWJOBS_DEFAULT, /* job number, status, command */
diff --git a/external/sh/kill.c b/external/sh/kill.c
index 028cbb2b..dbf345de 100644
--- a/external/sh/kill.c
+++ b/external/sh/kill.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1988, 1993, 1994
* The Regents of the University of California. All rights reserved.
*
@@ -43,7 +45,7 @@ static char sccsid[] = "@(#)kill.c 8.4 (Berkeley) 4/28/95";
#endif /* not lint */
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/kill/kill.c 314714 2017-03-05 21:56:04Z bdrewery $");
+__FBSDID("$FreeBSD: head/bin/kill/kill.c 326025 2017-11-20 19:49:47Z pfg $");
#include <ctype.h>
#include <err.h>
diff --git a/external/sh/mail.h b/external/sh/mail.h
index f334ee02..509f11c5 100644
--- a/external/sh/mail.h
+++ b/external/sh/mail.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)mail.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/mail.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/mail.h 326025 2017-11-20 19:49:47Z pfg $
*/
void chkmail(int);
diff --git a/external/sh/main.c b/external/sh/main.c
index 2acb95fa..338f97cf 100644
--- a/external/sh/main.c
+++ b/external/sh/main.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -42,7 +44,7 @@ static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/28/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/main.c 314436 2017-02-28 23:42:47Z imp $");
+__FBSDID("$FreeBSD: head/bin/sh/main.c 326025 2017-11-20 19:49:47Z pfg $");
#include <stdio.h>
#include <signal.h>
diff --git a/external/sh/main.h b/external/sh/main.h
index 47c3265e..ed160cd3 100644
--- a/external/sh/main.h
+++ b/external/sh/main.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)main.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/main.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/main.h 326025 2017-11-20 19:49:47Z pfg $
*/
extern int rootpid; /* pid of main shell */
diff --git a/external/sh/memalloc.c b/external/sh/memalloc.c
index 3aa3d157..7b5f3250 100644
--- a/external/sh/memalloc.c
+++ b/external/sh/memalloc.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -36,7 +38,7 @@ static char sccsid[] = "@(#)memalloc.c 8.3 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/memalloc.c 314436 2017-02-28 23:42:47Z imp $");
+__FBSDID("$FreeBSD: head/bin/sh/memalloc.c 326025 2017-11-20 19:49:47Z pfg $");
#include <sys/param.h>
#include "shell.h"
diff --git a/external/sh/memalloc.h b/external/sh/memalloc.h
index 74cdd323..180abfd4 100644
--- a/external/sh/memalloc.h
+++ b/external/sh/memalloc.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)memalloc.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/memalloc.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/memalloc.h 326025 2017-11-20 19:49:47Z pfg $
*/
#include <string.h>
diff --git a/external/sh/miscbltin.c b/external/sh/miscbltin.c
index 2e7a3a2b..b3534da1 100644
--- a/external/sh/miscbltin.c
+++ b/external/sh/miscbltin.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -36,7 +38,7 @@ static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/miscbltin.c 316744 2017-04-12 21:15:55Z jilles $");
+__FBSDID("$FreeBSD: head/bin/sh/miscbltin.c 326025 2017-11-20 19:49:47Z pfg $");
/*
* Miscellaneous builtins.
diff --git a/external/sh/myhistedit.h b/external/sh/myhistedit.h
index 882166e3..3dbad7e4 100644
--- a/external/sh/myhistedit.h
+++ b/external/sh/myhistedit.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
*
@@ -27,7 +29,7 @@
* SUCH DAMAGE.
*
* @(#)myhistedit.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/myhistedit.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/myhistedit.h 326025 2017-11-20 19:49:47Z pfg $
*/
#include <histedit.h>
diff --git a/external/sh/mystring.c b/external/sh/mystring.c
index 2b07de2a..7e17e23f 100644
--- a/external/sh/mystring.c
+++ b/external/sh/mystring.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -36,7 +38,7 @@ static char sccsid[] = "@(#)mystring.c 8.2 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/mystring.c 314436 2017-02-28 23:42:47Z imp $");
+__FBSDID("$FreeBSD: head/bin/sh/mystring.c 326025 2017-11-20 19:49:47Z pfg $");
/*
* String functions.
diff --git a/external/sh/mystring.h b/external/sh/mystring.h
index a99ad87b..31d7891f 100644
--- a/external/sh/mystring.h
+++ b/external/sh/mystring.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)mystring.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/mystring.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/mystring.h 326025 2017-11-20 19:49:47Z pfg $
*/
#include <string.h>
diff --git a/external/sh/options.c b/external/sh/options.c
index 81e48874..0628e73a 100644
--- a/external/sh/options.c
+++ b/external/sh/options.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -36,7 +38,7 @@ static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/options.c 317882 2017-05-06 13:28:42Z jilles $");
+__FBSDID("$FreeBSD: head/bin/sh/options.c 326025 2017-11-20 19:49:47Z pfg $");
#include <signal.h>
#include <unistd.h>
@@ -191,16 +193,11 @@ options(int cmdline)
while ((c = *p++) != '\0') {
if (c == 'c' && cmdline) {
char *q;
-#ifdef NOHACK /* removing this code allows sh -ce 'foo' for compat */
- if (*p == '\0')
-#endif
- q = *argptr++;
+
+ q = *argptr++;
if (q == NULL || minusc != NULL)
error("Bad -c option");
minusc = q;
-#ifdef NOHACK
- break;
-#endif
} else if (c == 'o') {
minus_o(*argptr, val);
if (*argptr)
diff --git a/external/sh/options.h b/external/sh/options.h
index 98baa9e3..233e9c62 100644
--- a/external/sh/options.h
+++ b/external/sh/options.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)options.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/options.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/options.h 326025 2017-11-20 19:49:47Z pfg $
*/
struct shparam {
diff --git a/external/sh/output.c b/external/sh/output.c
index 3eb2fa39..737eb91c 100644
--- a/external/sh/output.c
+++ b/external/sh/output.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -36,7 +38,7 @@ static char sccsid[] = "@(#)output.c 8.2 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/output.c 318502 2017-05-18 22:10:04Z jilles $");
+__FBSDID("$FreeBSD: head/bin/sh/output.c 326025 2017-11-20 19:49:47Z pfg $");
/*
* Shell output routines. We use our own output routines because:
diff --git a/external/sh/output.h b/external/sh/output.h
index 0bbb06cb..652187a1 100644
--- a/external/sh/output.h
+++ b/external/sh/output.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)output.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/output.h 318385 2017-05-16 21:54:51Z jilles $
+ * $FreeBSD: head/bin/sh/output.h 326025 2017-11-20 19:49:47Z pfg $
*/
#ifndef OUTPUT_INCL
diff --git a/external/sh/parser.c b/external/sh/parser.c
index 1a79b753..799e3b53 100644
--- a/external/sh/parser.c
+++ b/external/sh/parser.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -36,7 +38,7 @@ static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/parser.c 314436 2017-02-28 23:42:47Z imp $");
+__FBSDID("$FreeBSD: head/bin/sh/parser.c 326025 2017-11-20 19:49:47Z pfg $");
#include <stdlib.h>
#include <unistd.h>
diff --git a/external/sh/parser.h b/external/sh/parser.h
index 2bdfbc20..210726bd 100644
--- a/external/sh/parser.h
+++ b/external/sh/parser.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)parser.h 8.3 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/parser.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/parser.h 326025 2017-11-20 19:49:47Z pfg $
*/
/* control characters in argument strings */
diff --git a/external/sh/printf.c b/external/sh/printf.c
index dea39695..c391d039 100644
--- a/external/sh/printf.c
+++ b/external/sh/printf.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
* Copyright 2010 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 1989, 1993
@@ -46,7 +48,7 @@ static char const copyright[] =
static char const sccsid[] = "@(#)printf.c 8.1 (Berkeley) 7/20/93";
#endif
static const char rcsid[] =
- "$FreeBSD: head/usr.bin/printf/printf.c 317598 2017-04-29 21:48:11Z jilles $";
+ "$FreeBSD: head/usr.bin/printf/printf.c 326025 2017-11-20 19:49:47Z pfg $";
#endif /* not lint */
#include <sys/types.h>
diff --git a/external/sh/redir.c b/external/sh/redir.c
index 213e3c4c..8f415a6c 100644
--- a/external/sh/redir.c
+++ b/external/sh/redir.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -36,7 +38,7 @@ static char sccsid[] = "@(#)redir.c 8.2 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/redir.c 314436 2017-02-28 23:42:47Z imp $");
+__FBSDID("$FreeBSD: head/bin/sh/redir.c 326025 2017-11-20 19:49:47Z pfg $");
#include <sys/types.h>
#include <sys/stat.h>
diff --git a/external/sh/redir.h b/external/sh/redir.h
index 87800268..74d17b13 100644
--- a/external/sh/redir.h
+++ b/external/sh/redir.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)redir.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/redir.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/redir.h 326025 2017-11-20 19:49:47Z pfg $
*/
/* flags passed to redirect */
diff --git a/external/sh/shell.h b/external/sh/shell.h
index a4fd78fa..1c7a7662 100644
--- a/external/sh/shell.h
+++ b/external/sh/shell.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)shell.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/shell.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/shell.h 326025 2017-11-20 19:49:47Z pfg $
*/
#ifndef SHELL_H_
diff --git a/external/sh/show.c b/external/sh/show.c
index 0807db37..9b55708c 100644
--- a/external/sh/show.c
+++ b/external/sh/show.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -36,7 +38,7 @@ static char sccsid[] = "@(#)show.c 8.3 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/show.c 314436 2017-02-28 23:42:47Z imp $");
+__FBSDID("$FreeBSD: head/bin/sh/show.c 326025 2017-11-20 19:49:47Z pfg $");
#include <fcntl.h>
#include <stdio.h>
diff --git a/external/sh/show.h b/external/sh/show.h
index c9d0705c..fc5ef76a 100644
--- a/external/sh/show.h
+++ b/external/sh/show.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1995
* The Regents of the University of California. All rights reserved.
*
@@ -27,7 +29,7 @@
* SUCH DAMAGE.
*
* @(#)show.h 1.1 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/show.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/show.h 326025 2017-11-20 19:49:47Z pfg $
*/
void showtree(union node *);
diff --git a/external/sh/trap.c b/external/sh/trap.c
index 820ad623..d6b0dfa2 100644
--- a/external/sh/trap.c
+++ b/external/sh/trap.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -36,7 +38,7 @@ static char sccsid[] = "@(#)trap.c 8.5 (Berkeley) 6/5/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/trap.c 319826 2017-06-11 16:54:04Z jilles $");
+__FBSDID("$FreeBSD: head/bin/sh/trap.c 326025 2017-11-20 19:49:47Z pfg $");
#include <signal.h>
#include <unistd.h>
diff --git a/external/sh/trap.h b/external/sh/trap.h
index e4fa67ab..90ba054d 100644
--- a/external/sh/trap.h
+++ b/external/sh/trap.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)trap.h 8.3 (Berkeley) 6/5/95
- * $FreeBSD: head/bin/sh/trap.h 317298 2017-04-22 21:31:37Z jilles $
+ * $FreeBSD: head/bin/sh/trap.h 326025 2017-11-20 19:49:47Z pfg $
*/
extern volatile sig_atomic_t pendingsig;
diff --git a/external/sh/var.c b/external/sh/var.c
index 9a293a2e..f7ddf0bc 100644
--- a/external/sh/var.c
+++ b/external/sh/var.c
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -36,7 +38,7 @@ static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 5/4/95";
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: head/bin/sh/var.c 317912 2017-05-07 19:49:46Z jilles $");
+__FBSDID("$FreeBSD: head/bin/sh/var.c 326025 2017-11-20 19:49:47Z pfg $");
#include <unistd.h>
#include <stdlib.h>
diff --git a/external/sh/var.h b/external/sh/var.h
index 44b9e16f..c9b5a990 100644
--- a/external/sh/var.h
+++ b/external/sh/var.h
@@ -1,4 +1,6 @@
/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
* Copyright (c) 1991, 1993
* The Regents of the University of California. All rights reserved.
*
@@ -30,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)var.h 8.2 (Berkeley) 5/4/95
- * $FreeBSD: head/bin/sh/var.h 314436 2017-02-28 23:42:47Z imp $
+ * $FreeBSD: head/bin/sh/var.h 326025 2017-11-20 19:49:47Z pfg $
*/
/*