(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>
+
+ * 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.
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)
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
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) \
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) \
--- /dev/null
+/* 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) */
#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
#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. */
#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. */