diff options
author | Chip Salzenberg <chip@pobox.com> | 2008-11-26 15:01:41 -0800 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2008-12-05 18:11:56 +0000 |
commit | 4ee3916907333148e2c880a1f5aeba348c349925 (patch) | |
tree | ba07e244427cccdd6ed01277665634498770058c /perl.h | |
parent | 33839f2f0661d0502f129769a85cfcf904354d39 (diff) | |
download | perl-4ee3916907333148e2c880a1f5aeba348c349925.tar.gz |
standardize save/restore of errno & vaxc$errno
Message-ID: <20081127070141.GD17663@tytlal.topaz.cx>
p4raw-id: //depot/perl@35018
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1277,6 +1277,11 @@ EXTERN_C char *crypt(const char *, const char *); set_errno(errcode); \ set_vaxc_errno(vmserrcode); \ } STMT_END +# define dSAVEDERRNO int saved_errno; unsigned saved_vms_errno +# define dSAVE_ERRNO int saved_errno = errno; unsigned saved_vms_errno = vaxc$errno +# define SAVE_ERRNO ( saved_errno = errno, saved_vms_errno = vaxc$errno ) +# define RESTORE_ERRNO SETERRNO(saved_errno, saved_vms_errno) + # define LIB_INVARG LIB$_INVARG # define RMS_DIR RMS$_DIR # define RMS_FAC RMS$_FAC @@ -1291,6 +1296,11 @@ EXTERN_C char *crypt(const char *, const char *); # define SS_NORMAL SS$_NORMAL #else # define SETERRNO(errcode,vmserrcode) (errno = (errcode)) +# define dSAVEDERRNO int saved_errno +# define dSAVE_ERRNO int saved_errno = errno +# define SAVE_ERRNO (saved_errno = errno) +# define RESTORE_ERRNO (errno = saved_errno) + # define LIB_INVARG 0 # define RMS_DIR 0 # define RMS_FAC 0 |