aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Korn <dave.korn@artimi.com>2005-05-08 23:48:38 +0000
committerDave Korn <dave.korn@artimi.com>2005-05-08 23:48:38 +0000
commit74cc7600e397829aaffe91d1e1b63e19581c7031 (patch)
tree93b8585a3da8c040bc34b25a378e8f0be7bc155c
parent4252dc94bdafcf25eaa62721d12d403737598005 (diff)
downloadgdb-74cc7600e397829aaffe91d1e1b63e19581c7031.zip
gdb-74cc7600e397829aaffe91d1e1b63e19581c7031.tar.gz
gdb-74cc7600e397829aaffe91d1e1b63e19581c7031.tar.bz2
2005-05-08 Dave Korn <dave.korn@artimi.com>
* coff-tic80.c: Undefine _CONST after system headers to prevent clash with tic80-specific definition in include/coff/tic80.h
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/coff-tic80.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ee4797d..8563a0f 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-08 Dave Korn <dave.korn@artimi.com>
+
+ * coff-tic80.c: Undefine _CONST after system headers to prevent
+ clash with tic80-specific definition in include/coff/tic80.h
+
2005-05-08 H.J. Lu <hongjiu.lu@intel.com>
PR 939
diff --git a/bfd/coff-tic80.c b/bfd/coff-tic80.c
index 3c08964..ec9cbee 100644
--- a/bfd/coff-tic80.c
+++ b/bfd/coff-tic80.c
@@ -28,6 +28,14 @@ Boston, MA 02110-1301, USA. */
#include "bfdlink.h"
#include "sysdep.h"
#include "libbfd.h"
+#ifdef _CONST
+/* Newlib-based hosts define _CONST as a STDC-safe alias for const,
+ but to the tic80 toolchain it means something altogether different.
+ Since sysdep.h will have pulled in stdio.h and hence _ansi.h which
+ contains this definition, we must undef it before including the
+ tic80-specific definition. */
+#undef _CONST
+#endif /* _CONST */
#include "coff/tic80.h"
#include "coff/internal.h"
#include "libcoff.h"