From b6c1d2adc953d5652ee233ba65e7492a7c758e91 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 4 Jun 2017 14:25:43 -0700 Subject: [PATCH] same-inode: port better to VMS 8.2 and later Problem reported by John E. Malmberg in: http://lists.gnu.org/archive/html/bug-gnulib/2017-06/msg00005.html * lib/same-inode.h (SAME_INODE) [__VMS && 80200000 <= __CRTL_VER]: Use the usual POSIX definition. * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Define _USE_STD_STAT. --- ChangeLog | 9 +++++++++ lib/same-inode.h | 2 +- m4/sys_types_h.m4 | 5 ++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae9e39d..4294d51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2017-06-04 Paul Eggert + + same-inode: port better to VMS 8.2 and later + Problem reported by John E. Malmberg in: + http://lists.gnu.org/archive/html/bug-gnulib/2017-06/msg00005.html + * lib/same-inode.h (SAME_INODE) [__VMS && 80200000 <= __CRTL_VER]: + Use the usual POSIX definition. + * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Define _USE_STD_STAT. + 2017-06-01 Paul Eggert error: fix POSIX violation for va_end diff --git a/lib/same-inode.h b/lib/same-inode.h index a08bc4e..0c18563 100644 --- a/lib/same-inode.h +++ b/lib/same-inode.h @@ -20,7 +20,7 @@ # include -# ifdef __VMS +# if defined __VMS && __CRTL_VER < 80200000 # define SAME_INODE(a, b) \ ((a).st_ino[0] == (b).st_ino[0] \ && (a).st_ino[1] == (b).st_ino[1] \ diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4 index e590670..ec0860b 100644 --- a/m4/sys_types_h.m4 +++ b/m4/sys_types_h.m4 @@ -1,4 +1,4 @@ -# sys_types_h.m4 serial 7 +# sys_types_h.m4 serial 8 dnl Copyright (C) 2011-2017 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,6 +6,9 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_SYS_TYPES_H], [ + dnl Use sane struct stat types in OpenVMS 8.2 and later. + AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.]) + AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) gl_NEXT_HEADERS([sys/types.h]) -- 2.7.4