Fixed undefined symbol of getenv() which does not exist in WinRT. #2171

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
@dmitrykos
Contributor

dmitrykos commented Dec 10, 2017

Fixed undefined symbol of getenv() which does not exist when compiling for Windows 10 App (CURL_WINDOWS_APP).

Replaced getenv() with curl_getenv() which is aware of getenv() absence when CURL_WINDOWS_APP is defined.

Fixed undefined symbol of getenv() which does not exist when compilin…
…g for Windows 10 App (CURL_WINDOWS_APP). Replaced getenv() with curl_getenv() which is aware of getenv() absence when CURL_WINDOWS_APP is defined.
@bagder

This comment has been minimized.

Show comment Hide comment
@bagder

bagder Dec 10, 2017

Member

Thanks, but it seems your change doesn't follow our code style correctly:

./vtls/vtls.c:1286:2: error: Contains TAB character (TABS)
 		curl_free(env_tmp);
  ^
Member

bagder commented Dec 10, 2017

Thanks, but it seems your change doesn't follow our code style correctly:

./vtls/vtls.c:1286:2: error: Contains TAB character (TABS)
 		curl_free(env_tmp);
  ^
@dmitrykos

This comment has been minimized.

Show comment Hide comment
@dmitrykos

dmitrykos Dec 11, 2017

Contributor

Sorry, forgot to check for tabs! Removed them as advised.

Contributor

dmitrykos commented Dec 11, 2017

Sorry, forgot to check for tabs! Removed them as advised.

@bagder

This comment has been minimized.

Show comment Hide comment
@bagder

bagder Dec 12, 2017

Member

Thanks!

Member

bagder commented Dec 12, 2017

Thanks!

@bagder bagder closed this in 2437dbb Dec 12, 2017

@gvanem

This comment has been minimized.

Show comment Hide comment
@gvanem

gvanem Dec 13, 2017

Member

Replaced getenv() with curl_getenv() which is aware of getenv() absence when CURL_WINDOWS_APP
is defined.

What good does a curl_getenv() that always returns NULL for an UWP-app do? Does your app really work? According to MSDN, UWP-apps do have GetEnvironmentVariable(). No?

Member

gvanem commented Dec 13, 2017

Replaced getenv() with curl_getenv() which is aware of getenv() absence when CURL_WINDOWS_APP
is defined.

What good does a curl_getenv() that always returns NULL for an UWP-app do? Does your app really work? According to MSDN, UWP-apps do have GetEnvironmentVariable(). No?

@dmitrykos

This comment has been minimized.

Show comment Hide comment
@dmitrykos

dmitrykos Dec 13, 2017

Contributor

What good does a curl_getenv() that always returns NULL for an UWP-app do? Does your app really work?

In this given context if curl_getenv("CURL_SSL_BACKEND") returns NULL then the first SSL backend is selected which is defined during a compile time in available_backends[0]. Should not be any problem at all.

Reference UWP app works correctly if curl_getenv() returns NULL, no problems observed within its scope of curl usage - HTTP(-S), FTP.

GetEnvironmentVariable would be useless for the Windows 10 Mobile platform as there is no way to set own environment variables if I am not mistaken.

Contributor

dmitrykos commented Dec 13, 2017

What good does a curl_getenv() that always returns NULL for an UWP-app do? Does your app really work?

In this given context if curl_getenv("CURL_SSL_BACKEND") returns NULL then the first SSL backend is selected which is defined during a compile time in available_backends[0]. Should not be any problem at all.

Reference UWP app works correctly if curl_getenv() returns NULL, no problems observed within its scope of curl usage - HTTP(-S), FTP.

GetEnvironmentVariable would be useless for the Windows 10 Mobile platform as there is no way to set own environment variables if I am not mistaken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment