diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-12-30 20:31:24 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-12-30 20:31:24 +0000 |
commit | 72dd49d7dd07ba4cae13ee1249fd58550991c188 (patch) | |
tree | e85f546a63dcdd99e806071ea88b83282341d82a | |
parent | d9b6a5820f195ef681d7cd15d70a184265b37a94 (diff) | |
download | execline-72dd49d7dd07ba4cae13ee1249fd58550991c188.tar.gz execline-72dd49d7dd07ba4cae13ee1249fd58550991c188.tar.xz execline-72dd49d7dd07ba4cae13ee1249fd58550991c188.zip |
Rename cd/umask to execline-cd/execline-umask, make symlinks, etc.
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | NEWS | 9 | ||||
-rwxr-xr-x | configure | 5 | ||||
-rw-r--r-- | doc/cd.html | 50 | ||||
-rw-r--r-- | doc/execline-cd.html | 54 | ||||
-rw-r--r-- | doc/execline-umask.html | 50 | ||||
-rw-r--r-- | doc/index.html | 4 | ||||
-rw-r--r-- | doc/posix-cd.html | 23 | ||||
-rw-r--r-- | doc/posix-umask.html | 22 | ||||
-rw-r--r-- | doc/umask.html | 48 | ||||
-rw-r--r-- | doc/upgrade.html | 6 | ||||
-rw-r--r-- | package/deps.mak | 12 | ||||
-rw-r--r-- | package/targets.mak | 22 | ||||
-rw-r--r-- | src/execline/deps-exe/execline-cd (renamed from src/execline/deps-exe/cd) | 0 | ||||
-rw-r--r-- | src/execline/deps-exe/execline-umask (renamed from src/execline/deps-exe/umask) | 0 | ||||
-rw-r--r-- | src/execline/execline-cd.c (renamed from src/execline/cd.c) | 2 | ||||
-rw-r--r-- | src/execline/execline-umask.c (renamed from src/execline/umask.c) | 2 | ||||
-rw-r--r-- | src/execline/wait.c | 10 |
18 files changed, 183 insertions, 141 deletions
diff --git a/.gitignore b/.gitignore index 0631586..7103ade 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,6 @@ /src/include/execline/config.h /background /backtick -/cd /define /dollarat /elgetopt @@ -16,6 +15,8 @@ /envfile /exec /execlineb +/execline-cd +/execline-umask /exit /export /fdblock @@ -43,6 +44,7 @@ /pipeline /piperw /posix-cd +/posix-umask /redirfd /runblock /shift @@ -52,4 +54,3 @@ /unexport /wait /withstdinas - diff --git a/NEWS b/NEWS index 7ae513e..6e42862 100644 --- a/NEWS +++ b/NEWS @@ -5,9 +5,12 @@ In 2.6.0.0 - The dollarat program now has its conflicting -0 and -d options handled in the conventional way, with rightmost priority. - - New binary: posix-umask. With --enable-pedantic-posix, -umask is a symbolic link to posix-umask. And, hopefully, this -completes the "make execline POSIX-compliant" chapter. + - New binary: posix-umask. + - cd renamed to execline-cd, umask renamed to execline-umask + - With --enable-pedantic-posix, umask is a symbolic link to +posix-umask and cd is a symbolic link to posix-cd. Without this +option, umask is a symbolic link to execline-umask and cd is +a symbolic link to execline-cd. In 2.5.3.0 diff --git a/configure b/configure index 39777fe..f2fb757 100755 --- a/configure +++ b/configure @@ -494,6 +494,11 @@ fi echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir/\"" echo "#define ${package_macro_name}_SHEBANGPREFIX \"$shebangdir/\"" echo +echo "#undef ${package_macro_name}_PEDANTIC_POSIX" +if $pposix ; then +echo "#define ${package_macro_name}_PEDANTIC_POSIX" +fi +echo echo "#endif" exec 1>&3 3>&- echo " ... done." diff --git a/doc/cd.html b/doc/cd.html deleted file mode 100644 index fe64c19..0000000 --- a/doc/cd.html +++ /dev/null @@ -1,50 +0,0 @@ -<html> - <head> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <meta http-equiv="Content-Language" content="en" /> - <title>execline: the cd command</title> - <meta name="Description" content="execline: the cd command" /> - <meta name="Keywords" content="execline command cd chdir" /> - <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> -</head> -<body> - -<p> -<a href="index.html">execline</a><br /> -<a href="//skarnet.org/software/">Software</a><br /> -<a href="//skarnet.org/">skarnet.org</a> -</p> - -<h1> The <tt>cd</tt> program </h1> - -<p> -<tt>cd</tt> changes the current working directory to a -given directory, then executes a program. -</p> - -<h2> Interface </h2> - -<pre> - cd <em>dir</em> <em>prog...</em> -</pre> - -<p> -<tt>cd</tt> performs a -<a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html">chdir()</a> -system call on <em>dir</em>, then execs into <em>prog...</em>. -</p> - -<h2> Notes </h2> - -<ul> - <li> <tt>cd</tt> is a standard shell builtin. Be careful if you want to -use the <tt>cd</tt> command outside of an <tt>execline</tt> script </li> - <li> When execline has been configured with the <tt>--enable-pedantic-posix</tt> -option, the <tt>cd</tt> binary is actually a symbolic link to the -<a href="posix-cd.html">posix-cd</a> binary. </li> -</ul> - - -</body> -</html> diff --git a/doc/execline-cd.html b/doc/execline-cd.html new file mode 100644 index 0000000..911eb2a --- /dev/null +++ b/doc/execline-cd.html @@ -0,0 +1,54 @@ +<html> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>execline: the execline-cd command</title> + <meta name="Description" content="execline: the execline-cd command" /> + <meta name="Keywords" content="execline command cd chdir execline-cd" /> + <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> +</head> +<body> + +<p> +<a href="index.html">execline</a><br /> +<a href="//skarnet.org/software/">Software</a><br /> +<a href="//skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>execline-cd</tt> program </h1> + +<p> +<tt>execline-cd</tt> changes the current working directory to a +given directory, then executes a program. +</p> + +<h2> Interface </h2> + +<pre> + execline-cd <em>dir</em> <em>prog...</em> +</pre> + +<p> +<tt>execline-cd</tt> performs a +<a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html">chdir()</a> +system call on <em>dir</em>, then execs into <em>prog...</em>. +</p> + +<h2> Notes </h2> + +<ul> + <li> By default, <tt>execline-cd</tt> can also be invoked as <tt>cd</tt>: +there is a <tt>cd</tt> program which is a symbolic link to <tt>execline-cd</tt>. </li> + <li> When execline has been configured with the <tt>--enable-pedantic-posix</tt> +option, the <tt>cd</tt> binary is a symbolic link to the +<a href="posix-cd.html">posix-cd</a> binary instead, so a <tt>cd</tt> command +in an execline script will invoke <a href="posix-cd.html">posix-cd</a> instead +of <tt>execline-cd</tt>. </li> + <li> Existing scripts that call <tt>cd</tt> will keep working no matter the +chosen configuration. </li> +</ul> + + +</body> +</html> diff --git a/doc/execline-umask.html b/doc/execline-umask.html new file mode 100644 index 0000000..f01343d --- /dev/null +++ b/doc/execline-umask.html @@ -0,0 +1,50 @@ +<html> + <head> + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>execline: the execline-umask command</title> + <meta name="Description" content="execline: the execline-umask command" /> + <meta name="Keywords" content="execline command umask execline-umask" /> + <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">execline</a><br /> +<a href="//skarnet.org/software/">Software</a><br /> +<a href="//skarnet.org/">skarnet.org</a> +</p> + +<h1> The <tt>execline-umask</tt> program </h1> + +<p> +<tt>execline-umask</tt> sets the umask (file creation mask), +then executes a program. +</p> + +<h2> Interface </h2> + +<pre> + execline-umask <em>mask</em> <em>prog...</em> +</pre> + +<p> +<tt>execline-umask</tt> sets the current umask to <em>mask</em>, +then execs into <em>prog...</em>. +</p> + +<h2> Notes </h2> + +<ul> +<li> By default, at execline installation time, a <tt>umask</tt> +symbolic link is created, pointing to <tt>execline-umask</tt>. + <li> When execline has been configured with the <tt>--enable-pedantic-posix</tt> +option, the <tt>umask</tt> symbolic link points to the +<a href="posix-umask.html">posix-umask</a> binary instead. </li> + <li> Existing execline scripts calling <tt>umask</tt> will keep working +no matter the chosen configuration. </li> +</ul> + +</body> +</html> diff --git a/doc/index.html b/doc/index.html index d93f704..498bb13 100644 --- a/doc/index.html +++ b/doc/index.html @@ -125,9 +125,9 @@ to your installation: the shebang lines for your system might be something like (Process state control) </p> <ul> -<li><a href="cd.html">The <tt>cd</tt> program</a></li> +<li><a href="execline-cd.html">The <tt>execline-cd</tt> program</a></li> <li><a href="posix-cd.html">The <tt>posix-cd</tt> program</a></li> -<li><a href="umask.html">The <tt>umask</tt> program</a></li> +<li><a href="execline-umask.html">The <tt>execline-umask</tt> program</a></li> <li><a href="posix-umask.html">The <tt>posix-umask</tt> program</a></li> <li><a href="emptyenv.html">The <tt>emptyenv</tt> program</a></li> <li><a href="envfile.html">The <tt>envfile</tt> program</a></li> diff --git a/doc/posix-cd.html b/doc/posix-cd.html index 5074658..fc40203 100644 --- a/doc/posix-cd.html +++ b/doc/posix-cd.html @@ -40,23 +40,26 @@ not empty, it execs into it. <h2> Notes </h2> <ul> - <li> <tt>posix-cd</tt> is only available when execline has been configured -with the <tt>--enable-pedantic-posix</tt> option, and in this case, the -<a href="cd.html">cd</a> binary is a symbolic link to it. </li> + <li> When execline has been configured +with the <tt>--enable-pedantic-posix</tt> option, the <tt>cd</tt> +command is a symbolic link to it. So scripts calling <tt>cd</tt> +will use <tt>posix-cd</tt>. When this configuration option has not +been given, <tt>cd</tt> is a symbolic link to +<a href="execline-cd.html">execline-cd</a>. </li> <li> <tt>posix-cd</tt> fully conforms to the <a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cd.html">POSIX specification</a>. When <em>prog...</em> is not empty, the behaviour of a <tt>cd</tt> utility is not specified by POSIX, so <tt>posix-cd</tt> extends the spec to be actually useful and usable in an execline program with the same -interface as the regular execline <a href="cd.html">cd</a> command. </li> +interface as the regular execline <a href="execline-cd.html">cd</a> command. </li> <li> Nobody ever executes or needs the external version (i.e. not a shell -builtin) of the POSIX <tt>cd</tt> command. Compared to the regular execline -<a href="cd.html">cd</a>, <tt>posix-cd</tt> is uselessly bloated and slow. -The only reason it exists is that some distributions refuse to package -execline correctly unless it is strictly POSIX-compliant; the -<tt>--enable-pedantic-posix</tt> configure option is there to appease them. </li> +builtin) of the POSIX <tt>cd</tt> command. Compared to execline's regular <tt>cd</tt> +binary, <a href="execline-cd.html">execline-cd</a>, <tt>posix-cd</tt> is +uselessly bloated and slow. The only reason it exists is that some +distributions refuse to package execline correctly unless it is strictly +POSIX-compliant; the <tt>--enable-pedantic-posix</tt> configure option is +there to satisfy their requirements. </li> </ul> - </body> </html> diff --git a/doc/posix-umask.html b/doc/posix-umask.html index 4ee310d..0d89e58 100644 --- a/doc/posix-umask.html +++ b/doc/posix-umask.html @@ -48,21 +48,25 @@ specification for a <tt>umask</tt> external utility</a>. <h2> Notes </h2> <ul> - <li> <tt>posix-umask</tt> is only available when execline has been configured -with the <tt>--enable-pedantic-posix</tt> option, and in this case, the -<a href="umask.html">cd</a> binary is a symbolic link to it. </li> + <li> When execline has been configured +with the <tt>--enable-pedantic-posix</tt> option, the <tt>umask</tt> +command is a symbolic link to it. So scripts calling <tt>umask</tt> +will use <tt>posix-umask</tt>. When this configuration option has not +been given, <tt>umask</tt> is a symbolic link to +<a href="execline-umask.html">execline-umask</a>. </li> <li> <tt>posix-umask</tt> fully conforms to the <a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/umask.html">POSIX specification</a>. When <em>prog...</em> is not empty, the behaviour of a <tt>umask</tt> utility is not specified by POSIX, so <tt>posix-umask</tt> extends the spec to be actually useful and usable in an execline program with the same -interface as the regular execline <a href="umask.html">umask</a> command. </li> +interface as the regular execline <a href="execline-umask.html">umask</a> command. </li> <li> Nobody ever executes or needs the external version (i.e. not a shell -builtin) of the POSIX <tt>umask</tt> command. Compared to the regular execline -<a href="umask.html">umask</a>, <tt>posix-umask</tt> is uselessly bloated and slow. -The only reason it exists is that some distributions refuse to package -execline correctly unless it is strictly POSIX-compliant; the -<tt>--enable-pedantic-posix</tt> configure option is there to appease them. </li> +builtin) of the POSIX <tt>umask</tt> command. Compared to execline's regular <tt>umask</tt> +binary, <a href="execline-umask.html">execline-umask</a>, <tt>posix-umask</tt> is +uselessly bloated and slow. The only reason it exists is that some +distributions refuse to package execline correctly unless it is strictly +POSIX-compliant; the <tt>--enable-pedantic-posix</tt> configure option is +there to satisfy their requirements. </li> </ul> </body> diff --git a/doc/umask.html b/doc/umask.html deleted file mode 100644 index 22ae137..0000000 --- a/doc/umask.html +++ /dev/null @@ -1,48 +0,0 @@ -<html> - <head> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> - <meta http-equiv="Content-Language" content="en" /> - <title>execline: the umask command</title> - <meta name="Description" content="execline: the umask command" /> - <meta name="Keywords" content="execline command umask" /> - <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> - </head> -<body> - -<p> -<a href="index.html">execline</a><br /> -<a href="//skarnet.org/software/">Software</a><br /> -<a href="//skarnet.org/">skarnet.org</a> -</p> - -<h1> The <tt>umask</tt> program </h1> - -<p> -<tt>umask</tt> sets the umask (file creation mask), -then executes a program. -</p> - -<h2> Interface </h2> - -<pre> - umask <em>mask</em> <em>prog...</em> -</pre> - -<p> -<tt>umask</tt> sets the current umask to <em>mask</em>, -then execs into <em>prog...</em>. -</p> - -<h2> Notes </h2> - -<ul> -<li> <tt>umask</tt> is a standard shell builtin. Be careful if you want to -use the <tt>umask</tt> command outside of an <tt>execline</tt> script. </li> - <li> When execline has been configured with the <tt>--enable-pedantic-posix</tt> -option, the <tt>umask</tt> binary is actually a symbolic link to the -<a href="posix-umask.html">posix-umask</a> binary. </li> -</ul> - -</body> -</html> diff --git a/doc/upgrade.html b/doc/upgrade.html index bbb10aa..e286098 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -24,6 +24,12 @@ <li> <a href="dollarat.html">dollarat</a> now has its <tt>-0</tt> and <tt>-d</tt> priority unified. (Rightmost priority.) </li> <li> New binary: <a href="posix-umask.html">posix-umask</a>. </li> + <li> <tt>cd</tt> has been renamed <a href="execline-cd.html">execline-cd</a>. </li> + <li> <tt>umask</tt> has been renamed <a href="execline-umask.html">execline-umask</a>. </li> + <li> At installation time, <tt>cd</tt> and <tt>umask</tt> symbolic links are created, +pointing to either the <tt>posix-</tt> or <tt>execline-</tt> -prefixed version of the +commands, depending on whether the <tt>--enable-pedantic-posix</tt> option +was given or not. </li> </ul> <h2> in 2.5.3.0 </h2> diff --git a/package/deps.mak b/package/deps.mak index f944bc7..3aac760 100644 --- a/package/deps.mak +++ b/package/deps.mak @@ -4,7 +4,6 @@ src/execline/background.o src/execline/background.lo: src/execline/background.c src/include/execline/execline.h src/execline/backtick.o src/execline/backtick.lo: src/execline/backtick.c src/include/execline/execline.h -src/execline/cd.o src/execline/cd.lo: src/execline/cd.c src/execline/define.o src/execline/define.lo: src/execline/define.c src/include-local/exlsn.h src/execline/dollarat.o src/execline/dollarat.lo: src/execline/dollarat.c src/execline/elgetopt.o src/execline/elgetopt.lo: src/execline/elgetopt.c src/include/execline/execline.h @@ -13,6 +12,8 @@ src/execline/elglob.o src/execline/elglob.lo: src/execline/elglob.c src/include- src/execline/emptyenv.o src/execline/emptyenv.lo: src/execline/emptyenv.c src/include/execline/execline.h src/execline/envfile.o src/execline/envfile.lo: src/execline/envfile.c src/execline/exec.o src/execline/exec.lo: src/execline/exec.c +src/execline/execline-cd.o src/execline/execline-cd.lo: src/execline/execline-cd.c +src/execline/execline-umask.o src/execline/execline-umask.lo: src/execline/execline-umask.c src/execline/execlineb.o src/execline/execlineb.lo: src/execline/execlineb.c src/include/execline/execline.h src/include-local/exlsn.h src/execline/exit.o src/execline/exit.lo: src/execline/exit.c src/execline/export.o src/execline/export.lo: src/execline/export.c @@ -44,7 +45,6 @@ src/execline/runblock.o src/execline/runblock.lo: src/execline/runblock.c src/in src/execline/shift.o src/execline/shift.lo: src/execline/shift.c src/include/execline/execline.h src/execline/trap.o src/execline/trap.lo: src/execline/trap.c src/include/execline/execline.h src/execline/tryexec.o src/execline/tryexec.lo: src/execline/tryexec.c src/include/execline/execline.h -src/execline/umask.o src/execline/umask.lo: src/execline/umask.c src/execline/unexport.o src/execline/unexport.lo: src/execline/unexport.c src/execline/wait.o src/execline/wait.lo: src/execline/wait.c src/include/execline/execline.h src/execline/withstdinas.o src/execline/withstdinas.lo: src/execline/withstdinas.c @@ -78,8 +78,6 @@ background: EXTRA_LIBS := -lskarnet ${SPAWN_LIB} background: src/execline/background.o ${LIBEXECLINE} backtick: EXTRA_LIBS := -lskarnet ${SPAWN_LIB} backtick: src/execline/backtick.o ${LIBEXECLINE} -cd: EXTRA_LIBS := -lskarnet -cd: src/execline/cd.o define: EXTRA_LIBS := -lskarnet define: src/execline/define.o ${LIBEXECLINE} dollarat: EXTRA_LIBS := -lskarnet @@ -96,6 +94,10 @@ envfile: EXTRA_LIBS := -lskarnet envfile: src/execline/envfile.o exec: EXTRA_LIBS := -lskarnet exec: src/execline/exec.o +execline-cd: EXTRA_LIBS := -lskarnet +execline-cd: src/execline/execline-cd.o +execline-umask: EXTRA_LIBS := -lskarnet +execline-umask: src/execline/execline-umask.o execlineb: EXTRA_LIBS := -lskarnet execlineb: src/execline/execlineb.o ${LIBEXECLINE} exit: EXTRA_LIBS := -lskarnet @@ -158,8 +160,6 @@ trap: EXTRA_LIBS := -lskarnet ${SPAWN_LIB} trap: src/execline/trap.o ${LIBEXECLINE} tryexec: EXTRA_LIBS := -lskarnet tryexec: src/execline/tryexec.o ${LIBEXECLINE} -umask: EXTRA_LIBS := -lskarnet -umask: src/execline/umask.o unexport: EXTRA_LIBS := -lskarnet unexport: src/execline/unexport.o wait: EXTRA_LIBS := -lskarnet diff --git a/package/targets.mak b/package/targets.mak index b502988..be4764d 100644 --- a/package/targets.mak +++ b/package/targets.mak @@ -1,7 +1,6 @@ BIN_TARGETS := \ background \ backtick \ -cd \ define \ dollarat \ elgetopt \ @@ -11,6 +10,8 @@ emptyenv \ envfile \ exec \ execlineb \ +execline-cd \ +execline-umask \ exit \ export \ fdblock \ @@ -36,12 +37,13 @@ multidefine \ multisubstitute \ pipeline \ piperw \ +posix-cd \ +posix-umask \ redirfd \ runblock \ shift \ trap \ tryexec \ -umask \ unexport \ wait \ withstdinas @@ -51,13 +53,15 @@ LIBEXEC_TARGETS := LIB_DEFS := EXECLINE=execline ifeq ($(PEDANTIC_POSIX),1) +PEDANTIC_PREFIX := posix +else +PEDANTIC_PREFIX := execline +endif -BIN_TARGETS += posix-cd posix-umask - -$(DESTDIR)$(bindir)/cd: $(DESTDIR)$(bindir)/posix-cd - exec ./tools/install.sh -l posix-cd $(DESTDIR)$(bindir)/cd +install-bin: $(DESTDIR)$(bindir)/cd $(DESTDIR)$(bindir)/umask -$(DESTDIR)$(bindir)/umask: $(DESTDIR)$(bindir)/posix-umask - exec ./tools/install.sh -l posix-umask $(DESTDIR)$(bindir)/umask +$(DESTDIR)$(bindir)/cd: $(DESTDIR)$(bindir)/$(PEDANTIC_PREFIX)-cd + exec ./tools/install.sh -l $(PEDANTIC_PREFIX)-cd $(DESTDIR)$(bindir)/cd -endif +$(DESTDIR)$(bindir)/umask: $(DESTDIR)$(bindir)/$(PEDANTIC_PREFIX)-umask + exec ./tools/install.sh -l $(PEDANTIC_PREFIX)-umask $(DESTDIR)$(bindir)/umask diff --git a/src/execline/deps-exe/cd b/src/execline/deps-exe/execline-cd index e7187fe..e7187fe 100644 --- a/src/execline/deps-exe/cd +++ b/src/execline/deps-exe/execline-cd diff --git a/src/execline/deps-exe/umask b/src/execline/deps-exe/execline-umask index e7187fe..e7187fe 100644 --- a/src/execline/deps-exe/umask +++ b/src/execline/deps-exe/execline-umask diff --git a/src/execline/cd.c b/src/execline/execline-cd.c index 62b877c..8f308f3 100644 --- a/src/execline/cd.c +++ b/src/execline/execline-cd.c @@ -8,7 +8,7 @@ int main (int argc, char const *const *argv, char const *const *envp) { - PROG = "cd" ; + PROG = "execline-cd" ; if (argc < 3) strerr_dieusage(100, USAGE) ; if (chdir(argv[1]) == -1) strerr_diefu2sys(111, "chdir to ", argv[1]) ; diff --git a/src/execline/umask.c b/src/execline/execline-umask.c index f74f845..a7888a6 100644 --- a/src/execline/umask.c +++ b/src/execline/execline-umask.c @@ -10,7 +10,7 @@ int main (int argc, char const *const *argv, char const *const *envp) { unsigned int m ; - PROG = "umask" ; + PROG = "execline-umask" ; if (argc < 3) strerr_dieusage(100, USAGE) ; if (!uint_oscan(argv[1], &m)) strerr_dieusage(100, USAGE) ; umask(m) ; diff --git a/src/execline/wait.c b/src/execline/wait.c index 2a2ead2..726cd52 100644 --- a/src/execline/wait.c +++ b/src/execline/wait.c @@ -1,7 +1,13 @@ /* ISC license. */ +#include <execline/config.h> + #include <sys/wait.h> #include <errno.h> +#ifdef EXECLINE_PEDANTIC_POSIX +#include <locale.h> +#endif + #include <skalibs/types.h> #include <skalibs/sgetopt.h> #include <skalibs/strerr2.h> @@ -9,6 +15,7 @@ #include <skalibs/djbunix.h> #include <skalibs/selfpipe.h> #include <skalibs/iopause.h> + #include <execline/execline.h> #define USAGE "wait [ -I | -i ] [ -r | -t timeout ] { pids... }" @@ -109,6 +116,9 @@ int main (int argc, char const **argv, char const *const *envp) int r ; int hasblock ; PROG = "wait" ; +#ifdef EXECLINE_PEDANTIC_POSIX + setlocale(LC_ALL, "") ; /* but of course, dear POSIX */ +#endif { subgetopt_t l = SUBGETOPT_ZERO ; unsigned int t = 0 ; |