diff src/fileio.c @ 23503:49d866e9b439 v8.2.2294

patch 8.2.2294: VMS: a few remaining problems Commit: https://github.com/vim/vim/commit/82c38fe508155c11a904e6111b5bfb6adde3fb9a Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 4 10:47:26 2021 +0100 patch 8.2.2294: VMS: a few remaining problems Problem: VMS: a few remaining problems. Solution: Add VMS specific changes. Add Lua support. (Zoltan Arpadffy)
author Bram Moolenaar <Bram@vim.org>
date Mon, 04 Jan 2021 11:00:11 +0100
parents 826a6406ea7b
children 096f2b8d9cf4
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -16,10 +16,13 @@
 #if defined(__TANDEM)
 # include <limits.h>		// for SSIZE_MAX
 #endif
-#if defined(UNIX) && defined(FEAT_EVAL)
+#if (defined(UNIX) || defined(VMS)) && defined(FEAT_EVAL)
 # include <pwd.h>
 # include <grp.h>
 #endif
+#if defined(VMS) && defined(HAVE_XOS_R_H)
+# include <x11/xos_r.h>
+#endif
 
 // Is there any system that doesn't have access()?
 #define USE_MCH_ACCESS
@@ -338,7 +341,7 @@ readfile(
 
     if (!read_stdin && !read_buffer && !read_fifo)
     {
-#ifdef UNIX
+#if defined(UNIX) || defined(VMS)
 	/*
 	 * On Unix it is possible to read a directory, so we have to
 	 * check for it before the mch_open().
@@ -4623,11 +4626,13 @@ create_readdirex_item(char_u *path, char
 	    q = (char_u*)pw->pw_name;
 	if (dict_add_string(item, "user", q) == FAIL)
 	    goto theend;
+#  if !defined(VMS) || (defined(VMS) && defined(HAVE_XOS_R_H))
 	gr = getgrgid(st.st_gid);
 	if (gr == NULL)
 	    q = (char_u*)"";
 	else
 	    q = (char_u*)gr->gr_name;
+#  endif
 	if (dict_add_string(item, "group", q) == FAIL)
 	    goto theend;
     }