Mercurial > octave-nkf
comparison src/DLD-FUNCTIONS/urlwrite.cc @ 14424:c267a3522d6c
Fix compilation for old versions of cURL library (bug #35649)
* urlwrite.cc: Fix compilation for old versions of cURL library (bug #35649)
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Wed, 29 Feb 2012 23:07:18 -0800 |
parents | 97883071e8e4 |
children | 460a3c6d8bf1 |
comparison
equal
deleted
inserted
replaced
14423:62cb605af1af | 14424:c267a3522d6c |
---|---|
52 #ifdef HAVE_CURL | 52 #ifdef HAVE_CURL |
53 | 53 |
54 #include <curl/curl.h> | 54 #include <curl/curl.h> |
55 #include <curl/curlver.h> | 55 #include <curl/curlver.h> |
56 #include <curl/easy.h> | 56 #include <curl/easy.h> |
57 | |
58 // Backwards compatibility for curl < 7.17.0 | |
59 #if LIBCURL_VERSION_NUM < 0x071100 | |
60 #define CURLOPT_DIRLISTONLY CURLOPT_FTPLISTONLY | |
61 #endif | |
57 | 62 |
58 static int | 63 static int |
59 write_data (void *buffer, size_t size, size_t nmemb, void *streamp) | 64 write_data (void *buffer, size_t size, size_t nmemb, void *streamp) |
60 { | 65 { |
61 std::ostream& stream = *(static_cast<std::ostream*> (streamp)); | 66 std::ostream& stream = *(static_cast<std::ostream*> (streamp)); |