summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1999-06-08 00:44:58 -0400
committerGurusamy Sarathy <gsar@cpan.org>1999-07-05 18:29:08 +0000
commit048c1ddfd117b35fccfed36cb158c852c08324a0 (patch)
tree432f2e7f4d5dbdc127e7224c0a2c874276ae3e83 /mg.c
parentcc077a9f9f4e3dee71b48bf024d1779a86449578 (diff)
downloadperl-048c1ddfd117b35fccfed36cb158c852c08324a0.tar.gz
Setting $^E wipes out $!
Message-Id: <199906080844.EAA03784@monk.mps.ohio-state.edu> p4raw-id: //depot/perl@3595
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mg.c b/mg.c
index 8175982b45..a21ea5730e 100644
--- a/mg.c
+++ b/mg.c
@@ -1704,12 +1704,14 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg)
#ifdef VMS
set_vaxc_errno(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
#else
-#ifdef WIN32
+# ifdef WIN32
SetLastError( SvIV(sv) );
-#else
+# else
+# ifndef OS2
/* will anyone ever use this? */
SETERRNO(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv), 4);
-#endif
+# endif
+# endif
#endif
break;
case '\006': /* ^F */