summaryrefslogtreecommitdiff
path: root/src/generic
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/generic
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/generic')
-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
10 files changed, 37 insertions, 17 deletions
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