IIFE commented on code in PR #2858:
URL: https://github.com/apache/arrow-adbc/pull/2858#discussion_r2617402879
##########
c/driver_manager/adbc_driver_manager.cc:
##########
@@ -462,18 +462,16 @@ AdbcStatusCode LoadDriverManifest(const
std::filesystem::path& driver_manifest,
SearchPaths GetEnvPaths(const char_type* env_var) {
#ifdef _WIN32
- size_t required_size;
-
- _wgetenv_s(&required_size, NULL, 0, env_var);
+ DWORD required_size = GetEnvironmentVariableW(env_var, NULL, 0);
if (required_size == 0) {
return {};
}
std::wstring path_var;
path_var.resize(required_size);
- _wgetenv_s(&required_size, path_var.data(), required_size, env_var);
Review Comment:
There was inconsistency between how tests were setting env variables and how
it's being retrieved here for windows. Tests used ASCII SetEnvironmentVariable
and this uses wide getenv. Made them consistent by using
SetEnvironmentVariableW and GetEnvironmentVariableW
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]