X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=vms%2Fvmsish.h;h=a09d2be43808a11a62362e62127328ba419555ca;hb=840301ab1fb53d14da54391384089aef70e2d8dd;hp=261a5069871e5f249265ac1f2d7078dd40395e24;hpb=19c10e8f35fdb25560bcde71773a173ab954309f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/vms/vmsish.h b/vms/vmsish.h index 261a506..a09d2be 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -198,6 +198,16 @@ */ #define ALTERNATE_SHEBANG "$" +/* Lower case entry points for these are missing in some earlier RTLs + * so we borrow the defines and declares from errno.h and upcase them. + */ +#if defined(VMS_WE_ARE_CASE_SENSITIVE) && (__DECC_VER < 50500000) +# define errno (*CMA$TIS_ERRNO_GET_ADDR()) +# define vaxc$errno (*CMA$TIS_VMSERRNO_GET_ADDR()) + int *CMA$TIS_ERRNO_GET_ADDR (void); /* UNIX style error code */ + int *CMA$TIS_VMSERRNO_GET_ADDR (void); /* VMS error (errno == EVMSERR) */ +#endif + /* Macros to set errno using the VAX thread-safe calls, if present */ #if (defined(__DECC) || defined(__DECCXX)) && !defined(__ALPHA) # define set_errno(v) (cma$tis_errno_set_value(v)) @@ -252,6 +262,12 @@ #define HAS_KILL #define HAS_WAIT +#define PERL_FS_VER_FMT "%d_%d_%d" +/* Temporary; we need to add support for this to Configure.Com */ +#ifdef PERL_INC_VERSION_LIST +# undef PERL_INC_VERSION_LIST +#endif + /* VMS: * This symbol, if defined, indicates that the program is running under * VMS. It's a symbol automagically defined by all VMS C compilers I've seen. @@ -535,6 +551,25 @@ struct mystat }; typedef unsigned mydev_t; typedef unsigned myino_t; + +/* + * DEC C previous to 6.0 corrupts the behavior of the /prefix + * qualifier with the extern prefix pragma. This provisional + * hack circumvents this prefix pragma problem in previous + * precompilers. + */ +#if defined(__VMS_VER) && __VMS_VER >= 70000000 +# if defined(VMS_WE_ARE_CASE_SENSITIVE) && (__DECC_VER < 60000000) +# pragma __extern_prefix save +# pragma __extern_prefix "" /* set to empty to prevent prefixing */ +# define geteuid decc$__unix_geteuid +# define getuid decc$__unix_getuid +# define stat(__p1,__p2) decc$__utc_stat(__p1,__p2) +# define fstat(__p1,__p2) decc$__utc_fstat(__p1,__p2) +# pragma __extern_prefix restore +# endif +#endif + #ifndef DONT_MASK_RTL_CALLS /* defined for vms.c so we can see RTL calls */ # ifdef stat # undef stat @@ -554,6 +589,7 @@ typedef unsigned myino_t; #define S_IDGRP (S_IWGRP | S_IXGRP) #define S_IDOTH (S_IWOTH | S_IXOTH) + /* Prototypes for functions unique to vms.c. Don't include replacements * for routines in the mainline source files excluded by #ifndef VMS; * their prototypes are already in proto.h. @@ -635,7 +671,7 @@ int my_sigdelset (sigset_t *, int); int my_sigismember (sigset_t *, int); int my_sigprocmask (int, sigset_t *, sigset_t *); #endif -I32 cando_by_name (I32, I32, char *); +I32 cando_by_name (I32, Uid_t, char *); int flex_fstat (int, Stat_t *); int flex_stat (const char *, Stat_t *); int trim_unixpath (char *, char*, int); @@ -681,6 +717,4 @@ typedef char __VMS_SEPYTOTORP__; #undef HAS_NTOHL #endif -#define TMPPATH "sys$scratch:perl-eXXXXXX" - #endif /* __vmsish_h_included */