Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jun 2009 11:02:10 +0000 (UTC)
From:      "Ralf S. Engelschall" <rse@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r193222 - head/bin/sh
Message-ID:  <200906011102.n51B2AFv076962@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) &quotef;
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906011102.n51B2AFv076962>