This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix an error, spotted by Tim Bunce.
[perl5.git] / vms / vmsish.h
index 2c8bace..af70f06 100644 (file)
 #  define DONT_MASK_RTL_CALLS
 #endif
 
+#include <namdef.h>
+
+/* Set the maximum filespec size here as it is larger for EFS file
+ * specifications.
+ */
+#ifndef __VAX
+#ifndef VMS_MAXRSS
+#ifdef NAML$C_MAXRSS
+#define VMS_MAXRSS (NAML$C_MAXRSS+1)
+#ifndef VMS_LONGNAME_SUPPORT
+#define VMS_LONGNAME_SUPPORT 1
+#endif /* VMS_LONGNAME_SUPPORT */
+#endif /* NAML$C_MAXRSS */
+#endif /* VMS_MAXRSS */
+#endif
+
+#ifndef VMS_MAXRSS
+#define VMS_MAXRSS (NAM$C_MAXRSS + 1)
+#endif
+
+#ifndef MAXPATHLEN
+#define MAXPATHLEN (VMS_MAXRSS - 1)
+#endif
+
+
 /* Note that we do, in fact, have this */
 #define HAS_GETENV_SV
 #define HAS_GETENV_LEN
@@ -345,7 +370,7 @@ struct interp_intern {
 #define BIT_BUCKET "/dev/null"
 #endif
 #define PERL_SYS_INIT(c,v)     MALLOC_CHECK_TAINT2(*c,*v) vms_image_init((c),(v)); MALLOC_INIT
-#define PERL_SYS_TERM()                OP_REFCNT_TERM; MALLOC_TERM
+#define PERL_SYS_TERM()                HINTS_REFCNT_TERM; OP_REFCNT_TERM; MALLOC_TERM
 #define dXSUB_SYS
 #define HAS_KILL
 #define HAS_WAIT
@@ -464,12 +489,18 @@ struct interp_intern {
 # include <signal.h>
 #define ABORT() abort()
 
+#ifdef I_UTIME
+#include <utime.h>
+#else
 /* Used with our my_utime() routine in vms.c */
 struct utimbuf {
   time_t actime;
   time_t modtime;
 };
+#endif
+#ifndef DONT_MASK_RTL_CALLS
 #define utime my_utime
+#endif
 
 /* This is what times() returns, but <times.h> calls it tbuffer_t on VMS
  * prior to v7.0.  We check the DECC manifest to see whether it's already
@@ -686,7 +717,7 @@ struct mystat
 
 #ifdef _USE_STD_STAT
 #define VMS_INO_T_COMPARE(__a, __b) (__a != __b)
-#define VMS_INO_T_COPY(__a, __b) a = b
+#define VMS_INO_T_COPY(__a, __b) __a = __b
 #else
 #define VMS_INO_T_COMPARE(__a, __b) memcmp(&__a, &__b, 6)
 #define VMS_INO_T_COPY(__a, __b) memcpy(&__a, &__b, 6)
@@ -905,6 +936,7 @@ typedef char __VMS_SEPYTOTORP__;
 /* RMSEXPAND options */
 #define PERL_RMSEXPAND_M_VMS           0x02 /* Force output to VMS format */
 #define PERL_RMSEXPAND_M_LONG          0x04 /* Expand to long name format */
+#define PERL_RMSEXPAND_M_VMS_IN                0x08 /* Assume input is VMS already */
 #define PERL_RMSEXPAND_M_SYMLINK       0x20 /* Use symbolic link, not target */
 
 #endif  /* __vmsish_h_included */