From 4f97475d326c2773a78561fb874e4f23c25cbcd9 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sun, 17 Feb 2019 17:44:42 +0100 Subject: 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) --- src/if_cscope.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/if_cscope.c') diff --git a/src/if_cscope.c b/src/if_cscope.c index 4cc053ed0f..03346749c9 100644 --- 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 ) -- cgit v1.2.3