[ITA] w32api-3.0b_svn5368-1

Jon TURNEY jon.turney@dronecode.org.uk
Mon Sep 3 15:59:00 GMT 2012


On 03/09/2012 12:04, JonY wrote:
> On 9/3/2012 18:34, Corinna Vinschen wrote:
>>>
>>> New version up. Was the first uploaded?
>>>
>>> http://sourceforge.net/projects/mingw-w64/files/Cygwin%20Snapshots/dist/w32api/w32api-3.0b_svn5373-1-src.tar.bz2/download
>>>
>>> http://sourceforge.net/projects/mingw-w64/files/Cygwin%20Snapshots/dist/w32api/w32api-3.0b_svn5373-1.tar.bz2/download
>>>
>>> http://sourceforge.net/projects/mingw-w64/files/Cygwin%20Snapshots/dist/w32api/setup.hint/download
>>
>> None have been uploaded so far.  I'm not sure of the current state
>> of the discussion.  Are the above w32api headers good to go or is
>> a new version in the loop?
> 
> Jon Turney says he's working on a patch for xorg-server to build with
> mingw-w64. Jon, any comments?
Almost right.   The problem with BOOL redefinition affects the XWindows.h
header in the x11proto package, which is (should be) included by all
applications which need access to both the X11 and Win32 APIs, of which the
xserver is the primary, but not only example.

I really don't want to mess with this as I have no idea why this header
differs in this regard from the mingw.org headers, or how it came to be the
way it is (the svn history did not enlighten me much)

So, how about the attached (minimal) change? (where NOBOOLTYPE is named
whatever you think is appropriate)

(I also attach a patch which un-knots the definition of a macro BOOL just so
we can use it define some types, which seems a strange way to do things to me,
but might well be there for a reason I don't know)

-------------- next part --------------
--- windef.h.bak	2012-09-03 16:54:05.156250000 +0100
+++ windef.h	2012-09-03 16:54:25.343750000 +0100
@@ -101,15 +101,14 @@
 #ifndef _DEF_WINBOOL_
 #define _DEF_WINBOOL_
 typedef int WINBOOL;
+typedef WINBOOL *PBOOL;
+typedef WINBOOL *LPBOOL;
+#if !defined(__OBJC__) && !defined(__OBJC_BOOL) && !defined(__objc_INCLUDE_GNU) && !defined(NOBOOLTYPE)
 #pragma push_macro("BOOL")
 #undef BOOL
-#if !defined(__OBJC__) && !defined(__OBJC_BOOL) && !defined(__objc_INCLUDE_GNU) && !defined(NOBOOLTYPE)
 typedef int BOOL;
-#endif
-#define BOOL WINBOOL
-typedef BOOL *PBOOL;
-typedef BOOL *LPBOOL;
 #pragma pop_macro("BOOL")
+#endif
 #endif /* _DEF_WINBOOL_ */
 
 typedef unsigned char BYTE;
-------------- next part --------------
--- windef.h.bak	2012-09-03 16:54:05.156250000 +0100
+++ windef.h	2012-09-03 16:54:25.343750000 +0100
@@ -101,15 +101,14 @@
 #ifndef _DEF_WINBOOL_
 #define _DEF_WINBOOL_
 typedef int WINBOOL;
+typedef WINBOOL *PBOOL;
+typedef WINBOOL *LPBOOL;
+#if !defined(__OBJC__) && !defined(__OBJC_BOOL) && !defined(__objc_INCLUDE_GNU) && !defined(NOBOOLTYPE)
 #pragma push_macro("BOOL")
 #undef BOOL
-#if !defined(__OBJC__) && !defined(__OBJC_BOOL) && !defined(__objc_INCLUDE_GNU) && !defined(NOBOOLTYPE)
 typedef int BOOL;
-#endif
-#define BOOL WINBOOL
-typedef BOOL *PBOOL;
-typedef BOOL *LPBOOL;
 #pragma pop_macro("BOOL")
+#endif
 #endif /* _DEF_WINBOOL_ */
 
 typedef unsigned char BYTE;


More information about the Cygwin-apps mailing list