[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 255/282: seek: fix fallback for missing ftruncate on Windows
From: |
gnunet |
Subject: |
[gnurl] 255/282: seek: fix fallback for missing ftruncate on Windows |
Date: |
Wed, 01 Apr 2020 14:32:00 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit a39e5bfb9688f3eaab14272ba81ba78f7794f0d3
Author: Marc Hoersken <address@hidden>
AuthorDate: Sat Mar 7 10:59:27 2020 +0100
seek: fix fallback for missing ftruncate on Windows
This fixes test 198 on versions of MinGW-w64 without ftruncate
Reviewed-By: Daniel Stenberg
Reviewed-By: Marcel Raad
Closes #5055
---
appveyor.yml | 2 +-
src/tool_cb_see.c | 4 ++--
src/tool_cb_see.h | 9 ++++-----
3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/appveyor.yml b/appveyor.yml
index 9b4ad5cf5..25361a0b6 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -81,7 +81,7 @@ environment:
HTTP_ONLY: OFF
TESTING: ON
SHARED: OFF
- DISABLED_TESTS: "!198 !1139"
+ DISABLED_TESTS: "!1139"
COMPILER_PATH:
"C:\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin"
MSYS2_ARG_CONV_EXCL: "/*"
BUILD_OPT: -k
diff --git a/src/tool_cb_see.c b/src/tool_cb_see.c
index 99be273d1..a0ddc00ed 100644
--- a/src/tool_cb_see.c
+++ b/src/tool_cb_see.c
@@ -88,7 +88,7 @@ int tool_seek_cb(void *userdata, curl_off_t offset, int
whence)
return CURL_SEEKFUNC_OK;
}
-#if defined(WIN32) && !defined(__MINGW64__)
+#ifdef USE_TOOL_FTRUNCATE
#ifdef __BORLANDC__
/* 64-bit lseek-like function unavailable */
@@ -129,4 +129,4 @@ int tool_ftruncate64(int fd, curl_off_t where)
return 0;
}
-#endif /* WIN32 && ! __MINGW64__ */
+#endif /* USE_TOOL_FTRUNCATE */
diff --git a/src/tool_cb_see.h b/src/tool_cb_see.h
index fed8bbf8d..18ab02be4 100644
--- a/src/tool_cb_see.h
+++ b/src/tool_cb_see.h
@@ -23,18 +23,17 @@
***************************************************************************/
#include "tool_setup.h"
-#if defined(WIN32) && !defined(__MINGW64__)
+#if defined(WIN32) && !defined(HAVE_FTRUNCATE)
int tool_ftruncate64(int fd, curl_off_t where);
#undef ftruncate
#define ftruncate(fd,where) tool_ftruncate64(fd,where)
-#ifndef HAVE_FTRUNCATE
-# define HAVE_FTRUNCATE 1
-#endif
+#define HAVE_FTRUNCATE 1
+#define USE_TOOL_FTRUNCATE 1
-#endif /* WIN32 && ! __MINGW64__ */
+#endif /* WIN32 && ! HAVE_FTRUNCATE */
/*
** callback for CURLOPT_SEEKFUNCTION
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 250/282: pause: bail out on bad input, (continued)
- [gnurl] 250/282: pause: bail out on bad input, gnunet, 2020/04/01
- [gnurl] 247/282: curl_share_setopt.3: Note sharing cookies doesn't enable the engine, gnunet, 2020/04/01
- [gnurl] 257/282: perl: align order and completeness of Windows OS checks, gnunet, 2020/04/01
- [gnurl] 258/282: tests: use native Sleep function as fallback on Windows, gnunet, 2020/04/01
- [gnurl] 259/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 234/282: cirrus-ci: disable the FreeBSD 13 builds, gnunet, 2020/04/01
- [gnurl] 243/282: Revert "pause: force-drain the transfer on unpause", gnunet, 2020/04/01
- [gnurl] 240/282: KNOWN_BUGS: configure --with-gssapi with Heimdal is ignored on macOS, gnunet, 2020/04/01
- [gnurl] 252/282: socks5: switch state properly when the resolve is done, gnunet, 2020/04/01
- [gnurl] 238/282: tests: wrap ignored test failures in braces, gnunet, 2020/04/01
- [gnurl] 255/282: seek: fix fallback for missing ftruncate on Windows,
gnunet <=
- [gnurl] 251/282: libssh: Fix matching user-specified MD5 hex key, gnunet, 2020/04/01
- [gnurl] 256/282: tool_cb_see: set correct copyright year range, gnunet, 2020/04/01
- [gnurl] 254/282: config-win32: Windows does not have ftruncate, gnunet, 2020/04/01
- [gnurl] 262/282: runtests: fix missing use of exe_ext helper function, gnunet, 2020/04/01
- [gnurl] 261/282: ares: store dns parameters for duphandle, gnunet, 2020/04/01
- [gnurl] 266/282: lib1564: reduce number of mid-wait wakeup calls, gnunet, 2020/04/01
- [gnurl] 260/282: version: make curl_version* thread-safe without using global context, gnunet, 2020/04/01
- [gnurl] 269/282: test 1560: avoid valgrind false positives, gnunet, 2020/04/01
- [gnurl] 271/282: silly web server: silent a compilation warning, gnunet, 2020/04/01
- [gnurl] 272/282: socks4: fix host resolve regression, gnunet, 2020/04/01