Updated patches for new cURL version.
This commit is contained in:
parent
fdbec9cd56
commit
bb1e17f96e
@ -2,7 +2,7 @@
|
|||||||
1 file changed, 30 insertions(+), 17 deletions(-)
|
1 file changed, 30 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
diff --git a/lib/getenv.c b/lib/getenv.c
|
diff --git a/lib/getenv.c b/lib/getenv.c
|
||||||
index 49a2e50..dbf2642 100644
|
index 3bfcf70..9b4101f 100644
|
||||||
--- a/lib/getenv.c
|
--- a/lib/getenv.c
|
||||||
+++ b/lib/getenv.c
|
+++ b/lib/getenv.c
|
||||||
@@ -26,26 +26,23 @@
|
@@ -26,26 +26,23 @@
|
||||||
@ -17,7 +17,7 @@ index 49a2e50..dbf2642 100644
|
|||||||
+#if defined(_WIN32)
|
+#if defined(_WIN32)
|
||||||
+static wchar_t *GetEnv(const wchar_t *variable)
|
+static wchar_t *GetEnv(const wchar_t *variable)
|
||||||
{
|
{
|
||||||
-#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_UWP) || \
|
-#if defined(CURL_WINDOWS_UWP) || defined(UNDER_CE) || \
|
||||||
- defined(__ORBIS__) || defined(__PROSPERO__) /* PlayStation 4 and 5 */
|
- defined(__ORBIS__) || defined(__PROSPERO__) /* PlayStation 4 and 5 */
|
||||||
- (void)variable;
|
- (void)variable;
|
||||||
- return NULL;
|
- return NULL;
|
||||||
|
@ -2,19 +2,17 @@
|
|||||||
1 file changed, 8 insertions(+)
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/tool_doswin.c b/src/tool_doswin.c
|
diff --git a/src/tool_doswin.c b/src/tool_doswin.c
|
||||||
index 171b063..3ab301a 100644
|
index 4f0fa1d..7b1e126 100644
|
||||||
--- a/src/tool_doswin.c
|
--- a/src/tool_doswin.c
|
||||||
+++ b/src/tool_doswin.c
|
+++ b/src/tool_doswin.c
|
||||||
@@ -739,6 +739,8 @@ bool tool_isVistaOrGreater;
|
@@ -733,11 +733,19 @@ static void init_terminal(void)
|
||||||
|
|
||||||
CURLcode win32_init(void)
|
CURLcode win32_init(void)
|
||||||
{
|
{
|
||||||
+ size_t acmdln_len, wcmdln_len;
|
+ size_t acmdln_len, wcmdln_len;
|
||||||
+
|
+
|
||||||
/* curlx_verify_windows_version must be called during init at least once
|
curlx_now_init();
|
||||||
because it has its own initialization routine. */
|
#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
|
||||||
if(curlx_verify_windows_version(6, 0, 0, PLATFORM_WINNT,
|
|
||||||
@@ -753,6 +755,12 @@ CURLcode win32_init(void)
|
|
||||||
init_terminal();
|
init_terminal();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
1 file changed, 9 insertions(+)
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
|
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
|
||||||
index 40ac4e3..a5ed701 100644
|
index a55973a..c0b891a 100644
|
||||||
--- a/src/tool_getparam.c
|
--- a/src/tool_getparam.c
|
||||||
+++ b/src/tool_getparam.c
|
+++ b/src/tool_getparam.c
|
||||||
@@ -23,6 +23,10 @@
|
@@ -23,6 +23,10 @@
|
||||||
@ -16,7 +16,7 @@ index 40ac4e3..a5ed701 100644
|
|||||||
#include "strcase.h"
|
#include "strcase.h"
|
||||||
|
|
||||||
#include "curlx.h"
|
#include "curlx.h"
|
||||||
@@ -558,8 +562,13 @@ static void cleanarg(argv_item_t str)
|
@@ -580,8 +584,13 @@ static void cleanarg(argv_item_t str)
|
||||||
* argument out so that the username:password is not displayed in the
|
* argument out so that the username:password is not displayed in the
|
||||||
* system process list */
|
* system process list */
|
||||||
if(str) {
|
if(str) {
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/tool_operate.c b/src/tool_operate.c
|
diff --git a/src/tool_operate.c b/src/tool_operate.c
|
||||||
index e4b53e2..5441e3d 100644
|
index 426d1de..422eaa2 100644
|
||||||
--- a/src/tool_operate.c
|
--- a/src/tool_operate.c
|
||||||
+++ b/src/tool_operate.c
|
+++ b/src/tool_operate.c
|
||||||
@@ -3005,11 +3005,15 @@ static CURLcode cacertpaths(struct OperationConfig *config)
|
@@ -3015,11 +3015,15 @@ static CURLcode cacertpaths(struct OperationConfig *config)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if(!env) {
|
if(!env) {
|
||||||
#if defined(CURL_CA_SEARCH_SAFE)
|
#if defined(CURL_CA_SEARCH_SAFE)
|
||||||
- char *cacert = NULL;
|
- char *cacert = NULL;
|
||||||
- FILE *cafile = Curl_execpath("curl-ca-bundle.crt", &cacert);
|
- FILE *cafile = tool_execpath("curl-ca-bundle.crt", &cacert);
|
||||||
+ TCHAR *cacert = NULL;
|
+ TCHAR *cacert = NULL;
|
||||||
+ FILE *cafile = Curl_execpath(TEXT("curl-ca-bundle.crt"), &cacert);
|
+ FILE *cafile = Curl_execpath(TEXT("curl-ca-bundle.crt"), &cacert);
|
||||||
if(cafile) {
|
if(cafile) {
|
||||||
@ -21,5 +21,5 @@ index e4b53e2..5441e3d 100644
|
|||||||
config->cacert = strdup(cacert);
|
config->cacert = strdup(cacert);
|
||||||
+#endif
|
+#endif
|
||||||
}
|
}
|
||||||
#elif !defined(CURL_WINDOWS_UWP) && !defined(CURL_DISABLE_CA_SEARCH)
|
#elif !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE) && \
|
||||||
result = FindWin32CACert(config, TEXT("curl-ca-bundle.crt"));
|
!defined(CURL_DISABLE_CA_SEARCH)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
src/tool_parsecfg.c | 16 +++++++++-------
|
src/tool_parsecfg.c | 15 +++++++++------
|
||||||
1 file changed, 9 insertions(+), 7 deletions(-)
|
1 file changed, 9 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
|
diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c
|
||||||
index 651ec8e..406f774 100644
|
index 7a23f35..8338ec7 100644
|
||||||
--- a/src/tool_parsecfg.c
|
--- a/src/tool_parsecfg.c
|
||||||
+++ b/src/tool_parsecfg.c
|
+++ b/src/tool_parsecfg.c
|
||||||
@@ -55,7 +55,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
|
@@ -55,7 +55,7 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
|
||||||
@ -14,19 +14,19 @@ index 651ec8e..406f774 100644
|
|||||||
if(curlrc) {
|
if(curlrc) {
|
||||||
file = fopen(curlrc, FOPEN_READTEXT);
|
file = fopen(curlrc, FOPEN_READTEXT);
|
||||||
if(!file) {
|
if(!file) {
|
||||||
@@ -66,14 +66,16 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
|
@@ -66,14 +66,17 @@ int parseconfig(const char *filename, struct GlobalConfig *global)
|
||||||
}
|
}
|
||||||
#ifdef _WIN32 /* Windows */
|
#if defined(_WIN32) && !defined(UNDER_CE)
|
||||||
else {
|
else {
|
||||||
- char *fullp;
|
- char *fullp;
|
||||||
+ TCHAR *fullp;
|
+ TCHAR *fullp;
|
||||||
/* check for .curlrc then _curlrc in the dir of the executable */
|
/* check for .curlrc then _curlrc in the dir of the executable */
|
||||||
- file = Curl_execpath(".curlrc", &fullp);
|
- file = tool_execpath(".curlrc", &fullp);
|
||||||
- if(!file)
|
- if(!file)
|
||||||
- file = Curl_execpath("_curlrc", &fullp);
|
- file = tool_execpath("_curlrc", &fullp);
|
||||||
+ file = Curl_execpath(TEXT(".curlrc"), &fullp);
|
+ file = tool_execpath(TEXT(".curlrc"), &fullp);
|
||||||
if(file)
|
if(file)
|
||||||
- /* this is the filename we read from */
|
/* this is the filename we read from */
|
||||||
- filename = fullp;
|
- filename = fullp;
|
||||||
+ filename = ".curlrc";
|
+ filename = ".curlrc";
|
||||||
+ else {
|
+ else {
|
||||||
|
@ -3,16 +3,16 @@
|
|||||||
2 files changed, 14 insertions(+), 21 deletions(-)
|
2 files changed, 14 insertions(+), 21 deletions(-)
|
||||||
|
|
||||||
diff --git a/src/tool_util.c b/src/tool_util.c
|
diff --git a/src/tool_util.c b/src/tool_util.c
|
||||||
index 8a07889..7ad3fa9 100644
|
index 5afec91..b89ccc5 100644
|
||||||
--- a/src/tool_util.c
|
--- a/src/tool_util.c
|
||||||
+++ b/src/tool_util.c
|
+++ b/src/tool_util.c
|
||||||
@@ -216,28 +216,21 @@ int tool_ftruncate64(int fd, curl_off_t where)
|
@@ -109,28 +109,21 @@ int tool_ftruncate64(int fd, curl_off_t where)
|
||||||
#endif /* USE_TOOL_FTRUNCATE */
|
#endif /* USE_TOOL_FTRUNCATE */
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) && !defined(UNDER_CE)
|
||||||
-FILE *Curl_execpath(const char *filename, char **pathp)
|
-FILE *tool_execpath(const char *filename, char **pathp)
|
||||||
+#define BUFFSIZE 512U
|
+#define BUFFSIZE 512U
|
||||||
+FILE *Curl_execpath(const TCHAR *filename, TCHAR **pathp)
|
+FILE *tool_execpath(const TCHAR *filename, TCHAR **pathp)
|
||||||
{
|
{
|
||||||
- static char filebuffer[512];
|
- static char filebuffer[512];
|
||||||
- unsigned long len;
|
- unsigned long len;
|
||||||
@ -49,15 +49,15 @@ index 8a07889..7ad3fa9 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/tool_util.h b/src/tool_util.h
|
diff --git a/src/tool_util.h b/src/tool_util.h
|
||||||
index 9a4e87d..8092c14 100644
|
index c97c1c0..7ab3091 100644
|
||||||
--- a/src/tool_util.h
|
--- a/src/tool_util.h
|
||||||
+++ b/src/tool_util.h
|
+++ b/src/tool_util.h
|
||||||
@@ -49,7 +49,7 @@ int struplocompare(const char *p1, const char *p2);
|
@@ -35,7 +35,7 @@ int struplocompare(const char *p1, const char *p2);
|
||||||
int struplocompare4sort(const void *p1, const void *p2);
|
int struplocompare4sort(const void *p1, const void *p2);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) && !defined(UNDER_CE)
|
||||||
-FILE *Curl_execpath(const char *filename, char **pathp);
|
-FILE *tool_execpath(const char *filename, char **pathp);
|
||||||
+FILE *Curl_execpath(const TCHAR *filename, TCHAR **pathp);
|
+FILE *tool_execpath(const TCHAR *filename, TCHAR **pathp);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* HEADER_CURL_TOOL_UTIL_H */
|
#endif /* HEADER_CURL_TOOL_UTIL_H */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user