Workaround for "Failure writing output to destination" error on Windows XP.
This commit is contained in:
parent
1f902c076e
commit
80f368c2b8
1
build.sh
1
build.sh
@ -230,6 +230,7 @@ pushd "${CURL_DIR}"
|
|||||||
sed -i -E 's/\bmain[[:space:]]*\(([^\(\)]*)\)/wmain(\1)/g' configure
|
sed -i -E 's/\bmain[[:space:]]*\(([^\(\)]*)\)/wmain(\1)/g' configure
|
||||||
patch -p1 -b < "${BASE_DIR}/patch/curl_getenv.diff"
|
patch -p1 -b < "${BASE_DIR}/patch/curl_getenv.diff"
|
||||||
patch -p1 -b < "${BASE_DIR}/patch/curl_threads.diff"
|
patch -p1 -b < "${BASE_DIR}/patch/curl_threads.diff"
|
||||||
|
patch -p1 -b < "${BASE_DIR}/patch/curl_tool_cb_wrt.diff"
|
||||||
patch -p1 -b < "${BASE_DIR}/patch/curl_tool_doswin.diff"
|
patch -p1 -b < "${BASE_DIR}/patch/curl_tool_doswin.diff"
|
||||||
patch -p1 -b < "${BASE_DIR}/patch/curl_tool_getparam.diff"
|
patch -p1 -b < "${BASE_DIR}/patch/curl_tool_getparam.diff"
|
||||||
patch -p1 -b < "${BASE_DIR}/patch/curl_tool_parsecfg.diff"
|
patch -p1 -b < "${BASE_DIR}/patch/curl_tool_parsecfg.diff"
|
||||||
|
34
patch/curl_tool_cb_wrt.diff
Normal file
34
patch/curl_tool_cb_wrt.diff
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
src/tool_cb_wrt.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
|
||||||
|
index b783866..645a3cf 100644
|
||||||
|
--- a/src/tool_cb_wrt.c
|
||||||
|
+++ b/src/tool_cb_wrt.c
|
||||||
|
@@ -237,7 +237,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
|
||||||
|
if(isatty(fileno(outs->stream)) &&
|
||||||
|
GetConsoleScreenBufferInfo((HANDLE)fhnd, &console_info)) {
|
||||||
|
wchar_t *wc_buf;
|
||||||
|
- DWORD wc_len;
|
||||||
|
+ DWORD wc_len, chars_written;
|
||||||
|
unsigned char *rbuf = (unsigned char *)buffer;
|
||||||
|
DWORD rlen = (DWORD)bytes;
|
||||||
|
|
||||||
|
@@ -292,7 +292,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
|
||||||
|
(HANDLE) fhnd,
|
||||||
|
prefix,
|
||||||
|
prefix[1] ? 2 : 1,
|
||||||
|
- NULL,
|
||||||
|
+ &chars_written,
|
||||||
|
NULL)) {
|
||||||
|
return CURL_WRITEFUNC_ERROR;
|
||||||
|
}
|
||||||
|
@@ -351,7 +351,7 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
|
||||||
|
(HANDLE) fhnd,
|
||||||
|
wc_buf,
|
||||||
|
wc_len,
|
||||||
|
- NULL,
|
||||||
|
+ &chars_written,
|
||||||
|
NULL)) {
|
||||||
|
free(wc_buf);
|
||||||
|
return CURL_WRITEFUNC_ERROR;
|
Loading…
Reference in New Issue
Block a user