Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

dmitrykos
Copy link
Contributor

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.

…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
Copy link
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
Copy link
Contributor Author

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

@bagder
Copy link
Member

bagder commented Dec 12, 2017

Thanks!

@bagder bagder closed this in 2437dbb Dec 12, 2017
@gvanem
Copy link
Contributor

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
Copy link
Contributor Author

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants