forked from enlightenment/efl
efl: use HAVE_FCNTL around call to fcntl.
This commit is contained in:
parent
aac1bbb017
commit
8d5e33077e
|
@ -3,6 +3,7 @@
|
||||||
* Eeze: add a dummy implementation of libmount when it is not available.
|
* Eeze: add a dummy implementation of libmount when it is not available.
|
||||||
* Ecore_Con: add systemd socket activation support (ECORE_CON_SOCKET_ACTIVATE).
|
* Ecore_Con: add systemd socket activation support (ECORE_CON_SOCKET_ACTIVATE).
|
||||||
* Ecore: notify systemd that we are ready as soon as the main loop is running.
|
* Ecore: notify systemd that we are ready as soon as the main loop is running.
|
||||||
|
* EFL: use HAVE_FCNTL to disable code using fcntl.
|
||||||
|
|
||||||
2013-03-08 Igor Murzov
|
2013-03-08 Igor Murzov
|
||||||
|
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -122,6 +122,7 @@ Improvements:
|
||||||
* Evas GL engine downscale quality in smooth mode much improved with multisampling up to effectively 16x16 via shaders.
|
* Evas GL engine downscale quality in smooth mode much improved with multisampling up to effectively 16x16 via shaders.
|
||||||
* eina: eina_strlcat now work with a NULL source.
|
* eina: eina_strlcat now work with a NULL source.
|
||||||
* Evas textblock: Added proper size adjustments for "high" shaped texts.
|
* Evas textblock: Added proper size adjustments for "high" shaped texts.
|
||||||
|
* Use the right macro to disable fcntl.
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
* Fix a memory leak in ecore_con_dns when using ecore_con_server_connect
|
* Fix a memory leak in ecore_con_dns when using ecore_con_server_connect
|
||||||
|
|
|
@ -468,7 +468,8 @@ malloc_usable_size \
|
||||||
mkdirat \
|
mkdirat \
|
||||||
mtrace \
|
mtrace \
|
||||||
realpath \
|
realpath \
|
||||||
strlcpy
|
strlcpy \
|
||||||
|
fcntl \
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_FUNC_ALLOCA
|
AC_FUNC_ALLOCA
|
||||||
|
|
|
@ -180,7 +180,7 @@ ecore_con_info_mcast_listen(Ecore_Con_Server *svr,
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
_ecore_fd_close_on_exec(int fd)
|
_ecore_fd_close_on_exec(int fd)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
flags = fcntl(fd, F_GETFD);
|
flags = fcntl(fd, F_GETFD);
|
||||||
|
|
|
@ -50,7 +50,7 @@ int
|
||||||
ecore_file_monitor_backend_init(void)
|
ecore_file_monitor_backend_init(void)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
int flags;
|
int flags;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ ecore_file_monitor_backend_init(void)
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
flags = fcntl(fd, F_GETFD);
|
flags = fcntl(fd, F_GETFD);
|
||||||
flags |= FD_CLOEXEC;
|
flags |= FD_CLOEXEC;
|
||||||
fcntl(fd, F_SETFD, flags);
|
fcntl(fd, F_SETFD, flags);
|
||||||
|
|
|
@ -957,7 +957,7 @@ eina_file_open(const char *path, Eina_Bool shared)
|
||||||
char *filename;
|
char *filename;
|
||||||
struct stat file_stat;
|
struct stat file_stat;
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
int flags;
|
int flags;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -977,7 +977,7 @@ eina_file_open(const char *path, Eina_Bool shared)
|
||||||
|
|
||||||
if (fd < 0) goto on_error;
|
if (fd < 0) goto on_error;
|
||||||
|
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
flags = fcntl(fd, F_GETFD);
|
flags = fcntl(fd, F_GETFD);
|
||||||
if (flags == -1)
|
if (flags == -1)
|
||||||
goto on_error;
|
goto on_error;
|
||||||
|
|
|
@ -156,7 +156,7 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled)
|
||||||
/* no zero page device - open it */
|
/* no zero page device - open it */
|
||||||
if (_eina_mmap_zero_fd < 0)
|
if (_eina_mmap_zero_fd < 0)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
int flags;
|
int flags;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ eina_mmap_safety_enabled_set(Eina_Bool enabled)
|
||||||
/* if we don;'t have one - fail to set up mmap safety */
|
/* if we don;'t have one - fail to set up mmap safety */
|
||||||
if (_eina_mmap_zero_fd < 0) return EINA_FALSE;
|
if (_eina_mmap_zero_fd < 0) return EINA_FALSE;
|
||||||
|
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
flags = fcntl(_eina_mmap_zero_fd, F_GETFD);
|
flags = fcntl(_eina_mmap_zero_fd, F_GETFD);
|
||||||
flags |= FD_CLOEXEC;
|
flags |= FD_CLOEXEC;
|
||||||
fcntl(_eina_mmap_zero_fd, F_SETFD, flags);
|
fcntl(_eina_mmap_zero_fd, F_SETFD, flags);
|
||||||
|
|
|
@ -164,7 +164,7 @@ _eio_inotify_handler(void *data EINA_UNUSED, Ecore_Fd_Handler *fdh)
|
||||||
void eio_monitor_backend_init(void)
|
void eio_monitor_backend_init(void)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
int flags;
|
int flags;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -172,7 +172,7 @@ void eio_monitor_backend_init(void)
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
flags = fcntl(fd, F_GETFD);
|
flags = fcntl(fd, F_GETFD);
|
||||||
flags |= FD_CLOEXEC;
|
flags |= FD_CLOEXEC;
|
||||||
fcntl(fd, F_SETFD, flags);
|
fcntl(fd, F_SETFD, flags);
|
||||||
|
|
|
@ -35,7 +35,7 @@ static int _init_evas_event = 0;
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
_evas_fd_close_on_exec(int fd)
|
_evas_fd_close_on_exec(int fd)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
int flags;
|
int flags;
|
||||||
|
|
||||||
flags = fcntl(fd, F_GETFD);
|
flags = fcntl(fd, F_GETFD);
|
||||||
|
@ -74,7 +74,7 @@ evas_async_events_init(void)
|
||||||
_fd_read = filedes[0];
|
_fd_read = filedes[0];
|
||||||
_fd_write = filedes[1];
|
_fd_write = filedes[1];
|
||||||
|
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
fcntl(_fd_read, F_SETFL, O_NONBLOCK);
|
fcntl(_fd_read, F_SETFL, O_NONBLOCK);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ evas_async_events_process(void)
|
||||||
static void
|
static void
|
||||||
_evas_async_events_fd_blocking_set(Eina_Bool blocking)
|
_evas_async_events_fd_blocking_set(Eina_Bool blocking)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
long flags = fcntl(_fd_read, F_GETFL);
|
long flags = fcntl(_fd_read, F_GETFL);
|
||||||
|
|
||||||
if (blocking) flags &= ~O_NONBLOCK;
|
if (blocking) flags &= ~O_NONBLOCK;
|
||||||
|
|
|
@ -87,7 +87,7 @@ _server_connect(void)
|
||||||
{
|
{
|
||||||
int s, len;
|
int s, len;
|
||||||
struct sockaddr_un remote;
|
struct sockaddr_un remote;
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
int flags;
|
int flags;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ _server_connect(void)
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_EXECVP
|
#ifdef HAVE_FCNTL
|
||||||
flags = fcntl(s, F_GETFD);
|
flags = fcntl(s, F_GETFD);
|
||||||
flags |= FD_CLOEXEC;
|
flags |= FD_CLOEXEC;
|
||||||
fcntl(s, F_SETFD, flags);
|
fcntl(s, F_SETFD, flags);
|
||||||
|
|
Loading…
Reference in New Issue