]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1706: MS-Windows: Compile error when building with if_ruby v9.1.1706
authorFoxe Chen <chen.foxe@gmail.com>
Wed, 27 Aug 2025 21:53:41 +0000 (23:53 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 27 Aug 2025 21:53:41 +0000 (23:53 +0200)
Problem:  MS-Windows: Compile error when building with if_ruby
          (Christian Robinson, after v9.1.1704)
Solution: Do not define gettimeofday() if ruby interface is compiled in
          (Foxe Chen).

fixes: #18143
closes: #18144

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/proto/time.pro
src/time.c
src/version.c

index d9739b4188356098a94bcce129ebf4d2521f6e7e..9d6d9e962a83af9524bf32fcbea15ae6941e849e 100644 (file)
@@ -20,7 +20,7 @@ void f_timer_pause(typval_T *argvars, typval_T *rettv);
 void f_timer_start(typval_T *argvars, typval_T *rettv);
 void f_timer_stop(typval_T *argvars, typval_T *rettv);
 void f_timer_stopall(typval_T *argvars, typval_T *rettv);
-#if defined(MSWIN) || defined(__MINGW32__)
+#if (defined(MSWIN) || defined(__MINGW32__)) && !defined(FEAT_RUBY)
 int gettimeofday(struct timeval *tv, char *dummy);
 #endif
 void time_push(void *tv_rel, void *tv_start);
index d451799485cc805c46df256d33b7dcfe7aa3e2b4..830a94cd61e7c8b87e6908e33578c2967cd173ce 100644 (file)
@@ -127,7 +127,8 @@ get_ctime(time_t thetime, int add_newline)
     return buf;
 }
 
-#if defined(MSWIN) || defined(__MINGW32__)
+// Ruby has its own version of gettimeofday
+#if (defined(MSWIN) || defined(__MINGW32__)) && !defined(FEAT_RUBY)
 /*
  * Windows doesn't have gettimeofday(), although it does have struct timeval.
  */
index 595c100f08c5b496728df0cdeebf7e58663b797d..df58dfd3cccb733b991a4890b675a83985b44edc 100644 (file)
@@ -724,6 +724,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1706,
 /**/
     1705,
 /**/