Hello,

as maintainer of vim in MacPorts I got a build failure report [1] when
using './configure --with-x' (our +x11 variant):

----snip----

In file included from
/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:49,
                 from
/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:39,
                 from
/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:7,
                 from
/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
                 from os_macosx.m:20:
/System/Library/Frameworks/CoreServices.framework/Headers/../Frameworks/CarbonCore.framework/Headers/MacTypes.h:279:
error: conflicting types for 'Boolean'
/opt/local/include/X11/Intrinsic.h:158: error: previous declaration of
'Boolean' was here
In file included from
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QD.h:42,
                 from
/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:31,
                 from
/System/Library/Frameworks/Foundation.framework/Headers/NSAppleEventDescriptor.h:9,
                 from
/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:115,
                 from
/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13,
                 from os_macosx.m:20:
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/QD.framework/Headers/QuickdrawTypes.h:267:
error: conflicting types for 'Cursor'
/opt/local/include/X11/X.h:103: error: previous declaration of 'Cursor'
was here
make[1]: *** [objects/os_macosx.o] Error 1

----snap----

This snippet is from my system with Mac OS X 10.6.4 (Snow Leopard) with
xorg-libXt @1.0.8 and vim @7.3.11

As a solution for this, I added #define NO_X11_INCLUDES at the top of
os_macosx.m to avoid the type conflict. Patch attached.

Rainer

[1] Original report: http://trac.macports.org/ticket/26744

-- 
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
--- src/os_macosx.m.orig        2010-10-08 01:53:04.000000000 +0200
+++ src/os_macosx.m     2010-10-08 01:53:18.000000000 +0200
@@ -15,6 +15,7 @@
     Error: MACOS 9 is no longer supported in Vim 7
 #endif
 
+#define NO_X11_INCLUDES
 #include "vim.h"
 #import <Cocoa/Cocoa.h>
 

Raspunde prin e-mail lui