Updated patch for new cURL version.
This commit is contained in:
parent
fe0f7f715d
commit
ae6bcdff72
@ -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 48ee972..fe27a24 100644
|
index 49a2e50..dbf2642 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 @@
|
||||||
@ -23,7 +23,7 @@ index 48ee972..fe27a24 100644
|
|||||||
- return NULL;
|
- return NULL;
|
||||||
-#elif defined(_WIN32)
|
-#elif defined(_WIN32)
|
||||||
/* This uses Windows API instead of C runtime getenv() to get the environment
|
/* This uses Windows API instead of C runtime getenv() to get the environment
|
||||||
variable since some changes aren't always visible to the latter. #4774 */
|
variable since some changes are not always visible to the latter. #4774 */
|
||||||
- char *buf = NULL;
|
- char *buf = NULL;
|
||||||
- char *tmp;
|
- char *tmp;
|
||||||
+ wchar_t *buf = NULL;
|
+ wchar_t *buf = NULL;
|
||||||
@ -40,8 +40,8 @@ index 48ee972..fe27a24 100644
|
|||||||
return NULL;
|
return NULL;
|
||||||
@@ -56,25 +53,41 @@ static char *GetEnv(const char *variable)
|
@@ -56,25 +53,41 @@ static char *GetEnv(const char *variable)
|
||||||
|
|
||||||
/* It's possible for rc to be 0 if the variable was found but empty.
|
/* it is possible for rc to be 0 if the variable was found but empty.
|
||||||
Since getenv doesn't make that distinction we ignore it as well. */
|
Since getenv does not make that distinction we ignore it as well. */
|
||||||
- rc = GetEnvironmentVariableA(variable, buf, bufsize);
|
- rc = GetEnvironmentVariableA(variable, buf, bufsize);
|
||||||
+ rc = GetEnvironmentVariableW(variable, buf, bufsize);
|
+ rc = GetEnvironmentVariableW(variable, buf, bufsize);
|
||||||
if(!rc || rc == bufsize || rc > max) {
|
if(!rc || rc == bufsize || rc > max) {
|
||||||
|
Loading…
Reference in New Issue
Block a user