#define COMPLEX_STATUS 1 /* We track both "POSIX" and VMS values */
#define HINT_V_VMSISH 24
-#define HINT_M_VMSISH_HUSHED 0x20000000 /* stifle error msgs on exit */
#define HINT_M_VMSISH_STATUS 0x40000000 /* system, $? return VMS status */
#define HINT_M_VMSISH_TIME 0x80000000 /* times are local, not UTC */
#define NATIVE_HINTS (PL_hints >> HINT_V_VMSISH) /* used in op.c */
#define TEST_VMSISH(h) (PL_curcop->op_private & ((h) >> HINT_V_VMSISH))
-#define VMSISH_HUSHED TEST_VMSISH(HINT_M_VMSISH_HUSHED)
#define VMSISH_STATUS TEST_VMSISH(HINT_M_VMSISH_STATUS)
#define VMSISH_TIME TEST_VMSISH(HINT_M_VMSISH_TIME)
+/* VMS-specific data storage */
+
+#define HAVE_INTERP_INTERN
+struct interp_intern {
+ int hushed;
+ float inv_rand_max;
+ struct dsc$descriptor_s VMScmd;
+};
+#define VMSISH_HUSHED (PL_sys_intern.hushed)
+#define MY_INV_RAND_MAX (PL_sys_intern.inv_rand_max)
+#define VMSCMD (PL_sys_intern.VMScmd)
+
/* Flags for vmstrnenv() */
#define PERL__TRNENV_SECURE 0x01
#define _ckvmssts_noperl(call) STMT_START { register unsigned long int __ckvms_sts; \
if (!((__ckvms_sts=(call))&1)) { \
set_errno(EVMSERR); set_vaxc_errno(__ckvms_sts); \
- fprintf(Perl_debug_log,"Fatal VMS error (status=%d) at %s, line %d", \
+ fprintf(stderr,"Fatal VMS error (status=%d) at %s, line %d", \
__ckvms_sts,__FILE__,__LINE__); lib$signal(__ckvms_sts); } } STMT_END
#ifdef VMS_DO_SOCKETS
#ifndef DONT_MASK_RTL_CALLS
+# define fwrite my_fwrite /* for PerlSIO_fwrite */
# define fdopen my_fdopen
# define fclose my_fclose
#endif
# define sa_mask sv_mask
# define sigsuspend(set) sigpause(*set)
# define sigpending(a) (not_here("sigpending"),0)
+#else
+/*
+ * The C RTL's sigaction fails to check for invalid signal numbers so we
+ * help it out a bit.
+ */
+# ifndef DONT_MASK_RTL_CALLS
+# define sigaction(a,b,c) Perl_my_sigaction(a,b,c)
+# endif
#endif
/* VMS doesn't use a real sys_nerr, but we need this when scanning for error
/* Look up new %ENV values on the fly */
#define DYNAMIC_ENV_FETCH 1
-#define ENV_HV_NAME "%EnV%VmS%"
/* Special getenv function for retrieving %ENV elements. */
#define ENVgetenv(v) my_getenv(v,FALSE)
#define ENVgetenv_len(v,l) my_getenv_len(v,l,FALSE)
int Perl_kill_file (pTHX_ char *);
int Perl_my_chdir (pTHX_ char *);
FILE * Perl_my_tmpfile ();
+#ifndef HOMEGROWN_POSIX_SIGNALS
+int Perl_my_sigaction (pTHX_ int, const struct sigaction*, struct sigaction*);
+#endif
int Perl_my_utime (pTHX_ char *, struct utimbuf *);
void Perl_vms_image_init (int *, char ***);
struct dirent * Perl_readdir (pTHX_ DIR *);
unsigned long int Perl_do_spawn (pTHX_ char *);
FILE * my_fdopen (int, const char *);
int my_fclose (FILE *);
-int my_fwrite (void *, size_t, size_t, FILE *);
+int my_fwrite (const void *, size_t, size_t, FILE *);
int Perl_my_flush (pTHX_ FILE *);
struct passwd * Perl_my_getpwnam (pTHX_ char *name);
struct passwd * Perl_my_getpwuid (pTHX_ Uid_t uid);