From: Gurusamy Sarathy Date: Fri, 2 Oct 1998 01:02:09 +0000 (+0000) Subject: use SETERRNO() to reset errno (suggested by Charles Bailey) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aba27d8868c4da5501a93098d949549307dd9a6a;p=p5sagit%2Fp5-mst-13.2.git use SETERRNO() to reset errno (suggested by Charles Bailey) p4raw-id: //depot/perl@1900 --- diff --git a/perl.h b/perl.h index e5fa8d9..c9ec37a 100644 --- a/perl.h +++ b/perl.h @@ -604,7 +604,7 @@ Free_t Perl_free _((Malloc_t where)); set_vaxc_errno(vmserrcode); \ } STMT_END #else -# define SETERRNO(errcode,vmserrcode) errno = (errcode) +# define SETERRNO(errcode,vmserrcode) (errno = (errcode)) #endif #ifdef USE_THREADS diff --git a/pp_ctl.c b/pp_ctl.c index 7fcdf3d..eb5e3c2 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2686,7 +2686,7 @@ PP(pp_require) RETPUSHUNDEF; } else - errno = 0; + SETERRNO(0, SS$_NORMAL); /* Assume success here to prevent recursive requirement. */ (void)hv_store(GvHVn(PL_incgv), name, strlen(name),