summaryrefslogtreecommitdiff
path: root/mg.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1997-02-04 11:16:46 +1200
committerChip Salzenberg <chip@atlantic.net>1997-02-11 07:29:00 +1200
commit91e9c03fe206e18256c19e5e5628ca536e8b1fd6 (patch)
treec02b0679ff373a4ead204eeb469dcf8d434490a8 /mg.c
parent046ff0edbba626fc32c37c08cfba99cfeef41b6d (diff)
downloadperl-91e9c03fe206e18256c19e5e5628ca536e8b1fd6.tar.gz
Fix value of system() and $? for DEC UNIX, VMS, others
Diffstat (limited to 'mg.c')
-rw-r--r--mg.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/mg.c b/mg.c
index 8c89e6b54d..77c0417818 100644
--- a/mg.c
+++ b/mg.c
@@ -462,10 +462,7 @@ MAGIC *mg;
#endif
break;
case '?':
- if (STATUS_POSIX == -1)
- sv_setiv(sv, (IV)-1);
- else
- sv_setuv(sv, (UV)STATUS_POSIX);
+ sv_setiv(sv, (IV)STATUS_POSIX);
break;
case '^':
s = IoTOP_NAME(GvIOp(defoutgv));
@@ -1354,7 +1351,7 @@ MAGIC* mg;
compiling.cop_arybase = SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv);
break;
case '?':
- STATUS_POSIX_SET(SvIOK(sv) ? SvUVX(sv) : sv_2uv(sv));
+ STATUS_POSIX_SET(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv));
break;
case '!':
SETERRNO(SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv),