Hi,

2019/2/18 Mon 9:12:03 UTC+9 h_east wrote:
> Hi,
> 
> 2019-2-18(Mon) 8:46:17 UTC+9 Heptite:
> > On Sun, 17 Feb 2019, Cesar Romani wrote:
> > 
> > > if_ruby.c:68:11: fatal error: dlfcn.h: No such file or directory
> > > # include <dlfcn.h>
> > >           ^~~~~~~~~
> > > compilation terminated.
> > > make: *** [gobjZi686/if_ruby.o] Error 1
> > > Error by compiling gvim.exe
> > 
> > I tracked this down to MSWIN not being defined before it is tested 
> > for. (MSWIN being defined in vim.h.)
> > 
> > I was able to get that one file to compile by adding a -DMSWIN on the 
> > command line, but that's just a workaround.
> 
> Please check with the attached patch.
> Thank you for reporting.

> +#if !(defined(WIN32) || defined(_WIN64))

I think this line can be simpler:

 #ifndef WIN32

Moreover, indentation is incorrect around this line.
I attached a patch to fix both of them.

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent  ab420518cdf0d118cc50900dae43a49b83d5071c

diff --git a/src/if_ruby.c b/src/if_ruby.c
--- a/src/if_ruby.c
+++ b/src/if_ruby.c
@@ -64,19 +64,19 @@
 #  define RUBY_EXPORT
 # endif
 
-#if !defined(MSWIN)
-# include <dlfcn.h>
-# define HINSTANCE void*
-# define RUBY_PROC void*
-# define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
-# define symbol_from_dll dlsym
-# define close_dll dlclose
-#else
-# define RUBY_PROC FARPROC
-# define load_dll vimLoadLib
-# define symbol_from_dll GetProcAddress
-# define close_dll FreeLibrary
-#endif
+# ifndef WIN32
+#  include <dlfcn.h>
+#  define HINSTANCE void*
+#  define RUBY_PROC void*
+#  define load_dll(n) dlopen((n), RTLD_LAZY|RTLD_GLOBAL)
+#  define symbol_from_dll dlsym
+#  define close_dll dlclose
+# else
+#  define RUBY_PROC FARPROC
+#  define load_dll vimLoadLib
+#  define symbol_from_dll GetProcAddress
+#  define close_dll FreeLibrary
+# endif
 
 #endif  /* ifdef DYNAMIC_RUBY */
 

Raspunde prin e-mail lui