summaryrefslogtreecommitdiff
path: root/src/lib/evil
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2019-08-19 09:55:12 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-08-19 09:55:13 -0400
commit01b987df59154f87a5ed8688c272f0a04bc8c4c9 (patch)
treefb8f8fa042ab81e824db5a4c0fbda1614fb3056d /src/lib/evil
parentce3d1ec7e7c5574651dbf5c278356308528e2ea9 (diff)
make mman.h private
Summary: integrate mman.h to make Evil private to the EFL, as mman.h does not exist on Windows. After a discussion with raster, i include sys/mman.h only on non Windows platform. One issue, though, is that src/modules/emotion/generic/Emotion_Generic_Plugin.h has inlined functions using mmap() Test Plan: compilation on Windows Reviewers: cedric, raster, zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9542
Diffstat (limited to 'src/lib/evil')
-rw-r--r--src/lib/evil/evil_mman.c1
-rw-r--r--src/lib/evil/evil_mman.h (renamed from src/lib/evil/sys/mman.h)28
-rw-r--r--src/lib/evil/evil_private.h1
-rw-r--r--src/lib/evil/meson.build2
4 files changed, 1 insertions, 31 deletions
diff --git a/src/lib/evil/evil_mman.c b/src/lib/evil/evil_mman.c
index b1bcf35..dbcfc31 100644
--- a/src/lib/evil/evil_mman.c
+++ b/src/lib/evil/evil_mman.c
@@ -10,7 +10,6 @@
10 10
11#include <io.h> 11#include <io.h>
12 12
13#include "sys/mman.h"
14#include "evil_private.h" 13#include "evil_private.h"
15 14
16/* 15/*
diff --git a/src/lib/evil/sys/mman.h b/src/lib/evil/evil_mman.h
index 39ebd20..990d146 100644
--- a/src/lib/evil/sys/mman.h
+++ b/src/lib/evil/evil_mman.h
@@ -3,25 +3,6 @@
3 3
4#include <sys/types.h> 4#include <sys/types.h>
5 5
6#ifdef EAPI
7# undef EAPI
8#endif
9
10#ifdef EFL_BUILD
11# ifdef DLL_EXPORT
12# define EAPI __declspec(dllexport)
13# else
14# define EAPI
15# endif
16#else
17# define EAPI __declspec(dllimport)
18#endif
19
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25 6
26/** 7/**
27 * @def PROT_NONE 8 * @def PROT_NONE
@@ -177,14 +158,5 @@ EAPI int munmap(void *addr,
177EAPI int mprotect(void *addr, size_t len, int prot); 158EAPI int mprotect(void *addr, size_t len, int prot);
178 159
179 160
180#ifdef __cplusplus
181}
182#endif
183
184
185#undef EAPI
186#define EAPI
187
188
189#endif /* __EVIL_SYS_MMAN_H__ */ 161#endif /* __EVIL_SYS_MMAN_H__ */
190 162
diff --git a/src/lib/evil/evil_private.h b/src/lib/evil/evil_private.h
index a88572b..d87ac75 100644
--- a/src/lib/evil/evil_private.h
+++ b/src/lib/evil/evil_private.h
@@ -49,6 +49,7 @@ extern "C" {
49#include "evil_langinfo.h" 49#include "evil_langinfo.h"
50#include "evil_locale.h" 50#include "evil_locale.h"
51#include "evil_main.h" 51#include "evil_main.h"
52#include "evil_mman.h"
52#include "evil_stdlib.h" 53#include "evil_stdlib.h"
53#include "evil_stdio.h" 54#include "evil_stdio.h"
54#include "evil_string.h" 55#include "evil_string.h"
diff --git a/src/lib/evil/meson.build b/src/lib/evil/meson.build
index 85978d8..7877c7f 100644
--- a/src/lib/evil/meson.build
+++ b/src/lib/evil/meson.build
@@ -15,9 +15,7 @@ if target_machine.system() == 'windows'
15 'evil_time.h', 15 'evil_time.h',
16 'evil_unistd.h', 16 'evil_unistd.h',
17 'evil_util.h', 17 'evil_util.h',
18 'dirent.h',
19 ] 18 ]
20 evil_header_sys_src = [join_paths('sys','mman.h')]
21 19
22 evil_src = [ 20 evil_src = [
23 'evil_dlfcn.c', 21 'evil_dlfcn.c',