Skip to content

Use GetEnvironmentVariableA() instead of _dupenv_s() #266

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

Conversation

ldorau
Copy link
Contributor

@ldorau ldorau commented Feb 27, 2024

No description provided.

@ldorau ldorau requested a review from a team as a code owner February 27, 2024 10:05
@lplewa
Copy link
Contributor

lplewa commented Feb 27, 2024

We will need universal getenv, and this solution will not allow us to retrieve env variable. Please rewrite it to by able to return value of env variable to the caller.

@bratpiorka
Copy link
Contributor

We will need universal getenv, and this solution will not allow us to retrieve env variable. Please rewrite it to by able to return value of env variable to the caller.

Actually, I agree with this. The util_env_var_has_str() could rely on the function that returns the value of env.

@bratpiorka bratpiorka requested a review from lplewa February 27, 2024 10:49
@ldorau ldorau force-pushed the Use_GetEnvironmentVariableA_instead_of_dupenv_s branch 2 times, most recently from 11a7590 to 8d88ea9 Compare February 27, 2024 11:22
@ldorau ldorau force-pushed the Use_GetEnvironmentVariableA_instead_of_dupenv_s branch 2 times, most recently from a672d80 to f2e49c4 Compare February 27, 2024 11:28
@ldorau ldorau force-pushed the Use_GetEnvironmentVariableA_instead_of_dupenv_s branch from f2e49c4 to 1d11afa Compare February 27, 2024 16:19
@ldorau ldorau force-pushed the Use_GetEnvironmentVariableA_instead_of_dupenv_s branch from 1d11afa to 96c8d16 Compare February 28, 2024 09:37
@ldorau ldorau force-pushed the Use_GetEnvironmentVariableA_instead_of_dupenv_s branch from 96c8d16 to d72593e Compare February 28, 2024 13:36
Add util_env_var() and util_env_var_has_str() to utils_common.h.
Use GetEnvironmentVariableA() instead of _dupenv_s().

Signed-off-by: Lukasz Dorau <[email protected]>
@ldorau ldorau force-pushed the Use_GetEnvironmentVariableA_instead_of_dupenv_s branch from d72593e to f83423b Compare February 28, 2024 14:53
@bratpiorka bratpiorka merged commit c860b3a into oneapi-src:main Feb 29, 2024
@ldorau ldorau deleted the Use_GetEnvironmentVariableA_instead_of_dupenv_s branch February 29, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants