summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-07-16 21:14:36 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-07-16 21:14:36 +0000
commit37be0adfd3a8c7700da400b1233879928b7830b0 (patch)
treeb5173a8402fb63f0602ed0bf28ff87940e29e856 /sv.c
parent6b7580e543c9f51ca0360c11c0b0e39c24afd6ef (diff)
downloadperl-37be0adfd3a8c7700da400b1233879928b7830b0.tar.gz
DJGPP was broken by #17270. Because of the time crunch
we may not have time to investigate how that is possible, since the #17270 was trying to protect against illegal memory accesses... (the breakage of the DJGPP build was manifested by configpm eating up all the available memory) p4raw-id: //depot/perl@17583
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/sv.c b/sv.c
index b62955883f..9e3d2a0d20 100644
--- a/sv.c
+++ b/sv.c
@@ -5884,10 +5884,23 @@ screamer2:
/* Accomodate broken VAXC compiler, which applies U8 cast to
* both args of ?: operator, causing EOF to change into 255
*/
- if (cnt > 0) { i = (U8)buf[cnt - 1]; } else { i = EOF; }
+#ifdef DJGPP /* This is basically undoing #17270 for DJGPP. See below. */
+ if (cnt)
+#else
+ if (cnt > 0)
+#endif
+ {
+ i = (U8)buf[cnt - 1];
+ }
+ else {
+ i = EOF;
+ }
}
- if (cnt > 0) {
+#ifndef DJGPP /* This is basically undoing #17270 for DJGPP. See above.*/
+ if (cnt > 0)
+#endif
+ {
if (append)
sv_catpvn(sv, (char *) buf, cnt);
else