aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdb_curses.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-10-16 12:25:27 -0600
committerTom Tromey <tromey@redhat.com>2013-10-29 10:41:30 -0600
commitaee17e424f491173bb377b97c397bca1604bf5b8 (patch)
tree37d19060157ff961f0748e31c2ad9eb94dd47e0e /gdb/gdb_curses.h
parent9ac6985971f0af43d4dd385798db42eecb4ea98b (diff)
downloadgdb-aee17e424f491173bb377b97c397bca1604bf5b8.zip
gdb-aee17e424f491173bb377b97c397bca1604bf5b8.tar.gz
gdb-aee17e424f491173bb377b97c397bca1604bf5b8.tar.bz2
undef reg in gdb_curses.h
I tried to build gdb on the AIX machine in the GCC compile farm (gcc111), but it failed in a couple of spots because gdb uses "reg" as a variable name and the AIX <curses.h> defines "reg" to "register". I saw that we already had a workaround for this lurking in utils.c, so I just moved that to gdb_curses.h. This fixed the problem on AIX and still builds on x86-64 Fedora 18. 2013-10-29 Tom Tromey <tromey@redhat.com> * utils.c (reg): Move undefinition... * gdb_curses.h: ... here. Update comment to mention AIX.
Diffstat (limited to 'gdb/gdb_curses.h')
-rw-r--r--gdb/gdb_curses.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/gdb_curses.h b/gdb/gdb_curses.h
index 37b2d5b..92c6db1 100644
--- a/gdb/gdb_curses.h
+++ b/gdb/gdb_curses.h
@@ -54,4 +54,12 @@
extern int tgetnum (const char *);
#endif
+/* SunOS's curses.h has a '#define reg register' in it. Thank you Sun. */
+/* Ditto for:
+ -bash-4.2$ uname -a
+ AIX power-aix 1 7 00F84C0C4C00 */
+#ifdef reg
+#undef reg
+#endif
+
#endif /* gdb_curses.h */