Module Name: src
Committed By: kre
Date: Tue May 3 13:47:58 UTC 2016
Modified Files:
src/bin/sh: eval.c exec.h shell.h
Log Message:
Fix things so that STATIC can me made static (-DSTATIC=static)
and have the shell still compile, link, and run...
ok christos@
To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/bin/sh/eval.c
cvs rdiff -u -r1.23 -r1.24 src/bin/sh/exec.h
cvs rdiff -u -r1.18 -r1.19 src/bin/sh/shell.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.121 src/bin/sh/eval.c:1.122
--- src/bin/sh/eval.c:1.121 Tue May 3 03:12:40 2016
+++ src/bin/sh/eval.c Tue May 3 13:47:58 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: eval.c,v 1.121 2016/05/03 03:12:40 kre Exp $ */
+/* $NetBSD: eval.c,v 1.122 2016/05/03 13:47:58 kre Exp $ */
/*-
* Copyright (c) 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)eval.c 8.9 (Berkeley) 6/8/95";
#else
-__RCSID("$NetBSD: eval.c,v 1.121 2016/05/03 03:12:40 kre Exp $");
+__RCSID("$NetBSD: eval.c,v 1.122 2016/05/03 13:47:58 kre Exp $");
#endif
#endif /* not lint */
@@ -1155,19 +1155,19 @@ prehash(union node *n)
pathval());
}
-STATIC int
+int
in_function(void)
{
return funcnest;
}
-STATIC enum skipstate
+enum skipstate
current_skipstate(void)
{
return evalskip;
}
-STATIC void
+void
stop_skipping(void)
{
evalskip = SKIPNONE;
Index: src/bin/sh/exec.h
diff -u src/bin/sh/exec.h:1.23 src/bin/sh/exec.h:1.24
--- src/bin/sh/exec.h:1.23 Thu Mar 15 02:02:20 2012
+++ src/bin/sh/exec.h Tue May 3 13:47:58 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.h,v 1.23 2012/03/15 02:02:20 joerg Exp $ */
+/* $NetBSD: exec.h,v 1.24 2016/05/03 13:47:58 kre Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -70,7 +70,6 @@ void hashcd(void);
void changepath(const char *);
void deletefuncs(void);
void getcmdentry(char *, struct cmdentry *);
-void addcmdentry(char *, struct cmdentry *);
void defun(char *, union node *);
int unsetfunc(char *);
void hash_special_builtins(void);
Index: src/bin/sh/shell.h
diff -u src/bin/sh/shell.h:1.18 src/bin/sh/shell.h:1.19
--- src/bin/sh/shell.h:1.18 Sun Apr 28 17:01:28 2013
+++ src/bin/sh/shell.h Tue May 3 13:47:58 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: shell.h,v 1.18 2013/04/28 17:01:28 dholland Exp $ */
+/* $NetBSD: shell.h,v 1.19 2016/05/03 13:47:58 kre Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -66,7 +66,9 @@ typedef void *pointer;
#ifndef NULL
#define NULL (void *)0
#endif
+#ifndef STATIC
#define STATIC /* empty */
+#endif
#define MKINIT /* empty */
#include <sys/cdefs.h>