diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-01-22 14:09:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-22 14:09:14 +0100 |
| commit | c5fb54168665d41503ef3a08f0534da58949b632 (patch) | |
| tree | 19e2adc8809290881a6a13ec6001013d03170c7d /src/4D_api.cpp | |
| parent | a6390b59ae2bad2a763e7ab3341ee4c80e708b3d (diff) | |
| parent | 66fd99a8831955034cb25c8468ecfe1f9d3a7d62 (diff) | |
| download | PROJ-c5fb54168665d41503ef3a08f0534da58949b632.tar.gz PROJ-c5fb54168665d41503ef3a08f0534da58949b632.zip | |
Merge pull request #1839 from rouault/rfc4_utf8
[RFC4_dev] Use Win32 Unicode APIs and expect all strings to be UTF-8 (fixes #1765)
Diffstat (limited to 'src/4D_api.cpp')
| -rw-r--r-- | src/4D_api.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/4D_api.cpp b/src/4D_api.cpp index 9107723d..6b53363a 100644 --- a/src/4D_api.cpp +++ b/src/4D_api.cpp @@ -1461,10 +1461,10 @@ PJ_INFO proj_info (void) { pj_context_get_user_writable_directory(ctx, false).c_str(), &buf_size); } - const char *envPROJ_LIB = getenv("PROJ_LIB"); - buf = path_append(buf, envPROJ_LIB, &buf_size); + const std::string envPROJ_LIB = NS_PROJ::FileManager::getProjLibEnvVar(ctx); + buf = path_append(buf, envPROJ_LIB.empty() ? nullptr : envPROJ_LIB.c_str(), &buf_size); #ifdef PROJ_LIB - if (envPROJ_LIB == nullptr) { + if (envPROJ_LIB.empty()) { buf = path_append(buf, PROJ_LIB, &buf_size); } #endif @@ -1770,3 +1770,4 @@ PJ_FACTORS proj_factors(PJ *P, PJ_COORD lp) { return factors; } + |
