]> git.pld-linux.org Git - packages/ash.git/blame - ash-misc.patch
- dropped pre-cvs changelog
[packages/ash.git] / ash-misc.patch
CommitLineData
cf7098dd
MM
1diff -urN netbsd-sh/error.c ash-0.3.7.orig/error.c
2--- netbsd-sh/error.c Fri Jan 12 17:50:35 2001
3+++ ash-0.3.7.orig/error.c Mon Apr 23 22:16:46 2001
4@@ -233,6 +233,7 @@
5 { ENOTDIR, E_CREAT,"directory nonexistent" },
6 { ENOTDIR, E_EXEC, "not found" },
7 { EISDIR, ALL, "is a directory" },
8+ { EEXIST, E_CREAT,"file exists" },
9 #ifdef notdef
10 { EMFILE, ALL, "too many open files" },
11 #endif
12diff -urN netbsd-sh/error.h ash-0.3.7.orig/error.h
13--- netbsd-sh/error.h Fri Jul 9 13:02:05 1999
14+++ ash-0.3.7.orig/error.h Mon Apr 23 22:16:46 2001
15@@ -102,7 +102,7 @@
16 * so we use _setjmp instead.
17 */
18
19-#if defined(BSD) && !defined(__SVR4)
20+#if defined(BSD) && !defined(__SVR4) && !defined(__GLIBC__)
21 #define setjmp(jmploc) _setjmp(jmploc)
22 #define longjmp(jmploc, val) _longjmp(jmploc, val)
23 #endif
24diff -urN netbsd-sh/bltin/bltin.h ash-0.3.7.orig/bltin/bltin.h
25--- netbsd-sh/bltin/bltin.h Sat Jul 5 13:12:37 1997
26+++ ash-0.3.7.orig/bltin/bltin.h Mon Apr 23 22:16:46 2001
27@@ -46,8 +46,10 @@
28
29 #include "../shell.h"
30 #include "../mystring.h"
31+#include "../memalloc.h"
32 #ifdef SHELL
33 #include "../output.h"
34+#ifndef _GNU_SOURCE
35 #define stdout out1
36 #define stderr out2
37 #define printf out1fmt
38@@ -56,12 +58,13 @@
39 #define fprintf outfmt
40 #define fputs outstr
41 #define fflush flushout
42-#define INITARGS(argv)
43 #define warnx(a, b, c) { \
44 char buf[64]; \
45 (void)snprintf(buf, sizeof(buf), a, b, c); \
46 error("%s", buf); \
47 }
48+#endif
49+#define INITARGS(argv)
50
51 #else
52 #undef NULL
53diff -urN netbsd-sh/main.c ash-0.3.7.orig/main.c
54--- netbsd-sh/main.c Fri Jan 12 17:50:36 2001
55+++ ash-0.3.7.orig/main.c Mon Apr 23 22:16:46 2001
56@@ -115,6 +119,9 @@
57 #if PROFILE
58 monitor(4, etext, profile_buf, sizeof profile_buf, 50);
59 #endif
60+#if defined(linux) || defined(__GNU__)
61+ signal(SIGCHLD, SIG_DFL);
62+#endif
63 state = 0;
64 if (setjmp(jmploc.loc)) {
65 /*
66diff -urN netbsd-sh/var.c ash-0.3.7.orig/var.c
67--- netbsd-sh/var.c Fri Jan 12 17:50:40 2001
68+++ ash-0.3.7.orig/var.c Mon Apr 23 22:19:54 2001
69@@ -114,7 +114,7 @@
70 NULL },
71 { &vmpath, VSTRFIXED|VTEXTFIXED|VUNSET, "MAILPATH=",
72 NULL },
73- { &vpath, VSTRFIXED|VTEXTFIXED, "PATH=" _PATH_DEFPATH,
74+ { &vpath, VSTRFIXED|VTEXTFIXED, "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
75 changepath },
76 /*
77 * vps1 depends on uid
78@@ -138,13 +138,16 @@
79
80 /*
81 * Initialize the varable symbol tables and import the environment
82+ * Setting PWD added by herbert
83 */
84
85 #ifdef mkinit
86+INCLUDE "cd.h"
87 INCLUDE "var.h"
88 INIT {
89 char **envp;
90 extern char **environ;
91+ extern char *curdir;
92
93 initvar();
94 for (envp = environ ; *envp ; envp++) {
95@@ -152,6 +155,9 @@
96 setvareq(*envp, VEXPORT|VTEXTFIXED);
97 }
98 }
99+
100+ getpwd();
101+ setvar("PWD", curdir, VEXPORT|VTEXTFIXED);
102 }
103 #endif
104
105@@ -283,6 +289,7 @@
106 struct var *vp, **vpp;
107
108 vpp = hashvar(s);
109+ flags |= (VEXPORT & (((unsigned) (1 - aflag)) - 1));
110 for (vp = *vpp ; vp ; vp = vp->next) {
111 if (varequal(s, vp->text)) {
112 if (vp->flags & VREADONLY) {
113@@ -305,7 +312,8 @@
114 * We could roll this to a function, to handle it as
115 * a regular variable function callback, but why bother?
116 */
117- if (vp == &vmpath || (vp == &vmail && ! mpathset()))
118+ if (iflag &&
119+ (vp == &vmpath || (vp == &vmail && ! mpathset())))
120 chkmail(1);
121 INTON;
122 return;
This page took 0.199841 seconds and 4 git commands to generate.