Selaa lähdekoodia

[hlc] add more undef (#753)

Yuxiao Mao 6 kuukautta sitten
vanhempi
commit
7dc1ce9e09
2 muutettua tiedostoa jossa 29 lisäystä ja 0 poistoa
  1. 17 0
      src/hlc.h
  2. 12 0
      src/hlc_main.c

+ 17 - 0
src/hlc.h

@@ -35,10 +35,14 @@
 
 // undefine some commonly used names that can clash with class/var name
 #undef CONST
+#undef IN
+#undef OUT
+#undef OPTIONAL
 #undef stdin
 #undef stdout
 #undef stderr
 #undef DELETE
+#undef ERROR
 #undef NO_ERROR
 #undef EOF
 #undef STRICT
@@ -55,6 +59,19 @@
 #undef GENERIC_READ
 #undef INT_MAX
 #undef INT_MIN
+#undef BIG_ENDIAN
+#undef LITTLE_ENDIAN
+#undef ALTERNATE
+#undef DIFFERENCE
+#undef DOUBLE_CLICK
+#undef WAIT_FAILED
+#undef OVERFLOW
+#undef UNDERFLOW
+#undef DOMAIN
+#undef TRANSPARENT
+#undef CopyFile
+#undef COLOR_HIGHLIGHT
+#undef __valid
 
 // disable some warnings triggered by HLC code generator
 

+ 12 - 0
src/hlc_main.c

@@ -29,6 +29,15 @@
 # ifndef CONST
 #	define CONST
 # endif
+# ifndef IN
+#	define IN
+# endif
+# ifndef OUT
+#	define OUT
+# endif
+# ifndef OPTIONAL
+#	define OPTIONAL
+# endif
 #	pragma warning(disable:4091)
 #if !defined(HL_MINGW)
 #	include <DbgHelp.h>
@@ -37,6 +46,9 @@
 #endif
 #	pragma comment(lib, "Dbghelp.lib")
 #	undef CONST
+#	undef IN
+#	undef OUT
+#	undef OPTIONAL
 #endif
 
 #ifdef HL_CONSOLE