bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CommonC++-1.9.4 and gcc 3.x


From: Peter Simons
Subject: CommonC++-1.9.4 and gcc 3.x
Date: Thu, 14 Mar 2002 13:15:09 +0100

Hi,

when I tried to compile the 1.9.4 release of CommonC++ with gcc 3.0.4
on a Linux machine, I had to do the following changes to the build
process and the sources in order to succeed. You thus might want to
incorporate the following changes into the distribution:

The configure script did not recognize the type of the iostream
library correctly, hence I had to patch src/config.h manually:

diff -rub CommonC++-1.9.4/src/config.h CommonC++-1.9.4-new/src/config.h
--- CommonC++-1.9.4/src/config.h        Sat Jan  5 00:50:53 2002
+++ CommonC++-1.9.4-new/src/config.h    Thu Mar 14 10:59:57 2002
@@ -118,7 +118,7 @@
 #define HAVE_LOCALTIME_R 1
 #define HAVE_STRTOK_R 1
 #define HAVE_SETENV 1
-#define HAVE_OLD_IOSTREAM 1
+#undef HAVE_OLD_IOSTREAM

 /* Define if you have the getopt_long function.  */
 #define HAVE_GETOPT_LONG 1

Furthermore several references to the standard library were lacking
the std:: qualifier for the namespace:

diff -rub CommonC++-1.9.4/src/xml.cpp CommonC++-1.9.4-new/src/xml.cpp
--- CommonC++-1.9.4/src/xml.cpp Sat Jan  5 15:20:17 2002
+++ CommonC++-1.9.4-new/src/xml.cpp     Thu Mar 14 10:57:51 2002
@@ -173,14 +173,14 @@
 void XMLRPC::Invoke(const char *member)
 {
        buffer[0] = 0;
-       strbuf = new strstream(buffer, bufsize);
+       strbuf = new std::strstream(buffer, bufsize);
        structflag = reply = fault = false;
        array = 0;

-       *strbuf << "<?xml version=\"1.0\"?>" << endl;
-       *strbuf << "<methodCall>" << endl;
-       *strbuf << "<methodName>" << member << "</methodName>" << endl;
-       *strbuf << "<params>" << endl;
+       *strbuf << "<?xml version=\"1.0\"?>" << std::endl;
+       *strbuf << "<methodCall>" << std::endl;
+       *strbuf << "<methodName>" << member << "</methodName>" << std::endl;
+       *strbuf << "<params>" << std::endl;
 }

 void XMLRPC::Response(bool f)
@@ -190,14 +190,14 @@
        fault = f;
        array = 0;
        buffer[0] = 0;
-       strbuf = new strstream(buffer, bufsize);
+       strbuf = new std::strstream(buffer, bufsize);

-       *strbuf << "<?xml version=\"1.0\"?>" << endl;
-       *strbuf << "<methodResponse>" << endl;
+       *strbuf << "<?xml version=\"1.0\"?>" << std::endl;
+       *strbuf << "<methodResponse>" << std::endl;
        if(fault)
-               *strbuf << "<fault>" << endl;
+               *strbuf << "<fault>" << std::endl;
        else
-               *strbuf << "<params>" << endl;
+               *strbuf << "<params>" << std::endl;
 }

 void XMLRPC::addMember(const char *name, long value)
@@ -207,8 +207,8 @@

        begStruct();

-       *strbuf << "<member><name>" << name << "</name>" << endl;
-       *strbuf << "<value><i4>" << value << "</i4></value></member>" << endl;
+       *strbuf << "<member><name>" << name << "</name>" << std::endl;
+       *strbuf << "<value><i4>" << value << "</i4></value></member>" << 
std::endl;
 }

 void XMLRPC::addMember(const char *name, const char *value)
@@ -218,8 +218,8 @@

        begStruct();

-       *strbuf << "<member><name>" << name << "</name>" << endl;
-       *strbuf << "<value><i4>" << value << "</i4></value></member>" << endl;
+       *strbuf << "<member><name>" << name << "</name>" << std::endl;
+       *strbuf << "<value><i4>" << value << "</i4></value></member>" << 
std::endl;
 }


@@ -230,14 +230,14 @@

        begStruct();

-       *strbuf << "<member><name>" << name << "</name>" << endl;
+       *strbuf << "<member><name>" << name << "</name>" << std::endl;
        *strbuf << "<value><boolean>";
        if(value)
                *strbuf << "1";
        else
                *strbuf << "0";

-       *strbuf << "</boolean></value></member>" << endl;
+       *strbuf << "</boolean></value></member>" << std::endl;
 }

 void XMLRPC::addParam(bool value)
@@ -260,7 +260,7 @@
        if(!fault && !array)
                *strbuf << "</param>";

-       *strbuf << endl;
+       *strbuf << std::endl;
 }

 void XMLRPC::addParam(long value)
@@ -278,7 +278,7 @@
        if(!fault && !array)
                *strbuf << "</param>";

-       *strbuf << endl;
+       *strbuf << std::endl;
 }

 void XMLRPC::addParam(const char *value)
@@ -289,14 +289,14 @@
        endStruct();

        if(!fault && !array)
-               *strbuf << "<param>" << endl;
+               *strbuf << "<param>" << std::endl;

        *strbuf << "<value><string>" << value << "</string></value>";

        if(!fault && !array)
                *strbuf << "</param>";

-       *strbuf << endl;
+       *strbuf << std::endl;
 }

 void XMLRPC::begArray(void)
@@ -307,7 +307,7 @@
        if(!fault && !array)
                *strbuf << "<param>";

-       *strbuf << "<array><data>" << endl;
+       *strbuf << "<array><data>" << std::endl;
 }

 void XMLRPC::endArray(void)
@@ -320,7 +320,7 @@
        if(!--array && !fault)
                *strbuf << "</param>";

-       *strbuf << endl;
+       *strbuf << std::endl;
 }

 void XMLRPC::begStruct(void)
@@ -333,7 +333,7 @@
        if(!fault && !array)
                *strbuf << "<param>";

-       *strbuf << "<struct><value>" << endl;
+       *strbuf << "<struct><value>" << std::endl;
 }

 void XMLRPC::endStruct(void)
@@ -345,7 +345,7 @@

        if(!fault && !array)
                *strbuf << "</param>";
-       *strbuf << endl;
+       *strbuf << std::endl;
        structflag = false;
 }

@@ -357,16 +357,16 @@
        endStruct();
        while(array)
        {
-               *strbuf << "</data></array>" << endl;
+               *strbuf << "</data></array>" << std::endl;
                --array;
        }
        if(!fault)
-               *strbuf << "</params>" << endl;
+               *strbuf << "</params>" << std::endl;

        if(reply)
-               *strbuf << "</methodResponse>" << endl << ends;
+               *strbuf << "</methodResponse>" << std::endl << std::ends;
        else
-               *strbuf << "</methodCall>" << endl << ends;
+               *strbuf << "</methodCall>" << std::endl << std::ends;

        delete strbuf;
        strbuf = NULL;
diff -rub CommonC++-1.9.4/src/xml.h CommonC++-1.9.4-new/src/xml.h
--- CommonC++-1.9.4/src/xml.h   Sat Jan  5 15:28:43 2002
+++ CommonC++-1.9.4-new/src/xml.h       Thu Mar 14 10:56:31 2002
@@ -173,7 +173,7 @@
 {
 private:
        char *buffer;
-       strstream *strbuf;
+       std::strstream *strbuf;
        size_t bufsize;
        bool structflag;
        bool reply, fault;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]