sim: cgen: workaround Windows VOID define

The cgen framework provides a "VOID" type for code to use, but this
defines ends up conflicting with the standard Windows VOID define.
Since they actually define to the same thing ("void"), undef it here
to fix the Windows build.

We might want to reconsider the need for "VOID" in cgen, but that
will take larger discussion & coordination with the cgen project.
This commit is contained in:
Mike Frysinger 2021-09-09 01:16:04 -04:00
parent 287fbf951a
commit 93aaa742b3

View file

@ -57,6 +57,8 @@ typedef enum mode_type {
extern const char * const cgen_mode_names[];
#define MODE_NAME(m) (cgen_mode_names[m])
/* Some system headers define VOID already, so undo it. */
#undef VOID
typedef void VOID;
typedef unsigned char BI;
typedef signed8 QI;