diff options
author | João Antônio Cardoso <joao.maker@gmail.com> | 2020-12-09 16:51:32 -0300 |
---|---|---|
committer | Felipe Magno de Almeida <felipe@expertise.dev> | 2020-12-09 16:53:30 -0300 |
commit | 2b083068754ffd004c763e74f60a237c994c64a9 (patch) | |
tree | 062dba98554e85433915bfa64b67cfbf8f7c1628 | |
parent | 138e9e5294bcc5994853c826da013f0220042c5c (diff) |
evil: Define environ macro when using VS based on UCRT definition
Summary:
Microsoft Visual Studio defines _environ, but not environ. Create
a macro #define environ _environ like other analogous solutions
Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com>
Reviewers: vtorri, woohyun, joaoantoniocardoso, lucas, jptiz
Reviewed By: jptiz
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D12209
-rw-r--r-- | src/lib/ecore/efl_core_proc_env.c | 2 | ||||
-rw-r--r-- | src/lib/evil/evil_stdlib.h | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/ecore/efl_core_proc_env.c b/src/lib/ecore/efl_core_proc_env.c index f693df25af..9177d822f1 100644 --- a/src/lib/ecore/efl_core_proc_env.c +++ b/src/lib/ecore/efl_core_proc_env.c | |||
@@ -16,7 +16,7 @@ | |||
16 | #if defined (__FreeBSD__) || defined (__OpenBSD__) | 16 | #if defined (__FreeBSD__) || defined (__OpenBSD__) |
17 | # include <dlfcn.h> | 17 | # include <dlfcn.h> |
18 | static char ***_dl_environ; | 18 | static char ***_dl_environ; |
19 | #else | 19 | #elif !defined(_MSC_VER) |
20 | extern char **environ; | 20 | extern char **environ; |
21 | #endif | 21 | #endif |
22 | 22 | ||
diff --git a/src/lib/evil/evil_stdlib.h b/src/lib/evil/evil_stdlib.h index e836cb4732..82bb6d183f 100644 --- a/src/lib/evil/evil_stdlib.h +++ b/src/lib/evil/evil_stdlib.h | |||
@@ -14,6 +14,13 @@ | |||
14 | * @{ | 14 | * @{ |
15 | */ | 15 | */ |
16 | 16 | ||
17 | /* | ||
18 | * Define environ for native windows based on UCRT | ||
19 | * | ||
20 | */ | ||
21 | #ifdef _MSC_VER | ||
22 | # define environ _environ | ||
23 | #endif | ||
17 | 24 | ||
18 | /* | 25 | /* |
19 | * Environment variable related functions | 26 | * Environment variable related functions |