summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-10-05 19:42:31 +0000
committerDaniel Jacobowitz <dan@debian.org>2006-10-05 19:42:31 +0000
commit958f4abf2e5ac829ca6f7b2e8e4732152eeff5a8 (patch)
treed289e728352566547dd41dd6a605527705b86f95
parente5df30fe7a5ab04c7b3160f2a1ad1164111078b9 (diff)
downloadgdb-958f4abf2e5ac829ca6f7b2e8e4732152eeff5a8.tar.gz
* Makefile.in (gdb_expat_h): New.
(xml_support_h): Add gdb_expat.h dependency. (memory-map.o, xml-support.o): Likewise. * gdb_expat.h: New file. * xml-support.h: Include it. * memory-map.c, xml-support.c: Likewise. Remove XML_STATUS_OK definitions.
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/Makefile.in7
-rw-r--r--gdb/gdb_expat.h35
-rw-r--r--gdb/memory-map.c6
-rw-r--r--gdb/xml-support.c8
-rw-r--r--gdb/xml-support.h2
6 files changed, 52 insertions, 16 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b431592821a..403bbcbd0ae 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2006-10-05 Daniel Jacobowitz <dan@codesourcery.com>
+ * Makefile.in (gdb_expat_h): New.
+ (xml_support_h): Add gdb_expat.h dependency.
+ (memory-map.o, xml-support.o): Likewise.
+ * gdb_expat.h: New file.
+ * xml-support.h: Include it.
+ * memory-map.c, xml-support.c: Likewise. Remove XML_STATUS_OK
+ definitions.
+
+2006-10-05 Daniel Jacobowitz <dan@codesourcery.com>
+
* remote.c (get_remote_state_raw): Renamed from get_remote_state.
(get_remote_state): New function.
(init_remote_state, _initialize_remote): Use get_remote_state_raw.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 394f4e060c6..354fd200520 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -701,6 +701,7 @@ gdb_curses_h = gdb_curses.h
gdb_dirent_h = gdb_dirent.h
gdb_events_h = gdb-events.h
gdb_h = gdb.h
+gdb_expat_h = gdb_expat.h
gdb_locale_h = gdb_locale.h
gdb_obstack_h = gdb_obstack.h $(obstack_h)
gdb_proc_service_h = gdb_proc_service.h $(gregset_h)
@@ -823,7 +824,7 @@ version_h = version.h
wince_stub_h = wince-stub.h
wrapper_h = wrapper.h $(gdb_h)
xcoffsolib_h = xcoffsolib.h
-xml_support_h = xml-support.h
+xml_support_h = xml-support.h $(gdb_expat_h)
#
# gdb/cli/ headers
@@ -2375,7 +2376,7 @@ mips-tdep.o: mips-tdep.c $(defs_h) $(gdb_string_h) $(gdb_assert_h) \
mipsv4-nat.o: mipsv4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \
$(regcache_h) $(gregset_h)
memory-map.o: memory-map.c $(defs_h) $(memory_map_h) $(xml_support_h) \
- $(gdb_assert_h) $(exceptions_h) $(gdb_string_h)
+ $(gdb_assert_h) $(exceptions_h) $(gdb_string_h) $(gdb_expat_h)
mn10300-linux-tdep.o: mn10300-linux-tdep.c $(defs_h) $(gdbcore_h) \
$(gdb_string_h) $(regcache_h) $(mn10300_tdep_h) $(gdb_assert_h) \
$(bfd_h) $(elf_bfd_h) $(osabi_h) $(regset_h) $(solib_svr4_h) \
@@ -2855,7 +2856,7 @@ xcoffread.o: xcoffread.c $(defs_h) $(bfd_h) $(gdb_string_h) $(gdb_stat_h) \
xcoffsolib.o: xcoffsolib.c $(defs_h) $(bfd_h) $(xcoffsolib_h) $(inferior_h) \
$(gdbcmd_h) $(symfile_h) $(frame_h) $(gdb_regex_h)
xml-support.o: xml-support.c $(defs_h) $(xml_support_h) $(exceptions_h) \
- $(gdb_string_h)
+ $(gdb_string_h) $(gdb_expat_h)
xstormy16-tdep.o: xstormy16-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \
$(frame_unwind_h) $(dwarf2_frame_h) $(symtab_h) $(gdbtypes_h) \
$(gdbcmd_h) $(gdbcore_h) $(value_h) $(dis_asm_h) $(inferior_h) \
diff --git a/gdb/gdb_expat.h b/gdb/gdb_expat.h
new file mode 100644
index 00000000000..b3301826b80
--- /dev/null
+++ b/gdb/gdb_expat.h
@@ -0,0 +1,35 @@
+/* Slightly more portable version of <expat.h>.
+
+ Copyright (C) 2006
+ Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ 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., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+#if !defined(GDB_EXPAT_H)
+#define GDB_EXPAT_H
+
+#include <expat.h>
+
+/* Expat 1.95.x does not define these; this is the definition
+ recommended by the expat 2.0 headers. */
+#ifndef XML_STATUS_OK
+# define XML_STATUS_OK 1
+# define XML_STATUS_ERROR 0
+#endif
+
+#endif /* !defined(GDB_EXPAT_H) */
diff --git a/gdb/memory-map.c b/gdb/memory-map.c
index e3f8a805d58..991db1bf91b 100644
--- a/gdb/memory-map.c
+++ b/gdb/memory-map.c
@@ -47,12 +47,8 @@ parse_memory_map (const char *memory_map)
#else /* HAVE_LIBEXPAT */
#include "xml-support.h"
-#include <expat.h>
-#ifndef XML_STATUS_OK
-# define XML_STATUS_OK 1
-# define XML_STATUS_ERROR 0
-#endif
+#include "gdb_expat.h"
/* Internal parsing data passed to all Expat callbacks. */
struct memory_map_parsing_data
diff --git a/gdb/xml-support.c b/gdb/xml-support.c
index 54b0c9be526..2fcf64e5c9c 100644
--- a/gdb/xml-support.c
+++ b/gdb/xml-support.c
@@ -29,15 +29,9 @@
#include "exceptions.h"
#include "xml-support.h"
-#include <expat.h>
-
+#include "gdb_expat.h"
#include "gdb_string.h"
-#ifndef XML_STATUS_OK
-# define XML_STATUS_OK 1
-# define XML_STATUS_ERROR 0
-#endif
-
/* Returns the value of attribute ATTR from expat attribute list
ATTRLIST. If not found, throws an exception. */
diff --git a/gdb/xml-support.h b/gdb/xml-support.h
index 1ad807074c2..ada4847de76 100644
--- a/gdb/xml-support.h
+++ b/gdb/xml-support.h
@@ -24,7 +24,7 @@
#ifndef XML_SUPPORT_H
#define XML_SUPPORT_H
-#include <expat.h>
+#include "gdb_expat.h"
/* Helper functions for parsing XML documents. See xml-support.c
for more information about these functions. */