diff --git a/patch/curl_getenv.diff b/patch/curl_getenv.diff index e0b86b5..203361e 100644 --- a/patch/curl_getenv.diff +++ b/patch/curl_getenv.diff @@ -2,7 +2,7 @@ 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/lib/getenv.c b/lib/getenv.c -index 48ee972..fe27a24 100644 +index 49a2e50..dbf2642 100644 --- a/lib/getenv.c +++ b/lib/getenv.c @@ -26,26 +26,23 @@ @@ -23,7 +23,7 @@ index 48ee972..fe27a24 100644 - return NULL; -#elif defined(_WIN32) /* 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 *tmp; + wchar_t *buf = NULL; @@ -40,8 +40,8 @@ index 48ee972..fe27a24 100644 return NULL; @@ -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. - Since getenv doesn't make that distinction we ignore it as well. */ + /* it is possible for rc to be 0 if the variable was found but empty. + Since getenv does not make that distinction we ignore it as well. */ - rc = GetEnvironmentVariableA(variable, buf, bufsize); + rc = GetEnvironmentVariableW(variable, buf, bufsize); if(!rc || rc == bufsize || rc > max) {