summaryrefslogtreecommitdiffstats
path: root/source/ap/ash/patches/ash-misc.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/ap/ash/patches/ash-misc.patch
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'source/ap/ash/patches/ash-misc.patch')
-rw-r--r--source/ap/ash/patches/ash-misc.patch122
1 files changed, 122 insertions, 0 deletions
diff --git a/source/ap/ash/patches/ash-misc.patch b/source/ap/ash/patches/ash-misc.patch
new file mode 100644
index 000000000..9845a2325
--- /dev/null
+++ b/source/ap/ash/patches/ash-misc.patch
@@ -0,0 +1,122 @@
+diff -urN netbsd-sh/error.c ash-0.3.7.orig/error.c
+--- netbsd-sh/error.c Fri Jan 12 17:50:35 2001
++++ ash-0.3.7.orig/error.c Mon Apr 23 22:16:46 2001
+@@ -233,6 +233,7 @@
+ { ENOTDIR, E_CREAT,"directory nonexistent" },
+ { ENOTDIR, E_EXEC, "not found" },
+ { EISDIR, ALL, "is a directory" },
++ { EEXIST, E_CREAT,"file exists" },
+ #ifdef notdef
+ { EMFILE, ALL, "too many open files" },
+ #endif
+diff -urN netbsd-sh/error.h ash-0.3.7.orig/error.h
+--- netbsd-sh/error.h Fri Jul 9 13:02:05 1999
++++ ash-0.3.7.orig/error.h Mon Apr 23 22:16:46 2001
+@@ -102,7 +102,7 @@
+ * so we use _setjmp instead.
+ */
+
+-#if defined(BSD) && !defined(__SVR4)
++#if defined(BSD) && !defined(__SVR4) && !defined(__GLIBC__)
+ #define setjmp(jmploc) _setjmp(jmploc)
+ #define longjmp(jmploc, val) _longjmp(jmploc, val)
+ #endif
+diff -urN netbsd-sh/bltin/bltin.h ash-0.3.7.orig/bltin/bltin.h
+--- netbsd-sh/bltin/bltin.h Sat Jul 5 13:12:37 1997
++++ ash-0.3.7.orig/bltin/bltin.h Mon Apr 23 22:16:46 2001
+@@ -46,8 +46,10 @@
+
+ #include "../shell.h"
+ #include "../mystring.h"
++#include "../memalloc.h"
+ #ifdef SHELL
+ #include "../output.h"
++#ifndef _GNU_SOURCE
+ #define stdout out1
+ #define stderr out2
+ #define printf out1fmt
+@@ -56,12 +58,13 @@
+ #define fprintf outfmt
+ #define fputs outstr
+ #define fflush flushout
+-#define INITARGS(argv)
+ #define warnx(a, b, c) { \
+ char buf[64]; \
+ (void)snprintf(buf, sizeof(buf), a, b, c); \
+ error("%s", buf); \
+ }
++#endif
++#define INITARGS(argv)
+
+ #else
+ #undef NULL
+diff -urN netbsd-sh/main.c ash-0.3.7.orig/main.c
+--- netbsd-sh/main.c Fri Jan 12 17:50:36 2001
++++ ash-0.3.7.orig/main.c Mon Apr 23 22:16:46 2001
+@@ -115,6 +119,9 @@
+ #if PROFILE
+ monitor(4, etext, profile_buf, sizeof profile_buf, 50);
+ #endif
++#if defined(linux) || defined(__GNU__)
++ signal(SIGCHLD, SIG_DFL);
++#endif
+ state = 0;
+ if (setjmp(jmploc.loc)) {
+ /*
+diff -urN netbsd-sh/var.c ash-0.3.7.orig/var.c
+--- netbsd-sh/var.c Fri Jan 12 17:50:40 2001
++++ ash-0.3.7.orig/var.c Mon Apr 23 22:19:54 2001
+@@ -114,7 +114,7 @@
+ NULL },
+ { &vmpath, VSTRFIXED|VTEXTFIXED|VUNSET, "MAILPATH=",
+ NULL },
+- { &vpath, VSTRFIXED|VTEXTFIXED, "PATH=" _PATH_DEFPATH,
++ { &vpath, VSTRFIXED|VTEXTFIXED, "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
+ changepath },
+ /*
+ * vps1 depends on uid
+@@ -138,13 +138,16 @@
+
+ /*
+ * Initialize the varable symbol tables and import the environment
++ * Setting PWD added by herbert
+ */
+
+ #ifdef mkinit
++INCLUDE "cd.h"
+ INCLUDE "var.h"
+ INIT {
+ char **envp;
+ extern char **environ;
++ extern char *curdir;
+
+ initvar();
+ for (envp = environ ; *envp ; envp++) {
+@@ -152,6 +155,9 @@
+ setvareq(*envp, VEXPORT|VTEXTFIXED);
+ }
+ }
++
++ getpwd();
++ setvar("PWD", curdir, VEXPORT|VTEXTFIXED);
+ }
+ #endif
+
+@@ -283,6 +289,7 @@
+ struct var *vp, **vpp;
+
+ vpp = hashvar(s);
++ flags |= (VEXPORT & (((unsigned) (1 - aflag)) - 1));
+ for (vp = *vpp ; vp ; vp = vp->next) {
+ if (varequal(s, vp->text)) {
+ if (vp->flags & VREADONLY) {
+@@ -305,7 +312,8 @@
+ * We could roll this to a function, to handle it as
+ * a regular variable function callback, but why bother?
+ */
+- if (vp == &vmpath || (vp == &vmail && ! mpathset()))
++ if (iflag &&
++ (vp == &vmpath || (vp == &vmail && ! mpathset())))
+ chkmail(1);
+ INTON;
+ return;