summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-04-26 07:52:51 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-04-26 07:52:51 +0000
commitd175a3f045fc637f1a2ebcb20d3386cf109302c4 (patch)
tree8a57620144a60dea903e8e7e7cd49df83bfd2711 /util.c
parent0dd88869d3c6272dc66f202c5be0f40bfb94fccd (diff)
downloadperl-d175a3f045fc637f1a2ebcb20d3386cf109302c4.tar.gz
integrate change#3229 from maint-5.004
p4raw-link: @3229 on //depot/maint-5.004/perl: 3e0793ddbcfdff90910112e638ae702c43386bb6 p4raw-id: //depot/perl@3271
Diffstat (limited to 'util.c')
-rw-r--r--util.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/util.c b/util.c
index 0b3673e049..b6a9fe0667 100644
--- a/util.c
+++ b/util.c
@@ -1349,8 +1349,17 @@ croak(const char* pat, ...)
PL_restartop = die_where(message);
JMPENV_JUMP(3);
}
- PerlIO_puts(PerlIO_stderr(),message);
- (void)PerlIO_flush(PerlIO_stderr());
+ {
+#ifdef USE_SFIO
+ /* SFIO can really mess with your errno */
+ int e = errno;
+#endif
+ PerlIO_puts(PerlIO_stderr(), message);
+ (void)PerlIO_flush(PerlIO_stderr());
+#ifdef USE_SFIO
+ errno = e;
+#endif
+ }
my_failure_exit();
}