diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-10-24 14:36:09 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-10-24 14:36:09 +0000 |
commit | 5b411029755fe810157205c2903f1053046aff30 (patch) | |
tree | 77a2a30c7adb079ba6ae508962bc2f93528abf4f /ext | |
parent | ea0efc06fdad2019ffceb86d079dd853e9d79cea (diff) | |
download | perl-5b411029755fe810157205c2903f1053046aff30.tar.gz |
Patches for VMS [Dan Sugalski]
p4raw-id: //depot/perl@173
Diffstat (limited to 'ext')
-rw-r--r-- | ext/POSIX/POSIX.xs | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index a09eafe37a..0e53a49183 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -58,76 +58,6 @@ #if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000) # define HAS_TZNAME /* shows up in VMS 7.0 or Dec C 5.6 */ # include <utsname.h> -#else - /* The default VMS emulation of Unix signals isn't very POSIXish */ - typedef int sigset_t; -# define sigpending(a) (not_here("sigpending"),0) - - /* sigset_t is atomic under VMS, so these routines are easy */ - int sigemptyset(sigset_t *set) { - if (!set) { SETERRNO(EFAULT,SS$_ACCVIO); return -1; } - *set = 0; return 0; - } - int sigfillset(sigset_t *set) { - int i; - if (!set) { SETERRNO(EFAULT,SS$_ACCVIO); return -1; } - for (i = 0; i < NSIG; i++) *set |= (1 << i); - return 0; - } - int sigaddset(sigset_t *set, int sig) { - if (!set) { SETERRNO(EFAULT,SS$_ACCVIO); return -1; } - if (sig > NSIG) { SETERRNO(EINVAL,LIB$_INVARG); return -1; } - *set |= (1 << (sig - 1)); - return 0; - } - int sigdelset(sigset_t *set, int sig) { - if (!set) { SETERRNO(EFAULT,SS$_ACCVIO); return -1; } - if (sig > NSIG) { SETERRNO(EINVAL,LIB$_INVARG); return -1; } - *set &= ~(1 << (sig - 1)); - return 0; - } - int sigismember(sigset_t *set, int sig) { - if (!set) { SETERRNO(EFAULT,SS$_ACCVIO); return -1; } - if (sig > NSIG) { SETERRNO(EINVAL,LIB$_INVARG); return -1; } - *set & (1 << (sig - 1)); - } - /* The tools for sigprocmask() are there, just not the routine itself */ -# ifndef SIG_UNBLOCK -# define SIG_UNBLOCK 1 -# endif -# ifndef SIG_BLOCK -# define SIG_BLOCK 2 -# endif -# ifndef SIG_SETMASK -# define SIG_SETMASK 3 -# endif - int sigprocmask(int how, sigset_t *set, sigset_t *oset) { - if (!set || !oset) { - set_errno(EFAULT); set_vaxc_errno(SS$_ACCVIO); - return -1; - } - switch (how) { - case SIG_SETMASK: - *oset = sigsetmask(*set); - break; - case SIG_BLOCK: - *oset = sigblock(*set); - break; - case SIG_UNBLOCK: - *oset = sigblock(0); - sigsetmask(*oset & ~*set); - break; - default: - set_errno(EINVAL); set_vaxc_errno(LIB$_INVARG); - return -1; - } - return 0; - } -# define sigaction sigvec -# define sa_flags sv_onstack -# define sa_handler sv_handler -# define sa_mask sv_mask -# define sigsuspend(set) sigpause(*set) # endif /* __VMS_VER >= 70000000 or Dec C 5.6 */ /* The POSIX notion of ttyname() is better served by getname() under VMS */ |