From: Jarkko Hietaniemi Date: Sun, 4 Jun 2006 11:21:30 +0000 (+0300) Subject: mg.c: using #ifdef inside a macro call ENONPORTABLE (causes e.g. AIX to barf) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=427eaa011f61c437e03305d68b0dfe40fd3cb5c7;p=p5sagit%2Fp5-mst-13.2.git mg.c: using #ifdef inside a macro call ENONPORTABLE (causes e.g. AIX to barf) Message-Id: <200606040821.k548LUYu010965@vipunen.hut.fi> p4raw-id: //depot/perl@28351 --- diff --git a/mg.c b/mg.c index 4957a71..65cda05 100644 --- a/mg.c +++ b/mg.c @@ -1097,19 +1097,18 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) #endif /* VMS */ if (s && klen == 4 && strEQ(ptr,"PATH")) { const char * const strend = s + len; +#ifdef VMS /* Hmm. How do we get $Config{path_sep} from C? */ + const char path_sep = '|'; +#else + const char path_sep = ':'; +#endif while (s < strend) { char tmpbuf[256]; Stat_t st; I32 i; s = delimcpy(tmpbuf, tmpbuf + sizeof tmpbuf, - s, strend, -#ifdef VMS - '|', /* Hmm. How do we get $Config{path_sep} from C? */ -#else - ':', -#endif - &i); + s, strend, path_sep, &i); s++; if (i >= (I32)sizeof tmpbuf /* too long -- assume the worst */ #ifdef VMS