]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
undef reg in gdb_curses.h
authorTom Tromey <tromey@redhat.com>
Wed, 16 Oct 2013 18:25:27 +0000 (12:25 -0600)
committerTom Tromey <tromey@redhat.com>
Tue, 29 Oct 2013 16:41:30 +0000 (10:41 -0600)
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.

gdb/ChangeLog
gdb/gdb_curses.h
gdb/utils.c

index 23a216266509a7b948cd2fd60f1f9dcdcbe67261..daceab8fde0138841bb336b7d370fd737f9ad502 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-29  Tom Tromey  <tromey@redhat.com>
+
+       * utils.c (reg): Move undefinition...
+       * gdb_curses.h: ... here.  Update comment to mention AIX.
+
 2013-10-29  Nicolas Blanc  <nicolas.blanc@intel.com>
 
        * exec.h (add_target_sections_of_objfile): New declaration.
index 37b2d5b8c4997171fc6acb3c706e7ffd29d6fd5c..92c6db169d00c0dab34925c4a665cca696413f76 100644 (file)
 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 */
index 47f9dfe321943404f568698b642da21360c139e2..198675827a2865df6406b3116732d8d9a8b3e51e 100644 (file)
 #include <pc.h>
 #endif
 
-/* SunOS's curses.h has a '#define reg register' in it.  Thank you Sun.  */
-#ifdef reg
-#undef reg
-#endif
-
 #include <signal.h>
 #include "timeval-utils.h"
 #include "gdbcmd.h"