From eabb7ed19b82b23080566b97ed8920e540fdfbcb Mon Sep 17 00:00:00 2001 From: cantor Date: Wed, 30 Sep 2009 20:14:02 +0000 Subject: [PATCH] https://bugs.internet2.edu/jira/browse/CPPXT-37 git-svn-id: https://svn.middleware.georgetown.edu/cpp-xmltooling/branches/REL_1@656 de75baf8-a10c-0410-a50a-987c0e22f00f --- xmltooling/soap/impl/CURLSOAPTransport.cpp | 7 ++++++- xmltooling/util/CurlURLInputStream.cpp | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/xmltooling/soap/impl/CURLSOAPTransport.cpp b/xmltooling/soap/impl/CURLSOAPTransport.cpp index 0bd3715..ebf6f85 100644 --- a/xmltooling/soap/impl/CURLSOAPTransport.cpp +++ b/xmltooling/soap/impl/CURLSOAPTransport.cpp @@ -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 diff --git a/xmltooling/util/CurlURLInputStream.cpp b/xmltooling/util/CurlURLInputStream.cpp index 35fe364..f3b6dcd 100644 --- a/xmltooling/util/CurlURLInputStream.cpp +++ b/xmltooling/util/CurlURLInputStream.cpp @@ -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 -- 2.1.4