mirror of
https://github.com/curl/curl.git
synced 2026-08-25 12:23:44 +03:00
Fixed some compile warnings and errors and improved portability in the
examples. Removed ftp3rdparty.c since libcurl doesn't support 3rd party FTP transfers any longer.
This commit is contained in:
parent
4a728747e6
commit
49ce3e5160
24 changed files with 78 additions and 169 deletions
|
|
@ -31,14 +31,13 @@ int main(int argc, char **argv)
|
|||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
FILE *ftpfile;
|
||||
FILE * hd_src ;
|
||||
int hd ;
|
||||
struct stat file_info;
|
||||
|
||||
struct curl_slist *headerlist=NULL;
|
||||
char buf_1 [] = "RNFR " UPLOAD_FILE_AS;
|
||||
char buf_2 [] = "RNTO " RENAME_FILE_TO;
|
||||
static const char buf_1 [] = "RNFR " UPLOAD_FILE_AS;
|
||||
static const char buf_2 [] = "RNTO " RENAME_FILE_TO;
|
||||
|
||||
/* get the file size of the local file */
|
||||
hd = open(LOCAL_FILE, O_RDONLY) ;
|
||||
|
|
@ -61,7 +60,7 @@ int main(int argc, char **argv)
|
|||
headerlist = curl_slist_append(headerlist, buf_2);
|
||||
|
||||
/* enable uploading */
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, TRUE) ;
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1) ;
|
||||
|
||||
/* specify target */
|
||||
curl_easy_setopt(curl,CURLOPT_URL, REMOTE_URL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue