From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27315 invoked by alias); 5 Oct 2006 19:44:44 -0000 Received: (qmail 27302 invoked by uid 22791); 5 Oct 2006 19:44:43 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 05 Oct 2006 19:44:37 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GVZ91-0002g2-Gl; Thu, 05 Oct 2006 15:44:35 -0400 Date: Thu, 05 Oct 2006 19:44:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Cc: Mark Kettenis Subject: Re: Build fix for expat 1.95 Message-ID: <20061005194435.GA10269@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org, Mark Kettenis References: <20061003160151.GA13665@nevyn.them.org> <200610032200.k93M0mZO014478@elgar.sibelius.xs4all.nl> <20061003234522.GA31007@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061003234522.GA31007@nevyn.them.org> User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00031.txt.bz2 On Tue, Oct 03, 2006 at 07:45:22PM -0400, Daniel Jacobowitz wrote: > On Wed, Oct 04, 2006 at 12:00:48AM +0200, Mark Kettenis wrote: > > > Date: Tue, 3 Oct 2006 12:01:51 -0400 > > > From: Daniel Jacobowitz > > > > > > RHEL3 ships with a version of expat which is almost, but not quite, good > > > enough. And the configure script picks it up as OK. Rather than making > > > the configure script pickier, I made GDB less picky; the only problem are > > > some missing constants. Non-zero for success, yuck. > > > > > > Checked in. > > > > Hmm, I wonder if it is worth putting this in a "gdb_expat.h". > > Yeah, that makes sense, since it's in two files. I'll try to make that > change soon. Done, as so; thanks for suggesting it. -- Daniel Jacobowitz CodeSourcery 2006-10-05 Daniel Jacobowitz * 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. Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.844 diff -u -p -r1.844 Makefile.in --- Makefile.in 21 Sep 2006 14:00:53 -0000 1.844 +++ Makefile.in 5 Oct 2006 19:32:52 -0000 @@ -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 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 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) \ Index: gdb_expat.h =================================================================== RCS file: gdb_expat.h diff -N gdb_expat.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gdb_expat.h 5 Oct 2006 19:32:52 -0000 @@ -0,0 +1,35 @@ +/* Slightly more portable version of . + + 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 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) */ Index: memory-map.c =================================================================== RCS file: /cvs/src/src/gdb/memory-map.c,v retrieving revision 1.2 diff -u -p -r1.2 memory-map.c --- memory-map.c 3 Oct 2006 15:54:01 -0000 1.2 +++ memory-map.c 5 Oct 2006 19:32:52 -0000 @@ -47,12 +47,8 @@ parse_memory_map (const char *memory_map #else /* HAVE_LIBEXPAT */ #include "xml-support.h" -#include -#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 Index: xml-support.c =================================================================== RCS file: /cvs/src/src/gdb/xml-support.c,v retrieving revision 1.2 diff -u -p -r1.2 xml-support.c --- xml-support.c 3 Oct 2006 15:54:01 -0000 1.2 +++ xml-support.c 5 Oct 2006 19:32:52 -0000 @@ -29,15 +29,9 @@ #include "exceptions.h" #include "xml-support.h" -#include - +#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. */ Index: xml-support.h =================================================================== RCS file: /cvs/src/src/gdb/xml-support.h,v retrieving revision 1.1 diff -u -p -r1.1 xml-support.h --- xml-support.h 21 Sep 2006 13:54:03 -0000 1.1 +++ xml-support.h 5 Oct 2006 19:32:52 -0000 @@ -24,7 +24,7 @@ #ifndef XML_SUPPORT_H #define XML_SUPPORT_H -#include +#include "gdb_expat.h" /* Helper functions for parsing XML documents. See xml-support.c for more information about these functions. */