summaryrefslogtreecommitdiff
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
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 '')
-rw-r--r--header_checks/meson.build2
-rw-r--r--src/bin/edje/edje_cc_handlers.c6
-rw-r--r--src/bin/elementary/elm_prefs_cc_handlers.c1
-rw-r--r--src/generic/emotion/vlc/emotion_generic_vlc.c1
-rw-r--r--src/generic/evas/common/shmfile.c9
-rw-r--r--src/generic/evas/gst/main.c7
-rw-r--r--src/generic/evas/gst/main_0_10.c1
-rw-r--r--src/generic/evas/pdf/main.cpp9
-rw-r--r--src/generic/evas/ps/main.c5
-rw-r--r--src/generic/evas/raw/main.c13
-rw-r--r--src/generic/evas/rsvg/main.c4
-rw-r--r--src/generic/evas/xcf/common.h1
-rw-r--r--src/generic/evas/xcf/main.c4
-rw-r--r--src/lib/ecore/ecore.c4
-rw-r--r--src/lib/ecore_evas/ecore_evas.c4
-rw-r--r--src/lib/eet/eet_cipher.c6
-rw-r--r--src/lib/efreet/efreet_mime.c1
-rw-r--r--src/lib/efreet/efreet_xml.c7
-rw-r--r--src/lib/eina/eina_debug_chunk.c7
-rw-r--r--src/lib/eina/eina_evlog.c8
-rw-r--r--src/lib/eina/eina_safepointer.c7
-rw-r--r--src/lib/eio/eio_private.h1
-rw-r--r--src/lib/elementary/efl_ui_selection_manager.c5
-rw-r--r--src/lib/elput/elput_private.h1
-rw-r--r--src/lib/elua/cache.c1
-rw-r--r--src/lib/eo/eo_ptr_indirection.x7
-rw-r--r--src/lib/evas/canvas/evas_image_private.h3
-rw-r--r--src/lib/evas/common/evas_image_main.c4
-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
-rw-r--r--src/modules/ecore_evas/engines/extn/ecore_evas_extn_engine.h6
-rw-r--r--src/modules/evas/engines/software_generic/evas_native_dmabuf.c8
-rw-r--r--src/modules/evas/image_loaders/generic/evas_image_load_generic.c7
-rw-r--r--src/tests/efreet/efreet_icon_cache_dump.c1
36 files changed, 105 insertions, 78 deletions
diff --git a/header_checks/meson.build b/header_checks/meson.build
index 520b4ea843..c83f48b897 100644
--- a/header_checks/meson.build
+++ b/header_checks/meson.build
@@ -248,8 +248,6 @@ config_h.set('SIZEOF_INT', cc.sizeof('int'))
248config_h.set('SIZEOF_LONG', cc.sizeof('long')) 248config_h.set('SIZEOF_LONG', cc.sizeof('long'))
249 249
250if sys_windows == true 250if sys_windows == true
251 config_h.set('HAVE_DLSYM', '1')
252 config_h.set('HAVE_NOTIFY_WIN32', '1') 251 config_h.set('HAVE_NOTIFY_WIN32', '1')
253 config_h.set10('HAVE_WINDOWS_H', true)
254 config_h.set10('HAVE_DDRAW_H', true) 252 config_h.set10('HAVE_DDRAW_H', true)
255endif 253endif
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 9e4f0427ff..c9bbc1744a 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -34,9 +34,13 @@
34#include <errno.h> 34#include <errno.h>
35#include <sys/stat.h> 35#include <sys/stat.h>
36#include <fcntl.h> 36#include <fcntl.h>
37#include <sys/mman.h>
38#include <unistd.h> 37#include <unistd.h>
39#include <ctype.h> 38#include <ctype.h>
39#ifdef _WIN32
40# include <evil_private.h> /* mmap */
41#else
42# include <sys/mman.h>
43#endif
40 44
41#include "edje_cc.h" 45#include "edje_cc.h"
42 46
diff --git a/src/bin/elementary/elm_prefs_cc_handlers.c b/src/bin/elementary/elm_prefs_cc_handlers.c
index a400d5bca9..ce5c01210b 100644
--- a/src/bin/elementary/elm_prefs_cc_handlers.c
+++ b/src/bin/elementary/elm_prefs_cc_handlers.c
@@ -32,7 +32,6 @@
32#include <errno.h> 32#include <errno.h>
33#include <sys/stat.h> 33#include <sys/stat.h>
34#include <fcntl.h> 34#include <fcntl.h>
35#include <sys/mman.h>
36#include <unistd.h> 35#include <unistd.h>
37 36
38#include "elm_prefs_cc.h" 37#include "elm_prefs_cc.h"
diff --git a/src/generic/emotion/vlc/emotion_generic_vlc.c b/src/generic/emotion/vlc/emotion_generic_vlc.c
index 456509e673..dcfcbe9e8c 100644
--- a/src/generic/emotion/vlc/emotion_generic_vlc.c
+++ b/src/generic/emotion/vlc/emotion_generic_vlc.c
@@ -8,7 +8,6 @@
8#include <stdlib.h> 8#include <stdlib.h>
9#include <unistd.h> 9#include <unistd.h>
10#include <string.h> 10#include <string.h>
11#include <sys/mman.h>
12#include <sys/stat.h> 11#include <sys/stat.h>
13#include <fcntl.h> 12#include <fcntl.h>
14#include <pthread.h> 13#include <pthread.h>
diff --git a/src/generic/evas/common/shmfile.c b/src/generic/evas/common/shmfile.c
index 0f9361397c..6fe9eb30d6 100644
--- a/src/generic/evas/common/shmfile.c
+++ b/src/generic/evas/common/shmfile.c
@@ -11,16 +11,19 @@
11# include <netinet/in.h> 11# include <netinet/in.h>
12#endif 12#endif
13#include <time.h> 13#include <time.h>
14#ifdef HAVE_SHM_OPEN
15# include <sys/mman.h>
16#endif
17#include <sys/stat.h> 14#include <sys/stat.h>
18#include <fcntl.h> 15#include <fcntl.h>
19#include <string.h> 16#include <string.h>
20#include <zlib.h> 17#include <zlib.h>
21 18
22#ifdef _WIN32 19#ifdef _WIN32
20# ifndef WIN32_LEAN_AND_MEAN
21# define WIN32_LEAN_AND_MEAN
22# endif
23# include <windows.h> 23# include <windows.h>
24# undef WIN32_LEAN_AND_MEAN
25#else
26# include <sys/mman.h>
24#endif 27#endif
25 28
26#ifdef __cplusplus 29#ifdef __cplusplus
diff --git a/src/generic/evas/gst/main.c b/src/generic/evas/gst/main.c
index e4f9f00285..3f93507078 100644
--- a/src/generic/evas/gst/main.c
+++ b/src/generic/evas/gst/main.c
@@ -2,9 +2,6 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_SHM_OPEN
6# include <sys/mman.h>
7#endif
8#include <fcntl.h> 5#include <fcntl.h>
9#include <unistd.h> 6#include <unistd.h>
10 7
@@ -272,7 +269,11 @@ main(int argc, char **argv)
272 269
273 if (!head_only) 270 if (!head_only)
274 { 271 {
272#ifdef _WIN32
273 if (shm_fd)
274#else
275 if (shm_fd >= 0) 275 if (shm_fd >= 0)
276#endif
276 { 277 {
277 printf("shmfile %s\n", shmfile); 278 printf("shmfile %s\n", shmfile);
278 } 279 }
diff --git a/src/generic/evas/gst/main_0_10.c b/src/generic/evas/gst/main_0_10.c
index 8e383334f6..8a197c4208 100644
--- a/src/generic/evas/gst/main_0_10.c
+++ b/src/generic/evas/gst/main_0_10.c
@@ -2,7 +2,6 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#include <sys/mman.h>
6#include <fcntl.h> 5#include <fcntl.h>
7#include <unistd.h> 6#include <unistd.h>
8 7
diff --git a/src/generic/evas/pdf/main.cpp b/src/generic/evas/pdf/main.cpp
index d8532fed54..c7c3ee13bd 100644
--- a/src/generic/evas/pdf/main.cpp
+++ b/src/generic/evas/pdf/main.cpp
@@ -2,9 +2,6 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#ifdef HAVE_SHM_OPEN
6# include <sys/mman.h>
7#endif
8#include <fcntl.h> 5#include <fcntl.h>
9#include <stdio.h> 6#include <stdio.h>
10#include <unistd.h> 7#include <unistd.h>
@@ -317,11 +314,13 @@ main(int argc, char **argv)
317 314
318 if (!head_only) 315 if (!head_only)
319 { 316 {
320#ifdef HAVE_SHM_OPEN 317#ifdef _WIN32
318 if (shm_fd)
319#else
321 if (shm_fd >= 0) 320 if (shm_fd >= 0)
321#endif
322 printf("shmfile %s\n", shmfile); 322 printf("shmfile %s\n", shmfile);
323 else 323 else
324#endif
325 { 324 {
326 // could also to "tmpfile %s\n" like shmfile but just 325 // could also to "tmpfile %s\n" like shmfile but just
327 // a mmaped tmp file on the system 326 // a mmaped tmp file on the system
diff --git a/src/generic/evas/ps/main.c b/src/generic/evas/ps/main.c
index 6fdd74ce03..586c7e8f0b 100644
--- a/src/generic/evas/ps/main.c
+++ b/src/generic/evas/ps/main.c
@@ -2,7 +2,6 @@
2# include <config.h> 2# include <config.h>
3#endif 3#endif
4 4
5#include <sys/mman.h>
6#include <fcntl.h> 5#include <fcntl.h>
7 6
8#include <libspectre/spectre.h> 7#include <libspectre/spectre.h>
@@ -270,7 +269,11 @@ main(int argc, char **argv)
270 269
271 if (!head_only) 270 if (!head_only)
272 { 271 {
272#ifdef _WIN32
273 if (shm_fd) printf("shmfile %s\n", shmfile);
274#else
273 if (shm_fd >= 0) printf("shmfile %s\n", shmfile); 275 if (shm_fd >= 0) printf("shmfile %s\n", shmfile);
276#endif
274 else 277 else
275 { 278 {
276 // could also to "tmpfile %s\n" like shmfile but just 279 // could also to "tmpfile %s\n" like shmfile but just
diff --git a/src/generic/evas/raw/main.c b/src/generic/evas/raw/main.c
index 70a1625b75..c007bf62ba 100644
--- a/src/generic/evas/raw/main.c
+++ b/src/generic/evas/raw/main.c
@@ -3,7 +3,6 @@
3#endif 3#endif
4#include <fcntl.h> 4#include <fcntl.h>
5#include <stdio.h> 5#include <stdio.h>
6#include <sys/mman.h>
7#include <sys/stat.h> 6#include <sys/stat.h>
8#include <sys/types.h> 7#include <sys/types.h>
9#include <unistd.h> 8#include <unistd.h>
@@ -15,6 +14,12 @@
15# include <unistd.h> 14# include <unistd.h>
16#endif 15#endif
17 16
17#ifdef _WIN32
18# include <evil_private.h> /* mmap */
19#else
20# include <sys/mman.h>
21#endif
22
18#include <Eina.h> 23#include <Eina.h>
19 24
20 25
@@ -204,7 +209,7 @@ int main(int argc, char **argv)
204 } 209 }
205 210
206 timeout_init(4); 211 timeout_init(4);
207 212
208 if (!_raw_init(file)) return -1; 213 if (!_raw_init(file)) return -1;
209 if (head_only != 0) 214 if (head_only != 0)
210 { 215 {
@@ -221,7 +226,11 @@ int main(int argc, char **argv)
221 { 226 {
222 printf("size %d %d\n", width, height); 227 printf("size %d %d\n", width, height);
223 printf("alpha 1\n"); 228 printf("alpha 1\n");
229#ifdef _WIN32
230 if (shm_fd) printf("shmfile %s\n", shmfile);
231#else
224 if (shm_fd >= 0) printf("shmfile %s\n", shmfile); 232 if (shm_fd >= 0) printf("shmfile %s\n", shmfile);
233#endif
225 else 234 else
226 { 235 {
227 printf("data\n"); 236 printf("data\n");
diff --git a/src/generic/evas/rsvg/main.c b/src/generic/evas/rsvg/main.c
index f1973303ee..f09309f79e 100644
--- a/src/generic/evas/rsvg/main.c
+++ b/src/generic/evas/rsvg/main.c
@@ -214,7 +214,11 @@ int main(int argc, char **argv)
214 { 214 {
215 printf("size %d %d\n", width, height); 215 printf("size %d %d\n", width, height);
216 printf("alpha 1\n"); 216 printf("alpha 1\n");
217#ifdef _WIN32
218 if (shm_fd) printf("shmfile %s\n", shmfile);
219#else
217 if (shm_fd >= 0) printf("shmfile %s\n", shmfile); 220 if (shm_fd >= 0) printf("shmfile %s\n", shmfile);
221#endif
218 else 222 else
219 { 223 {
220 printf("data\n"); 224 printf("data\n");
diff --git a/src/generic/evas/xcf/common.h b/src/generic/evas/xcf/common.h
index 34b0cad692..4e605b0022 100644
--- a/src/generic/evas/xcf/common.h
+++ b/src/generic/evas/xcf/common.h
@@ -14,7 +14,6 @@
14# include <netinet/in.h> 14# include <netinet/in.h>
15#endif 15#endif
16#include <time.h> 16#include <time.h>
17#include <sys/mman.h>
18#include <sys/stat.h> 17#include <sys/stat.h>
19#include <fcntl.h> 18#include <fcntl.h>
20#include <string.h> 19#include <string.h>
diff --git a/src/generic/evas/xcf/main.c b/src/generic/evas/xcf/main.c
index 65e5e1b5b3..767c6bf4b1 100644
--- a/src/generic/evas/xcf/main.c
+++ b/src/generic/evas/xcf/main.c
@@ -1714,7 +1714,11 @@ main(int argc, char **argv)
1714 printf("alpha 1\n"); 1714 printf("alpha 1\n");
1715 if (!head_only) 1715 if (!head_only)
1716 { 1716 {
1717#ifdef _WIN32
1718 if (shm_fd) printf("shmfile %s\n", shmfile);
1719#else
1717 if (shm_fd >= 0) printf("shmfile %s\n", shmfile); 1720 if (shm_fd >= 0) printf("shmfile %s\n", shmfile);
1721#endif
1718 else 1722 else
1719 { 1723 {
1720 // could also to "tmpfile %s\n" like shmfile but just 1724 // could also to "tmpfile %s\n" like shmfile but just
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 7aa987b271..b2ca8aa649 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -15,7 +15,9 @@
15# include <langinfo.h> 15# include <langinfo.h>
16#endif 16#endif
17 17
18#if defined(HAVE_SYS_MMAN_H) || defined(_WIN32) 18#ifdef _WIN32
19# include <evil_private.h> /* mmap */
20#else
19# include <sys/mman.h> 21# include <sys/mman.h>
20#endif 22#endif
21 23
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 18c251f007..9d2d4d10f1 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -14,7 +14,9 @@
14#include <fcntl.h> 14#include <fcntl.h>
15#include <unistd.h> 15#include <unistd.h>
16 16
17#if defined(HAVE_SYS_MMAN_H) || defined(_WIN32) 17#ifdef _WIN32
18# include <evil_private.h> /* mmap */
19#else
18# include <sys/mman.h> 20# include <sys/mman.h>
19#endif 21#endif
20 22
diff --git a/src/lib/eet/eet_cipher.c b/src/lib/eet/eet_cipher.c
index 3bdab4c2f1..2314c24e03 100644
--- a/src/lib/eet/eet_cipher.c
+++ b/src/lib/eet/eet_cipher.c
@@ -9,7 +9,11 @@
9#include <unistd.h> 9#include <unistd.h>
10 10
11#ifdef HAVE_SIGNATURE 11#ifdef HAVE_SIGNATURE
12# include <sys/mman.h> 12# ifdef _WIN32
13# include <evil_private.h> /* mmap */
14# else
15# include <sys/mman.h>
16# endif
13# ifdef HAVE_GNUTLS 17# ifdef HAVE_GNUTLS
14# include <gnutls/gnutls.h> 18# include <gnutls/gnutls.h>
15# include <gnutls/x509.h> 19# include <gnutls/x509.h>
diff --git a/src/lib/efreet/efreet_mime.c b/src/lib/efreet/efreet_mime.c
index e4e1ba896f..9eba8c8db9 100644
--- a/src/lib/efreet/efreet_mime.c
+++ b/src/lib/efreet/efreet_mime.c
@@ -6,7 +6,6 @@
6#include <sys/stat.h> 6#include <sys/stat.h>
7#include <fcntl.h> 7#include <fcntl.h>
8#include <unistd.h> 8#include <unistd.h>
9#include <sys/mman.h>
10#include <fnmatch.h> 9#include <fnmatch.h>
11 10
12#include <Ecore.h> 11#include <Ecore.h>
diff --git a/src/lib/efreet/efreet_xml.c b/src/lib/efreet/efreet_xml.c
index 4f4cd2fea8..97a44aa9de 100644
--- a/src/lib/efreet/efreet_xml.c
+++ b/src/lib/efreet/efreet_xml.c
@@ -6,7 +6,12 @@
6#include <sys/stat.h> 6#include <sys/stat.h>
7#include <fcntl.h> 7#include <fcntl.h>
8#include <unistd.h> 8#include <unistd.h>
9#include <sys/mman.h> 9
10#ifdef _WIN32
11# include <evil_private.h> /* mmap */
12#else
13# include <sys/mman.h>
14#endif
10 15
11#include <Ecore_File.h> 16#include <Ecore_File.h>
12 17
diff --git a/src/lib/eina/eina_debug_chunk.c b/src/lib/eina/eina_debug_chunk.c
index 4ee9655140..1c6c028647 100644
--- a/src/lib/eina/eina_debug_chunk.c
+++ b/src/lib/eina/eina_debug_chunk.c
@@ -29,8 +29,13 @@
29# include <memcheck.h> 29# include <memcheck.h>
30#endif 30#endif
31 31
32#ifdef HAVE_MMAP 32#ifdef _WIN32
33# include <evil_private.h> /* mmap */
34#else
33# include <sys/mman.h> 35# include <sys/mman.h>
36#endif
37
38#ifdef HAVE_MMAP
34 39
35// custom memory allocators to avoid malloc/free during backtrace handling 40// custom memory allocators to avoid malloc/free during backtrace handling
36// just in case we're inside some signal handler due to mem corruption and 41// just in case we're inside some signal handler due to mem corruption and
diff --git a/src/lib/eina/eina_evlog.c b/src/lib/eina/eina_evlog.c
index 994a370779..4dba784ff1 100644
--- a/src/lib/eina/eina_evlog.c
+++ b/src/lib/eina/eina_evlog.c
@@ -36,9 +36,11 @@
36#include <time.h> 36#include <time.h>
37#include <unistd.h> 37#include <unistd.h>
38 38
39# ifdef HAVE_MMAP 39#ifdef _WIN32
40# include <sys/mman.h> 40# include <evil_private.h> /* mmap */
41# endif 41#else
42# include <sys/mman.h>
43#endif
42 44
43#if __BYTE_ORDER == __LITTLE_ENDIAN 45#if __BYTE_ORDER == __LITTLE_ENDIAN
44#define SWAP_64(x) x 46#define SWAP_64(x) x
diff --git a/src/lib/eina/eina_safepointer.c b/src/lib/eina/eina_safepointer.c
index 8f9d4b62a9..9016aab27a 100644
--- a/src/lib/eina/eina_safepointer.c
+++ b/src/lib/eina/eina_safepointer.c
@@ -10,10 +10,15 @@
10#include <stdint.h> 10#include <stdint.h>
11#include <stdio.h> 11#include <stdio.h>
12#include <stdlib.h> 12#include <stdlib.h>
13#include <sys/mman.h>
14#include <fcntl.h> 13#include <fcntl.h>
15#include <inttypes.h> 14#include <inttypes.h>
16 15
16#ifdef _WIN32
17# include <evil_private.h> /* mmap */
18#else
19# include <sys/mman.h>
20#endif
21
17#include "eina_config.h" 22#include "eina_config.h"
18#include "eina_private.h" 23#include "eina_private.h"
19 24
diff --git a/src/lib/eio/eio_private.h b/src/lib/eio/eio_private.h
index 36d784752d..aa75336124 100644
--- a/src/lib/eio/eio_private.h
+++ b/src/lib/eio/eio_private.h
@@ -23,7 +23,6 @@
23#include <errno.h> 23#include <errno.h>
24#include <sys/types.h> 24#include <sys/types.h>
25#include <sys/stat.h> 25#include <sys/stat.h>
26#include <sys/mman.h>
27#include <unistd.h> 26#include <unistd.h>
28#include <fcntl.h> 27#include <fcntl.h>
29 28
diff --git a/src/lib/elementary/efl_ui_selection_manager.c b/src/lib/elementary/efl_ui_selection_manager.c
index 49b3c5a3b1..e857f4fd98 100644
--- a/src/lib/elementary/efl_ui_selection_manager.c
+++ b/src/lib/elementary/efl_ui_selection_manager.c
@@ -4,7 +4,10 @@
4 4
5#include <Elementary.h> 5#include <Elementary.h>
6#include "elm_priv.h" 6#include "elm_priv.h"
7#ifdef HAVE_SYS_MMAN_H 7
8#ifdef _WIN32
9# include <evil_private.h> /* mmap */
10#else
8# include <sys/mman.h> 11# include <sys/mman.h>
9#endif 12#endif
10 13
diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h
index 16fe305c5b..744c5a92e3 100644
--- a/src/lib/elput/elput_private.h
+++ b/src/lib/elput/elput_private.h
@@ -13,7 +13,6 @@
13# include <Elput.h> 13# include <Elput.h>
14 14
15# include <ctype.h> 15# include <ctype.h>
16# include <sys/mman.h>
17# include <fcntl.h> 16# include <fcntl.h>
18# include <unistd.h> 17# include <unistd.h>
19# include <linux/vt.h> 18# include <linux/vt.h>
diff --git a/src/lib/elua/cache.c b/src/lib/elua/cache.c
index 91fcdac658..b18d690569 100644
--- a/src/lib/elua/cache.c
+++ b/src/lib/elua/cache.c
@@ -2,7 +2,6 @@
2 2
3#include <sys/types.h> 3#include <sys/types.h>
4#include <sys/stat.h> 4#include <sys/stat.h>
5#include <sys/mman.h>
6#include <fcntl.h> 5#include <fcntl.h>
7#include <unistd.h> 6#include <unistd.h>
8 7
diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x
index d6affe0cc6..2b3fa5a467 100644
--- a/src/lib/eo/eo_ptr_indirection.x
+++ b/src/lib/eo/eo_ptr_indirection.x
@@ -1,9 +1,12 @@
1#include <assert.h> 1#include <assert.h>
2#ifdef HAVE_MMAP
3#include <sys/types.h> 2#include <sys/types.h>
4#include <sys/stat.h> 3#include <sys/stat.h>
5#include <fcntl.h> 4#include <fcntl.h>
6#include <sys/mman.h> 5
6#ifdef _WIN32
7# include <evil_private.h> /* mmap mprotect */
8#else
9# include <sys/mman.h>
7#endif 10#endif
8 11
9#ifdef HAVE_VALGRIND 12#ifdef HAVE_VALGRIND
diff --git a/src/lib/evas/canvas/evas_image_private.h b/src/lib/evas/canvas/evas_image_private.h
index efd53209c8..2d468184eb 100644
--- a/src/lib/evas/canvas/evas_image_private.h
+++ b/src/lib/evas/canvas/evas_image_private.h
@@ -12,9 +12,6 @@
12 12
13#include <sys/types.h> 13#include <sys/types.h>
14#include <unistd.h> 14#include <unistd.h>
15#ifdef HAVE_SYS_MMAN_H
16# include <sys/mman.h>
17#endif
18#include <math.h> 15#include <math.h>
19 16
20#include "evas_private.h" 17#include "evas_private.h"
diff --git a/src/lib/evas/common/evas_image_main.c b/src/lib/evas/common/evas_image_main.c
index e42e05d816..1be23a591e 100644
--- a/src/lib/evas/common/evas_image_main.c
+++ b/src/lib/evas/common/evas_image_main.c
@@ -2,7 +2,9 @@
2# include "config.h" /* so that EAPI in Eet.h is correctly defined */ 2# include "config.h" /* so that EAPI in Eet.h is correctly defined */
3#endif 3#endif
4 4
5#ifdef HAVE_SYS_MMAN_H 5#ifdef _WIN32
6# include <evil_private.h> /* mmap */
7#else
6# include <sys/mman.h> 8# include <sys/mman.h>
7#endif 9#endif
8 10
diff --git a/src/lib/evil/evil_mman.c b/src/lib/evil/evil_mman.c
index b1bcf35bea..dbcfc31901 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 39ebd20638..990d146058 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 a88572bf24..d87ac75423 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 85978d8e9c..7877c7f914 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',
diff --git a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_engine.h b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_engine.h
index 511397dfdf..dd82f50293 100644
--- a/src/modules/ecore_evas/engines/extn/ecore_evas_extn_engine.h
+++ b/src/modules/ecore_evas/engines/extn/ecore_evas_extn_engine.h
@@ -14,9 +14,13 @@
14#include <unistd.h> 14#include <unistd.h>
15#include <math.h> 15#include <math.h>
16#include <time.h> 16#include <time.h>
17#ifdef HAVE_SYS_MMAN_H 17
18#ifdef _WIN32
19# include <evil_private.h> /* mmap */
20#else
18# include <sys/mman.h> 21# include <sys/mman.h>
19#endif 22#endif
23
20#include <sys/stat.h> 24#include <sys/stat.h>
21#include <fcntl.h> 25#include <fcntl.h>
22#include <string.h> 26#include <string.h>
diff --git a/src/modules/evas/engines/software_generic/evas_native_dmabuf.c b/src/modules/evas/engines/software_generic/evas_native_dmabuf.c
index c71e1b2276..e7c2e162aa 100644
--- a/src/modules/evas/engines/software_generic/evas_native_dmabuf.c
+++ b/src/modules/evas/engines/software_generic/evas_native_dmabuf.c
@@ -2,15 +2,17 @@
2#include "evas_private.h" 2#include "evas_private.h"
3#include "evas_native_common.h" 3#include "evas_native_common.h"
4 4
5#if defined HAVE_DLSYM && ! defined _WIN32 5#if defined HAVE_DLSYM
6# include <dlfcn.h> /* dlopen,dlclose,etc */ 6# include <dlfcn.h> /* dlopen,dlclose,etc */
7#elif _WIN32 7#elif _WIN32
8# include <evil_private.h> /* dlopen dlclose dlsym */ 8# include <evil_private.h> /* dlopen dlclose dlsym mmap */
9#else 9#else
10# warning native_dmabuf should not get compiled if dlsym is not found on the system! 10# warning native_dmabuf should not get compiled if dlsym is not found on the system!
11#endif 11#endif
12 12
13#include <sys/mman.h> 13#ifndef _WIN32
14# include <sys/mman.h>
15#endif
14 16
15#define DRM_FORMAT_ARGB8888 0x34325241 17#define DRM_FORMAT_ARGB8888 0x34325241
16#define DRM_FORMAT_XRGB8888 0x34325258 18#define DRM_FORMAT_XRGB8888 0x34325258
diff --git a/src/modules/evas/image_loaders/generic/evas_image_load_generic.c b/src/modules/evas/image_loaders/generic/evas_image_load_generic.c
index 7d0c8e3609..94b935bc20 100644
--- a/src/modules/evas/image_loaders/generic/evas_image_load_generic.c
+++ b/src/modules/evas/image_loaders/generic/evas_image_load_generic.c
@@ -7,11 +7,16 @@
7 7
8#include <stdio.h> 8#include <stdio.h>
9#include <sys/types.h> 9#include <sys/types.h>
10#include <sys/mman.h>
11#include <sys/stat.h> 10#include <sys/stat.h>
12#include <fcntl.h> 11#include <fcntl.h>
13#include <ctype.h> 12#include <ctype.h>
14 13
14#ifdef _WIN32
15# include <evil_private.h> /* mmap */
16#else
17# include <sys/mman.h>
18#endif
19
15#ifndef O_BINARY 20#ifndef O_BINARY
16# define O_BINARY 0 21# define O_BINARY 0
17#endif 22#endif
diff --git a/src/tests/efreet/efreet_icon_cache_dump.c b/src/tests/efreet/efreet_icon_cache_dump.c
index 313c890933..a1b71eb855 100644
--- a/src/tests/efreet/efreet_icon_cache_dump.c
+++ b/src/tests/efreet/efreet_icon_cache_dump.c
@@ -5,7 +5,6 @@
5#include <stdio.h> 5#include <stdio.h>
6#include <limits.h> 6#include <limits.h>
7#include <sys/stat.h> 7#include <sys/stat.h>
8#include <sys/mman.h>
9#include <fcntl.h> 8#include <fcntl.h>
10#include <unistd.h> 9#include <unistd.h>
11#include <errno.h> 10#include <errno.h>