summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2013-03-10 23:09:45 +0900
committerCedric Bail <cedric.bail@free.fr>2013-03-10 23:10:27 +0900
commit8d5e33077e9317fdd0ace25901457084413c5f54 (patch)
tree826ad78bb676d7b782040d20cdcf00af257f7280 /src/lib
parentaac1bbb017a170ff6892a3a71f1cb2e9f79c778b (diff)
efl: use HAVE_FCNTL around call to fcntl.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ecore_con/ecore_con_info.c2
-rw-r--r--src/lib/ecore_file/ecore_file_monitor_inotify.c4
-rw-r--r--src/lib/eina/eina_file.c4
-rw-r--r--src/lib/eina/eina_mmap.c4
-rw-r--r--src/lib/eio/eio_monitor_inotify.c4
-rw-r--r--src/lib/evas/canvas/evas_async_events.c6
-rw-r--r--src/lib/evas/cserve2/evas_cs2_client.c4
7 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/ecore_con/ecore_con_info.c b/src/lib/ecore_con/ecore_con_info.c
index a4f80623a2..62a1836d21 100644
--- a/src/lib/ecore_con/ecore_con_info.c
+++ b/src/lib/ecore_con/ecore_con_info.c
@@ -180,7 +180,7 @@ ecore_con_info_mcast_listen(Ecore_Con_Server *svr,
180Eina_Bool 180Eina_Bool
181_ecore_fd_close_on_exec(int fd) 181_ecore_fd_close_on_exec(int fd)
182{ 182{
183#ifdef HAVE_EXECVP 183#ifdef HAVE_FCNTL
184 int flags; 184 int flags;
185 185
186 flags = fcntl(fd, F_GETFD); 186 flags = fcntl(fd, F_GETFD);
diff --git a/src/lib/ecore_file/ecore_file_monitor_inotify.c b/src/lib/ecore_file/ecore_file_monitor_inotify.c
index be3564602f..112bc81f14 100644
--- a/src/lib/ecore_file/ecore_file_monitor_inotify.c
+++ b/src/lib/ecore_file/ecore_file_monitor_inotify.c
@@ -50,7 +50,7 @@ int
50ecore_file_monitor_backend_init(void) 50ecore_file_monitor_backend_init(void)
51{ 51{
52 int fd; 52 int fd;
53#ifdef HAVE_EXECVP 53#ifdef HAVE_FCNTL
54 int flags; 54 int flags;
55#endif 55#endif
56 56
@@ -58,7 +58,7 @@ ecore_file_monitor_backend_init(void)
58 if (fd < 0) 58 if (fd < 0)
59 return 0; 59 return 0;
60 60
61#ifdef HAVE_EXECVP 61#ifdef HAVE_FCNTL
62 flags = fcntl(fd, F_GETFD); 62 flags = fcntl(fd, F_GETFD);
63 flags |= FD_CLOEXEC; 63 flags |= FD_CLOEXEC;
64 fcntl(fd, F_SETFD, flags); 64 fcntl(fd, F_SETFD, flags);
diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c
index 271e4ce27d..126a665fbf 100644
--- a/src/lib/eina/eina_file.c
+++ b/src/lib/eina/eina_file.c
@@ -957,7 +957,7 @@ eina_file_open(const char *path, Eina_Bool shared)
957 char *filename; 957 char *filename;
958 struct stat file_stat; 958 struct stat file_stat;
959 int fd = -1; 959 int fd = -1;
960#ifdef HAVE_EXECVP 960#ifdef HAVE_FCNTL
961 int flags; 961 int flags;
962#endif 962#endif
963 963
@@ -977,7 +977,7 @@ eina_file_open(const char *path, Eina_Bool shared)
977 977
978 if (fd < 0) goto on_error; 978 if (fd < 0) goto on_error;
979 979
980#ifdef HAVE_EXECVP 980#ifdef HAVE_FCNTL
981 flags = fcntl(fd, F_GETFD); 981 flags = fcntl(fd, F_GETFD);
982 if (flags == -1) 982 if (flags == -1)
983 goto on_error; 983 goto on_error;
diff --git a/src/lib/eina/eina_mmap.c b/src/lib/eina/eina_mmap.c
index bed7e07d08..d8fd2e55f8 100644
--- a/src/lib/eina/eina_mmap.c
+++ b/src/lib/eina/eina_mmap.c
@@ -156,7 +156,7 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled)
156 /* no zero page device - open it */ 156 /* no zero page device - open it */
157 if (_eina_mmap_zero_fd < 0) 157 if (_eina_mmap_zero_fd < 0)
158 { 158 {
159#ifdef HAVE_EXECVP 159#ifdef HAVE_FCNTL
160 int flags; 160 int flags;
161#endif 161#endif
162 162
@@ -164,7 +164,7 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled)
164 /* if we don;'t have one - fail to set up mmap safety */ 164 /* if we don;'t have one - fail to set up mmap safety */
165 if (_eina_mmap_zero_fd < 0) return EINA_FALSE; 165 if (_eina_mmap_zero_fd < 0) return EINA_FALSE;
166 166
167#ifdef HAVE_EXECVP 167#ifdef HAVE_FCNTL
168 flags = fcntl(_eina_mmap_zero_fd, F_GETFD); 168 flags = fcntl(_eina_mmap_zero_fd, F_GETFD);
169 flags |= FD_CLOEXEC; 169 flags |= FD_CLOEXEC;
170 fcntl(_eina_mmap_zero_fd, F_SETFD, flags); 170 fcntl(_eina_mmap_zero_fd, F_SETFD, flags);
diff --git a/src/lib/eio/eio_monitor_inotify.c b/src/lib/eio/eio_monitor_inotify.c
index bb2e091f62..012cd59c4a 100644
--- a/src/lib/eio/eio_monitor_inotify.c
+++ b/src/lib/eio/eio_monitor_inotify.c
@@ -164,7 +164,7 @@ _eio_inotify_handler(void *data EINA_UNUSED, Ecore_Fd_Handler *fdh)
164void eio_monitor_backend_init(void) 164void eio_monitor_backend_init(void)
165{ 165{
166 int fd; 166 int fd;
167#ifdef HAVE_EXECVP 167#ifdef HAVE_FCNTL
168 int flags; 168 int flags;
169#endif 169#endif
170 170
@@ -172,7 +172,7 @@ void eio_monitor_backend_init(void)
172 if (fd < 0) 172 if (fd < 0)
173 return ; 173 return ;
174 174
175#ifdef HAVE_EXECVP 175#ifdef HAVE_FCNTL
176 flags = fcntl(fd, F_GETFD); 176 flags = fcntl(fd, F_GETFD);
177 flags |= FD_CLOEXEC; 177 flags |= FD_CLOEXEC;
178 fcntl(fd, F_SETFD, flags); 178 fcntl(fd, F_SETFD, flags);
diff --git a/src/lib/evas/canvas/evas_async_events.c b/src/lib/evas/canvas/evas_async_events.c
index ed8a55172e..2bab52875a 100644
--- a/src/lib/evas/canvas/evas_async_events.c
+++ b/src/lib/evas/canvas/evas_async_events.c
@@ -35,7 +35,7 @@ static int _init_evas_event = 0;
35Eina_Bool 35Eina_Bool
36_evas_fd_close_on_exec(int fd) 36_evas_fd_close_on_exec(int fd)
37{ 37{
38#ifdef HAVE_EXECVP 38#ifdef HAVE_FCNTL
39 int flags; 39 int flags;
40 40
41 flags = fcntl(fd, F_GETFD); 41 flags = fcntl(fd, F_GETFD);
@@ -74,7 +74,7 @@ evas_async_events_init(void)
74 _fd_read = filedes[0]; 74 _fd_read = filedes[0];
75 _fd_write = filedes[1]; 75 _fd_write = filedes[1];
76 76
77#ifdef HAVE_EXECVP 77#ifdef HAVE_FCNTL
78 fcntl(_fd_read, F_SETFL, O_NONBLOCK); 78 fcntl(_fd_read, F_SETFL, O_NONBLOCK);
79#endif 79#endif
80 80
@@ -195,7 +195,7 @@ evas_async_events_process(void)
195static void 195static void
196_evas_async_events_fd_blocking_set(Eina_Bool blocking) 196_evas_async_events_fd_blocking_set(Eina_Bool blocking)
197{ 197{
198#ifdef HAVE_EXECVP 198#ifdef HAVE_FCNTL
199 long flags = fcntl(_fd_read, F_GETFL); 199 long flags = fcntl(_fd_read, F_GETFL);
200 200
201 if (blocking) flags &= ~O_NONBLOCK; 201 if (blocking) flags &= ~O_NONBLOCK;
diff --git a/src/lib/evas/cserve2/evas_cs2_client.c b/src/lib/evas/cserve2/evas_cs2_client.c
index 43bdd239d3..dcc8ff260f 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -87,7 +87,7 @@ _server_connect(void)
87{ 87{
88 int s, len; 88 int s, len;
89 struct sockaddr_un remote; 89 struct sockaddr_un remote;
90#ifdef HAVE_EXECVP 90#ifdef HAVE_FCNTL
91 int flags; 91 int flags;
92#endif 92#endif
93 93
@@ -97,7 +97,7 @@ _server_connect(void)
97 return EINA_FALSE; 97 return EINA_FALSE;
98 } 98 }
99 99
100#ifdef HAVE_EXECVP 100#ifdef HAVE_FCNTL
101 flags = fcntl(s, F_GETFD); 101 flags = fcntl(s, F_GETFD);
102 flags |= FD_CLOEXEC; 102 flags |= FD_CLOEXEC;
103 fcntl(s, F_SETFD, flags); 103 fcntl(s, F_SETFD, flags);