diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-04-08 00:14:13 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-04-08 00:14:13 +0000 |
commit | ba3eb2af450c2577c20a691fb686a5e02955c48b (patch) | |
tree | a8cf1145dc0c922547f90f92d9c444715752d512 /vms | |
parent | 00dc2f4f23da07658d2634f904ac3a098aaa4153 (diff) | |
parent | 8c9208bc5764dada175aceff9d0b1938978d7db6 (diff) | |
download | perl-ba3eb2af450c2577c20a691fb686a5e02955c48b.tar.gz |
[asperl] integrate mainline changes
p4raw-id: //depot/asperl@884
Diffstat (limited to 'vms')
-rw-r--r-- | vms/config.vms | 311 | ||||
-rw-r--r-- | vms/descrip.mms | 280 | ||||
-rw-r--r-- | vms/ext/Filespec.pm | 10 | ||||
-rw-r--r-- | vms/ext/Stdio/0README.txt | 23 | ||||
-rw-r--r-- | vms/ext/Stdio/Stdio.pm | 39 | ||||
-rw-r--r-- | vms/ext/Stdio/Stdio.xs | 108 | ||||
-rwxr-xr-x | vms/ext/Stdio/test.pl | 30 | ||||
-rw-r--r-- | vms/ext/filespec.t | 34 | ||||
-rwxr-xr-x | vms/fndvers.com | 4 | ||||
-rw-r--r-- | vms/gen_shrfls.pl | 49 | ||||
-rw-r--r-- | vms/genconfig.pl | 66 | ||||
-rw-r--r-- | vms/perly_c.vms | 22 | ||||
-rw-r--r-- | vms/sockadapt.h | 3 | ||||
-rw-r--r-- | vms/test.com | 4 | ||||
-rw-r--r-- | vms/vms.c | 150 | ||||
-rw-r--r-- | vms/vmsish.h | 21 |
16 files changed, 859 insertions, 295 deletions
diff --git a/vms/config.vms b/vms/config.vms index 0320012c72..35abbdb00f 100644 --- a/vms/config.vms +++ b/vms/config.vms @@ -8,11 +8,11 @@ * GenConfig.pl when producing Config.pm. * * config.h for VMS - * Version: 5.004 + * Version: 5.005 */ -/* Configuration time: 19-Nov-1996 23:34 - * Configured by: Charles Bailey bailey@genetics.upenn.edu +/* Configuration time: 7-Mar-1998 16:30 + * Configured by: Charles Bailey bailey@newman.upenn.edu * Target system: VMS */ @@ -76,7 +76,7 @@ * when Perl is built. Please do not change it by hand; make * any changes to FndVers.Com instead. */ -#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX/5_00456" /**/ +#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX/5_00463" /**/ #define ARCHLIB ARCHLIB_EXP /*config-skip*/ @@ -89,12 +89,6 @@ */ #define ARCHNAME "VMS_VAX" /**/ -/* BINCOMPAT3: - * This symbol, if defined, indicates that Perl 5.004 should be - * binary-compatible with Perl 5.003. - */ -#undef BINCOMPAT3 - /* CPPSTDIN: * This symbol contains the first part of the string which will invoke * the C preprocessor on the standard input and produce to standard @@ -183,6 +177,7 @@ * This symbol, if defined, indicates that the C-shell exists. * If defined, contains the full pathname of csh. */ +#undef HAS_CSH /**/ #undef CSH /**/ /* HAS_DUP2: @@ -240,7 +235,7 @@ * The type "Timeval" should be used to refer to "struct timeval". */ #if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000) -#define HAS_GETTIMEOFDAY /**/ +#define HAS_GETTIMEOFDAY /*config-skip*/ #else #undef HAS_GETTIMEOFDAY /*config-skip*/ #endif @@ -248,6 +243,26 @@ # define Timeval struct timeval /*config-skip*/ #endif +/* HAS_LONG_DOUBLE: + * This symbol will be defined if the C compiler supports long + * doubles. + */ +/* LONG_DOUBLESIZE: + * This symbol contains the size of a long double, so that the + * C preprocessor can make decisions based on it. It is only + * defined if the system supports long doubles. + */ +#undef HAS_LONG_DOUBLE /**/ +#ifdef HAS_LONG_DOUBLE +# define LONG_DOUBLESIZE 8 /**/ +#endif + +/* HAS_MKSTEMP: + * This symbol, if defined, indicates that the mkstemp routine is + * available to create and open a unique temporary file. + */ +#undef HAS_MKSTEMP /**/ + /* HAS_GETGROUPS: * This symbol, if defined, indicates that the getgroups() routine is * available to get the list of process groups. If unavailable, multiple @@ -267,7 +282,7 @@ * and PHOSTNAME. */ #if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000) -#define HAS_UNAME /**/ +#define HAS_UNAME /*config-skip*/ #else #undef HAS_UNAME /*config-skip*/ #endif @@ -377,16 +392,16 @@ /* HAS_PTHREAD_YIELD: * This symbol, if defined, indicates that the pthread_yield routine is * available to yield the execution of the current thread. - * VMS: pthread_yield_np is there, but we won't worry for now since it's - * set up already as sched_yield. + * VMS: pthread_yield_np is there, so just set up the alias */ -#undef HAS_PTHREAD_YIELD /**/ +#define HAS_PTHREAD_YIELD /**/ +#define pthread_yield pthread_yield_np /*config-skip*/ -/* HAS_SCHED_YIELD: - * This symbol, if defined, indicates that the sched_yield routine is - * available to yield the execution of the current thread. +/* OLD_PTHREADS_API: + * This symbol, if defined, indicates that Perl should + * be built to use the old draft POSIX threads API. */ -#define HAS_SCHED_YIELD /**/ +#undef OLD_PTHREADS_API /**/ /* HAS_READDIR: * This symbol, if defined, indicates that the readdir routine is @@ -655,7 +670,7 @@ * available to truncate files. */ #if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000) -#define HAS_TRUNCATE /**/ +#define HAS_TRUNCATE /*config-skip*/ #else #undef HAS_TRUNCATE /*config-skip*/ #endif @@ -701,7 +716,7 @@ * This symbol, if defined, indicates that wait4() exists. */ #if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000) -#define HAS_WAIT4 /**/ +#define HAS_WAIT4 /*config-skip*/ #else #undef HAS_WAIT4 /*config-skip*/ #endif @@ -971,6 +986,17 @@ */ #undef I_VFORK /**/ +/* Pid_t: + * This symbol holds the type used to declare process ids in the kernel. + * It can be int, uint, pid_t, etc... It may be necessary to include + * <sys/types.h> to get any typedef'ed information. + */ +#if defined(__DECC) && defined(__DECC_VER) && (__DECC_VER >= 500000) +# define Pid_t pid_t /* config-skip */ +#else +# define Pid_t int /* config-skip */ +#endif + /* CAN_PROTOTYPE: * If defined, this macro indicates that the C compiler can handle * function prototypes. @@ -1202,7 +1228,7 @@ */ #define HAS_STRCHR /**/ #if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000) -#define HAS_INDEX /**/ +#define HAS_INDEX /*config-skip*/ #else #undef HAS_INDEX /*config-skip*/ #endif @@ -1325,6 +1351,10 @@ */ #define I_MATH /**/ +/* DOUBLESIZE: + * This symbol contains the size of a double, so that the C preprocessor + * can make decisions based on it. + */ /* INTSIZE: * This symbol contains the size of an int, so that the C preprocessor * can make decisions based on it. @@ -1337,9 +1367,18 @@ * This symbol contains the value of sizeof(short) so that the C * preprocessor can make decisions based on it. */ +/* PTRSIZE: + * This symbol contains the size of a pointer, so that the C preprocessor + * can make decisions based on it. It will be sizeof(void *) if + * the compiler supports (void *); otherwise it will be + * sizeof(char *). + * VMS: Use 32-bit pointers everywhere for now 7-Mar-1998 + */ +#define DOUBLESIZE 8 /**/ #define INTSIZE 4 /**/ #define LONGSIZE 4 /**/ #define SHORTSIZE 2 /**/ +#define PTRSIZE 4 /**/ /* Off_t: * This symbol holds the type used to declare offsets in the kernel. @@ -1467,26 +1506,6 @@ #undef RD_NODATA #undef EOF_NONBLOCK -/* OLDARCHLIB: - * This variable, if defined, holds the name of the directory in - * which the user has perl5.000 or perl5.001 architecture-dependent - * public library files for $package. For the most part, these - * files will work with 5.002 (and later), but that is not - * guaranteed. - */ -/* OLDARCHLIB_EXP: - * This symbol contains the ~name expanded version of OLDARCHLIB, to be - * used in programs that are not prepared to deal with ~ expansion at - * run-time. - */ -/* ==> NOTE <== - * This value is automatically updated by FndVers.Com - * when Perl is built. Please do not change it by hand; make - * any changes to FndVers.Com instead. - */ -#define OLDARCHLIB_EXP "/perl_root/lib/VMS_VAX" /**/ -#define OLDARCHLIB OLDARCHLIB_EXP /*config-skip*/ - /* PRIVLIB: * This symbol contains the name of the private library for this package. * The library is private in the sense that it needn't be in anyone's @@ -1610,6 +1629,12 @@ */ #undef HAS_INET_ATON /**/ +/* HAS_GNULIBC: + * This symbol, if defined, indicates to the C program that + * the GNU C library is being used. + */ +#undef HAS_GNULIBC /**/ + /* HAS_ISASCII: * This manifest constant lets the C program know that the * isascii is available. @@ -1655,8 +1680,8 @@ * with a given open file descriptor. */ #if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000) -#define HAS_PATHCONF /**/ -#define HAS_FPATHCONF /**/ +#define HAS_PATHCONF /*config-skip*/ +#define HAS_FPATHCONF /*config-skip*/ #else #undef HAS_PATHCONF /*config-skip*/ #undef HAS_FPATHCONF /*config-skip*/ @@ -1694,14 +1719,8 @@ * arguments whereas USG one needs none. See also HAS_SETPGID * for a POSIX interface. */ -/* USE_BSDPGRP: - * This symbol, if defined, indicates that the BSD notion of process - * group is to be used. For instance, you have to say setpgrp(pid, pgrp) - * instead of the USG setpgrp(). - */ #undef HAS_SETPGRP /**/ #undef USE_BSD_SETPGRP /**/ -#undef USE_BSDPGRP /**/ /* HAS_SETPGID: * This symbol, if defined, indicates that the setpgid routine is @@ -1720,7 +1739,7 @@ * to determine system related limits and options. */ #if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000) -#define HAS_SYSCONF /**/ +#define HAS_SYSCONF /*config-skip*/ #else #undef HAS_SYSCONF /*config-skip*/ #endif @@ -1790,7 +1809,7 @@ * traditional longjmp() if siglongjmp isn't available. */ #if ((__VMS_VER >= 70000000) && (__DECC_VER >= 50200000)) || (__CRTL_VER >= 70000000) -#define HAS_SIGSETJMP /**/ +#define HAS_SIGSETJMP /*config-skip*/ #else #undef HAS_SIGSETJMP /*config-skip*/ #endif @@ -1849,6 +1868,13 @@ */ #undef USE_PERLIO /**/ +/* HAS_SETVBUF: + * This symbol, if defined, indicates that the setvbuf routine is + * available to change buffering on an open stdio stream. + * to a line-buffered mode. + */ +#define HAS_SETVBUF /**/ + /* VOIDFLAGS: * This symbol indicates how much support of the void type is given by this * compiler. What various bits mean: @@ -1894,27 +1920,38 @@ /* HAS_GETHOSTBYADDR: * This symbol, if defined, indicates that the gethostbyaddr routine is - * available to lookup hosts by their IP addresses. + * available to lookup host names by their IP addresses. */ -#define HAS_GETHOSTBYADDR /**/ +#define HAS_GETHOSTBYADDR /**/ /* config-skip */ /* Netdb_host_t: * This symbol holds the type used for the 1st argument * to gethostbyaddr(). */ -#define Netdb_host_t char * /**/ +#define Netdb_host_t char * /**/ /* config-skip */ /* Netdb_hlen_t: * This symbol holds the type used for the 2nd argument * to gethostbyaddr(). */ -#define Netdb_hlen_t int +#define Netdb_hlen_t int /**/ /* config-skip */ + +/* HAS_GETPROTOBYNAME: + * This symbol, if defined, indicates that the getprotobyname() + * routine is available to look up protocols by their name. + */ +/* HAS_GETPROTOBYNUMBER: + * This symbol, if defined, indicates that the getprotobynumber() + * routine is available to look up protocols by their number. + */ +#define HAS_GETPROTOBYNAME /*config-skip*/ +#define HAS_GETPROTOBYNUMBER /*config-skip*/ /* HAS_GETHOSTBYNAME: * This symbol, if defined, indicates that the gethostbyname routine is * available to lookup hosts by their DNS names. */ -#define HAS_GETHOSTBYNAME /**/ +#define HAS_GETHOSTBYNAME /*config-skip*/ /* Netdb_name_t: * This symbol holds the type used for the 1st argument @@ -1923,55 +1960,80 @@ * getservbyname(), the 2nd argument to getservbyname(), * and the 2nd argument to getservbyport(). */ -#define Netdb_name_t long /**/ +#define Netdb_name_t char * -/* HAS_GETNETBYADD: +#ifdef DECCRTL_SOCKETS +/* HAS_GETNETBYADDR: * This symbol, if defined, indicates that the getnetbyaddr routine is * available to lookup networks by their IP addresses. */ -#define HAS_GETNETBYADD /**/ +#define HAS_GETNETBYADDR /**/ /* config-skip */ /* Netdb_net_t: * This symbol holds the type used for the 1st argument * to getnetbyaddr(). */ -#define Netdb_net_t long +#define Netdb_net_t long /**/ /* config-skip */ -/* HAS_GETHBADD: - * This symbol, if defined, indicates that the gethostbyaddr routine is - * available to lookup host names by their IP addresses. +/* HAS_GETNETBYNAME: + * This symbol, if defined, indicates that the getnetbyname routine is + * available to lookup networks by their names. */ -#define HAS_GETHBADD /**/ /* config-skip */ +#define HAS_GETNETBYNAME /*config-skip*/ -/* Gethbadd_addr_t: - * This symbol holds the type used for the 1st argument - * to gethostbyaddr(). - */ -#define Gethbadd_addr_t char * /**/ /* config-skip */ - -/* Gethbadd_alen_t: - * This symbol holds the type used for the 2nd argument - * to gethostbyaddr(). +/* HAS_GETNETENT: + * This symbol, if defined, indicates that the getnetent() routine is + * available to look up network names in some data base or another. */ -#define Gethbadd_alen_t int /**/ /* config-skip */ +#define HAS_GETNETENT /*config-skip*/ -#ifdef DECCRTL_SOCKETS -/* HAS_GETNBADD: - * This symbol, if defined, indicates that the getnetbyaddr routine is - * available to lookup networks by their IP addresses. +/* HAS_SETNETENT: + * This symbol, if defined, indicates that the setnetent() routine is + * available. */ -#define HAS_GETNBADD /**/ /* config-skip */ +#define HAS_SETNETENT /*config-skip*/ -/* Gethbadd_net_t: - * This symbol holds the type used for the 1st argument - * to getnetbyaddr(). +/* HAS_ENDNETENT: + * This symbol, if defined, indicates that the endnetent() routine is + * available to close whatever was being used for network queries. */ -#define Getnbadd_net_t long /**/ /* config-skip */ +#define HAS_ENDNETENT /*config-skip*/ #else -#undef HAS_GETNBADD /**/ /* config-skip */ -#undef Getnbadd_net_t long /**/ /* config-skip */ +#undef HAS_GETNETBYADDR /*config-skip*/ +#undef HAS_GETNETBYNAME /*config-skip*/ +#undef HAS_GETNETENT /*config-skip*/ +#undef HAS_SETNETENT /*config-skip*/ +#undef HAS_ENDNETENT /*config-skip*/ #endif +/* HAS_GETPROTOBYNAME: + * This symbol, if defined, indicates that the getprotobyname routine is + * available to lookup protocols by their names. + */ +/* HAS_GETPROTOBYNUMBER: + * This symbol, if defined, indicates that the getprotobynumber() + * routine is available to look up protocols by their number. + */ +#define HAS_GETPROTOBYNAME /*config-skip*/ +#define HAS_GETPROTOBYNUMBER /*config-skip*/ + +/* HAS_GETSERVBYNAME: + * This symbol, if defined, indicates that the getservbyname() + * routine is available to look up services by their name. + */ +/* HAS_GETSERVBYPORT: + * This symbol, if defined, indicates that the getservbyport() + * routine is available to look up services by their port. + */ +#define HAS_GETSERVBYNAME /*config-skip*/ +#define HAS_GETSERVBYPORT /*config-skip*/ + +/* HAS_SETHOSTENT: + * This symbol, if defined, indicates that the sethostent() routine is + * available. + */ +#define HAS_SETHOSTENT /*config-skip*/ + /* VMS: In general, TCP/IP header files should be included from * sockadapt.h, instead of here, in order to keep the TCP/IP code * together as much as possible. @@ -2001,17 +2063,76 @@ */ #define HAS_SELECT /**/ /* config-skip */ +/* HAS_ENDHOSTENT: + * This symbol, if defined, indicates that the endhostent() routine is + * available to close whatever was being used for host queries. + */ +#define HAS_ENDHOSTENT /*config-skip*/ + +/* HAS_GETPROTOENT: + * This symbol, if defined, indicates that the getprotoent() routine is + * available to look up protocols in some data base or another. + */ +#define HAS_GETPROTOENT /*config-skip*/ + +/* HAS_ENDPROTOENT: + * This symbol, if defined, indicates that the endprotoent() routine is + * available to close whatever was being used for protocol queries. + */ +#define HAS_ENDPROTOENT /*config-skip*/ + +/* HAS_SETPROTOENT: + * This symbol, if defined, indicates that the setprotoent() routine is + * available. + */ +#define HAS_SETPROTOENT /*config-skip*/ + +/* HAS_GETSERVENT: + * This symbol, if defined, indicates that the getservent() routine is + * available to look up network services in some data base or another. + */ +#define HAS_GETSERVENT /*config-skip*/ + +/* HAS_SETSERVENT: + * This symbol, if defined, indicates that the setservent() routine is + * available. + */ +#define HAS_SETSERVENT /*config-skip*/ + +/* HAS_ENDSERVENT: + * This symbol, if defined, indicates that the endservent() routine is + * available to close whatever was being used for service queries. + */ +#define HAS_ENDSERVENT /*config-skip*/ + #else /* VMS_DO_SOCKETS */ -#undef HAS_SOCKET /**/ /* config-skip */ -#undef HAS_SOCKETPAIR /**/ /* config-skip */ -#undef HAS_GETHOSTENT /**/ /* config-skip */ -#undef I_NETINET_IN /**/ /* config-skip */ -#undef I_NETDB /**/ /* config-skip */ -#undef I_NET_ERRNO /**/ /* config-skip */ -#undef HAS_SELECT /**/ /* config-skip */ -#undef HAS_GETHBADD /**/ /* config-skip */ -#undef HAS_GETNBADD /**/ /* config-skip */ +#undef HAS_SOCKET /*config-skip*/ +#undef HAS_SOCKETPAIR /*config-skip*/ +#undef HAS_GETHOSTENT /*config-skip*/ +#undef HAS_SETHOSTENT /*config-skip*/ +#undef I_NETINET_IN /*config-skip*/ +#undef I_NETDB /*config-skip*/ +#undef I_NET_ERRNO /*config-skip*/ +#undef HAS_SELECT /*config-skip*/ +#undef HAS_GETHOSTBYADDR /*config-skip*/ +#undef HAS_GETNETBYADDR /*config-skip*/ +#undef HAS_GETNETENT /*config-skip*/ +#undef HAS_SETNETENT /*config-skip*/ +#undef HAS_ENDNETENT /*config-skip*/ +#undef HAS_GETHOSTBYNAME /*config-skip*/ +#undef HAS_GETNETBYNAME /*config-skip*/ +#undef HAS_GETPROTOBYNAME /*config-skip*/ +#undef HAS_GETPROTOBYNUMBER /*config-skip*/ +#undef HAS_GETSERVBYNAME /*config-skip*/ +#undef HAS_GETSERVBYPORT /*config-skip*/ +#undef HAS_ENDHOSTENT /*config-skip*/ +#undef HAS_GETPROTOENT /*config-skip*/ +#undef HAS_SETPROTOENT /*config-skip*/ +#undef HAS_ENDPROTOENT /*config-skip*/ +#undef HAS_GETSERVENT /*config-skip*/ +#undef HAS_SETSERVENT /*config-skip*/ +#undef HAS_ENDSERVENT /*config-skip*/ #endif /* !VMS_DO_SOCKETS */ diff --git a/vms/descrip.mms b/vms/descrip.mms index 5f055091b0..00a5c0b425 100644 --- a/vms/descrip.mms +++ b/vms/descrip.mms @@ -1,5 +1,5 @@ # Descrip.MMS for perl5 on VMS -# Last revised 23-Dec-1997 by Charles Bailey bailey@genetics.upenn.edu +# Last revised 27-Feb-1998 by Charles Bailey bailey@genetics.upenn.edu # #: This file uses MMS syntax, and can be processed using DEC's MMS product, #: or the free MMK clone (available by ftp at ftp.spc.edu). If you want to @@ -74,7 +74,7 @@ OBJVAL = $(MMS$TARGET_NAME)$(O) .endif # Updated by fndvers.com -- do not edit by hand -PERL_VERSION = 5_00460# +PERL_VERSION = 5_00463# .ifdef DECC_SOCKETS SOCKET=1 @@ -274,22 +274,22 @@ extobj = $(myextobj) #### End of system configuration section. #### -h1 = EXTERN.h, INTERN.h, XSUB.h, av.h, config.h, cop.h, cv.h +h1 = EXTERN.h, INTERN.h, XSUB.h, av.h, bytecode.h, byterun.h, config.h, cop.h, cv.h h2 = embed.h, form.h, gv.h, handy.h, hv.h, keywords.h, mg.h, op.h, thread.h h3 = opcode.h, patchlevel.h, perl.h, perly.h, pp.h, proto.h, regcomp.h h4 = regexp.h, scope.h, sv.h, vmsish.h, util.h, perlio.h, perlsdio.h -h5 = embedvar.h, intrpvar.h, perlvars.h, thrdvar.h +h5 = embedvar.h, intrpvar.h, perlvars.h, thrdvar.h, atomic.h h = $(h1), $(h2), $(h3), $(h4), $(h5) $(SOCKHLIS) $(THREADH) c1 = av.c, scope.c, op.c, doop.c, doio.c, dump.c, hv.c, mg.c, universal.c, perlio.c c2 = perl.c, perly.c, pp.c, pp_hot.c, pp_ctl.c, pp_sys.c, regcomp.c, regexec.c -c3 = gv.c, sv.c, taint.c, toke.c, util.c, deb.c, run.c, globals.c, vms.c $(SOCKCLIS) +c3 = gv.c, sv.c, taint.c, toke.c, util.c, deb.c, run.c, globals.c, vms.c, byterun.c $(SOCKCLIS) -c = $(c1), $(c2), $(c3), miniperlmain.c, perlmain.c +c = $(c1), $(c2), $(c3), miniperlmain.c, perlmain.c, byteperl.c obj1 = perl$(O), gv$(O), toke$(O), perly$(O), op$(O), regcomp$(O), dump$(O), util$(O), mg$(O), perlio$(O) obj2 = hv$(O), av$(O), run$(O), pp_hot$(O), sv$(O), pp$(O), scope$(O), pp_ctl$(O), pp_sys$(O) -obj3 = doop$(O), doio$(O), regexec$(O), taint$(O), deb$(O), universal$(O), globals$(O), vms$(O) $(SOCKOBJ) +obj3 = doop$(O), doio$(O), regexec$(O), taint$(O), deb$(O), universal$(O), globals$(O), vms$(O), byterun$(O) $(SOCKOBJ) obj = $(obj1), $(obj2), $(obj3) @@ -298,11 +298,13 @@ ac2 = $(ARCHCORE)config.h $(ARCHCORE)cop.h $(ARCHCORE)cv.h $(ARCHCORE)embed.h ac3 = $(ARCHCORE)form.h $(ARCHCORE)gv.h $(ARCHCORE)handy.h $(ARCHCORE)hv.h ac4 = $(ARCHCORE)keywords.h $(ARCHCORE)mg.h $(ARCHCORE)op.h $(ARCHCORE)opcode.h ac5 = $(ARCHCORE)patchlevel.h $(ARCHCORE)perl.h $(ARCHCORE)perly.h $(ARCHCORE)thread.h -ac6 = $(ARCHCORE)pp.h $(ARCHCORE)proto.h $(ARCHCORE)regcomp.h $(ARCHCORE)perlio.h $(ARCHCORE)perlsdio.h -ac7 = $(ARCHCORE)regexp.h $(ARCHCORE)scope.h $(ARCHCORE)sv.h $(ARCHCORE)util.h -ac8 = $(ARCHCORE)embedvar.h $(ARCHCORE)intrpvar.h $(ARCHCORE)perlvars.h $(ARCHCORE)thrdvar.h -ac9 = $(ARCHCORE)vmsish.h $(ARCHCORE)$(DBG)libperl$(OLB) $(ARCHCORE)perlshr_attr.opt -ac10 = $(ARCHCORE)$(DBG)perlshr_bld.opt +ac6 = $(ARCHCORE)perldir.h $(ARCHCORE)perlenv.h $(ARCHCORE)perllio.h $(ARCHCORE)atomic.h +ac7 = $(ARCHCORE)perlmem.h $(ARCHCORE)perlproc.h $(ARCHCORE)perlsock.h +ac8 = $(ARCHCORE)pp.h $(ARCHCORE)proto.h $(ARCHCORE)regcomp.h $(ARCHCORE)perlio.h $(ARCHCORE)perlsdio.h +ac9 = $(ARCHCORE)regexp.h $(ARCHCORE)scope.h $(ARCHCORE)sv.h $(ARCHCORE)util.h +ac10 = $(ARCHCORE)embedvar.h $(ARCHCORE)intrpvar.h $(ARCHCORE)perlvars.h $(ARCHCORE)thrdvar.h +ac11 = $(ARCHCORE)vmsish.h $(ARCHCORE)$(DBG)libperl$(OLB) $(ARCHCORE)perlshr_attr.opt +ac12 = $(ARCHCORE)$(DBG)perlshr_bld.opt $(ARCHCORE)bytecode.h $(ARCHCORE)byterun.h .ifdef SOCKET acs = $(ARCHCORE)$(SOCKH) .else @@ -345,7 +347,7 @@ all : base extras x2p archcorefiles preplibrary perlpods .endif base : miniperl perl @ $(NOOP) -extras : Fcntl IO Opcode attrs $(POSIX) $(THREAD) SDBM_File libmods utils podxform +extras : Fcntl IO Opcode attrs B $(POSIX) $(THREAD) SDBM_File libmods utils podxform @ $(NOOP) libmods : $(LIBPREREQ) @ $(NOOP) @@ -368,15 +370,15 @@ pod8 = [.lib.pod]perltrap.pod [.lib.pod]perlvar.pod [.lib.pod]perlxs.pod [.lib.p perlpods : $(pod1) $(pod2) $(pod3) $(pod4) $(pod5) $(pod6) $(pod7) $(pod8) [.lib.pod]perlvms.pod @ $(NOOP) -archcorefiles : $(ac1) $(ac2) $(ac3) $(ac4) $(ac5) $(ac6) $(ac7) $(ac8) $(ac9) $(ac10) $(acs) $(acth) $(ARCHAUTO)time.stamp +archcorefiles : $(ac1) $(ac2) $(ac3) $(ac4) $(ac5) $(ac6) $(ac7) $(ac8) $(ac9) $(ac10) $(ac11) $(ac12) $(acs) $(acth) $(ARCHAUTO)time.stamp @ $(NOOP) miniperl : $(DBG)miniperl$(E) @ Continue $(MINIPERL_EXE) : miniperlmain$(O), $(DBG)libperl$(OLB) $(CRTL) - Link $(LINKFLAGS)/NoDebug/NoMap/NoFull/NoCross/Exe=$(MMS$TARGET) miniperlmain$(O), $(DBG)libperl$(OLB)/Library/Include=globals $(CRTLOPTS) + Link $(LINKFLAGS)/NoDebug/Trace/NoMap/NoFull/NoCross/Exe=$(MMS$TARGET) miniperlmain$(O), $(DBG)libperl$(OLB)/Library/Include=globals $(CRTLOPTS) $(DBG)miniperl$(E) : miniperlmain$(O), $(DBG)libperl$(OLB) $(CRTL) - Link $(LINKFLAGS)/Exe=$(MMS$TARGET) miniperlmain$(O),$(DBG)libperl$(OLB)/Library/Include=globals $(CRTLOPTS) + Link $(LINKFLAGS)/Trace/Exe=$(MMS$TARGET) miniperlmain$(O),$(DBG)libperl$(OLB)/Library/Include=globals $(CRTLOPTS) $(DBG)libperl$(OLB) : $(obj) @ If F$Search("$(MMS$TARGET)").eqs."" Then Library/Object/Create $(MMS$TARGET) @@ -387,15 +389,26 @@ $(DBG)libperl$(OLB) : $(obj) perlmain.c : miniperlmain.c $(MINIPERL_EXE) [.vms]writemain.pl $(MINIPERL) [.VMS]Writemain.pl "$(EXT)" -perl : $(DBG)perl$(E) +byteperl.c : [.ext.B]byteperl.c + Copy/Log $(MMS$SOURCE) $(MMS$TARGET) + +.ifdef __DEBUG__ +# Link an extra perl that doesn't invoke the debugger +perl : $(DBG)perl$(E) $(DBG)byteperl$(E) + Link $(LINKFLAGS)/NoDebug/Trace/NoMap/NoCross/NoFull/Exe=N$(DBG)perl$(E) perlmain$(O), perlshr.opt/Option, perlshr_attr.opt/Option $(CRTLOPTS) + Link $(LINKFLAGS)/NoDebug/Trace/NoMap/NoCross/NoFull/Exe=N$(DBG)byteperl$(E) byteperl$(O), perlshr.opt/Option, perlshr_attr.opt/Option $(CRTLOPTS) +.else +perl : $(DBG)perl$(E) $(DBG)byteperl$(E) @ Continue +.endif + $(DBG)perl$(E) : perlmain$(O), $(DBG)perlshr$(E), $(MINIPERL_EXE) @ @[.vms]genopt "PerlShr.Opt/Write" "|" "''F$Environment("Default")'$(DBG)PerlShr$(E)/Share" -.ifdef gnuc - Link $(LINKFLAGS)/Exe=$(MMS$TARGET) perlmain$(O), perlshr.opt/Option, perlshr_attr.opt/Option, crtl.opt/Option -.else - Link $(LINKFLAGS)/Exe=$(MMS$TARGET) perlmain$(O), perlshr.opt/Option, perlshr_attr.opt/Option -.endif + Link $(LINKFLAGS)/Exe=$(MMS$TARGET) perlmain$(O), perlshr.opt/Option, perlshr_attr.opt/Option $(CRTLOPTS) + +$(DBG)byteperl$(E) : byteperl$(O), $(DBG)perlshr$(E), $(MINIPERL_EXE) + @ @[.vms]genopt "PerlShr.Opt/Write" "|" "''F$Environment("Default")'$(DBG)PerlShr$(E)/Share" + Link $(LINKFLAGS)/Exe=$(MMS$TARGET) byteperl$(O), perlshr.opt/Option, perlshr_attr.opt/Option $(CRTLOPTS) $(DBG)perlshr$(E) : $(DBG)libperl$(OLB) $(extobj) $(DBG)perlshr_xtras.ts Link $(LINKFLAGS)/Share=$(MMS$TARGET) $(extobj) []$(DBG)perlshr_bld.opt/Option, perlshr_attr.opt/Option @@ -433,7 +446,7 @@ $(ARCHDIR)config.pm : [.lib]config.pm # Once again, we accomodate DCL's 255 character buffer [.lib]config.pm : [.vms]config.vms [.vms]genconfig.pl $(MINIPERL_EXE) @ $(MINIPERL) -e "print join('|',@ARGV),'|';" "cc=$(CC)$(CFLAGS)" >genconfig.opt - @ $(MINIPERL) -e "print join('|',@ARGV),'|';" "ldflags=$(LINKFLAGS)|obj_ext=$(O)|exe_ext=$(E)|lib_ext=$(OLB)" >>genconfig.opt + @ $(MINIPERL) -e "print join('|',@ARGV),'|';" "ldflags=$(LINKFLAGS)|obj_ext=$(O)|exe_ext=$(E)|lib_ext=$(OLB)|dbgprefix=$(DBG)" >>genconfig.opt $(MINIPERL) [.VMS]GenConfig.Pl -f genconfig.opt @ Delete/NoLog/NoConfirm genconfig.opt; $(MINIPERL) ConfigPM. @@ -616,6 +629,7 @@ IO : [.lib]IO.pm [.lib.IO]File.pm [.lib.IO]Handle.pm [.lib.IO]Pipe.pm [.lib.IO]S @ Set Default [--] [.lib.auto.IO]IO$(E) : [.ext.IO]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] @ Set Default [.ext.IO] $(MMS) @ Set Default [--] @@ -625,6 +639,116 @@ IO : [.lib]IO.pm [.lib.IO]File.pm [.lib.IO]Handle.pm [.lib.IO]Pipe.pm [.lib.IO]S [.ext.IO]Descrip.MMS : [.ext.IO]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E) $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.IO]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]" +B : [.lib]B.pm [.lib]O.pm [.lib.B]Asmdata.pm [.lib.B]Assembler.pm [.lib.B]Bblock.pm [.lib.B]Bytecode.pm [.lib.B]C.pm [.lib.B]CC.pm [.lib.B]Debug.pm [.lib.B]Deparse.pm [.lib.B]Disassembler.pm [.lib.B]Lint.pm [.lib.B]Showlex.pm [.lib.B]Stackobj.pm [.lib.B]Terse.pm [.lib.B]Xref.pm [.lib.auto.B]B$(E) + @ $(NOOP) + +[.lib]B.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib]O.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Asmdata.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Assembler.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Bblock.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Bytecode.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]C.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]CC.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Debug.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Deparse.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Disassembler.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Lint.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Showlex.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Stackobj.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Terse.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.B]Xref.pm : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +[.lib.auto.B]B$(E) : [.ext.B]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.B] + $(MMS) + @ Set Default [--] + +# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir> +# ${@} necessary to distract different versions of MM[SK]/make +[.ext.B]Descrip.MMS : [.ext.B]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E) + $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.B]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]" + [.lib]vmsish.pm : [.vms.ext]vmsish.pm Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET) @@ -966,6 +1090,15 @@ $(ARCHCORE)INTERN.h : INTERN.h $(ARCHCORE)XSUB.h : XSUB.h @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) Copy/Log $(MMS$SOURCE) $(MMS$TARGET) +$(ARCHCORE)bytecode.h : bytecode.h + @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) + Copy/Log $(MMS$SOURCE) $(MMS$TARGET) +$(ARCHCORE)byterun.h : byterun.h + @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) + Copy/Log $(MMS$SOURCE) $(MMS$TARGET) +$(ARCHCORE)atomic.h : atomic.h + @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) + Copy/Log $(MMS$SOURCE) $(MMS$TARGET) $(ARCHCORE)av.h : av.h @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) Copy/Log $(MMS$SOURCE) $(MMS$TARGET) @@ -1022,12 +1155,30 @@ $(ARCHCORE)patchlevel.h : patchlevel.h $(ARCHCORE)perl.h : perl.h @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) Copy/Log $(MMS$SOURCE) $(MMS$TARGET) +$(ARCHCORE)perldir.h : perldir.h + @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) + Copy/Log $(MMS$SOURCE) $(MMS$TARGET) +$(ARCHCORE)perlenv.h : perlenv.h + @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) + Copy/Log $(MMS$SOURCE) $(MMS$TARGET) $(ARCHCORE)perlio.h : perlio.h @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) Copy/Log $(MMS$SOURCE) $(MMS$TARGET) +$(ARCHCORE)perllio.h : perllio.h + @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) + Copy/Log $(MMS$SOURCE) $(MMS$TARGET) +$(ARCHCORE)perlmem.h : perlmem.h + @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) + Copy/Log $(MMS$SOURCE) $(MMS$TARGET) +$(ARCHCORE)perlproc.h : perlproc.h + @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) + Copy/Log $(MMS$SOURCE) $(MMS$TARGET) $(ARCHCORE)perlsdio.h : perlsdio.h @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) Copy/Log $(MMS$SOURCE) $(MMS$TARGET) +$(ARCHCORE)perlsock.h : perlsock.h + @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) + Copy/Log $(MMS$SOURCE) $(MMS$TARGET) $(ARCHCORE)perlvars.h : perlvars.h @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE) Copy/Log $(MMS$SOURCE) $(MMS$TARGET) @@ -1089,41 +1240,44 @@ $(ARCHAUTO)time.stamp : util$(O) : util.c $(CC) $(CFLAGS) util.c # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE -av$(O) : av.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -deb$(O) : deb.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -doio$(O) : doio.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -doop$(O) : doop.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -dump$(O) : dump.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -globals$(O) : globals.c INTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -gv$(O) : gv.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -hv$(O) : hv.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -malloc$(O) : malloc.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -mg$(O) : mg.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -miniperlmain$(O) : miniperlmain.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -op$(O) : op.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -perl$(O) : perl.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h patchlevel.h -perlio$(O) : perlio.c config.h EXTERN.h perl.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -perlmain$(O) : perlmain.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -perly$(O) : perly.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -pp$(O) : pp.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -pp_ctl$(O) : pp_ctl.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -pp_hot$(O) : pp_hot.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -pp_sys$(O) : pp_sys.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -regcomp$(O) : regcomp.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h INTERN.h regcomp.h -regexec$(O) : regexec.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h regcomp.h -run$(O) : run.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -scope$(O) : scope.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -sv$(O) : sv.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -taint$(O) : taint.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -toke$(O) : toke.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h keywords.h -universal$(O) : universal.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h XSUB.h -util$(O) : util.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h -vms$(O) : vms.c EXTERN.h perl.h config.h embed.h perlio.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h XSUB.h +av$(O) : av.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +byterun$(O) : byterun.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +deb$(O) : deb.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +doio$(O) : doio.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +doop$(O) : doop.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +dump$(O) : dump.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +globals$(O) : globals.c INTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +gv$(O) : gv.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +hv$(O) : hv.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +malloc$(O) : malloc.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +mg$(O) : mg.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +miniperlmain$(O) : miniperlmain.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +op$(O) : op.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +perl$(O) : perl.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h patchlevel.h +perlio$(O) : perlio.c config.h EXTERN.h perl.h bytecode.h byterun.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +perlmain$(O) : perlmain.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +byteperl$(O) : byteperl.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +perly$(O) : perly.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +pp$(O) : pp.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +pp_ctl$(O) : pp_ctl.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +pp_hot$(O) : pp_hot.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +pp_sys$(O) : pp_sys.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +regcomp$(O) : regcomp.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h INTERN.h regcomp.h +regexec$(O) : regexec.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h regcomp.h +run$(O) : run.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +scope$(O) : scope.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +sv$(O) : sv.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +taint$(O) : taint.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +toke$(O) : toke.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h keywords.h +universal$(O) : universal.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h XSUB.h +util$(O) : util.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h +vms$(O) : vms.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlio.h perldir.h perlenv.h perllio.h perlmem.h perlproc.h perlsock.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h XSUB.h [.x2p]a2p$(O) : [.x2p]a2p.c [.x2p]a2py.c [.x2p]INTERN.h [.x2p]a2p.h [.x2p]hash.h [.x2p]str.h config.h handy.h [.x2p]hash$(O) : [.x2p]hash.c [.x2p]EXTERN.h [.x2p]a2p.h [.x2p]hash.h [.x2p]str.h [.x2p]util.h config.h handy.h [.x2p]str$(O) : [.x2p]str.c [.x2p]EXTERN.h [.x2p]a2p.h [.x2p]hash.h [.x2p]str.h [.x2p]util.h config.h handy.h [.x2p]util$(O) : [.x2p]util.c [.x2p]EXTERN.h [.x2p]INTERN.h [.x2p]a2p.h [.x2p]hash.h [.x2p]str.h [.x2p]util.h config.h handy.h [.x2p]walk$(O) : [.x2p]walk.c [.x2p]EXTERN.h [.x2p]a2p.h [.x2p]hash.h [.x2p]str.h [.x2p]util.h config.h handy.h +# End of automatically generated make dependencies .endif # !LINK_ONLY config.h : [.vms]config.vms @@ -1155,6 +1309,7 @@ tidy : cleanlis - If F$Search("VMSish.H;-1").nes."" Then Purge/NoConfirm/Log VMSish.H - If F$Search("VMS.C;-1") .nes."" Then Purge/NoConfirm/Log VMS.C - If F$Search("Perlmain.C;-1") .nes."" Then Purge/NoConfirm/Log Perlmain.C + - If F$Search("byteperl.C;-1") .nes."" Then Purge/NoConfirm/Log byteperl.C - If F$Search("Perlshr_Gbl*.Mar;-1") .nes."" Then Purge/NoConfirm/Log Perlshr_Gbl*.Mar - If F$Search("[.Ext.DynaLoader]DL_VMS$(O);-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS$(O) - If F$Search("[.Ext.DynaLoader]DL_VMS.C;-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS.C @@ -1167,8 +1322,8 @@ tidy : cleanlis - If F$Search("[.Lib]Socket.pm;-1").nes."" Then Purge/NoConfirm/Log [.Lib]Socket.pm - If F$Search("[.Lib]Config.pm;-1").nes."" Then Purge/NoConfirm/Log [.Lib]Config.pm - If F$Search("$(ARCHDIR)Config.pm;-1").nes."" Then Purge/NoConfirm/Log $(ARCHDIR)Config.pm - - If F$Search("[.lib.ExtUtils]Miniperl.pm").nes."" Then Purge/NoConfirm/Log [.lib.ExtUtils]Miniperl.pm;* - - If F$Search("[.lib.ExtUtils]XSSymSet.pm").nes."" Then Purge/NoConfirm/Log [.lib.ExtUtils]XSSymSet.pm;* + - If F$Search("[.lib.ExtUtils]Miniperl.pm").nes."" Then Purge/NoConfirm/Log [.lib.ExtUtils]Miniperl.pm + - If F$Search("[.lib.ExtUtils]XSSymSet.pm").nes."" Then Purge/NoConfirm/Log [.lib.ExtUtils]XSSymSet.pm - If F$Search("[.Lib.VMS]*.*;-1").nes."" Then Purge/NoConfirm/Log [.Lib.VMS]*.* - If F$Search("[.Lib.Pod]*.Pod;-1").nes."" Then Purge/NoConfirm/Log [.Lib.Pod]*.Pod - If F$Search("$(ARCHCORE)*.*").nes."" Then Purge/NoConfirm/Log $(ARCHCORE)*.* @@ -1187,6 +1342,17 @@ clean : tidy Set Default [.ext.Opcode] - $(MMS) clean Set Default [--] + Set Default [.ext.attrs] + - $(MMS) clean + Set Default [--] + Set Default [.ext.B] + - $(MMS) clean + Set Default [--] +.ifdef THREAD + Set Default [.ext.Thread] + - $(MMS) realclean + Set Default [--] +.endif .ifdef DECC Set Default [.ext.POSIX] - $(MMS) clean @@ -1206,6 +1372,7 @@ clean : tidy - If F$Search("VMSish.H").nes."" Then Delete/NoConfirm/Log VMSish.H;* - If F$Search("VMS.C") .nes."" Then Delete/NoConfirm/Log VMS.C;* - If F$Search("Perlmain.C") .nes."" Then Delete/NoConfirm/Log Perlmain.C;* + - If F$Search("byteperl.C") .nes."" Then Delete/NoConfirm/Log byteperl.C;* - If F$Search("Perlshr_Gbl*.Mar") .nes."" Then Delete/NoConfirm/Log Perlshr_Gbl*.Mar;* - If F$Search("*.TS").nes."" Then Delete/NoConfirm/Log *.TS;* - If F$Search("[.Ext.DynaLoader]DL_VMS$(O)").nes."" Then Delete/NoConfirm/Log [.Ext.DynaLoader]DL_VMS$(O);* @@ -1228,6 +1395,9 @@ realclean : clean Set Default [.ext.attrs] - $(MMS) realclean Set Default [--] + Set Default [.ext.B] + - $(MMS) realclean + Set Default [--] .ifdef THREAD Set Default [.ext.Thread] - $(MMS) realclean diff --git a/vms/ext/Filespec.pm b/vms/ext/Filespec.pm index db3283c571..b0b1414599 100644 --- a/vms/ext/Filespec.pm +++ b/vms/ext/Filespec.pm @@ -12,7 +12,7 @@ VMS::Filespec - convert between VMS and Unix file specification syntax =head1 SYNOPSIS use VMS::Filespec; -$fullspec = rmsexpand('[.VMS]file.specification'); +$fullspec = rmsexpand('[.VMS]file.specification'[, 'default:[file.spec]']); $vmsspec = vmsify('/my/Unix/file/specification'); $unixspec = unixify('my:[VMS]file.specification'); $path = pathify('my:[VMS.or.Unix.directory]specification.dir'); @@ -65,9 +65,11 @@ The routines provided are: =head2 rmsexpand Uses the RMS $PARSE and $SEARCH services to expand the input -specification to its fully qualified form. (If the file does -not exist, the input specification is expanded as much as -possible.) If an error occurs, returns C<undef> and sets C<$!> +specification to its fully qualified form, except that a null type +or version is not added unless it was present in either the original +file specification or the default specification passed to C<rmsexpand>. +(If the file does not exist, the input specification is expanded as much +as possible.) If an error occurs, returns C<undef> and sets C<$!> and C<$^E>. =head2 vmsify diff --git a/vms/ext/Stdio/0README.txt b/vms/ext/Stdio/0README.txt index 28f82b3a14..25329f9334 100644 --- a/vms/ext/Stdio/0README.txt +++ b/vms/ext/Stdio/0README.txt @@ -3,26 +3,6 @@ VMS::Stdio, which provides access from Perl to VMS-specific stdio functions. For more specific documentation of its function, please see the pod section of Stdio.pm. - *** Please Note *** - -This package is the direct descendant of VMS::stdio, but as of Perl -5.002, the name has been changed to VMS::Stdio, in order to conform -to the Perl naming convention that extensions whose name begins -with a lowercase letter represent compile-time "pragmas", while -extensions which provide added functionality have names whose parts -begin with uppercase letters. In addition, the functions -vmsfopen and fgetname have been renamed vmsopen and getname, -respectively, in order to more closely resemble related Perl -I/O operators, which do not retain the 'f' from corresponding -C routine names. - -A transitional interface to the old routine names has been -provided, so that calls to these routines will generate a -warning, and be routed to the corresponding VMS::Stdio -routine. This interface will be removed in a future release, -so please update your code to use the new names. - - ===> Installation This extension, like most Perl extensions, should be installed @@ -45,3 +25,6 @@ the Perl distribution tree, and then saying 2.0 28-Feb-1996 Charles Bailey bailey@genetics.upenn.edu major rewrite for Perl 5.002: name changed to VMS::Stdio, new functions added, and prototypes incorporated +2.1 24-Mar-1998 Charles Bailey bailey@newman.upenn.edu + Added writeof() + Removed old VMs::stdio compatibility interface diff --git a/vms/ext/Stdio/Stdio.pm b/vms/ext/Stdio/Stdio.pm index 218c406fa4..ea5d9074ef 100644 --- a/vms/ext/Stdio/Stdio.pm +++ b/vms/ext/Stdio/Stdio.pm @@ -1,8 +1,8 @@ # VMS::Stdio - VMS extensions to Perl's stdio calls # # Author: Charles Bailey bailey@genetics.upenn.edu -# Version: 2.02 -# Revised: 15-Feb-1997 +# Version: 2.1 +# Revised: 24-Mar-1998 package VMS::Stdio; @@ -12,17 +12,18 @@ use Carp '&croak'; use DynaLoader (); use Exporter (); -$VERSION = '2.02'; +$VERSION = '2.1'; @ISA = qw( Exporter DynaLoader IO::File ); @EXPORT = qw( &O_APPEND &O_CREAT &O_EXCL &O_NDELAY &O_NOWAIT &O_RDONLY &O_RDWR &O_TRUNC &O_WRONLY ); -@EXPORT_OK = qw( &flush &getname &remove &rewind &sync &tmpnam - &vmsopen &vmssysopen &waitfh ); +@EXPORT_OK = qw( &flush &getname &remove &rewind &sync &setdef &tmpnam + &vmsopen &vmssysopen &waitfh &writeof ); %EXPORT_TAGS = ( CONSTANTS => [ qw( &O_APPEND &O_CREAT &O_EXCL &O_NDELAY &O_NOWAIT &O_RDONLY &O_RDWR &O_TRUNC &O_WRONLY ) ], - FUNCTIONS => [ qw( &flush &getname &remove &rewind &sync - &tmpnam &vmsopen &vmssysopen &waitfh ) ] ); + FUNCTIONS => [ qw( &flush &getname &remove &rewind &setdef + &sync &tmpnam &vmsopen &vmssysopen + &waitfh &writeof ) ] ); bootstrap VMS::Stdio $VERSION; @@ -32,7 +33,7 @@ sub AUTOLOAD { if ($constname =~ /^O_/) { my($val) = constant($constname); defined $val or croak("Unknown VMS::Stdio constant $constname"); - *$AUTOLOAD = sub { val; } + *$AUTOLOAD = sub { $val; } } else { # We don't know about it; hand off to IO::File require IO::File; @@ -80,8 +81,9 @@ VMS::Stdio - standard I/O functions via VMS extensions =head1 SYNOPSIS -use VMS::Stdio qw( &flush &getname &remove &rewind &sync &tmpnam - &vmsopen &vmssysopen &waitfh ); +use VMS::Stdio qw( &flush &getname &remove &rewind &setdef &sync &tmpnam + &vmsopen &vmssysopen &waitfh &writeof ); +setdef("new:[default.dir]"); $uniquename = tmpnam; $fh = vmsopen("my.file","rfm=var","alq=100",...) or die $!; $name = getname($fh); @@ -96,7 +98,7 @@ sysread($fh,$data,128); waitfh($fh); close($fh); remove("another.file"); - +writeof($pipefh); =head1 DESCRIPTION This package gives Perl scripts access via VMS extensions to several @@ -175,6 +177,13 @@ to the beginning of the file. It's really just a convenience method equivalent in effect to C<seek($fh,0,0)>. It returns a true value if successful, and C<undef> if it fails. +=item setdef + +This function sets the default device and directory for the process. +It is identical to the built-in chdir() operator, except that the change +persists after Perl exits. It returns a true value on success, and +C<undef> if it encounters and error. + =item sync This function flushes buffered data for the specified file handle @@ -231,6 +240,14 @@ operation on the file handle specified as its argument. It is used with handles opened for asynchronous I/O, and performs its task by calling the CRTL routine fwait(). +=item writeof + +This function writes an EOF to a file handle, if the device driver +supports this operation. Its primary use is to send an EOF to a +subprocess through a pipe opened for writing without closing the +pipe. It returns a true value if successful, and C<undef> if +it encounters an error. + =head1 REVISION This document was last revised on 10-Dec-1996, for Perl 5.004. diff --git a/vms/ext/Stdio/Stdio.xs b/vms/ext/Stdio/Stdio.xs index b10fec0d48..0a7b47e514 100644 --- a/vms/ext/Stdio/Stdio.xs +++ b/vms/ext/Stdio/Stdio.xs @@ -1,8 +1,8 @@ /* VMS::Stdio - VMS extensions to stdio routines * - * Version: 2.02 + * Version: 2.1 * Author: Charles Bailey bailey@genetics.upenn.edu - * Revised: 15-Feb-1997 + * Revised: 24-Mar-1998 * */ @@ -10,6 +10,9 @@ #include "perl.h" #include "XSUB.h" #include <file.h> +#include <iodef.h> +#include <rms.h> +#include <starlet.h> static bool constant(name, pval) @@ -121,12 +124,10 @@ constant(name) ST(0) = &sv_undef; void -flush(sv) - SV * sv +flush(fp) + FILE * fp PROTOTYPE: $ CODE: - FILE *fp = Nullfp; - if (SvOK(sv)) fp = IoIFP(sv_2io(sv)); if (fflush(fp)) { ST(0) = &sv_undef; } else { clearerr(fp); ST(0) = &sv_yes; } @@ -135,7 +136,7 @@ getname(fp) FILE * fp PROTOTYPE: $ CODE: - char fname[257]; + char fname[NAM$C_MAXRSS+1]; ST(0) = sv_newmortal(); if (fgetname(fp,fname) != NULL) sv_setpv(ST(0),fname); @@ -154,6 +155,59 @@ remove(name) ST(0) = remove(name) ? &sv_undef : &sv_yes; void +setdef(...) + PROTOTYPE: @ + CODE: + char vmsdef[NAM$C_MAXRSS+1], es[NAM$C_MAXRSS], sep; + unsigned long int retsts; + struct FAB deffab = cc$rms_fab; + struct NAM defnam = cc$rms_nam; + struct dsc$descriptor_s dirdsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0}; + if (items) { + SV *defsv = ST(items-1); /* mimic chdir() */ + ST(0) = &sv_undef; + if (!SvPOK(defsv)) { SETERRNO(EINVAL,LIB$_INVARG); XSRETURN(1); } + if (tovmsspec(SvPV(defsv,na),vmsdef) == NULL) { XSRETURN(1); } + deffab.fab$l_fna = vmsdef; deffab.fab$b_fns = strlen(vmsdef); + } + else { + deffab.fab$l_fna = "SYS$LOGIN"; deffab.fab$b_fns = 9; + EXTEND(sp,1); ST(0) = &sv_undef; + } + defnam.nam$l_esa = es; defnam.nam$b_ess = sizeof es; + deffab.fab$l_nam = &defnam; + retsts = sys$parse(&deffab,0,0); + if (retsts & 1) { + if (defnam.nam$v_wildcard) retsts = RMS$_WLD; + else if (defnam.nam$b_name || defnam.nam$b_type > 1 || + defnam.nam$b_ver > 1) retsts = RMS$_DIR; + } + defnam.nam$b_nop |= NAM$M_SYNCHK; defnam.nam$l_rlf = NULL; deffab.fab$b_dns = 0; + if (!(retsts & 1)) { + set_vaxc_errno(retsts); + switch (retsts) { + case RMS$_DNF: + set_errno(ENOENT); break; + case RMS$_SYN: case RMS$_DIR: case RMS$_DEV: + set_errno(EINVAL); break; + case RMS$_PRV: + set_errno(EACCES); break; + default: + set_errno(EVMSERR); break; + } + (void) sys$parse(&deffab,0,0); /* free up context */ + XSRETURN(1); + } + sep = *defnam.nam$l_dir; + *defnam.nam$l_dir = '\0'; + my_setenv("SYS$DISK",defnam.nam$b_node ? defnam.nam$l_node : defnam.nam$l_dev); + *defnam.nam$l_dir = sep; + dirdsc.dsc$a_pointer = defnam.nam$l_dir; dirdsc.dsc$w_length = defnam.nam$b_dir; + if ((retsts = sys$setddir(&dirdsc,0,0)) & 1) ST(0) = &sv_yes; + else { set_errno(EVMSERR); set_vaxc_errno(retsts); } + (void) sys$parse(&deffab,0,0); /* free up context */ + +void sync(fp) FILE * fp PROTOTYPE: $ @@ -295,3 +349,43 @@ waitfh(fp) PROTOTYPE: $ CODE: ST(0) = fwait(fp) ? &sv_undef : &sv_yes; + +void +writeof(mysv) + SV * mysv + PROTOTYPE: $ + CODE: + char devnam[257], *cp; + unsigned long int chan, iosb[2], retsts, retsts2; + struct dsc$descriptor devdsc = {0, DSC$K_DTYPE_T, DSC$K_CLASS_S, devnam}; + IO *io = sv_2io(mysv); + FILE *fp = io ? IoOFP(io) : NULL; + if (fp == NULL || strchr(">was+-|",IoTYPE(io)) == Nullch) { + set_errno(EBADF); set_vaxc_errno(SS$_IVCHAN); + ST(0) = &sv_undef; XSRETURN(1); + } + if (fgetname(fp,devnam) == Nullch) { ST(0) = &sv_undef; XSRETURN(1); } + if ((cp = strrchr(devnam,':')) != NULL) *(cp+1) = '\0'; + devdsc.dsc$w_length = strlen(devnam); + retsts = sys$assign(&devdsc,&chan,0,0); + if (retsts & 1) retsts = sys$qiow(0,chan,IO$_WRITEOF,iosb,0,0,0,0,0,0,0,0); + if (retsts & 1) retsts = iosb[0]; + retsts2 = sys$dassgn(chan); /* Be sure to deassign the channel */ + if (retsts & 1) retsts = retsts2; + if (retsts & 1) { ST(0) = &sv_yes; } + else { + set_vaxc_errno(retsts); + switch (retsts) { + case SS$_EXQUOTA: case SS$_INSFMEM: case SS$_MBFULL: + case SS$_MBTOOSML: case SS$_NOIOCHAN: case SS$_NOLINKS: + case SS$_BUFFEROVF: + set_errno(ENOSPC); break; + case SS$_ILLIOFUNC: case SS$_DEVOFFLINE: case SS$_NOSUCHDEV: + set_errno(EBADF); break; + case SS$_NOPRIV: + set_errno(EACCES); break; + default: /* Includes "shouldn't happen" cases that might map */ + set_errno(EVMSERR); break; /* to other errno values */ + } + ST(0) = &sv_undef; + } diff --git a/vms/ext/Stdio/test.pl b/vms/ext/Stdio/test.pl index 0b50d63e3a..36353d91b3 100755 --- a/vms/ext/Stdio/test.pl +++ b/vms/ext/Stdio/test.pl @@ -1,8 +1,8 @@ -# Tests for VMS::Stdio v2.01 +# Tests for VMS::Stdio v2.1 use VMS::Stdio; -import VMS::Stdio qw(&flush &getname &rewind &sync); +import VMS::Stdio qw(&flush &getname &rewind &sync &tmpnam); -print "1..14\n"; +print "1..19\n"; print +(defined(&getname) ? '' : 'not '), "ok 1\n"; $name = "test$$"; @@ -42,3 +42,27 @@ undef $sfh; print +(stat("$name.tmp") ? 'not ' : ''),"ok 13\n"; print +(&VMS::Stdio::tmpnam ? '' : 'not '),"ok 14\n"; + +if (open(P, qq[| MCR $^X -e "1 while (<STDIN>);print 'Foo';1 while (<STDIN>); print 'Bar'" >$name.tmp])) { + print P "Baz\nQuux\n"; + print +(VMS::Stdio::writeof(P) ? '' : 'not '),"ok 15\n"; + print P "Baz\nQuux\n"; + print +(close(P) ? '' : 'not '),"ok 16\n"; + $fh = VMS::Stdio::vmsopen("$name.tmp"); + chomp($line = <$fh>); + close $fh; + unlink("$name.tmp"); + print +($line eq 'FooBar' ? '' : 'not '),"ok 17\n"; +} +else { print "not ok 15\nnot ok 16\nnot ok 17\n"; } + +$sfh = VMS::Stdio::vmsopen(">$name.tmp"); +$setuperl = "\$ MCR $^X\nBEGIN { \@INC = qw(@INC) };\nuse VMS::Stdio qw(&setdef);"; +print $sfh qq[\$ here = F\$Environment("Default")\n]; +print $sfh "$setuperl\nsetdef();\n\$ Show Default\n\$ Set Default 'here'\n"; +print $sfh "$setuperl\nsetdef('..');\n\$ Show Default\n"; +close $sfh; +@defs = map { /(\S+)/ && $1 } `\@$name.tmp`; +unlink("$name.tmp"); +print +($defs[0] eq uc($ENV{'SYS$LOGIN'}) ? '' : "not ($defs[0]) "),"ok 18\n"; +print +($defs[1] eq VMS::Filespec::rmsexpand('[-]') ? '' : "not ($defs[1]) "),"ok 19\n"; diff --git a/vms/ext/filespec.t b/vms/ext/filespec.t index 6201a42dc6..05644917b6 100644 --- a/vms/ext/filespec.t +++ b/vms/ext/filespec.t @@ -10,7 +10,7 @@ foreach (<DATA>) { next if /^\s*$/; push(@tests,$_); } -print '1..',scalar(@tests)+3,"\n"; +print '1..',scalar(@tests)+6,"\n"; foreach $test (@tests) { ($arg,$func,$expect) = split(/\t+/,$test); @@ -25,14 +25,17 @@ foreach $test (@tests) { } } +$defwarn = <<'EOW'; +# Note: This failure may have occurred because your default device +# was set using a non-concealed logical name. If this is the case, +# you will need to determine by inspection that the two resultant +# file specifications shwn above are in fact equivalent. +EOW + if (rmsexpand('[]') eq "\U$ENV{DEFAULT}") { print 'ok ',++$idx,"\n"; } else { print 'not ok ', ++$idx, ": rmsexpand('[]') = |", rmsexpand('[]'), - "|, \$ENV{DEFAULT} = |\U$ENV{DEFAULT}|\n"; - print "# Note: This failure may have occurred because your default device\n"; - print "# was set using a non-concealed logical name. If this is the case,\n"; - print "# you will need to determine by inspection that the two resultant\n"; - print "# file specifications shwn above are in fact equivalent.\n"; + "|, \$ENV{DEFAULT} = |\U$ENV{DEFAULT}|\n$defwarn"; } if (rmsexpand('from.here') eq "\L$ENV{DEFAULT}from.here") { print 'ok ', ++$idx, "\n"; @@ -40,11 +43,15 @@ if (rmsexpand('from.here') eq "\L$ENV{DEFAULT}from.here") { else { print 'not ok ', ++$idx, ": rmsexpand('from.here') = |", rmsexpand('from.here'), - "|, \$ENV{DEFAULT}from.here = |\L$ENV{DEFAULT}from.here|\n"; - print "# Note: This failure may have occurred because your default device\n"; - print "# was set using a non-concealed logical name. If this is the case,\n"; - print "# you will need to determine by inspection that the two resultant\n"; - print "# file specifications shwn above are in fact equivalent.\n"; + "|, \$ENV{DEFAULT}from.here = |\L$ENV{DEFAULT}from.here|\n$defwarn"; +} +if (rmsexpand('from') eq "\L$ENV{DEFAULT}from") { + print 'ok ', ++$idx, "\n"; +} +else { + print 'not ok ', ++$idx, ": rmsexpand('from') = |", + rmsexpand('from'), + "|, \$ENV{DEFAULT}from = |\L$ENV{DEFAULT}from|\n$defwarn"; } if (rmsexpand('from.here','cant:[get.there];2') eq 'cant:[get.there]from.here;2') { print 'ok ',++$idx,"\n"; } @@ -53,6 +60,11 @@ else { rmsexpand('from.here','cant:[get.there];2'),"|\n"; } +# Make sure we're using redirected mkdir, which strips trailing '/', since +# the CRTL's mkdir can't handle this. +print +(mkdir('testdir/',0777) ? 'ok ' : 'not ok '),++$idx,"\n"; +print +(rmdir('testdir/') ? 'ok ' : 'not ok '),++$idx,"\n"; + __DATA__ # Basic VMS to Unix filespecs diff --git a/vms/fndvers.com b/vms/fndvers.com index f668666956..30243d82e5 100755 --- a/vms/fndvers.com +++ b/vms/fndvers.com @@ -63,10 +63,6 @@ $ Call update_file "''p2'" "#define ARCHNAME" "''token'" $ teststs = $Status $ If .not.teststs Then Exit teststs $! -$ token = """""""""/perl_root/lib/VMS_''arch'"""""""" /**/" -$ Call update_file "''p2'" "#define OLDARCHLIB_EXP" "''token'" -$ If .not.$Status Then Exit $Status -$! $ token = """""""""/perl_root/lib/site_perl/VMS_''arch'"""""""" /**/" $ Call update_file "''p2'" "#define SITEARCH_EXP" "''token'" $ If .not.$Status Then Exit $Status diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl index 0a8d7e60dc..9d5748d499 100644 --- a/vms/gen_shrfls.pl +++ b/vms/gen_shrfls.pl @@ -68,6 +68,7 @@ if ($docc) { if (($prefix,$defines,$suffix) = ($cc_cmd =~ m#(.*)/Define=(.*?)([/\s].*)#i)) { $defines =~ s/^\((.*)\)$/$1/; + $debugging_enabled = $defines =~ /\bDEBUGGING\b/; @defines = split(/,/,$defines); $cc_cmd = "$prefix/Define=(" . join(',',grep($_ = "\"$_\"",@defines)) . ')' . $suffix; @@ -85,6 +86,7 @@ if ($docc) { or 0; # again, make debug output nice print "\$isgcc: $isgcc\n" if $debug; print "\$isvaxc: $isvaxc\n" if $debug; + print "\$debugging_enabled: $debugging_enabled\n" if $debug; if (-f 'perl.h') { $dir = '[]'; } elsif (-f '[-]perl.h') { $dir = '[-]'; } @@ -96,8 +98,10 @@ else { or 0; # for nice debug output $isvaxc = (!$isgcc && $cc_cmd !~ /standard=/i) or 0; # again, for nice debug output + $debugging_enabled = $cc_cmd =~ /\bdebugging\b/i; print "\$isgcc: \\$isgcc\\\n" if $debug; print "\$isvaxc: \\$isvaxc\\\n" if $debug; + print "\$debugging_enabled: \\$debugging_enabled\\\n" if $debug; print "Not running cc, preprocesor output in \\$cpp_file\\\n" if $debug; } @@ -192,44 +196,51 @@ if ($docc) { else { open(CPP,"$cpp_file") or die "$0: Can't read preprocessed file $cpp_file: $!\n"; } +%checkh = map { $_,1 } qw( thread bytecode byterun proto ); +$ckfunc = 0; LINE: while (<CPP>) { while (/^#.*vmsish\.h/i .. /^#.*perl\.h/i) { while (/__VMS_PROTOTYPES__/i .. /__VMS_SEPYTOTORP__/i) { print "vms_proto>> $_" if $debug > 2; if (/^\s*EXT/) { &scan_var($_); } else { &scan_func($_); } - last LINE unless $_ = <CPP>; + last LINE unless defined($_ = <CPP>); } print "vmsish.h>> $_" if $debug > 2; if (/^\s*EXT/) { &scan_var($_); } - last LINE unless $_ = <CPP>; + last LINE unless defined($_ = <CPP>); } while (/^#.*opcode\.h/i .. /^#.*perl\.h/i) { print "opcode.h>> $_" if $debug > 2; if (/^OP \*\s/) { &scan_func($_); } if (/^\s*EXT/) { &scan_var($_); } if (/^\s+OP_/) { &scan_enum($_); } - last LINE unless $_ = <CPP>; + last LINE unless defined($_ = <CPP>); } - while (/^typedef enum/ .. /^\}/) { + while (/^typedef enum/ .. /^\s*\}/) { print "global enum>> $_" if $debug > 2; &scan_enum($_); - last LINE unless $_ = <CPP>; + last LINE unless defined($_ = <CPP>); } - while (/^#.*thread\.h/i .. /^#.*perl\.h/i) { - print "thread.h>> $_" if $debug > 2; - if (/\s*^EXT/) { &scan_var($_); } - else { &scan_func($_); } - last LINE unless $_ = <CPP>; + # Check for transition to new header file + if (/^# \d+ "(\S+)"/) { + my $spec = $1; + # Pull name from library module or header filespec + $spec =~ /^(\w+)$/ or $spec =~ /(\w+)\.h/i; + my $name = lc $1; + $ckfunc = exists $checkh{$name} ? 1 : 0; + $scanname = $name if $ckfunc; + print "Header file transition: ckfunc = $ckfunc for $name.h\n" if $debug > 1; } - while (/^#.*proto\.h/i .. /^#.*perl\.h/i) { - print "proto.h>> $_" if $debug > 2; + if ($ckfunc) { + print "$scanname>> $_" if $debug > 2; if (/\s*^EXT/) { &scan_var($_); } - else { &scan_func($_); } - last LINE unless $_ = <CPP>; + else { &scan_func($_); } + } + else { + print $_ if $debug > 3 && ($debug > 5 || length($_)); + if (/^\s*EXT/) { &scan_var($_); } } - print $_ if $debug > 3 && ($debug > 5 || length($_)); - if (/^\s*EXT/) { &scan_var($_); } } close CPP; @@ -248,6 +259,7 @@ while (<DATA>) { print "Adding $key to \%$array list\n" if $debug > 1; ${$array}{$key}++; } +if ($debugging_enabled and ($isvaxc or $isgcc)) { $vars{'colors'}++ } foreach (split /\s+/, $extnames) { my($pkgname) = $_; $pkgname =~ s/::/__/g; @@ -378,9 +390,8 @@ if ($ENV{PERLSHR_USE_GSMATCH}) { my $major = int($] * 1000) & 0xFF; # range 0..255 my $minor = int(($] * 1000 - $major) * 100 + 0.5) & 0xFF; # range 0..255 print OPTBLD "GSMATCH=LEQUAL,$major,$minor\n"; - foreach (@symfiles) { - print OPTBLD "CLUSTER=\$\$TRANSFER_VECTOR,,,$_$objsuffix\n"; - } + print OPTBLD 'CLUSTER=$$TRANSFER_VECTOR,,', + map(",$_$objsuffix",@symfiles), "\n"; } elsif (@symfiles) { $incstr .= ',' . join(',',@symfiles); } # Include object modules and RTLs in options file diff --git a/vms/genconfig.pl b/vms/genconfig.pl index d2da57262c..4e0cf31655 100644 --- a/vms/genconfig.pl +++ b/vms/genconfig.pl @@ -6,7 +6,7 @@ # that went into your perl binary. In addition, values which change from run # to run may be supplied on the command line as key=val pairs. # -# Rev. 10-Nov-1997 Charles Bailey bailey@newman.upenn.edu +# Rev. 16-Feb-1998 Charles Bailey bailey@newman.upenn.edu # #==== Locations of installed Perl components @@ -26,6 +26,7 @@ if ($ARGV[0] eq '-f') { open(ARGS,$ARGV[1]) or die "Can't read data from $ARGV[1]: $!\n"; @ARGV = (); while (<ARGS>) { + chomp; push(@ARGV,split(/\|/,$_)); } close ARGS; @@ -88,6 +89,8 @@ man1ext='rno' man3ext='rno' arch='VMS_$archsufx' archname='VMS_$archsufx' +bincompat3='undef' +d_bincompat3='undef' osvers='$osvers' prefix='$prefix' builddir='$builddir' @@ -154,44 +157,78 @@ foreach (@ARGV) { $optimize = $qual; $ccflags =~ s/$qual//; } + $usethreads = ($ccflags =~ m!/DEF[^/]+USE_THREADS!i and + $ccflags !~ m!/UND[^/]+USE_THREADS!i); + print OUT "usethreads='",($usethreads ? 'define' : 'undef'),"'\n";; $optimize = "$debug$optimize"; print OUT "ccflags='$ccflags'\n"; print OUT "optimize='$optimize'\n"; - $usethreads = ($ccflags =~ m!/DEF[^/]+USE_THREADS!i and - $ccflags !~ m!/UND[^/]+USE_THREADS!i); - print OUT "usethreads='$usethreads'\n"; $dosock = ($ccflags =~ m!/DEF[^/]+VMS_DO_SOCKETS!i and $ccflags !~ m!/UND[^/]+VMS_DO_SOCKETS!i); print OUT "d_vms_do_sockets=",$dosock ? "'define'\n" : "'undef'\n"; print OUT "d_socket=",$dosock ? "'define'\n" : "'undef'\n"; print OUT "d_sockpair=",$dosock ? "'define'\n" : "'undef'\n"; print OUT "d_gethent=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_sethent=",$dosock ? "'define'\n" : "'undef'\n"; print OUT "d_select=",$dosock ? "'define'\n" : "'undef'\n"; print OUT "i_netdb=",$dosock ? "'define'\n" : "'undef'\n"; print OUT "i_niin=",$dosock ? "'define'\n" : "'undef'\n"; print OUT "i_neterrno=",$dosock ? "'define'\n" : "'undef'\n"; - print OUT "d_gethbadd=",$dosock ? "'define'\n" : "'undef'\n"; - print OUT "gethbadd_addr_type=",$dosock ? "'char *'\n" : "'undef'\n"; - print OUT "gethbadd_alen_type=",$dosock ? "'int'\n" : "'undef'\n"; + print OUT "d_gethbyname=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_gethbyaddr=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_getpbyname=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_getpbynumber=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_getsbyname=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_getsbyport=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_endhent=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_getpent=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_setpent=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_endpent=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_getsent=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_setsent=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "d_endsent=",$dosock ? "'define'\n" : "'undef'\n"; + print OUT "netdb_name_type=",$dosock ? "'char *'\n" : "'undef'\n"; + print OUT "netdb_host_type=",$dosock ? "'char *'\n" : "'undef'\n"; + print OUT "netdb_hlen_type=",$dosock ? "'int'\n" : "'undef'\n"; if ($dosock and $cctype eq 'decc' and $ccflags =~ /DECCRTL_SOCKETS/) { print OUT "selecttype='fd_set'\n"; - print OUT "d_getnbadd='define'\n"; - print OUT "getnbadd_net_type='long'\n"; + print OUT "d_getnbyaddr='define'\n"; + print OUT "d_getnbyname='define'\n"; + print OUT "d_getnent='define'\n"; + print OUT "d_setnent='define'\n"; + print OUT "d_endnent='define'\n"; + print OUT "netdb_net_type='long'\n"; } else { print OUT "selecttype='int'\n"; - print OUT "d_getnbadd='undef'\n"; - print OUT "getnbadd_net_type='undef'\n"; + print OUT "d_getnybname='undef'\n"; + print OUT "d_getnybaddr='undef'\n"; + print OUT "d_getnent='undef'\n"; + print OUT "d_setnent='undef'\n"; + print OUT "d_endnent='undef'\n"; + print OUT "netdb_net_type='undef'\n"; } - if ($cctype eq 'decc') { $rtlhas = 'define'; print OUT "useposix='true'\n"; } - else { $rtlhas = 'undef'; print OUT "useposix='false'\n"; } + if ($cctype eq 'decc') { + $rtlhas = 'define'; + print OUT "useposix='true'\n"; + ($ccver,$vmsver) = `$cc/VERSION` =~ /V(\S+) on .*V(\S+)$/; + # Best guess; the may be wrong on systems which have separately + # installed the new CRTL. + if ($ccver >= 5.2 and $vmsver >= 7) { $rtlnew = 'define'; } + else { $rtlnew = 'undef'; } + } + else { $rtlhas = $rtlnew = 'undef'; print OUT "useposix='false'\n"; } foreach (qw[ d_stdstdio d_stdio_ptr_lval d_stdio_cnt_lval d_stdiobase d_locconv d_setlocale i_locale d_mbstowcs d_mbtowc d_wcstombs d_wctomb d_mblen d_mktime d_strcoll d_strxfrm ]) { print OUT "$_='$rtlhas'\n"; } + foreach (qw[ d_gettimeod d_uname d_truncate d_wait4 d_index + d_pathconf d_fpathconf d_sysconf d_sigsetjmp ]) { + print OUT "$_='$rtlnew'\n"; + } next; } elsif ($key eq 'exe_ext') { @@ -324,6 +361,9 @@ close IN; # as the manifest for the obsolete variable $d_eunice. print OUT "d_eunice='undef'\n"; delete $pp_vars{VMS}; +# XXX temporary -- USE_THREADS is currently on CC command line +delete $pp_vars{'USE_THREADS'}; + foreach (sort keys %pp_vars) { warn "Didn't see $_ in $infile\n"; } diff --git a/vms/perly_c.vms b/vms/perly_c.vms index 2e68d12bc8..5f2a6f9384 100644 --- a/vms/perly_c.vms +++ b/vms/perly_c.vms @@ -1276,7 +1276,7 @@ dEXT YYSTYPE yyval; dEXT YYSTYPE yylval; #line 636 "perly.y" /* PROGRAM */ -#line 1349 "y_tab.c" +#line 1349 "perly.c" #define YYABORT goto yyabort #define YYACCEPT goto yyaccept #define YYERROR goto yyerrlab @@ -1375,7 +1375,7 @@ yyloop: yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; - fprintf(stderr, "yydebug: state %d, reading %d (%s)\n", yystate, + PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n", yystate, yychar, yys); } #endif @@ -1385,7 +1385,7 @@ yyloop: { #if YYDEBUG if (yydebug) - fprintf(stderr, "yydebug: state %d, shifting to state %d\n", + PerlIO_printf(Perl_debug_log, "yydebug: state %d, shifting to state %d\n", yystate, yytable[yyn]); #endif if (yyssp >= yyss + yystacksize - 1) @@ -1440,7 +1440,7 @@ yyinrecovery: { #if YYDEBUG if (yydebug) - fprintf(stderr, + PerlIO_printf(Perl_debug_log, "yydebug: state %d, error recovery shifting to state %d\n", *yyssp, yytable[yyn]); #endif @@ -1470,7 +1470,7 @@ yyinrecovery: { #if YYDEBUG if (yydebug) - fprintf(stderr, + PerlIO_printf(Perl_debug_log, "yydebug: error recovery discarding state %d\n", *yyssp); #endif @@ -1489,7 +1489,7 @@ yyinrecovery: yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; - fprintf(stderr, + PerlIO_printf(Perl_debug_log, "yydebug: state %d, error recovery discards token %d (%s)\n", yystate, yychar, yys); } @@ -1500,7 +1500,7 @@ yyinrecovery: yyreduce: #if YYDEBUG if (yydebug) - fprintf(stderr, "yydebug: state %d, reducing by rule %d (%s)\n", + PerlIO_printf(Perl_debug_log, "yydebug: state %d, reducing by rule %d (%s)\n", yystate, yyn, yyrule[yyn]); #endif yym = yylen[yyn]; @@ -2285,7 +2285,7 @@ case 176: #line 633 "perly.y" { yyval.opval = yyvsp[0].opval; } break; -#line 2267 "y_tab.c" +#line 2267 "perly.c" } yyssp -= yym; yystate = *yyssp; @@ -2295,7 +2295,7 @@ break; { #if YYDEBUG if (yydebug) - fprintf(stderr, + PerlIO_printf(Perl_debug_log, "yydebug: after reduction, shifting from state 0 to state %d\n", YYFINAL); #endif @@ -2311,7 +2311,7 @@ break; yys = 0; if (yychar <= YYMAXTOKEN) yys = yyname[yychar]; if (!yys) yys = "illegal-symbol"; - fprintf(stderr, "yydebug: state %d, reading %d (%s)\n", + PerlIO_printf(Perl_debug_log, "yydebug: state %d, reading %d (%s)\n", YYFINAL, yychar, yys); } #endif @@ -2326,7 +2326,7 @@ break; yystate = yydgoto[yym]; #if YYDEBUG if (yydebug) - fprintf(stderr, + PerlIO_printf(Perl_debug_log, "yydebug: after reduction, shifting from state %d to state %d\n", *yyssp, yystate); #endif diff --git a/vms/sockadapt.h b/vms/sockadapt.h index 7f9150a579..3e5daf3765 100644 --- a/vms/sockadapt.h +++ b/vms/sockadapt.h @@ -145,7 +145,6 @@ void endnetent(); #include <socket.h> #include <in.h> #include <inet.h> -#include <netdb.h> /* SocketShr doesn't support these routines, but the DECC RTL contains * stubs with these names, designed to be used with the UCX socket @@ -156,6 +155,8 @@ void endnetent(); #define getnetent no_getnetent #define setnetent no_setnetent #define endnetent no_endnetent + +#include <netdb.h> #endif /* We don't have these two in the system headers. */ diff --git a/vms/test.com b/vms/test.com index 7786a17e1b..affc6a83c7 100644 --- a/vms/test.com +++ b/vms/test.com @@ -74,6 +74,7 @@ $ Delete/Log/NoConfirm Echo.Obj;* $ echo = "$" + F$Parse("Echo.Exe") $ $! And do it +$ Show Process/Accounting $ testdir = "Directory/NoHead/NoTrail/Column=1" $ Define/User Perlshr Sys$Disk:[-]PerlShr'exe' $ MCR Sys$Disk:[]Perl. "-I[-.lib]" - "''p2'" "''p3'" "''p4'" "''p5'" "''p6'" @@ -93,7 +94,7 @@ use Config; @ioexcl=('argv.t','dup.t','fs.t','inplace.t','pipe.t'); @libexcl=('db-btree.t','db-hash.t','db-recno.t', 'gdbm.t','io_dup.t', 'io_pipe.t', 'io_sel.t', 'io_sock.t', - 'ndbm.t','odbm.t','open2.t','open3.t','posix.t'); + 'ndbm.t','odbm.t','open2.t','open3.t', 'ph.t', 'posix.t'); # Note: POSIX is not part of basic build, but can be built # separately if you're using DECC @@ -217,6 +218,7 @@ print sprintf("u=%g s=%g cu=%g cs=%g files=%d tests=%d\n", $user,$sys,$cuser,$csys,$files,$totmax); $$END-OF-TEST$$ $ wrapup: +$ Show Process/Accounting $ If F$Search("Echo.Exe").nes."" Then Delete/Log/NoConfirm Echo.Exe;* $ Set Default &olddef $ Set Message 'oldmsg' @@ -2,8 +2,8 @@ * * VMS-specific routines for perl5 * - * Last revised: 9-Nov-1997 by Charles Bailey bailey@newman.upenn.edu - * Version: 5.4.53a + * Last revised: 27-Feb-1998 by Charles Bailey bailey@newman.upenn.edu + * Version: 5.4.61 */ #include <acedef.h> @@ -11,6 +11,7 @@ #include <armdef.h> #include <atrdef.h> #include <chpdef.h> +#include <clidef.h> #include <climsgdef.h> #include <descrip.h> #include <dvidef.h> @@ -174,7 +175,9 @@ my_getenv(char *lnm) } /* end of my_getenv() */ /*}}}*/ -static FILE *safe_popen(char *, char *); +static void create_mbx(unsigned short int *, struct dsc$descriptor_s *); + +static void riseandshine(unsigned long int dummy) { sys$wake(0,0); } /*{{{ void prime_env_iter() */ void @@ -184,12 +187,21 @@ prime_env_iter(void) */ { dTHR; - static int primed = 0; /* XXX Not thread-safe!!! */ + static int primed = 0; HV *envhv = GvHVn(envgv); - FILE *sholog; - char eqv[LNM$C_NAMLENGTH+1],*start,*end; + PerlIO *sholog; + char eqv[LNM$C_NAMLENGTH+1],mbxnam[LNM$C_NAMLENGTH+1],*start,*end; + unsigned short int chan; +#ifndef CLI$M_TRUSTED +# define CLI$M_TRUSTED 0x40 /* Missing from VAXC headers */ +#endif + unsigned long int flags = CLI$M_NOWAIT | CLI$M_NOCLISYM | CLI$M_NOKEYPAD | CLI$M_TRUSTED; + unsigned long int retsts, substs = 0, wakect = 0; STRLEN eqvlen; SV *oldrs, *linesv, *eqvsv; + $DESCRIPTOR(cmddsc,"Show Logical *"); $DESCRIPTOR(nldsc,"_NLA0:"); + $DESCRIPTOR(clidsc,"DCL"); $DESCRIPTOR(tabdsc,"DCLTABLES"); + $DESCRIPTOR(mbxdsc,mbxnam); #ifdef USE_THREADS static perl_mutex primenv_mutex = PTHREAD_MUTEX_INITIALIZER; #endif @@ -198,7 +210,7 @@ prime_env_iter(void) MUTEX_LOCK(&primenv_mutex); if (primed) { MUTEX_UNLOCK(&primenv_mutex); return; } /* Perform a dummy fetch as an lval to insure that the hash table is - * set up. Otherwise, the hv_store() will turn into a nullop */ + * set up. Otherwise, the hv_store() will turn into a nullop. */ (void) hv_fetch(envhv,"DEFAULT",7,TRUE); /* Also, set up the four "special" keys that the CRTL defines, * whether or not underlying logical names exist. */ @@ -208,20 +220,39 @@ prime_env_iter(void) (void) hv_fetch(envhv,"USER",4,TRUE); /* Now, go get the logical names */ - if ((sholog = safe_popen("$ Show Logical *","r")) == Nullfp) { + create_mbx(&chan,&mbxdsc); + if ((sholog = PerlIO_open(mbxnam,"r")) != Nullfp) { + if ((retsts = sys$dassgn(chan)) & 1) { + /* Be certain that subprocess is using the CLI and command tables we + * expect, and don't pass symbols through so that we insure that + * "Show Logical" can't be subverted. + */ + do { + retsts = lib$spawn(&cmddsc,&nldsc,&mbxdsc,&flags,0,0,&substs, + 0,&riseandshine,0,0,&clidsc,&tabdsc); + flags &= ~CLI$M_TRUSTED; /* Just in case we hit a really old version */ + } while (retsts == LIB$_INVARG && (flags | CLI$M_TRUSTED)); + } + } + if (sholog == Nullfp || !(retsts & 1)) { + if (sholog != Nullfp) PerlIO_close(sholog); MUTEX_UNLOCK(&primenv_mutex); - _ckvmssts(vaxc$errno); + _ckvmssts(sholog == Nullfp ? vaxc$errno : retsts); } - /* We use Perl's sv_gets to read from the pipe, since safe_popen is + /* We use Perl's sv_gets to read from the pipe, since PerlIO_open is * tied to Perl's I/O layer, so it may not return a simple FILE * */ oldrs = rs; rs = newSVpv("\n",1); linesv = newSVpv("",0); while (1) { if ((start = sv_gets(linesv,sholog,0)) == Nullch) { - my_pclose(sholog); + PerlIO_close(sholog); SvREFCNT_dec(linesv); SvREFCNT_dec(rs); rs = oldrs; primed = 1; + /* Wait for subprocess to clean up (we know subproc won't return 0) */ + while (substs == 0) { sys$hiber(); wakect++;} + if (wakect > 1) sys$wake(0,0); /* Stole someone else's wake */ + _ckvmssts(substs); MUTEX_UNLOCK(&primenv_mutex); return; } @@ -578,7 +609,7 @@ popen_completion_ast(struct pipe_details *thispipe) } } -static FILE * +static PerlIO * safe_popen(char *cmd, char *mode) { static int handler_set_up = FALSE; @@ -841,12 +872,14 @@ do_rmsexpand(char *filespec, char *outbuf, int ts, char *defspec, unsigned opts) retsts = sys$parse(&myfab,0,0); if (!(retsts & 1)) { + mynam.nam$b_nop |= NAM$M_SYNCHK; if (retsts == RMS$_DNF || retsts == RMS$_DIR || retsts == RMS$_DEV || retsts == RMS$_DEV) { - mynam.nam$b_nop |= NAM$M_SYNCHK; retsts = sys$parse(&myfab,0,0); if (retsts & 1) goto expanded; } + mynam.nam$l_rlf = NULL; myfab.fab$b_dns = 0; + (void) sys$parse(&myfab,0,0); /* Free search context */ if (out) Safefree(out); set_vaxc_errno(retsts); if (retsts == RMS$_PRV) set_errno(EACCES); @@ -857,6 +890,8 @@ do_rmsexpand(char *filespec, char *outbuf, int ts, char *defspec, unsigned opts) } retsts = sys$search(&myfab,0,0); if (!(retsts & 1) && retsts != RMS$_FNF) { + mynam.nam$b_nop |= NAM$M_SYNCHK; mynam.nam$l_rlf = NULL; + myfab.fab$b_dns = 0; (void) sys$parse(&myfab,0,0); /* Free search context */ if (out) Safefree(out); set_vaxc_errno(retsts); if (retsts == RMS$_PRV) set_errno(EACCES); @@ -874,6 +909,10 @@ do_rmsexpand(char *filespec, char *outbuf, int ts, char *defspec, unsigned opts) if (!(mynam.nam$l_fnb & NAM$M_EXP_VER) && (!defspec || !*defspec || !strchr(myfab.fab$l_dna,';'))) speclen = mynam.nam$l_ver - out; + if (!(mynam.nam$l_fnb & NAM$M_EXP_TYPE) && + (!defspec || !*defspec || defspec[myfab.fab$b_dns-1] != '.' || + defspec[myfab.fab$b_dns-2] == '.')) + speclen = mynam.nam$l_type - out; /* If we just had a directory spec on input, $PARSE "helpfully" * adds an empty name and type for us */ if (mynam.nam$l_name == mynam.nam$l_type && @@ -895,6 +934,9 @@ do_rmsexpand(char *filespec, char *outbuf, int ts, char *defspec, unsigned opts) if (do_tounixspec(outbuf,tmpfspec,0) == NULL) return NULL; strcpy(outbuf,tmpfspec); } + mynam.nam$b_nop |= NAM$M_SYNCHK; mynam.nam$l_rlf = NULL; + mynam.nam$l_rsa = NULL; mynam.nam$b_rss = 0; + myfab.fab$b_dns = 0; (void) sys$parse(&myfab,0,0); /* Free search context */ return outbuf; } /*}}}*/ @@ -1032,6 +1074,7 @@ static char *do_fileify_dirspec(char *dir,char *buf,int ts) } cp1++; } while ((cp1 = strstr(cp1,"/.")) != NULL); + lastdir = strrchr(dir,'/'); } else if (!strcmp(&dir[dirlen-7],"/000000")) { /* Ditto for specs that end in an MFD -- let the VMS code @@ -2339,6 +2382,12 @@ vms_image_init(int *argcp, char ***argvp) *argcp++; argvp = newap; } getredirection(argcp,argvp); +#if defined(USE_THREADS) && defined(__DECC) + { +# include <reentrancy.h> + (void) decc$set_reentrancy(C$C_MULTITHREAD); + } +#endif return; } /*}}}*/ @@ -2435,7 +2484,7 @@ trim_unixpath(char *fspec, char *wildspec, int opts) for (front = end ; front >= base; front--) if (*front == '/' && !dirs--) { front++; break; } } - for (cp1=template,cp2=lcres; *cp1 && cp2 <= lcend + sizeof lcend; + for (cp1=template,cp2=lcres; *cp1 && cp2 <= lcres + sizeof lcres; cp1++,cp2++) *cp2 = _tolower(*cp1); /* Make lc copy for match */ if (cp1 != '\0') return 0; /* Path too long. */ lcend = cp2; @@ -2878,6 +2927,7 @@ setup_cmddsc(char *cmd, int check_img) s = resspec; while (*s && !isspace(*s)) s++; *s = '\0'; + if (!cando_by_name(S_IXUSR,0,resspec)) return RMS$_PRV; New(402,VMScmd.dsc$a_pointer,7 + s - resspec + (rest ? strlen(rest) : 0),char); strcpy(VMScmd.dsc$a_pointer,"$ MCR "); strcat(VMScmd.dsc$a_pointer,resspec); @@ -2936,7 +2986,22 @@ vms_do_exec(char *cmd) if ((retsts = setup_cmddsc(cmd,1)) & 1) retsts = lib$do_command(&VMScmd); - set_errno(EVMSERR); + switch (retsts) { + case RMS$_FNF: + set_errno(ENOENT); break; + case RMS$_DNF: case RMS$_DIR: case RMS$_DEV: + set_errno(ENOTDIR); break; + case RMS$_PRV: + set_errno(EACCES); break; + case RMS$_SYN: + set_errno(EINVAL); break; + case CLI$_BUFOVF: + set_errno(E2BIG); break; + case LIB$_INVARG: case LIB$_INVSTRDES: case SS$_ACCVIO: /* shouldn't happen */ + _ckvmssts(retsts); /* fall through */ + default: /* SS$_DUPLNAM, SS$_CLI, resource exhaustion, etc. */ + set_errno(EVMSERR); + } set_vaxc_errno(retsts); if (dowarn) warn("Can't exec \"%s\": %s", VMScmd.dsc$a_pointer, Strerror(errno)); @@ -2965,21 +3030,36 @@ do_aspawn(void *really,void **mark,void **sp) unsigned long int do_spawn(char *cmd) { - unsigned long int substs, hadcmd = 1; + unsigned long int sts, substs, hadcmd = 1; TAINT_ENV(); TAINT_PROPER("spawn"); if (!cmd || !*cmd) { hadcmd = 0; - _ckvmssts(lib$spawn(0,0,0,0,0,0,&substs,0,0,0,0,0,0)); + sts = lib$spawn(0,0,0,0,0,0,&substs,0,0,0,0,0,0); } - else if ((substs = setup_cmddsc(cmd,0)) & 1) { - _ckvmssts(lib$spawn(&VMScmd,0,0,0,0,0,&substs,0,0,0,0,0,0)); + else if ((sts = setup_cmddsc(cmd,0)) & 1) { + sts = lib$spawn(&VMScmd,0,0,0,0,0,&substs,0,0,0,0,0,0); } - if (!(substs&1)) { - set_errno(EVMSERR); - set_vaxc_errno(substs); + if (!(sts & 1)) { + switch (sts) { + case RMS$_FNF: + set_errno(ENOENT); break; + case RMS$_DNF: case RMS$_DIR: case RMS$_DEV: + set_errno(ENOTDIR); break; + case RMS$_PRV: + set_errno(EACCES); break; + case RMS$_SYN: + set_errno(EINVAL); break; + case CLI$_BUFOVF: + set_errno(E2BIG); break; + case LIB$_INVARG: case LIB$_INVSTRDES: case SS$_ACCVIO: /* shouldn't happen */ + _ckvmssts(sts); /* fall through */ + default: /* SS$_DUPLNAM, SS$_CLI, resource exhaustion, etc. */ + set_errno(EVMSERR); + } + set_vaxc_errno(sts); if (dowarn) warn("Can't spawn \"%s\": %s", hadcmd ? VMScmd.dsc$a_pointer : "", Strerror(errno)); @@ -4065,25 +4145,36 @@ flex_stat(char *fspec, Stat_t *statbufp) FILE * my_binmode(FILE *fp, char iotype) { - char filespec[NAM$C_MAXRSS], *acmode; + char filespec[NAM$C_MAXRSS], *acmode, *s, *colon, *dirend = Nullch; + int ret = 0, saverrno = errno, savevmserrno = vaxc$errno; fpos_t pos; if (!fgetname(fp,filespec)) return NULL; - if (iotype != '-' && fgetpos(fp,&pos) == -1) return NULL; + for (s = filespec; *s; s++) { + if (*s == ':') colon = s; + else if (*s == ']' || *s == '>') dirend = s; + } + /* Looks like a tmpfile, which will go away if reopened */ + if (s == dirend + 3) return fp; + /* If we've got a non-file-structured device, clip off the trailing + * junk, and don't lose sleep if we can't get a stream position. */ + if (dirend == Nullch) *(colon+1) = '\0'; + if (iotype != '-'&& (ret = fgetpos(fp, &pos)) == -1 && dirend) return NULL; switch (iotype) { case '<': case 'r': acmode = "rb"; break; - case '>': case 'w': + case '>': case 'w': case '|': /* use 'a' instead of 'w' to avoid creating new file; fsetpos below will take care of restoring file position */ case 'a': acmode = "ab"; break; - case '+': case '|': case 's': acmode = "rb+"; break; + case '+': case 's': acmode = "rb+"; break; case '-': acmode = fileno(fp) ? "ab" : "rb"; break; default: warn("Unrecognized iotype %c in my_binmode",iotype); acmode = "rb+"; } if (freopen(filespec,acmode,fp) == NULL) return NULL; - if (iotype != '-' && fsetpos(fp,&pos) == -1) return NULL; + if (iotype != '-' && ret != -1 && fsetpos(fp,&pos) == -1) return NULL; + if (ret == -1) { set_errno(saverrno); set_vaxc_errno(savevmserrno); } return fp; } /* end of my_binmode() */ /*}}}*/ @@ -4490,6 +4581,11 @@ init_os_extras() newXSproto("VMS::Filespec::unixpath",unixpath_fromperl,file,"$"); newXSproto("VMS::Filespec::candelete",candelete_fromperl,file,"$"); newXS("File::Copy::rmscopy",rmscopy_fromperl,file); + +#ifdef PRIME_ENV_AT_STARTUP + prime_env_iter(); +#endif + return; } diff --git a/vms/vmsish.h b/vms/vmsish.h index cc08f39574..1cda1e29d0 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -16,12 +16,11 @@ #include <stsdef.h> /* bitmasks for exit status testing */ /* Suppress compiler warnings from DECC for VMS-specific extensions: - * GLOBALEXT, NOSHAREEXT, READONLYEXT: global[dr]ef declarations * ADDRCONSTEXT,NEEDCONSTEXT: initialization of data with non-constant values * (e.g. pointer fields of descriptors) */ #ifdef __DECC -# pragma message disable (GLOBALEXT,NOSHAREEXT,READONLYEXT,ADDRCONSTEXT,NEEDCONSTEXT) +# pragma message disable (ADDRCONSTEXT,NEEDCONSTEXT) #endif /* DEC's C compilers and gcc use incompatible definitions of _to(upp|low)er() */ @@ -56,6 +55,11 @@ # include <unistd.h> /* DECC has this; VAXC and gcc don't */ #endif +/* VAXC doesn't have a unary plus operator, so we need to get there indirectly */ +#if defined(VAXC) && !defined(__DECC) +# define NO_UNARY_PLUS +#endif + #ifdef NO_PERL_TYPEDEFS /* a2p; we don't want Perl's special routines */ # define DONT_MASK_RTL_CALLS #endif @@ -70,11 +74,6 @@ /* DECC introduces this routine in the RTL as of VMS 7.0; for now, * we'll use ours, since it gives us the full VMS exit status. */ -#ifdef __PID_T -# define Pid_t pid_t -#else -# define Pid_t unsigned int -#endif #define waitpid my_waitpid /* Don't redeclare standard RTL routines in Perl's header files; @@ -167,12 +166,6 @@ */ #define BIG_TIME -/* USE_STAT_RDEV: - * This symbol is defined if this system has a stat structure declaring - * st_rdev - */ -#define USE_STAT_RDEV /**/ - /* ACME_MESS: * This symbol, if defined, indicates that error messages should be * should be generated in a format that allows the use of the Acme @@ -381,7 +374,9 @@ struct utimbuf { # define sigdelset(t, u) my_sigdelset(t, u) # define sigismember(t, u) my_sigismember(t, u) # define sigprocmask(t, u, v) my_sigprocmask(t, u, v) +# ifndef _SIGSET_T typedef int sigset_t; +# endif /* The tools for sigprocmask() are there, just not the routine itself */ # ifndef SIG_UNBLOCK # define SIG_UNBLOCK 1 |