From 9da2083403ee24c7a4ab50041eab70e5b0e4b30a Mon Sep 17 00:00:00 2001 From: Dave Korn Date: Sun, 8 May 2005 23:48:38 +0000 Subject: 2005-05-08 Dave Korn * coff-tic80.c: Undefine _CONST after system headers to prevent clash with tic80-specific definition in include/coff/tic80.h --- bfd/ChangeLog | 5 +++++ bfd/coff-tic80.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ee4797d3492..8563a0f97db 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2005-05-08 Dave Korn + + * 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 PR 939 diff --git a/bfd/coff-tic80.c b/bfd/coff-tic80.c index 3c089648241..ec9cbeef59a 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" -- cgit v1.2.1