Hi!

Finally getting around to compiling Vim 7.3, and taking a little more
interest in the mailing list again. Would love to get back into Vim
development again if I can find time.

I use Vim in X on the Mac (gtk2), as well as in the console, as well as
MacVim. Building for X isn't done much these days, and has caused a
couple of problems, because os_macosx.c and os_mac_conv.c define
#NO_X11_INCLUDES.

- netbeans.pro uses the type BalloonEval which is not included if no X11
  headers are; I worked around this by adding typedef void to the .c
  files that #define NO_X11_INCLUDES. It's a nasty hack, but I haven't
  fiddled with the Vim source code for so long I don't have any idea
  what the 'right way' would be, so I figured I might as well just do a
  hack and someone else would know the proper way.

- FEAT_GUI is not defined if NO_X11_INCLUDES is defined (because doing
  so would pull in a lot of stuff that needs the X headers), so the
  check of FEAT_GUI in os_macosx.c is useless; I worked around it by
  unconditionally defining a different constant.

It'd be great if you could put similar workarounds in the source, Bram,
so it can compile out of the box.

Also, I am seeing src/xxd/xxd.dSYM created during a build which isn't
ignored by hg. It'd be good to add this to .hgignore or something.

Cheers,

Ben.



diff -r 951641b8784d src/os_mac_conv.c
--- a/src/os_mac_conv.c Mon Jan 17 20:08:11 2011 +0100
+++ b/src/os_mac_conv.c Tue Jan 18 17:58:26 2011 +1100
@@ -14,6 +14,8 @@
  */

 #define NO_X11_INCLUDES
+// netbeans.pro needs this
+typedef void BalloonEval;
 #include "vim.h"
 #ifndef FEAT_GUI_MAC
 # include <CoreServices/CoreServices.h>
diff -r 951641b8784d src/os_macosx.m
--- a/src/os_macosx.m   Mon Jan 17 20:08:11 2011 +0100
+++ b/src/os_macosx.m   Tue Jan 18 17:58:26 2011 +1100
@@ -18,6 +18,8 @@
 /* Avoid a conflict for the definition of Boolean between Mac header files and
  * X11 header files. */
 #define NO_X11_INCLUDES
+// netbeans.pro needs this
+typedef void BalloonEval;

 #include "vim.h"
 #import <Cocoa/Cocoa.h>
@@ -29,7 +31,7 @@
  * gui_mac.c are used then.  TODO: remove those instead?
  * But for MacVim we need these ones.
  */
-#if defined(FEAT_CLIPBOARD) && (!defined(FEAT_GUI) || defined(FEAT_GUI_MACVIM))
+#if defined(FEAT_CLIPBOARD) && (!defined(FEAT_GUI_ELSEWHERE) || defined(FEAT_GUI_MACVIM))

 /* Used to identify clipboard data copied from Vim. */

diff -r 951641b8784d src/vim.h
--- a/src/vim.h Mon Jan 17 20:08:11 2011 +0100
+++ b/src/vim.h Tue Jan 18 17:58:26 2011 +1100
@@ -121,6 +121,7 @@
     || defined(FEAT_GUI_W32) \
     || defined(FEAT_GUI_W16) \
     || defined(FEAT_GUI_PHOTON)
+# define FEAT_GUI_ELSEWHERE
 # if !defined(FEAT_GUI) && !defined(NO_X11_INCLUDES)
 #  define FEAT_GUI
 # endif



--
You received this message from the "vim_use" 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

Reply via email to