From 2b083068754ffd004c763e74f60a237c994c64a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Ant=C3=B4nio=20Cardoso?= Date: Wed, 9 Dec 2020 16:51:32 -0300 Subject: [PATCH] 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 Reviewers: vtorri, woohyun, joaoantoniocardoso, lucas, jptiz Reviewed By: jptiz Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12209 --- src/lib/ecore/efl_core_proc_env.c | 2 +- src/lib/evil/evil_stdlib.h | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 @@ #if defined (__FreeBSD__) || defined (__OpenBSD__) # include static char ***_dl_environ; -#else +#elif !defined(_MSC_VER) extern char **environ; #endif 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 @@ * @{ */ +/* + * Define environ for native windows based on UCRT + * + */ +#ifdef _MSC_VER +# define environ _environ +#endif /* * Environment variable related functions