]> git.pld-linux.org Git - packages/enigma.git/blob - enigma-xerces.patch
- fix build issues with xerces-c 3.1
[packages/enigma.git] / enigma-xerces.patch
1 --- enigma-1.01/configure.ac~   2007-05-25 23:28:44.000000000 +0200
2 +++ enigma-1.01/configure.ac    2010-11-24 00:07:13.166423002 +0100
3 @@ -179,7 +179,7 @@
4        xerces3exp="no")      
5    if test "x$xerces3exp" = xyes; then
6      AC_MSG_RESULT([found])
7 -    AC_CHECK_LIB(xerces, main,,[AC_MSG_ERROR([xerces is required to compile Enigma])])
8 +    AC_CHECK_LIB(xerces-c, main,,[AC_MSG_ERROR([xerces is required to compile Enigma])])
9    else
10      AC_MSG_RESULT([not found])
11      AC_MSG_CHECKING([for Xerces >=2.4 released version])
12 --- enigma-1.01/src/Utf8ToXML.cc~       2010-11-24 00:08:40.166982997 +0100
13 +++ enigma-1.01/src/Utf8ToXML.cc        2010-11-24 00:17:40.325982996 +0100
14 @@ -40,11 +40,11 @@
15      }
16  
17      void Utf8ToXML::init(const char * const toTranscode) {
18 -        unsigned int srcLength = std::strlen(toTranscode) + 1;
19 +        XMLSize_t srcLength = std::strlen(toTranscode) + 1;
20          // make safe assumptions on utf-16 size
21 -        unsigned int maxDestLength = srcLength;
22 -        unsigned int charsEaten;
23 -        unsigned int destLength;
24 +        XMLSize_t maxDestLength = srcLength;
25 +        XMLSize_t charsEaten;
26 +        XMLSize_t destLength;
27          unsigned char *charSizes = new unsigned char[maxDestLength]; // just junk
28          // make a buffer - size does not matter - the object is temporary 
29          xmlString = new XMLCh[maxDestLength];
30 --- enigma-1.01/src/XMLtoUtf8.cc~       2006-01-20 12:12:12.000000000 +0100
31 +++ enigma-1.01/src/XMLtoUtf8.cc        2010-11-24 00:20:37.279982998 +0100
32 @@ -27,11 +27,11 @@
33  namespace enigma
34  {
35      XMLtoUtf8::XMLtoUtf8(const XMLCh* const toTranscode) {
36 -        unsigned int srcLength = XMLString::stringLen(toTranscode) + 1;
37 +        XMLSize_t srcLength = XMLString::stringLen(toTranscode) + 1;
38          // make safe assumptions on utf-8 size
39 -        unsigned int maxDestLength = 3 * srcLength;
40 -        unsigned int charsEaten;
41 -        unsigned int destLength;
42 +        XMLSize_t maxDestLength = 3 * srcLength;
43 +        XMLSize_t charsEaten;
44 +        XMLSize_t destLength;
45          // make a buffer - size does not matter - the object is temporary 
46          utf8String = new char[maxDestLength];
47          // transcode to utf-8 -- there are no unrepresentable chars
48 --- enigma-1.01/src/lev/ScoreManager.cc.orig    2007-04-10 23:52:50.000000000 +0200
49 +++ enigma-1.01/src/lev/ScoreManager.cc 2010-11-24 00:31:38.370982993 +0100
50 @@ -61,18 +61,20 @@
51  namespace {
52  #if _XERCES_VERSION >= 30000
53      class ScoreDomSerFilter : public DOMLSSerializerFilter {
54 +       public:
55 +           virtual DOMNodeFilter::FilterAction acceptNode(const DOMNode *node) const;
56  #else
57      class ScoreDomSerFilter : public DOMWriterFilter {
58 -#endif
59          public:
60              virtual short acceptNode(const DOMNode *node) const;
61 +#endif
62              virtual unsigned long getWhatToShow () const {
63                  return DOMNodeFilter::SHOW_ALL;
64              }
65              virtual void setWhatToShow (unsigned long toShow) {}
66      };
67 -    
68 -    short ScoreDomSerFilter::acceptNode(const DOMNode *node) const {
69 +   
70 +    DOMNodeFilter::FilterAction ScoreDomSerFilter::acceptNode(const DOMNode *node) const {
71          if (node->getNodeType () == DOMNode::ELEMENT_NODE &&
72                   std::string(XMLtoUtf8(node->getNodeName()).c_str()) == "level") {
73              const DOMElement *e = dynamic_cast<const DOMElement *>(node);
This page took 0.057713 seconds and 4 git commands to generate.