public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] sim: cgen: workaround Windows VOID define
@ 2021-09-09  5:23 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2021-09-09  5:23 UTC (permalink / raw)
  To: gdb-patches

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.
---
 sim/common/cgen-types.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sim/common/cgen-types.h b/sim/common/cgen-types.h
index cb71b6bdda12..059f31a8b1b6 100644
--- a/sim/common/cgen-types.h
+++ b/sim/common/cgen-types.h
@@ -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;
-- 
2.33.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-09  5:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-09  5:23 [PATCH] sim: cgen: workaround Windows VOID define Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).