VMS 8.2 and later provide a 64 bit ino_t type when _USE_STD_STAT is defined on the command line.

This patch makes the fallback to the old VMS behavior for only VMS 8.1 and earlier.

This patch also adds an assert to require that VMS programmers have the _USE_STD_STAT defined for VMS 8.2+.

Regards,
-John

--- /src_root/gnulib/lib/same-inode.h   2017-06-01 07:48:48 -0500
+++ /vms_root/gnulib/lib/same-inode.h   2017-06-02 17:42:40 -0500
@@ -20,7 +20,15 @@
 
 # include <sys/types.h>
 
-# ifdef __VMS
+# if defined(__DECC) && defined(__VMS) && (__CRTL_VER >= 80200000)
+#   pragma assert_m non_zero(_USE_STD_STAT) "_USE_STD_STAT not defined."
+   /* For VMS 8.2 and later _USE_STD_STAT needs to be defined before
+      any system header file is included.  This will expose a struct
+      stat with a 64 bit ino_t and fix other sins of the past.
+    */
+# endif
+# if defined(__VMS) && (__CRTL_VER < 80200000)
+    /* This macro should only be used for VMS 8.1 and older. */
 #  define SAME_INODE(a, b)             \
     ((a).st_ino[0] == (b).st_ino[0]    \
      && (a).st_ino[1] == (b).st_ino[1] \

Reply via email to