File tree Expand file tree Collapse file tree 1 file changed +21
-3
lines changed
Expand file tree Collapse file tree 1 file changed +21
-3
lines changed Original file line number Diff line number Diff line change 7373 "-U__i386__" ,
7474 "-U__MINGW32__" ,
7575 "-DNT_INCLUDED" ,
76- "-D_MSC_VER=1900" ,
7776 # Minimal bool support - just enough for pycparser to understand modern headers
7877 "-D_Bool=_Bool" ,
7978 "-Dbool=_Bool" ,
9291
9392# Add platform-specific defines
9493if platform .system () == "Windows" :
95- DEFINE_ARGS .append ( "-D_WIN32" )
94+ DEFINE_ARGS .extend ([ "-D_WIN32" , "-D_MSC_VER=1900" ] )
9695elif platform .system () == "Linux" :
9796 DEFINE_ARGS .append ("-D__linux__" )
9897elif platform .system () == "Darwin" :
99- DEFINE_ARGS .append ("-D__APPLE__" )
98+ DEFINE_ARGS .extend (
99+ [
100+ "-D__APPLE__" ,
101+ "-D__MACH__" ,
102+ # Avoid problematic macros that can cause unbalanced conditionals
103+ "-U_MSC_VER" , # Don't pretend to be MSVC on macOS
104+ "-U_WIN32" ,
105+ "-UWIN32" ,
106+ # Define away problematic Apple-specific macros
107+ "-D__builtin_available(...)=1" ,
108+ "-D__has_feature(x)=0" ,
109+ "-D__has_extension(x)=0" ,
110+ "-D__has_attribute(x)=0" ,
111+ # Let macOS use its standard bool handling instead of our bool redefinition
112+ "-Ubool" , # Undefine our bool override
113+ "-U_Bool" , # Undefine our _Bool override
114+ "-Utrue" , # Undefine our true override
115+ "-Ufalse" , # Undefine our false override
116+ ]
117+ )
100118
101119FUNCTION_BLACKLIST = {}
102120
You can’t perform that action at this time.
0 commit comments