summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-06-04 14:21:30 +0300
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-06-05 08:35:45 +0000
commit427eaa011f61c437e03305d68b0dfe40fd3cb5c7 (patch)
tree70dbabc081314199a6498dd828accf9d676d360a /mg.c
parent64ab78e55a8eea6610eaec2b3b8740eead613094 (diff)
downloadperl-427eaa011f61c437e03305d68b0dfe40fd3cb5c7.tar.gz
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
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/mg.c b/mg.c
index 4957a711a2..65cda05dcc 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