This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Compilation error, expat version too old.
- From: Denis PILAT <denis dot pilat at st dot com>
- To: Daniel Jacobowitz <drow at false dot org>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Tue, 13 Feb 2007 10:52:35 +0100
- Subject: Re: Compilation error, expat version too old.
- References: <45D03D17.1070907@st.com> <20070212151109.GA1336@caradoc.them.org> <45D089E5.8040900@st.com> <20070212205100.GA28635@caradoc.them.org>
Daniel Jacobowitz wrote:
On Mon, Feb 12, 2007 at 04:38:13PM +0100, Denis PILAT wrote:
Daniel Jacobowitz wrote:
On Mon, Feb 12, 2007 at 11:10:31AM +0100, Denis PILAT wrote:
Hello,
I am facing compilation error with xml-support.c, it comes from the
expat version I have, it should be too old to define XMLCALL I guess.
Bellow is the the error.
What version of expat is it? We should either update the configure
check to reject it, or provide a fallback definition of XMLCALL.
I have "expat-1.95.5-6".
(I know it's a prehistoric version, but I guess I'm not the only one
working in the 20ieth century ...;-)
Yep:
Release 1.95.7 Mon Oct 20 2003
- Introduced an XMLCALL macro to control the calling
convention used by the Expat API; this macro should be used
to annotate prototypes and definitions of callback
implementations in code compiled with a calling convention
other than the default convention for the host platform.
We could provide a default definition of XMLCALL in gdb_expat.h,
to empty. Does that work?
Yes it works with that.
Here is the proposed patch
--
Denis
2007-02-13 Denis Pilat <denis.pilat@st.com>
* gdb_expat.h (XMLCALL): Defined.
Index: gdb_expat.h
===================================================================
RCS file: /cvs/src/src/gdb/gdb_expat.h,v
retrieving revision 1.2
diff -u -p -r1.2 gdb_expat.h
--- gdb_expat.h 9 Jan 2007 17:58:50 -0000 1.2
+++ gdb_expat.h 13 Feb 2007 09:47:21 -0000
@@ -31,4 +31,10 @@
# define XML_STATUS_ERROR 0
#endif
+/* Provide an empty definition of XMLCALL since it is defined only from
+ version 1.95.7 of Expat. */
+#ifndef XMLCALL
+# define XMLCALL
+#endif
+
#endif /* !defined(GDB_EXPAT_H) */