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)
diff --git a/src/fileio.c b/src/fileio.c
index b3b7100..1af0b4c 100644
--- 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 @@
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 @@
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;
}