felipealmeida pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2b083068754ffd004c763e74f60a237c994c64a9

commit 2b083068754ffd004c763e74f60a237c994c64a9
Author: João Antônio Cardoso <joao.ma...@gmail.com>
Date:   Wed Dec 9 16:51:32 2020 -0300

    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.so...@gmail.com>
    
    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 <dlfcn.h>
 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

-- 


Reply via email to