summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-10-18 18:05:36 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-10-18 18:05:36 +0000
commit265f08543b2938b9f8d5d94ecc2d0024309384cc (patch)
treedf7cc8219153183bcddfe22da712e2c9606fc7c8 /bin
parenta2a0c2fe7144c320a8cfa618814fe682b00229a9 (diff)
Move more EXTERN-defined globals from sh.h.
ok nicm@
Diffstat (limited to 'bin')
-rw-r--r--bin/ksh/main.c10
-rw-r--r--bin/ksh/sh.h18
2 files changed, 18 insertions, 10 deletions
diff --git a/bin/ksh/main.c b/bin/ksh/main.c
index b76d5565152..e85d38f4032 100644
--- a/bin/ksh/main.c
+++ b/bin/ksh/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.65 2015/10/17 18:26:24 mmcc Exp $ */
+/* $OpenBSD: main.c,v 1.66 2015/10/18 18:05:35 mmcc Exp $ */
/*
* startup, main loop, environments and error handling
@@ -22,6 +22,14 @@ static void remove_temps(struct temp *tp);
static int is_restricted(char *name);
static void init_username(void);
+const char *kshname;
+pid_t kshpid;
+pid_t procpid;
+uid_t ksheuid;
+int exstat;
+int subst_exstat;
+const char *safe_prompt;
+
/*
* shell initialization
*/
diff --git a/bin/ksh/sh.h b/bin/ksh/sh.h
index 208a4223345..058f87aad51 100644
--- a/bin/ksh/sh.h
+++ b/bin/ksh/sh.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sh.h,v 1.39 2015/10/17 18:43:22 mmcc Exp $ */
+/* $OpenBSD: sh.h,v 1.40 2015/10/18 18:05:35 mmcc Exp $ */
/*
* Public Domain Bourne/Korn shell
@@ -57,14 +57,14 @@
#define LINE 2048 /* input line size */
#define PATH 1024 /* pathname size (todo: PATH_MAX/pathconf()) */
-EXTERN const char *kshname; /* $0 */
-EXTERN pid_t kshpid; /* $$, shell pid */
-EXTERN pid_t procpid; /* pid of executing process */
-EXTERN uid_t ksheuid; /* effective uid of shell */
-EXTERN int exstat; /* exit status */
-EXTERN int subst_exstat; /* exit status of last $(..)/`..` */
-EXTERN const char *safe_prompt; /* safe prompt if PS1 substitution fails */
-EXTERN char username[]; /* username for \u prompt expansion */
+extern const char *kshname; /* $0 */
+extern pid_t kshpid; /* $$, shell pid */
+extern pid_t procpid; /* pid of executing process */
+extern uid_t ksheuid; /* effective uid of shell */
+extern int exstat; /* exit status */
+extern int subst_exstat; /* exit status of last $(..)/`..` */
+extern const char *safe_prompt; /* safe prompt if PS1 substitution fails */
+extern char username[]; /* username for \u prompt expansion */
/*
* Area-based allocation built on malloc/free