Hi there,

Attached is a patch to fix a number of compilation errors and warnings
in 0.7.2.

Regards,

Bob

-- 
Bob Ham <[EMAIL PROTECTED]>
diff -dur curlpp-0.7.2.orig/curlpp/CurlHandle.cpp curlpp-0.7.2/curlpp/CurlHandle.cpp
--- curlpp-0.7.2.orig/curlpp/CurlHandle.cpp	2008-02-03 20:24:14.000000000 +0000
+++ curlpp-0.7.2/curlpp/CurlHandle.cpp	2008-11-09 22:54:54.000000000 +0000
@@ -23,6 +23,7 @@
 
 #include <string>
 #include <iostream>
+#include <string.h>
 
 #include "global.h"
 #include "CurlHandle.hpp"
diff -dur curlpp-0.7.2.orig/curlpp/cURLpp.cpp curlpp-0.7.2/curlpp/cURLpp.cpp
--- curlpp-0.7.2.orig/curlpp/cURLpp.cpp	2007-01-14 00:43:26.000000000 +0000
+++ curlpp-0.7.2/curlpp/cURLpp.cpp	2008-11-09 22:54:38.000000000 +0000
@@ -1,3 +1,5 @@
+#include <stdlib.h>
+
 #include "global.h"
 #include "cURLpp.hpp"
 #include "Exception.hpp"
diff -dur curlpp-0.7.2.orig/examples/example02.cpp curlpp-0.7.2/examples/example02.cpp
--- curlpp-0.7.2.orig/examples/example02.cpp	2007-01-14 00:43:26.000000000 +0000
+++ curlpp-0.7.2/examples/example02.cpp	2008-11-09 22:55:17.000000000 +0000
@@ -23,6 +23,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 
 #include <curlpp/cURLpp.hpp>
 #include <curlpp/Easy.hpp>
diff -dur curlpp-0.7.2.orig/examples/example05.cpp curlpp-0.7.2/examples/example05.cpp
--- curlpp-0.7.2.orig/examples/example05.cpp	2007-01-14 00:43:26.000000000 +0000
+++ curlpp-0.7.2/examples/example05.cpp	2008-11-09 22:55:46.000000000 +0000
@@ -22,6 +22,7 @@
  */
 
 #include <stdlib.h>
+#include <string.h>
 
 #include <curlpp/cURLpp.hpp>
 #include <curlpp/Easy.hpp>
diff -dur curlpp-0.7.2.orig/examples/example06.cpp curlpp-0.7.2/examples/example06.cpp
--- curlpp-0.7.2.orig/examples/example06.cpp	2007-01-14 00:43:26.000000000 +0000
+++ curlpp-0.7.2/examples/example06.cpp	2008-11-09 22:55:32.000000000 +0000
@@ -22,6 +22,7 @@
  */
 
 #include <stdlib.h>
+#include <string.h>
 
 #include <curlpp/cURLpp.hpp>
 #include <curlpp/Easy.hpp>
diff -dur curlpp-0.7.2.orig/examples/example10.cpp curlpp-0.7.2/examples/example10.cpp
--- curlpp-0.7.2.orig/examples/example10.cpp	2007-01-14 00:43:26.000000000 +0000
+++ curlpp-0.7.2/examples/example10.cpp	2008-11-09 22:56:05.000000000 +0000
@@ -23,6 +23,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 
 #include <curlpp/cURLpp.hpp>
 #include <curlpp/Easy.hpp>
diff -dur curlpp-0.7.2.orig/examples/example11.cpp curlpp-0.7.2/examples/example11.cpp
--- curlpp-0.7.2.orig/examples/example11.cpp	2007-01-14 00:43:26.000000000 +0000
+++ curlpp-0.7.2/examples/example11.cpp	2008-11-09 22:56:21.000000000 +0000
@@ -23,6 +23,7 @@
 
 #include <stdlib.h>
 #include <errno.h>
+#include <string.h>
 
 #include <curlpp/cURLpp.hpp>
 #include <curlpp/Easy.hpp>
diff -dur curlpp-0.7.2.orig/examples/example13.cpp curlpp-0.7.2/examples/example13.cpp
--- curlpp-0.7.2.orig/examples/example13.cpp	2007-01-14 00:43:26.000000000 +0000
+++ curlpp-0.7.2/examples/example13.cpp	2008-11-09 22:56:47.000000000 +0000
@@ -23,6 +23,8 @@
 
 #include <iostream>
 
+#include <stdlib.h>
+
 #include <curlpp/cURLpp.hpp>
 #include <curlpp/Easy.hpp>
 #include <curlpp/Multi.hpp>
@@ -59,7 +61,7 @@
     requests.add(&request2);
     
     /* we start some action by calling perform right away */
-    while(!requests.perform(&nbLeft));
+    while(!requests.perform(&nbLeft)) ;
     
     while(nbLeft) {
       struct timeval timeout;
@@ -92,7 +94,7 @@
       case 0:
       default:
 	/* timeout or readable/writable sockets */
-	while(!requests.perform(&nbLeft));
+	while(!requests.perform(&nbLeft)) ;
 	break;
       }
     }
diff -dur curlpp-0.7.2.orig/examples/example14.cpp curlpp-0.7.2/examples/example14.cpp
--- curlpp-0.7.2.orig/examples/example14.cpp	2007-01-14 00:43:26.000000000 +0000
+++ curlpp-0.7.2/examples/example14.cpp	2008-11-09 22:57:19.000000000 +0000
@@ -23,6 +23,8 @@
 
 #include <iostream>
 
+#include <stdlib.h>
+
 #include <curlpp/cURLpp.hpp>
 #include <curlpp/Easy.hpp>
 #include <curlpp/Multi.hpp>
@@ -59,7 +61,7 @@
     requests.add(&request2);
     
     /* we start some action by calling perform right away */
-    while(!requests.perform(&nbLeft));
+    while(!requests.perform(&nbLeft)) ;
     
     while(nbLeft) {
       struct timeval timeout;
@@ -94,7 +96,7 @@
       default:
 	/* one or more of curl's file descriptors say there's data to read
 	   or write */
-	while(!requests.perform(&nbLeft));
+	while(!requests.perform(&nbLeft)) ;
 	break;
       }
     }
diff -dur curlpp-0.7.2.orig/examples/example18.cpp curlpp-0.7.2/examples/example18.cpp
--- curlpp-0.7.2.orig/examples/example18.cpp	2007-01-22 00:22:19.000000000 +0000
+++ curlpp-0.7.2/examples/example18.cpp	2008-11-09 23:02:43.000000000 +0000
@@ -82,8 +82,10 @@
 
     // Set the writer callback to enable cURL 
     // to write result in a memory area
+#ifdef HAVE_BOOST
     cURLpp::Options::BoostWriteFunction *test = new cURLpp::Options::BoostWriteFunction(boost::bind(&MethodClass::write, &mObject, &request, _1, _2, _3));
     request.setOpt(test);
+#endif /* HAVE_BOOST */
     
     // Setting the URL to retrive.
     request.setOpt(new cURLpp::Options::Url(url));
diff -dur curlpp-0.7.2.orig/examples/example21.cpp curlpp-0.7.2/examples/example21.cpp
--- curlpp-0.7.2.orig/examples/example21.cpp	2007-09-25 03:22:17.000000000 +0100
+++ curlpp-0.7.2/examples/example21.cpp	2008-11-09 22:57:26.000000000 +0000
@@ -25,6 +25,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <string.h>
 
 #include <curlpp/cURLpp.hpp>
 #include <curlpp/Easy.hpp>
diff -dur curlpp-0.7.2.orig/utilspp/singleton/LifetimeWithLongevity.inl curlpp-0.7.2/utilspp/singleton/LifetimeWithLongevity.inl
--- curlpp-0.7.2.orig/utilspp/singleton/LifetimeWithLongevity.inl	2007-01-14 00:43:26.000000000 +0000
+++ curlpp-0.7.2/utilspp/singleton/LifetimeWithLongevity.inl	2008-11-09 22:53:56.000000000 +0000
@@ -1,3 +1,5 @@
+#include <algorithm>
+
 template< typename T, typename TDestroyer >
 void
 utilspp::setLongevity( T *obj, unsigned int longevity, TDestroyer d )

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
cURLpp mailing list
[email protected]
http://www.rrette.com/mailman/listinfo/curlpp

Reply via email to