From ceb52b5d1b10ce0f5a1ab090e1911cdde6f7d98a Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 15 Jan 2023 18:04:36 -0500 Subject: Rename VMS macro to MK_OS_VMS * src/makeint.h: Set MK_OS_VMS to 1 if we're on VMS. * src/*: Convert all #if references to VMS, to use MK_OS_VMS. * gl/lib/*: Ditto. --- gl/lib/glob.c | 18 +++++++++--------- gl/lib/glob.in.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'gl') diff --git a/gl/lib/glob.c b/gl/lib/glob.c index 271a2d1c..a18c8942 100644 --- a/gl/lib/glob.c +++ b/gl/lib/glob.c @@ -71,7 +71,7 @@ USA. */ # endif #endif -#if !defined _AMIGA && !defined VMS && !defined WINDOWS32 +#if !defined _AMIGA && !MK_OS_VMS && !defined WINDOWS32 # include #endif @@ -518,13 +518,13 @@ glob (const char *pattern, int flags, oldcount = pglob->gl_pathc; -#ifndef VMS +#if !MK_OS_VMS if ((flags & (GLOB_TILDE|GLOB_TILDE_CHECK)) && dirname[0] == '~') { if (dirname[1] == '\0' || dirname[1] == '/') { /* Look up home directory. */ -#ifdef VMS +#if MK_OS_VMS /* This isn't obvious, RTLs of DECC and VAXC know about "HOME" */ const char *home_dir = getenv ("SYS$LOGIN"); #else @@ -538,7 +538,7 @@ glob (const char *pattern, int flags, if (home_dir == NULL || home_dir[0] == '\0') home_dir = "c:/users/default"; /* poor default */ # else -# ifdef VMS +# if MK_OS_VMS /* Again, this isn't obvious, if "HOME" isn't known "SYS$LOGIN" should be set */ if (home_dir == NULL || home_dir[0] == '\0') home_dir = "SYS$DISK:[]"; @@ -601,7 +601,7 @@ glob (const char *pattern, int flags, else home_dir = "~"; /* No luck. */ } -# endif /* VMS */ +# endif /* MK_OS_VMS */ # endif /* WINDOWS32 */ # endif /* Now construct the full directory. */ @@ -622,7 +622,7 @@ glob (const char *pattern, int flags, dirname = newp; } } -# if !defined _AMIGA && !defined WINDOWS32 && !defined VMS +# if !defined _AMIGA && !defined WINDOWS32 && !MK_OS_VMS else { char *end_name = strchr (dirname, '/'); @@ -702,9 +702,9 @@ glob (const char *pattern, int flags, home directory. */ return GLOB_NOMATCH; } -# endif /* Not Amiga && not WINDOWS32 && not VMS. */ +# endif /* Not Amiga && not WINDOWS32 && not MK_OS_VMS. */ } -#endif /* Not VMS. */ +#endif /* Not MK_OS_VMS. */ /* Now test whether we looked for "~" or "~NAME". In this case we can give the answer now. */ @@ -1124,7 +1124,7 @@ glob_in_dir (const char *pattern, const char *directory, int flags, int meta; int save; -#ifdef VMS +#if MK_OS_VMS if (*directory == 0) directory = "[]"; #endif diff --git a/gl/lib/glob.in.h b/gl/lib/glob.in.h index 5633d8b7..44a66556 100644 --- a/gl/lib/glob.in.h +++ b/gl/lib/glob.in.h @@ -67,7 +67,7 @@ extern "C" { #endif /* Structure describing a globbing run. */ -#if !defined _AMIGA && !defined VMS /* Buggy compiler. */ +#if !defined _AMIGA && !MK_OS_VMS /* Buggy compiler. */ struct stat; #endif typedef struct @@ -83,7 +83,7 @@ typedef struct struct dirent *(*gl_readdir) (void *); void * (*gl_opendir) (const char *); int (*gl_lstat) (const char *, struct stat *); -#if defined(VMS) && defined(__DECC) && !defined(_POSIX_C_SOURCE) +#if MK_OS_VMS && defined(__DECC) && !defined(_POSIX_C_SOURCE) int (*gl_stat) (const char *, struct stat *, ...); #else int (*gl_stat) (const char *, struct stat *); -- cgit v1.2.1