From 1a5a8f2a3edb3b67862fe74ca807aab8bcc5a483 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Fri, 22 Nov 1991 19:30:03 +0000 Subject: [PATCH] CLeanups to compile, mostly on BSD (okeeffe) and sco (kithrup). --- gdb/ChangeLog | 10 +++++++++- gdb/Makefile.in | 16 ++++++++-------- gdb/language.h | 4 ++-- gdb/m2-exp.y | 5 +++++ gdb/xm-tahoe.h | 14 ++++++++++---- 5 files changed, 34 insertions(+), 15 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8fd9162a90e..095b26f4ab9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,14 @@ Fri Nov 22 08:27:40 1991 John Gilmore (gnu at cygnus.com) - * infptrace.c: Lint. + * infptrace.c, language.h: Lint. + * m2-exp.y: #undef MAX and MIN in case system includes set them. + * xm-tahoe.h: Set HOST_BYTE_ORDER. Include system versions of + {BIG,LITTLE}_ENDIAN and the INT_MAX family first, to avoid + redefinition warnings. + * defs.h: Reorder things so that the xm-file gets first crack + at #define's, followed by defs.h and then the tm-file. + * Makefile.in: Remove spaces after 'ignore exit code' - flags. + Late-model BSD 'make's don't cope with them. Thu Nov 21 23:48:56 1991 John Gilmore (gnu at cygnus.com) diff --git a/gdb/Makefile.in b/gdb/Makefile.in index b812cc87b5d..3a2be7f1b51 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -570,18 +570,18 @@ comparison: force $(MAKE) subdir_do DO=comparison "DODIRS=$(SUBDIRS)" de-stage1: force - - (cd stage1 ; mv -f * ..) - - rmdir stage1 + -(cd stage1 ; mv -f * ..) + -rmdir stage1 $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)" de-stage2: force - - (cd stage2 ; mv -f * ..) - - rmdir stage2 + -(cd stage2 ; mv -f * ..) + -rmdir stage2 $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)" de-stage3: force - - (cd stage3 ; mv -f * ..) - - rmdir stage3 + -(cd stage3 ; mv -f * ..) + -rmdir stage3 $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)" Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag) @@ -628,14 +628,14 @@ c-exp.tab.o: c-exp.tab.c c-exp.tab.c: $(srcdir)/c-exp.y @echo 'Expect 4 shift/reduce conflicts.' ${YACC} $(srcdir)/c-exp.y - - mv y.tab.c c-exp.tab.c + -mv y.tab.c c-exp.tab.c # m2-exp.tab.c is generated in target dir from m2-exp.y if it doesn't exist # in srcdir, then compiled in target dir to m2-exp.tab.o. m2-exp.tab.o: m2-exp.tab.c m2-exp.tab.c: $(srcdir)/m2-exp.y ${YACC} $(srcdir)/m2-exp.y - - mv y.tab.c m2-exp.tab.c + -mv y.tab.c m2-exp.tab.c # The symbol-file readers have dependencies on BFD header files. dbxread.o: ${srcdir}/dbxread.c diff --git a/gdb/language.h b/gdb/language.h index d09d4d355e5..d46a7daa52e 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -99,10 +99,10 @@ extern enum language_mode evaluator. */ /* Should we strictly type check expressions? */ -#define STRICT_TYPE (type_check != range_check_off) +#define STRICT_TYPE (type_check != type_check_off) /* Should we range check values against the domain of their type? */ -#define RANGE_CHECK (range_check != type_check_off) +#define RANGE_CHECK (range_check != range_check_off) /* "cast" really means conversion */ /* FIXME -- should be a setting in language_defn */ diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index 7b29b8cbac3..72619e74842 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -39,6 +39,11 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "value.h" #include "parser-defs.h" +/* In case the system defines these as macros, get rid of them; we use + them as tokens. */ +#undef MAX +#undef MIN + /* These MUST be included in any grammar file!!!! Please choose unique names! */ #define yymaxdepth m2_maxdepth diff --git a/gdb/xm-tahoe.h b/gdb/xm-tahoe.h index d18d6835595..a28d69a9173 100644 --- a/gdb/xm-tahoe.h +++ b/gdb/xm-tahoe.h @@ -1,5 +1,7 @@ /* Definitions to make GDB hosted on a tahoe running 4.3-Reno Copyright (C) 1986, 1987, 1989, 1991 Free Software Foundation, Inc. + Contributed by the State University of New York at Buffalo, by the + Distributed Computer Systems Lab, Department of Computer Science, 1991. This file is part of GDB. @@ -17,10 +19,14 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* - * Ported by the State University of New York at Buffalo by the Distributed - * Computer Systems Lab, Department of Computer Science, 1991. - */ +/* Make sure the system include files define BIG_ENDIAN, UINT_MAX, const, + etc, rather than GDB's files. */ +#include +#include + +/* Host is big-endian */ + +#define HOST_BYTE_ORDER BIG_ENDIAN /* Get rid of any system-imposed stack limit if possible. */ -- 2.30.2