summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2023-01-16 00:03:13 -0500
committerPaul Smith <psmith@gnu.org>2023-01-16 00:03:13 -0500
commit6f3e9e9b844cf5e9cd95e9af9ae5fa9409993bd7 (patch)
treeacec441002f46aef18ea420dee099ca25e7dc665 /gl
parent6128c3e266940ebc3c5e5a4a54241354334d1ebc (diff)
downloadmake-git-6f3e9e9b844cf5e9cd95e9af9ae5fa9409993bd7.tar.gz
Use MK_OS_DOS macro instead of __MSDOS__
* src/configh.dos: Set MK_OS_DOS to 1 * src/*: Convert #if refs to __MSDOS__, to use MK_OS_DOS. * gl/lib/*: Ditto.
Diffstat (limited to 'gl')
-rw-r--r--gl/lib/glob.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gl/lib/glob.c b/gl/lib/glob.c
index a5bcd8d7..61a208cd 100644
--- a/gl/lib/glob.c
+++ b/gl/lib/glob.c
@@ -416,14 +416,14 @@ glob (const char *pattern, int flags,
/* Find the filename. */
filename = strrchr (pattern, '/');
-#if defined __MSDOS__ || MK_OS_W32
+#if MK_OS_DOS || MK_OS_W32
/* The case of "d:pattern". Since `:' is not allowed in
file names, we can safely assume that wherever it
happens in pattern, it signals the filename part. This
is so we could some day support patterns like "[a-z]:foo". */
if (filename == NULL)
filename = strchr (pattern, ':');
-#endif /* __MSDOS__ || MK_OS_W32 */
+#endif /* MK_OS_DOS || MK_OS_W32 */
if (filename == NULL)
{
/* This can mean two things: a simple name or "~name". The later
@@ -460,7 +460,7 @@ glob (const char *pattern, int flags,
{
char *newp;
dirlen = filename - pattern;
-#if defined __MSDOS__ || MK_OS_W32
+#if MK_OS_DOS || MK_OS_W32
if (*filename == ':'
|| (filename > pattern + 1 && filename[-1] == ':'))
{
@@ -494,7 +494,7 @@ glob (const char *pattern, int flags,
++filename;
if (filename[0] == '\0'
-#if defined __MSDOS__ || MK_OS_W32
+#if MK_OS_DOS || MK_OS_W32
&& dirname[dirlen - 1] != ':'
&& (dirlen < 3 || dirname[dirlen - 2] != ':'
|| dirname[dirlen - 1] != '/')
@@ -1011,7 +1011,7 @@ prefix_array (const char *dirname, char **array, size_t n)
{
size_t i;
size_t dirlen = strlen (dirname);
-#if defined __MSDOS__ || MK_OS_W32
+#if MK_OS_DOS || MK_OS_W32
char sep_char = '/';
# define DIRSEP_CHAR sep_char
#else
@@ -1022,7 +1022,7 @@ prefix_array (const char *dirname, char **array, size_t n)
/* DIRNAME is just "/", so normal prepending would get us "//foo".
We want "/foo" instead, so don't prepend any chars from DIRNAME. */
dirlen = 0;
-#if defined __MSDOS__ || MK_OS_W32
+#if MK_OS_DOS || MK_OS_W32
else if (dirlen > 1)
{
if (dirname[dirlen - 1] == '/' && dirname[dirlen - 2] == ':')