[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 63/178: examples/sftpuploadresmue: Fix Windows larg
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 63/178: examples/sftpuploadresmue: Fix Windows large file seek |
Date: |
Wed, 23 May 2018 12:24:58 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 817d1c01064ac81e9609819b15738ee540ef056c
Author: Jay Satiro <address@hidden>
AuthorDate: Sat Apr 7 16:03:55 2018 -0400
examples/sftpuploadresmue: Fix Windows large file seek
- Use _fseeki64 instead of fseek (long) to seek curl_off_t in Windows.
- Use CURL_FORMAT_CURL_OFF_T specifier instead of %ld to print
curl_off_t.
Caught by Marc's CI builds.
---
docs/examples/sftpuploadresume.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/docs/examples/sftpuploadresume.c b/docs/examples/sftpuploadresume.c
index 032bcaffb..3fcab71fb 100644
--- a/docs/examples/sftpuploadresume.c
+++ b/docs/examples/sftpuploadresume.c
@@ -65,7 +65,7 @@ static curl_off_t sftpGetRemoteFileSize(const char
*i_remoteFile)
result = curl_easy_getinfo(curlHandlePtr,
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
&remoteFileSizeByte);
- printf("filesize: %ld \n", remoteFileSizeByte);
+ printf("filesize: %" CURL_FORMAT_CURL_OFF_T "\n", remoteFileSizeByte);
}
curl_easy_cleanup(curlHandlePtr);
@@ -96,7 +96,11 @@ static int sftpResumeUpload(CURL *curlhandle, const char
*remotepath,
curl_easy_setopt(curlhandle, CURLOPT_READFUNCTION, readfunc);
curl_easy_setopt(curlhandle, CURLOPT_READDATA, f);
+#ifdef _WIN32
+ _fseeki64(f, remoteFileSizeByte, SEEK_SET);
+#else
fseek(f, remoteFileSizeByte, SEEK_SET);
+#endif
curl_easy_setopt(curlhandle, CURLOPT_APPEND, 1L);
result = curl_easy_perform(curlhandle);
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 86/178: winbuild: Support custom devel paths for each dependency, (continued)
- [GNUnet-SVN] [gnurl] 86/178: winbuild: Support custom devel paths for each dependency, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 100/178: Revert "ftplistparser: keep state between invokes", gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 103/178: curl.1: clarify that options and URLs can be mixed, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 119/178: RELEASE-NOTES: synced, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 114/178: ctype: restore character classification for non-ASCII platforms, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 115/178: mime: avoid NULL pointer dereference risk, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 129/178: TODO: Support the clienthello extension, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 131/178: KNOWN_BUGS: Connection information when using TCP Fast Open, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 136/178: wolfssl: Fix non-blocking connect, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 76/178: checksrc: Fix typo, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 63/178: examples/sftpuploadresmue: Fix Windows large file seek,
gnunet <=
- [GNUnet-SVN] [gnurl] 71/178: travis: build libpsl and make builds use it, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 78/178: vauth: Fix typo, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 81/178: urldata: make service names unconditional, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 67/178: winbuild: fix URL, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 72/178: proxy: show getenv proxy use in verbose output, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 87/178: RELEASE-NOTES: synced, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 91/178: http2: handle on_begin_headers() called more than once, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 120/178: configure: provide --with-wolfssl as an alias for --with-cyassl, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 75/178: all: Refactor malloc+memset to use calloc, gnunet, 2018/05/23
- [GNUnet-SVN] [gnurl] 83/178: ntlm_sspi: fix authentication using Credential Manager, gnunet, 2018/05/23