diff src/if_cscope.c @ 15868:7fad90423bd2 v8.1.0941

patch 8.1.0941: macros for MS-Windows are inconsistent commit https://github.com/vim/vim/commit/4f97475d326c2773a78561fb874e4f23c25cbcd9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 17 17:44:42 2019 +0100 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)
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Feb 2019 17:45:08 +0100
parents dd725a8ab112
children b52ea9c5f1db
line wrap: on
line diff
--- a/src/if_cscope.c
+++ b/src/if_cscope.c
@@ -548,7 +548,7 @@ staterr:
 	    goto add_err;
 
 	while (fname[strlen(fname)-1] == '/'
-#ifdef WIN32
+#ifdef MSWIN
 		|| fname[strlen(fname)-1] == '\\'
 #endif
 		)
@@ -790,7 +790,7 @@ cs_create_connection(int i)
 #endif
     int		len;
     char	*prog, *cmd, *ppath = NULL;
-#ifdef WIN32
+#ifdef MSWIN
     int		fd;
     SECURITY_ATTRIBUTES sa;
     PROCESS_INFORMATION pi;
@@ -844,7 +844,7 @@ err_closing:
 	(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 @@ err_closing:
 #ifdef UNIX
 	    return CSCOPE_FAILURE;
 #else
-	    /* WIN32 */
+	    /* MSWIN */
 	    goto err_closing;
 #endif
 	}
@@ -891,7 +891,7 @@ err_closing:
 #ifdef UNIX
 		return CSCOPE_FAILURE;
 #else
-		/* WIN32 */
+		/* MSWIN */
 		goto err_closing;
 #endif
 	    }
@@ -910,7 +910,7 @@ err_closing:
 #ifdef UNIX
 	    return CSCOPE_FAILURE;
 #else
-	    /* WIN32 */
+	    /* MSWIN */
 	    goto err_closing;
 #endif
 	}
@@ -919,7 +919,7 @@ err_closing:
 #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 @@ err_closing:
     }
 
 #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 @@ clear_csinfo(int i)
     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 @@ cs_pathcomponents(char *path)
     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 @@ cs_resolve_file(int i, char *name)
     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
        )