From: Jim Kingdon Date: Fri, 19 Apr 1991 17:28:32 +0000 (+0000) Subject: * Makefile.dist (cplus-dem.o): Hack in an #include "param.h" X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c1ace5b59644a8e2fe72883aea1c3df9ce372b4c;p=binutils-gdb.git * Makefile.dist (cplus-dem.o): Hack in an #include "param.h" before we compile it. defs.h: Protect against multiple inclusion. param.h: Include defs.h. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f5b3b9e41d9..ea43bd077f3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +Fri Apr 19 09:36:50 1991 Jim Kingdon (kingdon at cygint.cygnus.com) + + * Makefile.dist (cplus-dem.o): Hack in an #include "param.h" + before we compile it. + defs.h: Protect against multiple inclusion. + param.h: Include defs.h. + Thu Apr 18 19:49:10 1991 Jim Kingdon (kingdon at cygint.cygnus.com) * i386-pinsn.c (OP_E): Change %d to 0x%x for consistency. diff --git a/gdb/Makefile.dist b/gdb/Makefile.dist index ffaa1f591ba..f7770186260 100755 --- a/gdb/Makefile.dist +++ b/gdb/Makefile.dist @@ -503,5 +503,12 @@ force_update : # When used with GDB, the demangler should never look for leading underscores # because GDB strips them off during symbol read-in. Thus -Dnounderscore. +# Adding "param.h" gets us the USG define without having to edit cplus-dem.c +# (which is used by other programs which may or may not have a "param.h"). +# (no newline is added, so line numbers still work right). cplus-dem.o : cplus-dem.c - ${CC} -c ${CFLAGS} -Dnounderscore `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'` + sed <`echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'` \ + >cplus.tmp.c \ + '1s,^,#include "param.h" ,' + ${CC} -c ${CFLAGS} -Dnounderscore cplus.tmp.c + mv cplus.tmp.o cplus-dem.o diff --git a/gdb/Makefile.in b/gdb/Makefile.in index ffaa1f591ba..f7770186260 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -503,5 +503,12 @@ force_update : # When used with GDB, the demangler should never look for leading underscores # because GDB strips them off during symbol read-in. Thus -Dnounderscore. +# Adding "param.h" gets us the USG define without having to edit cplus-dem.c +# (which is used by other programs which may or may not have a "param.h"). +# (no newline is added, so line numbers still work right). cplus-dem.o : cplus-dem.c - ${CC} -c ${CFLAGS} -Dnounderscore `echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'` + sed <`echo ${srcdir}/cplus-dem.c | sed 's,^\./,,'` \ + >cplus.tmp.c \ + '1s,^,#include "param.h" ,' + ${CC} -c ${CFLAGS} -Dnounderscore cplus.tmp.c + mv cplus.tmp.o cplus-dem.o diff --git a/gdb/defs.h b/gdb/defs.h index 51a46b4ccca..57635f15d08 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License along with GDB; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +#if !defined (DEFS_H) +#define DEFS_H + /* An address in the program being debugged. Host byte order. */ typedef unsigned int CORE_ADDR; @@ -171,3 +174,5 @@ char *baud_rate; #if !defined (TARGET_CHAR_BIT) #define TARGET_CHAR_BIT 8 #endif + +#endif /* no DEFS_H */ diff --git a/gdb/param.h b/gdb/param.h index 0a569366bbb..a0b59e5cccc 100755 --- a/gdb/param.h +++ b/gdb/param.h @@ -21,6 +21,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ param-no-tm.h. Any future inclusions of param.h will be protected against by the #if !defined stuff below. */ +/* Some tm files need CORE_ADDR, for example. */ +#include "defs.h" + #if !defined (PARAM_H) #include "tm.h" #endif