svn commit: r193222 - head/bin/sh
Ralf S. Engelschall
rse at FreeBSD.org
Mon Jun 1 11:02:11 UTC 2009
Author: rse
Date: Mon Jun 1 11:02:09 2009
New Revision: 193222
URL: http://svn.freebsd.org/changeset/base/193222
Log:
correctly test for __GNUC__ macro (non-GCC compilers do not have it defined at all)
Modified:
head/bin/sh/eval.c
head/bin/sh/parser.c
head/bin/sh/var.c
Modified: head/bin/sh/eval.c
==============================================================================
--- head/bin/sh/eval.c Mon Jun 1 10:50:17 2009 (r193221)
+++ head/bin/sh/eval.c Mon Jun 1 11:02:09 2009 (r193222)
@@ -594,7 +594,7 @@ evalcommand(union node *cmd, int flags,
char *lastarg;
int realstatus;
int do_clearcmdentry;
-#if __GNUC__
+#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &argv;
(void) &argc;
Modified: head/bin/sh/parser.c
==============================================================================
--- head/bin/sh/parser.c Mon Jun 1 10:50:17 2009 (r193221)
+++ head/bin/sh/parser.c Mon Jun 1 11:02:09 2009 (r193222)
@@ -898,7 +898,7 @@ readtoken1(int firstc, char const *synta
int oldstyle;
char const *prevsyntax; /* syntax before arithmetic */
int synentry;
-#if __GNUC__
+#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &out;
(void) "ef;
@@ -1323,7 +1323,7 @@ parsebackq: {
struct jmploc *volatile savehandler;
int savelen;
int saveprompt;
-#if __GNUC__
+#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &saveprompt;
#endif
Modified: head/bin/sh/var.c
==============================================================================
--- head/bin/sh/var.c Mon Jun 1 10:50:17 2009 (r193221)
+++ head/bin/sh/var.c Mon Jun 1 11:02:09 2009 (r193222)
@@ -195,7 +195,7 @@ setvarsafe(char *name, char *val, int fl
struct jmploc jmploc;
struct jmploc *volatile savehandler = handler;
int err = 0;
-#if __GNUC__
+#ifdef __GNUC__
/* Avoid longjmp clobbering */
(void) &err;
#endif
More information about the svn-src-all
mailing list