patch 8.1.0941: macros for MS-Windows are inconsistent
Problem: Macros for MS-Windows are inconsistent, using "32", "3264 and
others.
Solution: Use MSWIN for all MS-Windows builds. Use FEAT_GUI_MSWIN for the
GUI build. (Hirohito Higashi, closes #3932)
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 4cc053e..0334674 100644
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -548,7 +548,7 @@
goto add_err;
while (fname[strlen(fname)-1] == '/'
-#ifdef WIN32
+#ifdef MSWIN
|| fname[strlen(fname)-1] == '\\'
#endif
)
@@ -790,7 +790,7 @@
#endif
int len;
char *prog, *cmd, *ppath = NULL;
-#ifdef WIN32
+#ifdef MSWIN
int fd;
SECURITY_ATTRIBUTES sa;
PROCESS_INFORMATION pi;
@@ -844,7 +844,7 @@
(void)close(to_cs[1]);
(void)close(from_cs[0]);
#else
- /* WIN32 */
+ /* MSWIN */
/* Create pipes to communicate with cscope */
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.bInheritHandle = TRUE;
@@ -874,7 +874,7 @@
#ifdef UNIX
return CSCOPE_FAILURE;
#else
- /* WIN32 */
+ /* MSWIN */
goto err_closing;
#endif
}
@@ -891,7 +891,7 @@
#ifdef UNIX
return CSCOPE_FAILURE;
#else
- /* WIN32 */
+ /* MSWIN */
goto err_closing;
#endif
}
@@ -910,7 +910,7 @@
#ifdef UNIX
return CSCOPE_FAILURE;
#else
- /* WIN32 */
+ /* MSWIN */
goto err_closing;
#endif
}
@@ -919,7 +919,7 @@
#if defined(UNIX)
(void)sprintf(cmd, "exec %s -dl -f %s", prog, csinfo[i].fname);
#else
- /* WIN32 */
+ /* MSWIN */
(void)sprintf(cmd, "%s -dl -f %s", prog, csinfo[i].fname);
#endif
if (csinfo[i].ppath != NULL)
@@ -971,7 +971,7 @@
}
#else
- /* WIN32 */
+ /* MSWIN */
/* Create a new process to run cscope and use pipes to talk with it */
GetStartupInfo(&si);
si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW;
@@ -1330,7 +1330,7 @@
csinfo[i].pid = 0;
csinfo[i].fr_fp = NULL;
csinfo[i].to_fp = NULL;
-#if defined(WIN32)
+#if defined(MSWIN)
csinfo[i].hProc = NULL;
#endif
}
@@ -1940,13 +1940,13 @@
s = path + strlen(path) - 1;
for (i = 0; i < p_cspc; ++i)
while (s > path && *--s != '/'
-#ifdef WIN32
+#ifdef MSWIN
&& *--s != '\\'
#endif
)
;
if ((s > path && *s == '/')
-#ifdef WIN32
+#ifdef MSWIN
|| (s > path && *s == '\\')
#endif
)
@@ -2433,7 +2433,7 @@
if (csinfo[i].ppath != NULL
&& (strncmp(name, csinfo[i].ppath, strlen(csinfo[i].ppath)) != 0)
&& (name[0] != '/')
-#ifdef WIN32
+#ifdef MSWIN
&& name[0] != '\\' && name[1] != ':'
#endif
)