diff src/ex_cmds2.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 3af565215286
children ddd82b1c9e9d
line wrap: on
line diff
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -1048,7 +1048,7 @@ dbg_breakpoint(char_u *name, linenr_T ln
     void
 profile_start(proftime_T *tm)
 {
-# ifdef WIN3264
+# ifdef MSWIN
     QueryPerformanceCounter(tm);
 # else
     gettimeofday(tm, NULL);
@@ -1063,7 +1063,7 @@ profile_end(proftime_T *tm)
 {
     proftime_T now;
 
-# ifdef WIN3264
+# ifdef MSWIN
     QueryPerformanceCounter(&now);
     tm->QuadPart = now.QuadPart - tm->QuadPart;
 # else
@@ -1084,7 +1084,7 @@ profile_end(proftime_T *tm)
     void
 profile_sub(proftime_T *tm, proftime_T *tm2)
 {
-# ifdef WIN3264
+# ifdef MSWIN
     tm->QuadPart -= tm2->QuadPart;
 # else
     tm->tv_usec -= tm2->tv_usec;
@@ -1106,7 +1106,7 @@ profile_msg(proftime_T *tm)
 {
     static char buf[50];
 
-# ifdef WIN3264
+# ifdef MSWIN
     LARGE_INTEGER   fr;
 
     QueryPerformanceFrequency(&fr);
@@ -1124,7 +1124,7 @@ profile_msg(proftime_T *tm)
     float_T
 profile_float(proftime_T *tm)
 {
-#  ifdef WIN3264
+#  ifdef MSWIN
     LARGE_INTEGER   fr;
 
     QueryPerformanceFrequency(&fr);
@@ -1145,7 +1145,7 @@ profile_setlimit(long msec, proftime_T *
 	profile_zero(tm);
     else
     {
-# ifdef WIN3264
+# ifdef MSWIN
 	LARGE_INTEGER   fr;
 
 	QueryPerformanceCounter(tm);
@@ -1170,7 +1170,7 @@ profile_passed_limit(proftime_T *tm)
 {
     proftime_T	now;
 
-# ifdef WIN3264
+# ifdef MSWIN
     if (tm->QuadPart == 0)  /* timer was not set */
 	return FALSE;
     QueryPerformanceCounter(&now);
@@ -1190,7 +1190,7 @@ profile_passed_limit(proftime_T *tm)
     void
 profile_zero(proftime_T *tm)
 {
-# ifdef WIN3264
+# ifdef MSWIN
     tm->QuadPart = 0;
 # else
     tm->tv_usec = 0;
@@ -1207,7 +1207,7 @@ static long	last_timer_id = 0;
     long
 proftime_time_left(proftime_T *due, proftime_T *now)
 {
-#  ifdef WIN3264
+#  ifdef MSWIN
     LARGE_INTEGER fr;
 
     if (now->QuadPart > due->QuadPart)
@@ -1592,7 +1592,7 @@ profile_divide(proftime_T *tm, int count
 	profile_zero(tm2);
     else
     {
-# ifdef WIN3264
+# ifdef MSWIN
 	tm2->QuadPart = tm->QuadPart / count;
 # else
 	double usec = (tm->tv_sec * 1000000.0 + tm->tv_usec) / count;
@@ -1617,7 +1617,7 @@ static proftime_T prof_wait_time;
     void
 profile_add(proftime_T *tm, proftime_T *tm2)
 {
-# ifdef WIN3264
+# ifdef MSWIN
     tm->QuadPart += tm2->QuadPart;
 # else
     tm->tv_usec += tm2->tv_usec;
@@ -1638,7 +1638,7 @@ profile_self(proftime_T *self, proftime_
 {
     /* Check that the result won't be negative.  Can happen with recursive
      * calls. */
-#ifdef WIN3264
+#ifdef MSWIN
     if (total->QuadPart <= children->QuadPart)
 	return;
 #else
@@ -1678,7 +1678,7 @@ profile_sub_wait(proftime_T *tm, proftim
     int
 profile_equal(proftime_T *tm1, proftime_T *tm2)
 {
-# ifdef WIN3264
+# ifdef MSWIN
     return (tm1->QuadPart == tm2->QuadPart);
 # else
     return (tm1->tv_usec == tm2->tv_usec && tm1->tv_sec == tm2->tv_sec);
@@ -1691,7 +1691,7 @@ profile_equal(proftime_T *tm1, proftime_
     int
 profile_cmp(const proftime_T *tm1, const proftime_T *tm2)
 {
-# ifdef WIN3264
+# ifdef MSWIN
     return (int)(tm2->QuadPart - tm1->QuadPart);
 # else
     if (tm1->tv_sec == tm2->tv_sec)
@@ -4286,7 +4286,7 @@ source_level(void *cookie)
 
 static char_u *get_one_sourceline(struct source_cookie *sp);
 
-#if (defined(WIN32) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC)
+#if (defined(MSWIN) && defined(FEAT_CSCOPE)) || defined(HAVE_FD_CLOEXEC)
 # define USE_FOPEN_NOINH
 /*
  * Special function to open a file without handle inheritance.
@@ -4295,7 +4295,7 @@ static char_u *get_one_sourceline(struct
     static FILE *
 fopen_noinh_readbin(char *filename)
 {
-# ifdef WIN32
+# ifdef MSWIN
     int	fd_tmp = mch_open(filename, O_RDONLY | O_BINARY | O_NOINHERIT, 0);
 # else
     int	fd_tmp = mch_open(filename, O_RDONLY, 0);
@@ -5201,7 +5201,7 @@ get_locale_val(int what)
     /* Obtain the locale value from the libraries. */
     loc = (char_u *)setlocale(what, NULL);
 
-# ifdef WIN32
+# ifdef MSWIN
     if (loc != NULL)
     {
 	char_u	*p;
@@ -5230,7 +5230,7 @@ get_locale_val(int what)
 #endif
 
 
-#ifdef WIN32
+#ifdef MSWIN
 /*
  * On MS-Windows locale names are strings like "German_Germany.1252", but
  * gettext expects "de".  Try to translate one into another here for a few
@@ -5307,7 +5307,7 @@ get_mess_lang(void)
 	    p = mch_getenv((char_u *)"LANG");
     }
 # endif
-# ifdef WIN32
+# ifdef MSWIN
     p = gettext_lang(p);
 # endif
     return is_valid_mess_lang(p) ? p : NULL;
@@ -5479,7 +5479,7 @@ ex_language(exarg_T *eap)
 
 		    /* Clear $LANGUAGE because GNU gettext uses it. */
 		    vim_setenv((char_u *)"LANGUAGE", (char_u *)"");
-# ifdef WIN32
+# ifdef MSWIN
 		    /* Apparently MS-Windows printf() may cause a crash when
 		     * we give it 8-bit text while it's expecting text in the
 		     * current locale.  This call avoids that. */
@@ -5489,7 +5489,7 @@ ex_language(exarg_T *eap)
 		if (what != LC_CTYPE)
 		{
 		    char_u	*mname;
-#ifdef WIN32
+#ifdef MSWIN
 		    mname = gettext_lang(name);
 #else
 		    mname = name;
@@ -5516,7 +5516,7 @@ ex_language(exarg_T *eap)
 
 static char_u	**locales = NULL;	/* Array of all available locales */
 
-#  ifndef WIN32
+#  ifndef MSWIN
 static int	did_init_locales = FALSE;
 
 /* Return an array of strings for all available locales + NULL for the
@@ -5567,7 +5567,7 @@ find_locales(void)
     static void
 init_locales(void)
 {
-#  ifndef WIN32
+#  ifndef MSWIN
     if (!did_init_locales)
     {
 	did_init_locales = TRUE;