summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2019-11-01 09:35:09 +0100
committerCedric BAIL <cedric.bail@free.fr>2019-12-04 12:21:24 -0800
commitf3d9b8ee703621cfbb52a03d346335148318af7a (patch)
tree38e0f640c8ed31c717668faa64be419fa6c07905
parent003ce06e85ba0f1597a26405ead92f2e01607177 (diff)
esacpe: remove library from tree
This has not been used for a while and is not even buildable after our switch to meson. It was a niche to start with given that it needed the PS3 OS to run on. I asked for any remaining users at EDD and on the list but heard nothing. Time to remove. Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com> Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D10778
-rw-r--r--COMPLIANCE4
-rw-r--r--README10
-rw-r--r--doc/main.dox6
-rw-r--r--old/README.escape4
-rw-r--r--src/lib/ecore/ecore_exe_ps3.c20
-rw-r--r--src/lib/ecore/ecore_pipe.c4
-rw-r--r--src/lib/ecore_con/ecore_con_url_curl.c4
-rw-r--r--src/lib/ecore_con/efl_net_ssl_conn-openssl.c4
-rw-r--r--src/lib/ecore_file/ecore_file_private.h4
-rw-r--r--src/lib/eina/eina_counter.c4
-rw-r--r--src/lib/eina/eina_file.c4
-rw-r--r--src/lib/eina/eina_file_common.c4
-rw-r--r--src/lib/eina/eina_module.c4
-rw-r--r--src/lib/eina/eina_prefix.c4
-rw-r--r--src/lib/escape/Escape.h83
-rw-r--r--src/lib/escape/escape_libgen.c90
-rw-r--r--src/lib/escape/escape_libgen.h33
-rw-r--r--src/lib/escape/escape_mman.c67
-rw-r--r--src/lib/escape/escape_unistd.c184
-rw-r--r--src/lib/escape/escape_unistd.h108
-rw-r--r--src/lib/escape/sys/mman.h180
-rw-r--r--src/lib/evas/include/evas_common_private.h4
22 files changed, 1 insertions, 828 deletions
diff --git a/COMPLIANCE b/COMPLIANCE
index ecd0c34..1df68cf 100644
--- a/COMPLIANCE
+++ b/COMPLIANCE
@@ -39,9 +39,7 @@ pieces of information you will need.
39 39
40Q. Do I need to make the source public of libraries or applications that I 40Q. Do I need to make the source public of libraries or applications that I
41build on top of EFL? 41build on top of EFL?
42A. No, UNLESS you use the escape library. Escape is GPL. This is ONLY 42A. No
43needed for PS3 development, so unless you are doing this, it is not
44relevant.
45 43
46Q. Do I need to provide the source for EFL? 44Q. Do I need to provide the source for EFL?
47A. Yes. In general you do. If you are shipping any of the binaries or 45A. Yes. In general you do. If you are shipping any of the binaries or
diff --git a/README b/README
index de08b78..5fd277e 100644
--- a/README
+++ b/README
@@ -365,16 +365,6 @@ their behavior as if they were real physical objects.
365 365
366 366
367 367
368**Escape:**
369
370//GPL v2 license//
371
372This library is used as a compatibility library to provide missing
373libc APIs for porting to the Playstation 3 (PS3) native runtime
374environment.
375
376
377
378**Ethumb:** 368**Ethumb:**
379 369
380//LGPL v2 license// 370//LGPL v2 license//
diff --git a/doc/main.dox b/doc/main.dox
index d9e50bc..a0e3288 100644
--- a/doc/main.dox
+++ b/doc/main.dox
@@ -210,12 +210,6 @@
210 */ 210 */
211 211
212/** 212/**
213 * @defgroup Escape Escape
214 *
215 * @brief PlayStation3 portability layer.
216 */
217
218/**
219 * @defgroup Ecore Ecore 213 * @defgroup Ecore Ecore
220 * 214 *
221 * @brief Operating System Abstraction and Integration. 215 * @brief Operating System Abstraction and Integration.
diff --git a/old/README.escape b/old/README.escape
deleted file mode 100644
index d45099f..0000000
--- a/old/README.escape
+++ /dev/null
@@ -1,4 +0,0 @@
1 The Escape library is a library that acts implements some of the missing
2 function from the PS3 GameOS system that are needed for the proper
3 functioning of the EFL.
4
diff --git a/src/lib/ecore/ecore_exe_ps3.c b/src/lib/ecore/ecore_exe_ps3.c
deleted file mode 100644
index 1ef1e81..0000000
--- a/src/lib/ecore/ecore_exe_ps3.c
+++ /dev/null
@@ -1,20 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#ifdef HAVE_ESCAPE
6# include <Escape.h>
7#endif
8
9#include "Ecore.h"
10#include "ecore_private.h"
11
12void
13_ecore_exe_init(void)
14{
15}
16
17void
18_ecore_exe_shutdown(void)
19{
20}
diff --git a/src/lib/ecore/ecore_pipe.c b/src/lib/ecore/ecore_pipe.c
index d352853..702f19c 100644
--- a/src/lib/ecore/ecore_pipe.c
+++ b/src/lib/ecore/ecore_pipe.c
@@ -26,10 +26,6 @@
26# endif 26# endif
27#endif 27#endif
28 28
29#ifdef HAVE_ESCAPE
30# include <Escape.h>
31#endif
32
33#ifdef HAVE_EXOTIC 29#ifdef HAVE_EXOTIC
34# include <Exotic.h> 30# include <Exotic.h>
35#endif 31#endif
diff --git a/src/lib/ecore_con/ecore_con_url_curl.c b/src/lib/ecore_con/ecore_con_url_curl.c
index 4217f91..f4fe730 100644
--- a/src/lib/ecore_con/ecore_con_url_curl.c
+++ b/src/lib/ecore_con/ecore_con_url_curl.c
@@ -12,10 +12,6 @@
12# include <ws2tcpip.h> 12# include <ws2tcpip.h>
13#endif 13#endif
14 14
15#ifdef HAVE_ESCAPE
16# include <Escape.h>
17#endif
18
19#include "Ecore.h" 15#include "Ecore.h"
20#include "ecore_private.h" 16#include "ecore_private.h"
21#include "Ecore_Con.h" 17#include "Ecore_Con.h"
diff --git a/src/lib/ecore_con/efl_net_ssl_conn-openssl.c b/src/lib/ecore_con/efl_net_ssl_conn-openssl.c
index 3f88c20..451fd24 100644
--- a/src/lib/ecore_con/efl_net_ssl_conn-openssl.c
+++ b/src/lib/ecore_con/efl_net_ssl_conn-openssl.c
@@ -21,10 +21,6 @@
21# include <evil_private.h> /* dlsym */ 21# include <evil_private.h> /* dlsym */
22#endif 22#endif
23 23
24#ifdef HAVE_ESCAPE
25# include <Escape.h>
26#endif
27
28#ifdef HAVE_EXOTIC 24#ifdef HAVE_EXOTIC
29# include <Exotic.h> 25# include <Exotic.h>
30#endif 26#endif
diff --git a/src/lib/ecore_file/ecore_file_private.h b/src/lib/ecore_file/ecore_file_private.h
index 01ea0a4..4c8561d 100644
--- a/src/lib/ecore_file/ecore_file_private.h
+++ b/src/lib/ecore_file/ecore_file_private.h
@@ -5,10 +5,6 @@
5# include <features.h> 5# include <features.h>
6#endif 6#endif
7 7
8#ifdef HAVE_ESCAPE
9# include <Escape.h>
10#endif
11
12#include <sys/types.h> 8#include <sys/types.h>
13#include <sys/stat.h> 9#include <sys/stat.h>
14 10
diff --git a/src/lib/eina/eina_counter.c b/src/lib/eina/eina_counter.c
index 08c6583..1143c56 100644
--- a/src/lib/eina/eina_counter.c
+++ b/src/lib/eina/eina_counter.c
@@ -33,10 +33,6 @@
33#include "eina_safety_checks.h" 33#include "eina_safety_checks.h"
34#include "eina_counter.h" 34#include "eina_counter.h"
35 35
36#ifdef HAVE_ESCAPE
37# include <Escape.h>
38#endif
39
40#include "eina_private.h" 36#include "eina_private.h"
41 37
42/*============================================================================* 38/*============================================================================*
diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c
index 6277ad6..bc65623 100644
--- a/src/lib/eina/eina_file.c
+++ b/src/lib/eina/eina_file.c
@@ -59,10 +59,6 @@
59#include "eina_xattr.h" 59#include "eina_xattr.h"
60#include "eina_file_common.h" 60#include "eina_file_common.h"
61 61
62#ifdef HAVE_ESCAPE
63# include <Escape.h>
64#endif
65
66/*============================================================================* 62/*============================================================================*
67 * Local * 63 * Local *
68 *============================================================================*/ 64 *============================================================================*/
diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c
index 7fdf491..c1517d5 100644
--- a/src/lib/eina/eina_file_common.c
+++ b/src/lib/eina/eina_file_common.c
@@ -41,10 +41,6 @@
41#include "eina_file_common.h" 41#include "eina_file_common.h"
42#include "eina_xattr.h" 42#include "eina_xattr.h"
43 43
44#ifdef HAVE_ESCAPE
45# include <Escape.h>
46#endif
47
48#ifndef O_BINARY 44#ifndef O_BINARY
49# define O_BINARY 0 45# define O_BINARY 0
50#endif 46#endif
diff --git a/src/lib/eina/eina_module.c b/src/lib/eina/eina_module.c
index bff6e3f..674da6a 100644
--- a/src/lib/eina/eina_module.c
+++ b/src/lib/eina/eina_module.c
@@ -35,10 +35,6 @@
35# include <evil_private.h> 35# include <evil_private.h>
36#endif 36#endif
37 37
38#ifdef HAVE_ESCAPE
39# include <Escape.h>
40#endif
41
42#ifdef HAVE_EXOTIC 38#ifdef HAVE_EXOTIC
43# include <Exotic.h> 39# include <Exotic.h>
44#endif 40#endif
diff --git a/src/lib/eina/eina_prefix.c b/src/lib/eina/eina_prefix.c
index 56737ad..dd483a0 100644
--- a/src/lib/eina/eina_prefix.c
+++ b/src/lib/eina/eina_prefix.c
@@ -46,10 +46,6 @@
46# include <evil_private.h> /* path_is_absolute realpath dladdr */ 46# include <evil_private.h> /* path_is_absolute realpath dladdr */
47#endif 47#endif
48 48
49#ifdef HAVE_ESCAPE
50# include <Escape.h>
51#endif
52
53#include "eina_config.h" 49#include "eina_config.h"
54#include "eina_private.h" 50#include "eina_private.h"
55#include "eina_alloca.h" 51#include "eina_alloca.h"
diff --git a/src/lib/escape/Escape.h b/src/lib/escape/Escape.h
deleted file mode 100644
index 210bc87..0000000
--- a/src/lib/escape/Escape.h
+++ /dev/null
@@ -1,83 +0,0 @@
1#ifndef __ESCAPE_H__
2#define __ESCAPE_H__
3
4#ifndef EAPI
5#define EAPI
6#endif /* EAPI */
7#define __UNUSED__ __attribute__((unused))
8
9#include <unistd.h>
10
11#ifdef CLOCK_REALTIME
12#undef CLOCK_REALTIME
13#endif
14#ifdef CLOCK_PROF
15#undef CLOCK_PROF
16#endif
17#ifdef CLOCK_PROCESS_CPUTIME_ID
18#undef CLOCK_PROCESS_CPUTIME_ID
19#endif
20
21/**
22 * @page escape_main Escape
23 * @date 2011 (created)
24 *
25 * @section toc Table of Contents
26 *
27 * @li @ref escape_main_intro
28 * @li @ref escape_main_compiling
29 * @li @ref escape_main_next_steps
30 *
31 * @section escape_main_intro Introduction
32 *
33 * The Escape library is a library that acts implements some of the missing
34 * function from the PS3 GameOS system that are needed for the proper
35 * functioning of the EFL.
36 *
37 * @section escape_main_compiling How to compile
38 *
39 * Escape is a library your application links to. The procedure for
40 * this is very simple. You simply have to compile your application
41 * with the appropriate compiler flags that the @p pkg-config script
42 * outputs. For example:
43 *
44 * Compiling C or C++ files into object files:
45 *
46 * @verbatim
47 gcc -c -o main.o main.c `pkg-config --cflags escape`
48 @endverbatim
49 *
50 * Linking object files into a binary executable:
51 *
52 * @verbatim
53 gcc -o my_application main.o `pkg-config --libs escape`
54 @endverbatim
55 *
56 * See @ref pkgconfig
57 *
58 * @section escape_main_next_steps Next Steps
59 *
60 * After you understood what Escape is and installed it in your system
61 * you should proceed understanding the programming interface.
62 *
63 * Recommended reading:
64 *
65 * @li @ref Escape_Libgen_Group
66 * @li @ref Escape_Unistd_Group
67 * @li @ref Escape_Mman
68 */
69
70#include "escape_libgen.h"
71#include "escape_unistd.h"
72
73#ifdef __cplusplus
74extern "C" {
75#endif
76
77/* Nothing to see here */
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif /* __ESCAPE_H__ */
diff --git a/src/lib/escape/escape_libgen.c b/src/lib/escape/escape_libgen.c
deleted file mode 100644
index 7967089..0000000
--- a/src/lib/escape/escape_libgen.c
+++ /dev/null
@@ -1,90 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif /* HAVE_CONFIG_H */
4
5#include <string.h>
6#include <malloc.h>
7
8#include "Escape.h"
9
10static char _escape_basename_buf[PATH_MAX];
11static char _escape_dirname_buf[PATH_MAX];
12
13char *
14escape_basename(char *path)
15{
16 char *p1;
17 char *p2;
18 size_t length;
19
20 /* path must begin by "?:\" or "?:/" */
21 if (!path || strlen(path) <= 1)
22 {
23 memcpy(_escape_basename_buf, path, PATH_MAX);
24 return _escape_basename_buf;
25 }
26
27 length = strlen(path);
28 p1 = strdup(path);
29 if (!p1)
30 {
31 memcpy(_escape_basename_buf, path, PATH_MAX);
32 return _escape_basename_buf;
33 }
34
35 /* remove trailing backslashes */
36 p2 = p1 + (length - 1);
37 if (*p2 == '/')
38 {
39 while (*p2 == '/')
40 p2--;
41 }
42 *(p2 + 1) = '\0';
43
44 p2 = strrchr(p1, '/');
45 memcpy(_escape_basename_buf, p2 + 1, (p1 + length + 1) - p2);
46
47 free(p1);
48
49 return _escape_basename_buf;
50}
51
52char *
53escape_dirname(char *path)
54{
55 char *p1;
56 char *p2;
57 size_t length;
58
59 /* path must begin by "?:\" or "?:/" */
60 if (!path || strlen(path) <= 1)
61 {
62 memcpy(_escape_dirname_buf, path, PATH_MAX);
63 return _escape_dirname_buf;
64 }
65
66 length = strlen(path);
67 p1 = strdup(path);
68 if (!p1)
69 {
70 memcpy(_escape_dirname_buf, path, PATH_MAX);
71 return _escape_dirname_buf;
72 }
73 /* remove trailing backslashes */
74 p2 = p1 + (length - 1);
75 if (*p2 == '/')
76 {
77 while (*p2 == '/')
78 p2--;
79 }
80 *(p2 + 1) = '\0';
81
82 p2 = strrchr(p1, '/');
83 *p2 = '\0';
84 memcpy(_escape_dirname_buf, p1, strlen(p1) + 1);
85
86 free(p1);
87
88 return _escape_dirname_buf;
89}
90
diff --git a/src/lib/escape/escape_libgen.h b/src/lib/escape/escape_libgen.h
deleted file mode 100644
index 4b63674..0000000
--- a/src/lib/escape/escape_libgen.h
+++ /dev/null
@@ -1,33 +0,0 @@
1#ifndef __ESCAPE_LIBGEN_H__
2#define __ESCAPE_LIBGEN_H__
3
4/**
5 * @file escape_libgen.h
6 * @brief The file that provides functions ported from Unix in libgen.h.
7 * @defgroup Escape_Libgen_Group Libgen.h functions.
8 * @ingroup Escape
9 *
10 * This header provides functions ported from Unix in libgen.h.
11 *
12 * @{
13 */
14
15EAPI char *escape_basename(char *path);
16
17#ifdef basename
18#undef basename
19#endif
20#define basename(p) escape_basename(p)
21
22EAPI char *escape_dirname(char *path);
23
24#ifdef dirname
25#undef dirname
26#endif
27#define dirname(p) escape_dirname(p)
28
29/**
30 * @}
31 */
32
33#endif /* __ESCAPE_LIBGEN_H__ */
diff --git a/src/lib/escape/escape_mman.c b/src/lib/escape/escape_mman.c
deleted file mode 100644
index 995c72e..0000000
--- a/src/lib/escape/escape_mman.c
+++ /dev/null
@@ -1,67 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif /* HAVE_CONFIG_H */
4
5#include <stdio.h>
6#include <stdlib.h>
7#include <sys/types.h>
8#include <unistd.h>
9
10#include "sys/mman.h"
11
12/***** API *****/
13
14void *
15mmap(void *addr __UNUSED__,
16 size_t len,
17 int prot,
18 int flags,
19 int fd,
20 off_t offset)
21{
22 void *data;
23 size_t size;
24
25 data = malloc(len);
26 if (!data)
27 {
28 fprintf (stderr, "[Escape] [mmap] malloc failed\n");
29 return MAP_FAILED;
30 }
31
32 size = read(fd, data, len);
33 if (size != len)
34 {
35 fprintf (stderr, "[Escape] [mmap] read failed\n");
36 free(data);
37 return MAP_FAILED;
38 }
39
40 if (lseek(fd, -len, SEEK_CUR) == -1)
41 {
42 fprintf (stderr, "[Escape] [mmap] lseek failed\n");
43 free(data);
44 return MAP_FAILED;
45 }
46
47 return data;
48}
49
50int
51munmap(void *addr,
52 size_t len __UNUSED__)
53{
54 if (addr && (addr != MAP_FAILED))
55 free(addr);
56
57 return 0;
58}
59
60int
61madvise(void *addr __UNUSED__,
62 size_t length __UNUSED__,
63 int advice __UNUSED__)
64{
65 return 0;
66}
67
diff --git a/src/lib/escape/escape_unistd.c b/src/lib/escape/escape_unistd.c
deleted file mode 100644
index 3ac3ee7..0000000
--- a/src/lib/escape/escape_unistd.c
+++ /dev/null
@@ -1,184 +0,0 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif /* HAVE_CONFIG_H */
4
5#include <errno.h>
6
7#include <sys/types.h> /* See NOTES */
8#include <sys/socket.h>
9#include <net/socket.h>
10#include <netinet/in.h>
11#include <arpa/inet.h>
12#include <net/net.h>
13#include <string.h>
14#include <libiberty.h>
15#include <sys/stat.h>
16
17#include "Escape.h"
18
19char *
20escape_realpath(const char *path, char *resolved_path)
21{
22 char *real = lrealpath (path);
23
24 if (real)
25 {
26 if (resolved_path)
27 {
28 memcpy (resolved_path, real, PATH_MAX);
29 free (real);
30 return resolved_path;
31 }
32 else
33 {
34 return real;
35 }
36 }
37
38 return NULL;
39}
40
41int
42escape_access(const char *pathname, int mode)
43{
44 struct stat stat_buf;
45
46 if (stat(pathname, &stat_buf) != 0)
47 return -1;
48
49 if (mode == F_OK)
50 return 0;
51 if (mode == R_OK)
52 {
53 if (stat_buf.st_mode & S_IRUSR)
54 return 0;
55 errno = EACCES;
56 return -1;
57 }
58 if (mode == W_OK)
59 {
60 if (stat_buf.st_mode & S_IWUSR)
61 return 0;
62 errno = EROFS;
63 return -1;
64 }
65 if (mode == X_OK)
66 {
67 if (stat_buf.st_mode & S_IXUSR)
68 return 0;
69 errno = EACCES;
70 return -1;
71 }
72
73 return 0;
74}
75
76EAPI ssize_t
77escape_readlink(const char *path,
78 char *buf,
79 size_t bufsize)
80{
81 errno = EINVAL;
82 return -1;
83}
84
85EAPI int
86escape_symlink(const char *path1, const char *path2)
87{
88 errno = EINVAL;
89 return -1;
90}
91
92/*
93 * The code of the following functions has been kindly offered
94 * by Tor Lillqvist.
95 */
96int
97escape_pipe(int *fds)
98{
99 struct sockaddr_in saddr;
100 int temp;
101 int socket1 = -1;
102 int socket2 = -1;
103 fd_set read_set;
104 fd_set write_set;
105 int len;
106
107 temp = socket (AF_INET, SOCK_STREAM, 0);
108
109 if (temp == -1)
110 goto out0;
111
112 memset (&saddr, 0, sizeof (saddr));
113 saddr.sin_family = AF_INET;
114 saddr.sin_port = 0;
115 saddr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
116
117 if (bind (temp, (struct sockaddr *)&saddr, sizeof (saddr)))
118 goto out0;
119
120 if (listen (temp, 1) == -1)
121 goto out0;
122
123 len = sizeof (saddr);
124 if (getsockname (temp, (struct sockaddr *)&saddr, &len))
125 goto out0;
126
127 socket1 = socket (AF_INET, SOCK_STREAM, 0);
128
129 if (socket1 == -1)
130 goto out0;
131
132 if ((connect (socket1, (struct sockaddr *)&saddr, len) == -1) &&
133 (errno != EAGAIN))
134 goto out1;
135
136 FD_ZERO (&read_set);
137 FD_SET (temp, &read_set);
138
139 if (select (0, &read_set, NULL, NULL, NULL) == -1)
140 goto out1;
141
142 if (!FD_ISSET (temp, &read_set))
143 goto out1;
144
145 socket2 = accept (temp, (struct sockaddr *)&saddr, &len);
146 if (socket2 == -1)
147 goto out1;
148
149 FD_ZERO (&write_set);
150 FD_SET (socket1, &write_set);
151
152 if (select (0, NULL, &write_set, NULL, NULL) == -1)
153 goto out2;
154
155 if (!FD_ISSET (socket1, &write_set))
156 goto out2;
157
158 fds[0] = socket1;
159 fds[1] = socket2;
160
161 closesocket (temp);
162
163 return 0;
164
165out2:
166 closesocket (socket2);
167out1:
168 closesocket (socket1);
169out0:
170 closesocket (temp);
171
172 fds[0] = -1;
173 fds[1] = -1;
174
175 return -1;
176}
177
178#undef access
179int
180access(const char *pathname, int mode)
181{
182 return escape_access (pathname, mode);
183}
184
diff --git a/src/lib/escape/escape_unistd.h b/src/lib/escape/escape_unistd.h
deleted file mode 100644
index 1ed1b5a..0000000
--- a/src/lib/escape/escape_unistd.h
+++ /dev/null
@@ -1,108 +0,0 @@
1#ifndef __ESCAPE_UNISTD_H__
2#define __ESCAPE_UNISTD_H__
3
4/**
5 * @file escape_unistd.h
6 * @brief The file that provides functions ported from Unix in unistd.h.
7 * @defgroup Escape_Unistd_Group Unistd.h functions
8 * @ingroup Escape
9 *
10 * This header provides functions ported from Unix in unistd.h.
11 *
12 * @{
13 */
14
15#include <sys/syslimits.h>
16
17/* Path function */
18/**
19 * @brief return the canonicalized absolute pathname
20 *
21 * @param path A path to canonicalize
22 * @param resolved_path A pointer of size PATH_MAX where to store the result
23 *
24 * realpath() expands all symbolic links and resolves references to /./, /../
25 * and extra '/' characters in the null-terminated string named by path to
26 * produce a canonicalized absolute pathname. The resulting pathname is
27 * stored as a null-terminated string, up to a maximum of PATH_MAX bytes,
28 * in the buffer pointed to by resolved_path. The resulting path will have
29 * no symbolic link, /./ or /../ components.
30 *
31 * If resolved_path is specified as NULL, then realpath() uses malloc(3)
32 * to allocate a buffer of up to PATH_MAX bytes to hold the resolved pathname,
33 * and returns a pointer to this buffer.
34 * The caller should deallocate this buffer using free(3).
35 *
36 */
37EAPI char *escape_realpath(const char *path, char *resolved_path);
38#ifdef realpath
39#undef realpath
40#endif
41#define realpath escape_realpath
42
43EAPI ssize_t
44escape_readlink(const char *path,
45 char *buf,
46 size_t bufsize);
47#ifdef readlink
48#undef readlink
49#endif
50#define readlink escape_readlink
51
52EAPI int
53escape_symlink(const char *path1, const char *path2);
54#ifdef symlink
55#undef symlink
56#endif
57#define symlink escape_symlink
58
59/**
60 * @brief check real user's permissions for a file
61 *
62 * @param pathname The path to check
63 * @param mode the permission to check
64 *
65 * access() checks whether the calling process can access the file pathname.
66 * If pathname is a symbolic link, it is dereferenced.
67 * The mode specifies the accessibility check(s) to be performed, and is either
68 * the value F_OK, or a mask consisting of the bitwise OR of one or more
69 * of R_OK, W_OK, and X_OK. F_OK tests for the existence of the file.
70 * R_OK, W_OK, and X_OK test whether the file exists and grants read, write,
71 * and execute permissions, respectively.
72 *
73 */
74EAPI int
75escape_access(const char *pathname, int mode);
76#ifdef access
77#undef access
78#endif
79#define access escape_access
80
81/**
82 * @brief Create a pair of sockets.
83 *
84 * @param fds A pointer that contains two sockets.
85 *
86 * Create a pair of sockets that can be use with select().
87 * Contrary to Unix, that functions does not
88 * create a pair of file descriptors.
89 *
90 * Conformity: Not applicable.
91 */
92EAPI int
93escape_pipe(int *fds);
94
95/**
96 * @def pipe(fds)
97 *
98 * Wrapper around escape_pipe().
99 */
100#define pipe(fds) escape_pipe(fds)
101
102//#define sync()
103
104/**
105 * @}
106 */
107
108#endif /* __ESCAPE_UNISTD_H__ */
diff --git a/src/lib/escape/sys/mman.h b/src/lib/escape/sys/mman.h
deleted file mode 100644
index 6c328c4..0000000
--- a/src/lib/escape/sys/mman.h
+++ /dev/null
@@ -1,180 +0,0 @@
1#ifndef __ESCAPE_SYS_MMAN_H__
2#define __ESCAPE_SYS_MMAN_H__
3
4#include <Escape.h>
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
10/**
11 * @def PROT_NONE
12 * Data can not be accessed.
13 */
14
15/**
16 * @def PROT_READ
17 * Data can be read.
18 */
19
20/**
21 * @def PROT_WRITE
22 * Data can be written.
23 */
24
25/**
26 * @def PROT_EXEC
27 * Data can be executed.
28 */
29
30#define PROT_NONE 0x00
31#define PROT_READ 0x01
32#define PROT_WRITE 0x02
33#define PROT_EXEC 0x04
34
35/**
36 * @def MAP_SHARED
37 * Changes are shared.
38 */
39
40/**
41 * @def MAP_PRIVATE
42 * Changes are private.
43 */
44
45/**
46 * @def MAP_FIXED
47 * Interpret the address (addr) exactly.
48 */
49
50/**
51 * @def MAP_FAILED
52 * Error return from mmap().
53 */
54
55#define MAP_SHARED 0x0001
56#define MAP_PRIVATE 0x0002
57#define MAP_FIXED 0x0010
58
59#define MAP_FAILED ((void *)-1)
60
61/**
62 * @file mman.h
63 * @brief The file that provides the memory map functions
64 * @defgroup Escape_Mman Functions that manage memory mappping.
65 * @ingroup Escape
66 *
67 * This header provides the meomry map functions mmap and munmap.
68 *
69 */
70
71/**
72 * Creates or opens a named or unnamed file mapping object for a
73 * specified file and maps a view of a file mapping into the
74 * address space of a calling process.
75 *
76 * @param addr Unused
77 * @param len Number of bytes to be mapped.
78 * @param prot Protections.
79 * @param flags Type of the mapped object.
80 * @param fd File descriptor that describes the object to map.
81 * @param offset Number of bytes from which to start the mapping.
82 * @return The starting address of the mapped view on success, -1 otherwise.
83 *
84 * Create or open an unnamed file mapping object for a specified
85 * file described by the file descriptor @p fd. The number of
86 * bytes that are mapped is given by @p len and start after
87 * @p offset bytes. The parameter @p addr is unused.
88 *
89 * The only type of the mapped object that is supported is
90 * @c MAP_SHARED. If another value if given, -1 is returned.
91 *
92 * @p prot specifies the protection of the mapped region. If
93 * PROT_EXEC is used, it set the execute access. If PROT_READ
94 * is used, it sets the read access. If PROT_WRITE is used, it
95 * sets the write access.
96 *
97 * If the map view of file can not be created, -1 is returned.
98 * If the mappping can not be done, -1 is returned.
99 *
100 * If no error occurred, the starting address of the mapped view
101 * is returned.
102 *
103 * Conformity: None.
104 *
105 * @ingroup Escape_Mman
106 */
107EAPI void *mmap(void *addr,
108 size_t len,
109 int prot,
110 int flags,
111 int fd,
112 off_t offset);
113
114/**
115 * Unmaps a mapped view of a file from the calling process's
116 * address space.
117 *
118 * @param addr Pointer to the base address.
119 * @param len Unused.
120 * @return 0 on success, -1 otherwise.
121 *
122 * Unmaps a mapped view of a file from the calling process's
123 * address space. @p addr is the pointer to the base address.
124 * This value must be identical to the value returned by a
125 * previous call to mmap(). The parameter @p len is unused.
126 *
127 * Conformity: None.
128 *
129 * @ingroup Escape_Mman
130 */
131EAPI int
132munmap(void *addr,
133 size_t len);
134
135# define MADV_NORMAL 0 /* No further special treatment. */
136# define MADV_RANDOM 1 /* Expect random page references. */
137# define MADV_SEQUENTIAL 2 /* Expect sequential page references. */
138# define MADV_WILLNEED 3 /* Will need these pages. */
139# define MADV_DONTNEED 4 /* Don't need these pages. */
140# define MADV_REMOVE 9 /* Remove these pages and resources. */
141# define MADV_DONTFORK 10 /* Do not inherit across fork. */
142# define MADV_DOFORK 11 /* Do inherit across fork. */
143# define MADV_MERGEABLE 12 /* KSM may merge identical pages. */
144# define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */
145# define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */
146# define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */
147# define MADV_HWPOISON 100 /* Poison a page for testing. */
148
149/**
150 * give advice about use of memory
151 *
152 * @param addr Unused.
153 * @param length Unused.
154 * @param advice Unused.
155 * @return 0 on success, -1 otherwise.
156 *
157 * The madvise() system call advises the kernel about how to handle
158 * paging input/output in the address range beginning at address addr and
159 * with size length bytes. It allows an application to tell the kernel
160 * how it expects to use some mapped or shared memory areas, so that
161 * the kernel can choose appropriate read-ahead and caching techniques.
162 * This call does not influence the semantics of the application (except
163 * in the case of MADV_DONTNEED), but may influence its performance.
164 * The kernel is free to ignore the advice.
165
166 * Conformity: None.
167 *
168 * @ingroup Escape_Mman
169 */
170EAPI int
171madvise(void *addr,
172 size_t length,
173 int advice);
174
175#ifdef __cplusplus
176}
177#endif
178
179#endif /* __ESCAPE_SYS_MMAN_H__ */
180
diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h
index 5fecf3f..91a2d98 100644
--- a/src/lib/evas/include/evas_common_private.h
+++ b/src/lib/evas/include/evas_common_private.h
@@ -24,10 +24,6 @@
24#include <stdint.h> 24#include <stdint.h>
25#include <unistd.h> 25#include <unistd.h>
26 26
27#ifdef HAVE_ESCAPE
28# include <Escape.h>
29#endif
30
31#ifdef HAVE_PIXMAN 27#ifdef HAVE_PIXMAN
32#include <pixman.h> 28#include <pixman.h>
33#endif 29#endif