Use POSIX getenv on Cygwin
The Windows-native GetEnvironmentVariable cannot be relied on, as Cygwin does not always copy environment variables set through Cygwin to the Windows environment block, particularly after fork().
This commit is contained in:
parent
4fc17d0d75
commit
1006ff8a7b
2
common.h
2
common.h
|
@ -439,7 +439,7 @@ please https://github.com/xianyi/OpenBLAS/issues/246
|
|||
typedef char env_var_t[MAX_PATH];
|
||||
#define readenv(p, n) 0
|
||||
#else
|
||||
#ifdef OS_WINDOWS
|
||||
#if defined(OS_WINDOWS) && !defined(OS_CYGWIN_NT)
|
||||
typedef char env_var_t[MAX_PATH];
|
||||
#define readenv(p, n) GetEnvironmentVariable((LPCTSTR)(n), (LPTSTR)(p), sizeof(p))
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue