Evil: move the inclusion of all headers in evil_private.h
authorVincent Torri <vincent.torri@gmail.com>
Wed, 15 May 2019 11:27:37 +0000 (12:27 +0100)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 30 May 2019 08:17:51 +0000 (17:17 +0900)
Summary: first step for making Evil private. evil_private.h will be included in the EFL source code instead of Evil.h

Test Plan: compilation

Reviewers: raster, cedric, zmike

Reviewed By: raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8893

20 files changed:
src/Makefile_Evil.am
src/lib/evil/Evil.h
src/lib/evil/evil_dlfcn.c
src/lib/evil/evil_fcntl.c
src/lib/evil/evil_langinfo.c
src/lib/evil/evil_locale.c
src/lib/evil/evil_macro.h [deleted file]
src/lib/evil/evil_macro_pop.h [deleted file]
src/lib/evil/evil_main.c
src/lib/evil/evil_mman.c
src/lib/evil/evil_private.h
src/lib/evil/evil_pwd.c
src/lib/evil/evil_stdio.c
src/lib/evil/evil_stdlib.c
src/lib/evil/evil_string.c
src/lib/evil/evil_time.c
src/lib/evil/evil_unistd.c
src/lib/evil/evil_util.c
src/lib/evil/meson.build
src/lib/evil/sys/mman.h

index f3ed478..5cf4c0d 100644 (file)
@@ -11,8 +11,6 @@ lib/evil/evil_dlfcn.h \
 lib/evil/evil_fcntl.h \
 lib/evil/evil_langinfo.h \
 lib/evil/evil_locale.h \
-lib/evil/evil_macro.h \
-lib/evil/evil_macro_pop.h \
 lib/evil/evil_macro_wrapper.h \
 lib/evil/evil_main.h \
 lib/evil/evil_stdio.h \
index e09e261..7383fe7 100644 (file)
@@ -94,15 +94,6 @@ extern "C" {
 #endif
 
 
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-#include <sys/stat.h> /* for mkdir in evil_macro_wrapper */
-
-
 typedef unsigned long  uid_t;
 typedef unsigned long  gid_t;
 
@@ -117,20 +108,6 @@ typedef unsigned short mode_t;
 # define strdup(str) _strdup(str)
 #endif
 
-
-#include "evil_macro.h"
-#include "evil_dlfcn.h"
-#include "evil_fcntl.h"
-#include "evil_langinfo.h"
-#include "evil_locale.h"
-#include "evil_main.h"
-#include "evil_stdlib.h"
-#include "evil_stdio.h"
-#include "evil_string.h"
-#include "evil_time.h"
-#include "evil_unistd.h"
-#include "evil_util.h"
-
 #ifndef S_ISDIR
 # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR)
 #endif
@@ -177,10 +154,7 @@ typedef unsigned short mode_t;
 #define _S_IWUSR _S_IWRITE
 #define _S_IRUSR _S_IREAD
 
-#define sigsetjmp(Env, Save) setjmp(Env)
-
-#include "evil_macro_wrapper.h"
-#include "evil_macro_pop.h"
+#include "evil_private.h"
 
 #ifdef __cplusplus
 }
index 1a7db5e..ef161cc 100644 (file)
@@ -4,19 +4,10 @@
 
 #include <stdlib.h>
 
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
+#include "evil_private.h"
 
 #include <psapi.h> /*  EnumProcessModules(Ex) */
 
-#include "evil_macro.h"
-#include "evil_util.h"
-#include "evil_dlfcn.h"
-#include "evil_private.h"
-
 
 static char *_dl_err = NULL;
 static int _dl_err_viewed = 0;
index e222f2b..dd23b7b 100644 (file)
@@ -8,8 +8,7 @@
 #include <winsock2.h> /* for ioctlsocket */
 #include <io.h>
 
-#include "evil_macro.h"
-#include "evil_fcntl.h"
+#include "evil_private.h"
 
 /* SOCKET is defined as a uintptr_t, so passing a fd (int) is not a problem */
 static int
index 25a863a..5e0a344 100644 (file)
@@ -5,8 +5,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "evil_macro.h"
-#include "evil_langinfo.h"
+#include "evil_private.h"
 
 
 static char *
index 0a28a5e..a4d056a 100644 (file)
@@ -6,14 +6,7 @@
 #include <locale.h>
 #include <errno.h>
 
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-#include "evil_macro.h"
-#include "evil_locale.h"
+#include "evil_private.h"
 
 /*
  * LOCALE_SISO639LANGNAME and LOCALE_SISO3166CTRYNAME need at least a buffer
diff --git a/src/lib/evil/evil_macro.h b/src/lib/evil/evil_macro.h
deleted file mode 100644 (file)
index 88cec3d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef __EVIL_MACRO_H__
-#define __EVIL_MACRO_H__
-
-#if _WIN32_WINNT < 0x0600
-# error Windows XP not supported anymore
-#endif
-
-#ifdef EAPI
-# undef EAPI
-#endif
-
-#ifdef EFL_BUILD
-# ifdef DLL_EXPORT
-#  define EAPI __declspec(dllexport)
-# else
-#  define EAPI
-# endif
-#else
-# define EAPI __declspec(dllimport)
-#endif
-
-
-#ifndef PATH_MAX
-# define PATH_MAX MAX_PATH
-#endif
-
-#endif /* __EVIL_MACRO_H__ */
diff --git a/src/lib/evil/evil_macro_pop.h b/src/lib/evil/evil_macro_pop.h
deleted file mode 100644 (file)
index 0fb9122..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __EVIL_MACRO_POP_H__
-#define __EVIL_MACRO_POP_H__
-
-#undef EAPI
-#define EAPI
-
-
-#endif /* __EVIL_MACRO_POP_H__ */
index 875d6c5..07dcd4a 100644 (file)
@@ -4,15 +4,6 @@
 
 #include <stdio.h>
 
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <winsock2.h>
-#undef WIN32_LEAN_AND_MEAN
-
-#include "evil_macro.h"
-#include "evil_unistd.h"
-#include "evil_main.h"
 #include "evil_private.h"
 
 
index 3f632e5..83b9ee7 100644 (file)
@@ -7,17 +7,9 @@
 #include <sys/types.h>
 #include <unistd.h>
 
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
 #include <io.h>
 
-#include "evil_macro.h"
 #include "sys/mman.h"
-#include "evil_util.h"
 #include "evil_private.h"
 
 
index 560b4e2..a88572b 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef __EVIL_PRIVATE_H__
 #define __EVIL_PRIVATE_H__
 
+#if _WIN32_WINNT < 0x0600
+# error Windows XP not supported anymore
+#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -14,6 +17,52 @@ extern "C" {
 # endif
 #endif
 
+#ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+#endif
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+#include <sys/stat.h> /* for mkdir in evil_macro_wrapper */
+
+
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#ifdef EFL_BUILD
+# ifdef DLL_EXPORT
+#  define EAPI __declspec(dllexport)
+# else
+#  define EAPI
+# endif
+#else
+# define EAPI __declspec(dllimport)
+#endif
+
+#ifndef PATH_MAX
+# define PATH_MAX MAX_PATH
+#endif
+
+#include "evil_dlfcn.h"
+#include "evil_fcntl.h"
+#include "evil_langinfo.h"
+#include "evil_locale.h"
+#include "evil_main.h"
+#include "evil_stdlib.h"
+#include "evil_stdio.h"
+#include "evil_string.h"
+#include "evil_time.h"
+#include "evil_unistd.h"
+#include "evil_util.h"
+
+#define sigsetjmp(Env, Save) setjmp(Env)
+
+#include "evil_macro_wrapper.h"
+
+#undef EAPI
+#define EAPI
+
 #ifdef __cplusplus
 }
 #endif
index 841c106..03e7414 100644 (file)
@@ -9,7 +9,7 @@
 #include <io.h>
 #include <lmcons.h>
 
-#include "evil_macro.h"
+#include "evil_private.h"
 #include "pwd.h"
 
 
index 6b71e92..61afe7c 100644 (file)
@@ -5,14 +5,6 @@
 #include <sys/types.h>
 #include <direct.h>
 
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-#include "evil_macro.h"
-#include "evil_stdio.h"
 #include "evil_private.h"
 
 #undef rename
index b03625a..d6de5a4 100644 (file)
@@ -5,20 +5,14 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <io.h>
+#include <direct.h>
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 
 #include <errno.h>
 
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-#include "evil_macro.h"
-#include "evil_stdlib.h"
+#include "evil_private.h"
 
 /*
  * Environment variable related functions
@@ -146,7 +140,7 @@ mkdtemp(char *__template)
      {
         val = _mkstemp(suffix, val);
 
-        if (mkdir(__template) == 0)
+        if (_mkdir(__template) == 0)
           return __template;
 
         if (errno == EFAULT ||
index 3620ce5..d135454 100644 (file)
@@ -6,8 +6,7 @@
 #include <string.h>
 #include <ctype.h>
 
-#include "evil_macro.h"
-#include "evil_string.h"
+#include "evil_private.h"
 
 
 /*
index 90b6369..32cfc2c 100644 (file)
@@ -7,9 +7,6 @@
 #include <ctype.h>
 #include <time.h>
 
-#include "evil_macro.h"
-#include "evil_time.h"
-#include "evil_macro_wrapper.h"
 #include "evil_private.h"
 
 /*
index 765c7aa..3eebf97 100644 (file)
@@ -12,8 +12,7 @@
 #include <winsock2.h>
 #undef WIN32_LEAN_AND_MEAN
 
-#include "evil_macro.h"
-#include "evil_unistd.h"
+#include "evil_private.h"
 
 
 LONGLONG _evil_time_freq;
index 7add78f..c045bf3 100644 (file)
@@ -8,14 +8,7 @@
 #include <limits.h>
 #include <wchar.h>
 
-#ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-#endif
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-#include "evil_macro.h"
-#include "evil_util.h"
+#include "evil_private.h"
 
 DWORD _evil_tls_index;
 
index db2871c..8ed266c 100644 (file)
@@ -7,8 +7,6 @@ if target_machine.system() == 'windows'
   'evil_fcntl.h',
   'evil_langinfo.h',
   'evil_locale.h',
-  'evil_macro.h',
-  'evil_macro_pop.h',
   'evil_macro_wrapper.h',
   'evil_main.h',
   'evil_stdio.h',
index 93b6bd4..15f176a 100644 (file)
@@ -3,7 +3,19 @@
 
 #include <sys/types.h>
 
-#include <evil_macro.h>
+#ifdef EAPI
+# undef EAPI
+#endif
+
+#ifdef EFL_BUILD
+# ifdef DLL_EXPORT
+#  define EAPI __declspec(dllexport)
+# else
+#  define EAPI
+# endif
+#else
+# define EAPI __declspec(dllimport)
+#endif
 
 
 #ifdef __cplusplus
@@ -148,7 +160,8 @@ EAPI int   munmap(void  *addr,
 #endif
 
 
-#include <evil_macro_pop.h>
+#undef EAPI
+#define EAPI
 
 
 #endif /* __EVIL_SYS_MMAN_H__ */