Index: Makefile.in
--- Makefile.in.orig	2004-11-08 17:21:22 +0100
+++ Makefile.in	2004-11-10 12:26:05 +0100
@@ -325,6 +325,7 @@
 
 CC = @CC@
 CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
 LIBCFLAGS = $(CFLAGS)
 
 CXX = @CXX@
@@ -388,6 +389,7 @@
 # (which we know are built with gcc) are built with optimizations so
 # prepend -O2 when setting CFLAGS_FOR_TARGET.
 CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
+CPPFLAGS_FOR_TARGET = $(CPPFLAGS)
 # If GCC_FOR_TARGET is not overriden on the command line, then this
 # variable is passed down to the gcc Makefile, where it is used to
 # build libgcc2.a.  We define it here so that it can itself be
@@ -531,10 +533,6 @@
 	"CXX_FOR_BUILD=$(CXX_FOR_BUILD)" \
 	"EXPECT=$(EXPECT)" \
 	"FLEX=$(FLEX)" \
-	"INSTALL=$(INSTALL)" \
-	"INSTALL_DATA=$(INSTALL_DATA)" \
-	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
-	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
 	"LEX=$(LEX)" \
 	"M4=$(M4)" \
 	"MAKE=$(MAKE)" \
@@ -544,6 +542,7 @@
 	"YACC=$(YACC)" \
 	"AR_FLAGS=$(AR_FLAGS)" \
 	"CFLAGS=$(CFLAGS)" \
+	"CPPFLAGS=$(CPPFLAGS)" \
 	"CXXFLAGS=$(CXXFLAGS)" \
 	"LDFLAGS=$(LDFLAGS)" \
 	"LIBCFLAGS=$(LIBCFLAGS)" \
@@ -612,6 +611,7 @@
 	'AS=$$(AS_FOR_TARGET)' \
 	'CC=$$(CC_FOR_TARGET)' \
 	'CFLAGS=$$(CFLAGS_FOR_TARGET)' \
+	'CPPFLAGS=$$(CPPFLAGS_FOR_TARGET)' \
 	'CXX=$$(CXX_FOR_TARGET)' \
 	'CXXFLAGS=$$(CXXFLAGS_FOR_TARGET)' \
 	'DLLTOOL=$$(DLLTOOL_FOR_TARGET)' \
Index: gdb/Makefile.in
--- gdb/Makefile.in.orig	2004-11-04 03:18:49 +0100
+++ gdb/Makefile.in	2004-11-10 12:34:33 +0100
@@ -336,6 +336,7 @@
 # CFLAGS is specifically reserved for setting from the command line
 # when running make.  I.E.  "make CFLAGS=-Wmissing-prototypes".
 CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
 
 # Need to pass this to testsuite for "make check".  Probably should be
 # consistent with top-level Makefile.in and gdb/testsuite/Makefile.in
@@ -436,6 +437,7 @@
 	"AR_FLAGS=$(AR_FLAGS)" \
 	"CC=$(CC)" \
 	"CFLAGS=$(CFLAGS)" \
+	"CPPFLAGS=$(CPPFLAGS)" \
 	"CXX=$(CXX)" \
 	"CXXFLAGS=$(CXXFLAGS)" \
 	"DLLTOOL=$(DLLTOOL)" \
@@ -495,6 +497,7 @@
 	'CC=$$(CC_FOR_TARGET)' \
 	"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
 	"CFLAGS=$(CFLAGS)" \
+	"CPPFLAGS=$(CPPFLAGS)" \
 	'CXX=$$(CXX_FOR_TARGET)' \
 	"CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
 	"CXXFLAGS=$(CXXFLAGS)" \
@@ -954,7 +957,7 @@
 # Prevent Sun make from putting in the machine type.  Setting
 # TARGET_ARCH to nothing works for SunOS 3, 4.0, but not for 4.1.
 .c.o:
-	$(CC) -c $(INTERNAL_CFLAGS) $<
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $<
 
 all: gdb$(EXEEXT) $(CONFIG_ALL)
 	@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
@@ -1430,16 +1433,16 @@
 
 # Provide explicit rule/dependency - works for more makes.
 copying.o: $(srcdir)/copying.c
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/copying.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/copying.c
 
 hpux-thread.o: $(srcdir)/hpux-thread.c
-	$(CC) -c $(INTERNAL_CFLAGS) -I$(srcdir)/osf-share \
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) -I$(srcdir)/osf-share \
 		-I$(srcdir)/osf-share/HP800 -I/usr/include/dce \
 		$(srcdir)/hpux-thread.c
 
 # main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and BINDIR.
 main.o: main.c
-	$(CC) -c $(INTERNAL_CFLAGS) $(TARGET_SYSTEM_ROOT_DEFINE) \
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(TARGET_SYSTEM_ROOT_DEFINE) \
 		-DBINDIR=\"$(bindir)\" $(srcdir)/main.c
 
 # FIXME: cagney/2004-09-16: "gnu-v3-abi.c", with a GCC 3.4 compiler,
@@ -1478,7 +1481,7 @@
 		$(srcdir)/thread-db.c
 
 v850ice.o: $(srcdir)/v850ice.c
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
 		$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) \
 		$(GDBTK_CFLAGS) \
 		$(srcdir)/v850ice.c
@@ -2722,31 +2725,31 @@
 	$(objfiles_h) $(source_h) $(disasm_h) $(ui_out_h) $(top_h) \
 	$(cli_decode_h) $(cli_script_h) $(cli_setshow_h) $(cli_cmds_h) \
 	$(tui_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/cli/cli-cmds.c
 cli-decode.o: $(srcdir)/cli/cli-decode.c $(defs_h) $(symtab_h) \
 	$(gdb_regex_h) $(gdb_string_h) $(ui_out_h) $(cli_cmds_h) \
 	$(cli_decode_h) $(tui_h) $(gdb_assert_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/cli/cli-decode.c
 cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \
 	$(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \
 	$(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/cli/cli-dump.c
 cli-interp.o: $(srcdir)/cli/cli-interp.c $(defs_h) $(interps_h) $(wrapper_h) \
 	$(event_top_h) $(ui_out_h) $(cli_out_h) $(top_h) $(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-interp.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/cli/cli-interp.c
 cli-logging.o: $(srcdir)/cli/cli-logging.c $(defs_h) $(gdbcmd_h) $(ui_out_h) \
 	$(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-logging.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/cli/cli-logging.c
 cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \
 	$(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \
 	$(cli_script_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-script.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/cli/cli-script.c
 cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(defs_h) $(readline_tilde_h) \
 	$(value_h) $(gdb_string_h) $(ui_out_h) $(cli_decode_h) $(cli_cmds_h) \
 	$(cli_setshow_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-setshow.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/cli/cli-setshow.c
 cli-utils.o: $(srcdir)/cli/cli-utils.c $(defs_h) $(cli_utils_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-utils.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/cli/cli-utils.c
 
 #
 # GDBTK sub-directory
@@ -2816,7 +2819,7 @@
 	$(symtab_h) $(inferior_h) $(command_h) \
 	$(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \
 	$(tracepoint_h) $(top_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
         $(ITK_CFLAGS)  \
 	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
 		$(srcdir)/gdbtk/generic/gdbtk.c \
@@ -2827,7 +2830,7 @@
 		$(srcdir)/gdbtk/generic/gdbtk-cmds.h \
 		$(defs_h) $(breakpoint_h) $(tracepoint_h) \
 		$(symfile_h) $(symtab_h) $(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
 	 $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
 	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-bp.c \
 	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
@@ -2838,7 +2841,7 @@
 	$(gdbcore_h) $(demangle_h) $(linespec_h) $(tui_file_h) $(top_h) \
 	$(annotate_h) $(block_h) $(dictionary_h) $(gdb_string_h) \
 	$(dis_asm_h) $(gdbcmd_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS)	\
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS)	\
 	 $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)		\
 	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-cmds.c		\
 	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
@@ -2848,7 +2851,7 @@
 	$(symtab_h) $(inferior_h) $(command_h) \
 	$(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) $(gdb_string_h) \
 	$(tracepoint_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS)  \
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS)  \
 	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
 		$(srcdir)/gdbtk/generic/gdbtk-hooks.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
 
@@ -2856,13 +2859,13 @@
 	$(defs_h) $(interps_h) $(ui_out_h) $(ui_file_h) \
 	$(cli_out_h) $(gdb_string_h) $(cli_cmds_h) $(cli_decode_h) \
 	$(srcdir)/gdbtk/generic/gdbtk.h
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
 	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS) \
 		$(srcdir)/gdbtk/generic/gdbtk-interp.c
 
 gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c $(defs_h) $(main_h) \
 	$(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS)  \
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS)  \
 	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
 		$(srcdir)/gdbtk/generic/gdbtk-main.c -DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
 
@@ -2870,7 +2873,7 @@
 		$(srcdir)/gdbtk/generic/gdbtk.h \
 		$(srcdir)/gdbtk/generic/gdbtk-cmds.h \
 		$(defs_h) $(frame_h) $(value_h) $(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
 	 $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
 	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-register.c \
 	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
@@ -2880,7 +2883,7 @@
 	$(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
 	$(defs_h) $(target_h) $(breakpoint_h) $(linespec_h) \
 	$(block_h) $(dictionary_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS) \
 	 $(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS)   \
 	$(GDBTK_CFLAGS) $(srcdir)/gdbtk/generic/gdbtk-stack.c \
 	-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\"
@@ -2888,14 +2891,14 @@
 gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c \
 		$(srcdir)/gdbtk/generic/gdbtk.h \
 		$(defs_h) $(value_h) $(varobj_h) $(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS)  \
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(IDE_CFLAGS) $(ITCL_CFLAGS)  \
 	$(TCL_CFLAGS) $(TK_CFLAGS) $(X11_CFLAGS) $(GDBTK_CFLAGS)\
 		$(srcdir)/gdbtk/generic/gdbtk-varobj.c
 
 gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c \
 	$(srcdir)/gdbtk/generic/gdbtk-wrapper.h \
 	$(defs_h) $(frame_h) $(value_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(IDE_CFLAGS) $(GDBTK_CFLAGS)\
 		$(srcdir)/gdbtk/generic/gdbtk-wrapper.c
 
 #
@@ -2907,52 +2910,52 @@
 mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c $(defs_h) $(mi_cmds_h) \
 	$(ui_out_h) $(mi_out_h) $(breakpoint_h) $(gdb_string_h) \
 	$(mi_getopt_h) $(gdb_events_h) $(gdb_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-break.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-cmd-break.c
 mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c $(defs_h) $(target_h) $(value_h) \
 	$(mi_cmds_h) $(mi_getopt_h) $(gdb_string_h) $(ui_out_h) $(disasm_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-disas.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS)  $(srcdir)/mi/mi-cmd-disas.c
 mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c $(defs_h) $(inferior_h) $(value_h) \
 	$(mi_out_h) $(mi_cmds_h) $(mi_getopt_h) $(symtab_h) $(target_h) \
 	$(environ_h) $(command_h) $(ui_out_h) $(top_h) $(gdb_string_h) \
 	$(gdb_stat_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-env.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-cmd-env.c
 mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c $(defs_h) $(mi_cmds_h) \
 	$(mi_getopt_h) $(ui_out_h) $(symtab_h) $(source_h) $(objfiles_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-file.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-cmd-file.c
 mi-cmds.o: $(srcdir)/mi/mi-cmds.c $(defs_h) $(top_h) $(mi_cmds_h) \
 	$(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmds.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-cmds.c
 mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c $(defs_h) $(target_h) $(frame_h) \
 	$(value_h) $(mi_cmds_h) $(ui_out_h) $(symtab_h) $(block_h) \
 	$(stack_h) $(dictionary_h) $(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-stack.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-cmd-stack.c
 mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c $(defs_h) $(mi_cmds_h) $(ui_out_h) \
 	$(mi_out_h) $(varobj_h) $(value_h) $(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-cmd-var.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-cmd-var.c
 mi-console.o: $(srcdir)/mi/mi-console.c $(defs_h) $(mi_console_h) \
 	$(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-console.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-console.c
 mi-getopt.o: $(srcdir)/mi/mi-getopt.c $(defs_h) $(mi_getopt_h) \
 	$(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-getopt.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-getopt.c
 mi-interp.o: $(srcdir)/mi/mi-interp.c $(defs_h) $(gdb_string_h) $(interps_h) \
 	$(event_top_h) $(event_loop_h) $(inferior_h) $(ui_out_h) $(top_h) \
 	$(mi_main_h) $(mi_cmds_h) $(mi_out_h) $(mi_console_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-interp.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-interp.c
 mi-main.o: $(srcdir)/mi/mi-main.c $(defs_h) $(target_h) $(inferior_h) \
 	$(gdb_string_h) $(top_h) $(gdbthread_h) $(mi_cmds_h) $(mi_parse_h) \
 	$(mi_getopt_h) $(mi_console_h) $(ui_out_h) $(mi_out_h) $(interps_h) \
 	$(event_loop_h) $(event_top_h) $(gdbcore_h) $(value_h) $(regcache_h) \
 	$(gdb_h) $(frame_h) $(mi_main_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-main.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-main.c
 mi-out.o: $(srcdir)/mi/mi-out.c $(defs_h) $(ui_out_h) $(mi_out_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-out.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-out.c
 mi-parse.o: $(srcdir)/mi/mi-parse.c $(defs_h) $(mi_cmds_h) $(mi_parse_h) \
 	$(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-parse.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-parse.c
 mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c $(defs_h) $(mi_cmds_h) \
 	$(symtab_h) $(ui_out_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/mi/mi-symbol-cmds.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/mi/mi-symbol-cmds.c
 
 #
 # rdi-share sub-directory
@@ -2978,7 +2981,7 @@
 
 signals.o: $(srcdir)/signals/signals.c $(server_h) $(defs_h) $(target_h) \
 	$(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/signals/signals.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/signals/signals.c
 
 #
 # gdb/tui/ dependencies
@@ -2991,21 +2994,21 @@
 	$(tui_stack_h) $(tui_win_h) $(tui_winsource_h) $(tui_windata_h) \
 	$(target_h) $(frame_h) $(breakpoint_h) $(inferior_h) $(symtab_h) \
 	$(source_h) $(gdb_curses_h) $(readline_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/tui/tui.c
 tui-command.o: $(srcdir)/tui/tui-command.c $(defs_h) $(tui_h) $(tui_data_h) \
 	$(tui_win_h) $(tui_io_h) $(gdb_curses_h) $(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-command.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/tui/tui-command.c
 tui-data.o: $(srcdir)/tui/tui-data.c $(defs_h) $(symtab_h) $(tui_h) \
 	$(tui_data_h) $(tui_wingeneral_h) $(gdb_string_h) $(gdb_curses_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-data.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/tui/tui-data.c
 tui-disasm.o: $(srcdir)/tui/tui-disasm.c $(defs_h) $(symtab_h) \
 	$(breakpoint_h) $(frame_h) $(value_h) $(source_h) $(disasm_h) \
 	$(gdb_string_h) $(tui_h) $(tui_data_h) $(tui_win_h) $(tui_layout_h) \
 	$(tui_winsource_h) $(tui_stack_h) $(tui_file_h) $(gdb_curses_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-disasm.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/tui/tui-disasm.c
 tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(ui_file_h) $(tui_file_h) \
 	$(tui_io_h) $(tui_h) $(gdb_string_h)
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/tui/tui-file.c
 tui-hooks.o: $(srcdir)/tui/tui-hooks.c $(defs_h) $(symtab_h) $(inferior_h) \
 	$(command_h) $(bfd_h) $(symfile_h) $(objfiles_h) $(target_h) \
 	$(gdbcore_h) $(event_loop_h) $(event_top_h) $(frame_h) \
@@ -3077,14 +3080,14 @@
 
 xdr_ld.o: vx-share/xdr_ld.c $(defs_h) vx-share/vxTypes.h \
 	vx-share/vxWorks.h vx-share/xdr_ld.h
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ld.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/vx-share/xdr_ld.c
 
 xdr_ptrace.o: vx-share/xdr_ptrace.c $(defs_h) vx-share/vxTypes.h \
 	vx-share/vxWorks.h vx-share/xdr_ptrace.h
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_ptrace.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/vx-share/xdr_ptrace.c
 
 xdr_rdb.o: vx-share/xdr_rdb.c $(defs_h) vx-share/vxTypes.h \
 	vx-share/vxWorks.h vx-share/xdr_rdb.h
-	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/vx-share/xdr_rdb.c
+	$(CC) -c $(INTERNAL_CFLAGS) $(CPPFLAGS) $(srcdir)/vx-share/xdr_rdb.c
 
 ### end of the gdb Makefile.in.
Index: gdb/configure.in
--- gdb/configure.in.orig	2004-11-10 12:29:03 +0100
+++ gdb/configure.in	2004-11-10 12:30:20 +0100
@@ -394,7 +394,7 @@
    Solaris 2.[789] when using GCC. ]])
     fi ;;
 esac
-AC_CHECK_HEADERS(curses.h cursesX.h ncurses.h ncurses/ncurses.h term.h)
+AC_CHECK_HEADERS(ncurses.h ncurses/ncurses.h curses.h cursesX.h term.h)
 
 # FIXME: kettenis/20030102: In most cases we include these
 # unconditionally, so what's the point in checking these?
Index: gdb/configure
--- gdb/configure.orig	2004-11-10 12:28:55 +0100
+++ gdb/configure	2004-11-10 12:29:58 +0100
@@ -5508,7 +5508,7 @@
 
     fi ;;
 esac
-for ac_hdr in curses.h cursesX.h ncurses.h ncurses/ncurses.h term.h
+for ac_hdr in ncurses.h ncurses/ncurses.h curses.h cursesX.h term.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Index: gdb/i386fbsd-tdep.c
--- gdb/i386fbsd-tdep.c.orig	2004-02-22 17:20:22 +0100
+++ gdb/i386fbsd-tdep.c	2005-10-18 17:17:30 +0200
@@ -45,7 +45,7 @@
 CORE_ADDR i386fbsd_sigtramp_end_addr = 0xbfbfdff0;
 
 /* From <machine/signal.h>.  */
-static int i386fbsd_sc_reg_offset[] =
+int i386fbsd_sc_reg_offset[] =
 {
   8 + 14 * 4,			/* %eax */
   8 + 13 * 4,			/* %ecx */
