* 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.
This commit is contained in:
Daniel Jacobowitz 2006-10-05 19:42:31 +00:00
parent 0b83947edd
commit dbc981de23
6 changed files with 52 additions and 16 deletions

View File

@ -1,3 +1,13 @@
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.

View File

@ -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) \

35
gdb/gdb_expat.h Normal file
View File

@ -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) */

View File

@ -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

View File

@ -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. */

View File

@ -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. */