https://issues.shibboleth.net/jira/browse/CPPXT-37
authorScott Cantor <cantor.2@osu.edu>
Wed, 30 Sep 2009 20:14:02 +0000 (20:14 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 30 Sep 2009 20:14:02 +0000 (20:14 +0000)
xmltooling/soap/impl/CURLSOAPTransport.cpp
xmltooling/util/CurlURLInputStream.cpp

index 0bd3715..ebf6f85 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2007 Internet2
+ *  Copyright 2001-2009 Internet2
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -157,8 +157,13 @@ namespace xmltooling {
 #ifdef CURLOPTTYPE_OFF_T
             else if (opt < CURLOPTTYPE_OFF_T)
                 return (curl_easy_setopt(m_handle, opt, value) == CURLE_OK);
+# ifdef HAVE_CURL_OFF_T
             else if (sizeof(curl_off_t) == sizeof(long))
                 return (curl_easy_setopt(m_handle, opt, strtol(value, NULL, 10)) == CURLE_OK);
+# else
+            else if (sizeof(off_t) == sizeof(long))
+                return (curl_easy_setopt(m_handle, opt, strtol(value, NULL, 10)) == CURLE_OK);
+# endif
             return false;
 #else
             else
index 35fe364..f3b6dcd 100644 (file)
@@ -202,8 +202,13 @@ void CurlURLInputStream::init(const DOMElement* e)
 #ifdef CURLOPTTYPE_OFF_T
                     else if (opt < CURLOPTTYPE_OFF_T)
                         success = (curl_easy_setopt(fEasy, opt, value.get()) == CURLE_OK);
+# ifdef HAVE_CURL_OFF_T
                     else if (sizeof(curl_off_t) == sizeof(long))
                         success = (curl_easy_setopt(fEasy, opt, strtol(value.get(), NULL, 10)) == CURLE_OK);
+# else
+                    else if (sizeof(off_t) == sizeof(long))
+                        success = (curl_easy_setopt(fEasy, opt, strtol(value.get(), NULL, 10)) == CURLE_OK);
+# endif
                     else
                         success = false;
 #else