gnustep / libs-back

The GNUstep gui library is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon Apple's Cocoa framework (which came from the OpenStep specification). *** Larger patches require copyright assignment to FSF. please file bugs here. ***
http://www.gnustep.org
GNU General Public License v3.0
50 stars 34 forks source link

Define WINBOOL on non-MinGW platforms #52

Closed qmfrederik closed 2 months ago

qmfrederik commented 2 months ago

The Windows SDK declares BOOL as an int. Objective C defines BOOL as a char. Those two types clash. MinGW's implementation of the Windows SDK uses the WINBOOL type to avoid this clash. When compiling natively on Windows, we need to manually define WINBOOL. MinGW will define _DEF_WINBOOL_ if it has defined WINBOOL so we can use the same trick here. See https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-headers/include/ntdef.h#L355

qmfrederik commented 2 months ago

This could also go in a separate header file; open for suggestions.