[Easysoap-developers] PATCH: fix build with a recent toolchain
Status: Beta
Brought to you by:
dcrowley
From: Bernardo I. <be...@de...> - 2003-05-29 16:45:44
|
Hello, this patch applies to EasySoap-0.6.1 and fixes some build problems with recent Linux distros (I use gcc 3.2.3 on a RedHat 9 look-alike system). Some configure tests were failing until I've regenerated the autoconf infrastructure from scratch with my newer auto-tools versions. Instead of providing updated versions of configure and other autogenerated files, I've included a short autogen.sh script in my patch to help other people making it themself. Within the next few days, we'll start porting EasySoap to a Coldfire-based embedded system running uClinux. If you are interested in our changes, I could provide them as patches. diff -Nur EasySoap++-0.6.1/autogen.sh EasySoap++-0.6.1-bernie/autogen.sh --- EasySoap++-0.6.1/autogen.sh 1970-01-01 01:00:00.000000000 +0100 +++ EasySoap++-0.6.1-bernie/autogen.sh 2003-05-28 16:54:15.000000000 +0200 @@ -0,0 +1,4 @@ +aclocal +autoheader +autoconf +automake --foreign --add-missing --force diff -Nur EasySoap++-0.6.1/include/easysoap/SOAPDispatchHandler.h EasySoap++-0.6.1-bernie/include/easysoap/SOAPDispatchHandler.h --- EasySoap++-0.6.1/include/easysoap/SOAPDispatchHandler.h 2002-05-20 18:56:11.000000000 +0200 +++ EasySoap++-0.6.1-bernie/include/easysoap/SOAPDispatchHandler.h 2003-05-28 16:37:35.000000000 +0200 @@ -61,7 +61,7 @@ bool ExecuteMethod(const SOAPEnvelope& request, SOAPMethod& response) { const SOAPMethod& method = request.GetBody().GetMethod(); - DispatchMap::Iterator i = m_dispatchMap.Find(method.GetName()); + MEMBER_TYPE(DispatchMap::Iterator) i = m_dispatchMap.Find(method.GetName()); if (i) { T *target= GetTarget(request); @@ -109,7 +109,7 @@ bool HandleHeader(const SOAPParameter& header, SOAPEnvelope& request, SOAPEnvelope& response) { - DispatchMap::Iterator i = m_dispatchMap.Find(header.GetName()); + MEMBER_TYPE(DispatchMap::Iterator) i = m_dispatchMap.Find(header.GetName()); if (i) { diff -Nur EasySoap++-0.6.1/include/easysoap/SOAPHashMap.h EasySoap++-0.6.1-bernie/include/easysoap/SOAPHashMap.h --- EasySoap++-0.6.1/include/easysoap/SOAPHashMap.h 2002-04-10 09:03:41.000000000 +0200 +++ EasySoap++-0.6.1-bernie/include/easysoap/SOAPHashMap.h 2003-05-29 17:36:44.000000000 +0200 @@ -117,13 +117,13 @@ { private: const SOAPHashMap *m_map; - Elements::Iterator m_index; + MEMBER_TYPE(Elements::Iterator) m_index; HashElement *m_he; friend class SOAPHashMap<K,I,H,E>; // private constuctor that can only be called by SOAPHashMap - ForwardHashMapIterator(const SOAPHashMap *map, Elements::Iterator index) + ForwardHashMapIterator(const SOAPHashMap *map, MEMBER_TYPE(Elements::Iterator) index) : m_map(map), m_index(index), m_he(0) { if (m_map) @@ -134,7 +134,7 @@ } } - ForwardHashMapIterator(const SOAPHashMap *map, Elements::Iterator index, HashElement *he) + ForwardHashMapIterator(const SOAPHashMap *map, MEMBER_TYPE(Elements::Iterator) index, HashElement *he) : m_map(map), m_index(index), m_he(he) { } @@ -366,8 +366,8 @@ { Clear(); Resize(r.GetNumBuckets()); - SOAPHashMap<A,B,C,D>::Iterator e = r.End(); - for (SOAPHashMap<A,B,C,D>::Iterator it = r.Begin(); it != e; ++it) + typename SOAPHashMap<A,B,C,D>::Iterator e = r.End(); + for (typename SOAPHashMap<A,B,C,D>::Iterator it = r.Begin(); it != e; ++it) Add(it.Key(), it.Item()); } return *this; @@ -397,7 +397,7 @@ */ Iterator Begin() const { - return Iterator(this, (Elements::Iterator)m_elements.Begin()); + return Iterator(this, (MEMBER_TYPE(Elements::Iterator))m_elements.Begin()); } /** @@ -407,7 +407,7 @@ */ Iterator End() const { - return Iterator(this, (Elements::Iterator)m_elements.End()); + return Iterator(this, (MEMBER_TYPE(Elements::Iterator))m_elements.End()); } @@ -491,7 +491,7 @@ */ void Clear() { - for (Elements::Iterator i = m_elements.Begin(); i != m_elements.End(); ++i) + for (MEMBER_TYPE(Elements::Iterator) i = m_elements.Begin(); i != m_elements.End(); ++i) { HashElement *he = *i; while (he) @@ -512,7 +512,7 @@ */ void Empty() { - Elements::Iterator i; + MEMBER_TYPE(Elements::Iterator) i; for (i = m_elements.Begin(); i != m_elements.End(); ++i) { HashElement *he = *i; @@ -588,7 +588,7 @@ while (he) { if (he->m_hash == hash && equals(he->m_key, key)) - return Iterator(this, (Elements::Iterator)m_elements.Begin() + index, he); + return Iterator(this, (MEMBER_TYPE(Elements::Iterator))m_elements.Begin() + index, he); he = he->m_next; } } @@ -603,7 +603,7 @@ Elements newelements; newelements.Resize(newsize); - Elements::Iterator i; + MEMBER_TYPE(Elements::Iterator) i; for (i = newelements.Begin(); i != newelements.End(); ++i) *i = 0; diff -Nur EasySoap++-0.6.1/include/easysoap/SOAPParameter.h EasySoap++-0.6.1-bernie/include/easysoap/SOAPParameter.h --- EasySoap++-0.6.1/include/easysoap/SOAPParameter.h 2002-05-31 02:50:50.000000000 +0200 +++ EasySoap++-0.6.1-bernie/include/easysoap/SOAPParameter.h 2003-05-28 16:21:44.000000000 +0200 @@ -168,7 +168,7 @@ Data(const Data&); }; - friend Data; + friend class Data; Pool m_pool; SOAPParameter *m_parent; diff -Nur EasySoap++-0.6.1/src/Makefile.am EasySoap++-0.6.1-bernie/src/Makefile.am --- EasySoap++-0.6.1/src/Makefile.am 2002-06-11 16:49:41.000000000 +0200 +++ EasySoap++-0.6.1-bernie/src/Makefile.am 2003-05-28 16:29:32.000000000 +0200 @@ -1,5 +1,4 @@ lib_LTLIBRARIES = libeasysoap.la -lib_LIBRARIES = libeasysoap.a THESOURCES = \ SOAPBase64.cpp \ SOAPBody.cpp \ @@ -33,7 +32,6 @@ XMLParser.cpp libeasysoap_la_SOURCES = $(THESOURCES) -libeasysoap_a_SOURCES = $(THESOURCES) noinst_HEADERS = \ SOAPBodyHandler.h \ SOAPClientSocketImp.h \ @@ -45,7 +43,7 @@ SOAPStructHandler.h \ es_namespaces.h -INCLUDES=-I@top_srcdir@/include +INCLUDES=-I@top_srcdir@/include -I/usr/kerberos/include libeasysoap_la_LDFLAGS = -no-undefined -release "0.6.1" diff -Nur EasySoap++-0.6.1/src/XMLParser.cpp EasySoap++-0.6.1-bernie/src/XMLParser.cpp --- EasySoap++-0.6.1/src/XMLParser.cpp 2001-11-21 07:00:47.000000000 +0100 +++ EasySoap++-0.6.1-bernie/src/XMLParser.cpp 2003-05-28 21:13:02.000000000 +0200 @@ -48,7 +48,7 @@ { if (m_parser) { - XML_ParserFree(m_parser); + XML_ParserFree((XML_ParserStruct *)m_parser); m_parser = 0; } } @@ -58,27 +58,27 @@ { FreeParser(); m_parser = XML_ParserCreateNS(encoding, '#'); - XML_SetElementHandler(m_parser, + XML_SetElementHandler((XML_ParserStruct *)m_parser, XMLParser::_startElement, XMLParser::_endElement); - XML_SetCharacterDataHandler(m_parser, + XML_SetCharacterDataHandler((XML_ParserStruct *)m_parser, XMLParser::_characterData); - XML_SetStartNamespaceDeclHandler(m_parser, + XML_SetStartNamespaceDeclHandler((XML_ParserStruct *)m_parser, XMLParser::_startNamespace); - XML_SetEndNamespaceDeclHandler(m_parser, + XML_SetEndNamespaceDeclHandler((XML_ParserStruct *)m_parser, XMLParser::_endNamespace); - XML_SetUserData(m_parser, this); + XML_SetUserData((XML_ParserStruct *)m_parser, this); } void * XMLParser::GetParseBuffer(int size) { if (m_parser) - return XML_GetBuffer(m_parser, size); + return XML_GetBuffer((XML_ParserStruct *)m_parser, size); return 0; } @@ -86,7 +86,7 @@ XMLParser::ParseBuffer(int size) { if (m_parser) - return XML_ParseBuffer(m_parser, size, size == 0) != 0; + return XML_ParseBuffer((XML_ParserStruct *)m_parser, size, size == 0) != 0; return false; } @@ -94,7 +94,7 @@ XMLParser::GetErrorMessage() { if (m_parser) - return XML_ErrorString(XML_GetErrorCode(m_parser)); + return XML_ErrorString(XML_GetErrorCode((XML_ParserStruct *)m_parser)); return 0; } -- // Bernardo Innocenti - Develer S.r.l., R&D dept. \X/ http://www.develer.com/ Please don't send Word attachments. See: http://www.gnu.org/philosophy/no-word-attachments.html |