parent
bf1ebaf7f4
commit
c1f2c6f682
|
@ -473,6 +473,21 @@ case "$host_vendor" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
### Checks for portability layer
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES([EXOTIC],
|
||||||
|
[exotic],
|
||||||
|
[enable_exotic="yes"],
|
||||||
|
[enable_exotic="no"])
|
||||||
|
|
||||||
|
if test "x${enable_exotic}" = "xyes"; then
|
||||||
|
requirement_exotic="exotic ${requirement_exotic}"
|
||||||
|
|
||||||
|
AC_DEFINE([HAVE_EXOTIC], [1], [Define to 1 if you have Exotic.])
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL([ECORE_HAVE_EXOTIC], [test "x${enable_exotic}" = "xyes"])
|
||||||
|
|
||||||
AC_SUBST(EFL_ECORE_BUILD)
|
AC_SUBST(EFL_ECORE_BUILD)
|
||||||
AC_SUBST(EFL_ECORE_CON_BUILD)
|
AC_SUBST(EFL_ECORE_CON_BUILD)
|
||||||
AC_SUBST(EFL_ECORE_EVAS_BUILD)
|
AC_SUBST(EFL_ECORE_EVAS_BUILD)
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
dnl Copyright (C) 2011 Cedric Bail <cedric.bail@free.fr>
|
||||||
|
dnl This code is public domain and can be freely used or copied.
|
||||||
|
|
||||||
|
dnl Macro that check for gettimeofday definition
|
||||||
|
|
||||||
|
dnl Usage: EFL_CHECK_GETTIMEOFDAY(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
||||||
|
dnl Define EFL_HAVE_GETTIMEOFDAY
|
||||||
|
|
||||||
|
AC_DEFUN([EFL_CHECK_GETTIMEOFDAY],
|
||||||
|
[
|
||||||
|
|
||||||
|
_efl_have_gettimeofday="no"
|
||||||
|
|
||||||
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([[
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
]],
|
||||||
|
[[
|
||||||
|
int res;
|
||||||
|
res = gettimeofday(NULL, NULL);
|
||||||
|
]])],
|
||||||
|
[_efl_have_gettimeofday="yes"],
|
||||||
|
[_efl_have_gettimeofday="no"])
|
||||||
|
|
||||||
|
if test "x${_efl_have_gettimeofday}" = "xno" -a "x${enable_exotic}" = "xyes"; then
|
||||||
|
SAVE_LIBS="${LIBS}"
|
||||||
|
SAVE_CFLAGS="${CFLAGS}"
|
||||||
|
LIBS="${LIBS} ${EXOTIC_LIBS}"
|
||||||
|
CFLAGS="${CFLAGS} ${EXOTIC_CFLAGS}"
|
||||||
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([[
|
||||||
|
#include <Exotic.h>
|
||||||
|
]],
|
||||||
|
[[
|
||||||
|
int res;
|
||||||
|
res = gettimeofday(NULL, NULL);
|
||||||
|
]])],
|
||||||
|
[_efl_have_gettimeofday="yes"],
|
||||||
|
[_efl_have_gettimeofday="no"])
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x${_efl_have_gettimeofday}" = "xyes"; then
|
||||||
|
AC_DEFINE([EFL_HAVE_GETTIMEOFDAY], [1], [Defined if gettimeofday is available.])
|
||||||
|
fi
|
||||||
|
|
||||||
|
AS_IF([test "x${_efl_have_gettimeofday}" = "xyes"], [$1], [$2])
|
||||||
|
])
|
|
@ -320,8 +320,10 @@ sudo make install
|
||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
#else
|
#else
|
||||||
# include <sys/time.h>
|
# include <sys/time.h>
|
||||||
|
# if !defined (EXOTIC_NO_SIGNAL)
|
||||||
# include <signal.h>
|
# include <signal.h>
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
@ -592,7 +594,7 @@ struct _Ecore_Event_Signal_User /** User signal event */
|
||||||
int number; /**< The signal number. Either 1 or 2 */
|
int number; /**< The signal number. Either 1 or 2 */
|
||||||
void *ext_data; /**< Extension data - not used */
|
void *ext_data; /**< Extension data - not used */
|
||||||
|
|
||||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||||
siginfo_t data; /**< Signal info */
|
siginfo_t data; /**< Signal info */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -601,7 +603,7 @@ struct _Ecore_Event_Signal_Hup /** Hup signal event */
|
||||||
{
|
{
|
||||||
void *ext_data; /**< Extension data - not used */
|
void *ext_data; /**< Extension data - not used */
|
||||||
|
|
||||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||||
siginfo_t data; /**< Signal info */
|
siginfo_t data; /**< Signal info */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -613,7 +615,7 @@ struct _Ecore_Event_Signal_Exit /** Exit request event */
|
||||||
Eina_Bool terminate : 1; /**< Set if the exit request was a terminate singal */
|
Eina_Bool terminate : 1; /**< Set if the exit request was a terminate singal */
|
||||||
void *ext_data; /**< Extension data - not used */
|
void *ext_data; /**< Extension data - not used */
|
||||||
|
|
||||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||||
siginfo_t data; /**< Signal info */
|
siginfo_t data; /**< Signal info */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -622,7 +624,7 @@ struct _Ecore_Event_Signal_Power /** Power event */
|
||||||
{
|
{
|
||||||
void *ext_data; /**< Extension data - not used */
|
void *ext_data; /**< Extension data - not used */
|
||||||
|
|
||||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||||
siginfo_t data; /**< Signal info */
|
siginfo_t data; /**< Signal info */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -631,7 +633,7 @@ struct _Ecore_Event_Signal_Realtime /** Realtime event */
|
||||||
{
|
{
|
||||||
int num; /**< The realtime signal's number */
|
int num; /**< The realtime signal's number */
|
||||||
|
|
||||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||||
siginfo_t data; /**< Signal info */
|
siginfo_t data; /**< Signal info */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -725,7 +727,7 @@ struct _Ecore_Exe_Event_Del /** Process exit event */
|
||||||
Eina_Bool exited : 1; /** < set to 1 if the process exited of its own accord */
|
Eina_Bool exited : 1; /** < set to 1 if the process exited of its own accord */
|
||||||
Eina_Bool signalled : 1; /** < set to 1 id the process exited due to uncaught signal */
|
Eina_Bool signalled : 1; /** < set to 1 id the process exited due to uncaught signal */
|
||||||
void *ext_data; /**< Extension data - not used */
|
void *ext_data; /**< Extension data - not used */
|
||||||
#if !defined (_WIN32) && !defined (__lv2ppu__)
|
#if !defined (_WIN32) && !defined (__lv2ppu__) && !defined (EXOTIC_NO_SIGNAL)
|
||||||
siginfo_t data; /**< Signal info */
|
siginfo_t data; /**< Signal info */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
|
@ -47,6 +47,12 @@ libecore_la_SOURCES += ecore_exe_ps3.c
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
if ECORE_HAVE_EXOTIC
|
||||||
|
|
||||||
|
libecore_la_SOURCES +=
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
libecore_la_SOURCES += ecore_signal.c ecore_exe.c
|
libecore_la_SOURCES += ecore_signal.c ecore_exe.c
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
@ -55,6 +61,8 @@ endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
libecore_la_LIBADD = @dlopen_libs@ @EINA_LIBS@ @EVIL_LIBS@ @GLIB_LIBS@ @WIN32_LIBS@ @LTLIBINTL@ @EFL_PTHREAD_LIBS@ @rt_libs@ -lm
|
libecore_la_LIBADD = @dlopen_libs@ @EINA_LIBS@ @EVIL_LIBS@ @GLIB_LIBS@ @WIN32_LIBS@ @LTLIBINTL@ @EFL_PTHREAD_LIBS@ @rt_libs@ -lm
|
||||||
libecore_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ @EFL_PTHREAD_LIBS@
|
libecore_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@ @EFL_PTHREAD_LIBS@
|
||||||
|
|
||||||
|
|
|
@ -163,8 +163,10 @@ ecore_init(void)
|
||||||
if (!ecore_mempool_init()) goto shutdown_mempool;
|
if (!ecore_mempool_init()) goto shutdown_mempool;
|
||||||
_ecore_main_loop_init();
|
_ecore_main_loop_init();
|
||||||
_ecore_signal_init();
|
_ecore_signal_init();
|
||||||
_ecore_thread_init();
|
#ifndef HAVE_EXOTIC
|
||||||
_ecore_exe_init();
|
_ecore_exe_init();
|
||||||
|
#endif
|
||||||
|
_ecore_thread_init();
|
||||||
_ecore_glib_init();
|
_ecore_glib_init();
|
||||||
_ecore_job_init();
|
_ecore_job_init();
|
||||||
_ecore_time_init();
|
_ecore_time_init();
|
||||||
|
@ -252,7 +254,9 @@ ecore_shutdown(void)
|
||||||
_ecore_glib_shutdown();
|
_ecore_glib_shutdown();
|
||||||
_ecore_job_shutdown();
|
_ecore_job_shutdown();
|
||||||
_ecore_thread_shutdown();
|
_ecore_thread_shutdown();
|
||||||
|
#ifndef HAVE_EXOTIC
|
||||||
_ecore_exe_shutdown();
|
_ecore_exe_shutdown();
|
||||||
|
#endif
|
||||||
_ecore_idle_enterer_shutdown();
|
_ecore_idle_enterer_shutdown();
|
||||||
_ecore_idle_exiter_shutdown();
|
_ecore_idle_exiter_shutdown();
|
||||||
_ecore_idler_shutdown();
|
_ecore_idler_shutdown();
|
||||||
|
|
|
@ -38,6 +38,10 @@ void *alloca(size_t);
|
||||||
# include <Evil.h>
|
# include <Evil.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_EXOTIC
|
||||||
|
# include <Exotic.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Ecore.h"
|
#include "Ecore.h"
|
||||||
#include "Ecore_Getopt.h"
|
#include "Ecore_Getopt.h"
|
||||||
|
|
||||||
|
|
|
@ -229,10 +229,14 @@ static Eina_Bool win32_handlers_delete_me = EINA_FALSE;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
Ecore_Select_Function main_loop_select = _ecore_main_win32_select;
|
Ecore_Select_Function main_loop_select = _ecore_main_win32_select;
|
||||||
#else
|
#else
|
||||||
|
# if !defined EXOTIC_NO_SELECT
|
||||||
# ifdef HAVE_SYS_SELECT_H
|
# ifdef HAVE_SYS_SELECT_H
|
||||||
# include <sys/select.h>
|
# include <sys/select.h>
|
||||||
# endif
|
# endif
|
||||||
Ecore_Select_Function main_loop_select = select;
|
Ecore_Select_Function main_loop_select = select;
|
||||||
|
# else
|
||||||
|
Ecore_Select_Function main_loop_select = NULL;
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef USE_G_MAIN_LOOP
|
#ifndef USE_G_MAIN_LOOP
|
||||||
|
|
|
@ -74,6 +74,9 @@
|
||||||
|
|
||||||
#endif /* ! _WIN32 */
|
#endif /* ! _WIN32 */
|
||||||
|
|
||||||
|
#include <Ecore.h>
|
||||||
|
#include "ecore_private.h"
|
||||||
|
|
||||||
struct _Ecore_Pipe
|
struct _Ecore_Pipe
|
||||||
{
|
{
|
||||||
ECORE_MAGIC;
|
ECORE_MAGIC;
|
||||||
|
|
|
@ -174,7 +174,7 @@ void *_ecore_main_fd_handler_del(Ecore_Fd_Handler *fd_handler);
|
||||||
|
|
||||||
void _ecore_main_shutdown(void);
|
void _ecore_main_shutdown(void);
|
||||||
|
|
||||||
#if defined (_WIN32) || defined (__lv2ppu__)
|
#if defined (_WIN32) || defined (__lv2ppu__) || defined (HAVE_EXOTIC)
|
||||||
static inline void _ecore_signal_shutdown(void) { }
|
static inline void _ecore_signal_shutdown(void) { }
|
||||||
|
|
||||||
static inline void _ecore_signal_init(void) { }
|
static inline void _ecore_signal_init(void) { }
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef HAVE_CLOCK_GETTIME
|
#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
|
||||||
static clockid_t _ecore_time_clock_id = -1;
|
static clockid_t _ecore_time_clock_id = -1;
|
||||||
#elif defined(__APPLE__) && defined(__MACH__)
|
#elif defined(__APPLE__) && defined(__MACH__)
|
||||||
static double _ecore_time_clock_conversion = 1e-9;
|
static double _ecore_time_clock_conversion = 1e-9;
|
||||||
|
@ -52,7 +52,7 @@ double _ecore_time_loop_time = -1.0;
|
||||||
EAPI double
|
EAPI double
|
||||||
ecore_time_get(void)
|
ecore_time_get(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_CLOCK_GETTIME
|
#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
|
||||||
struct timespec t;
|
struct timespec t;
|
||||||
|
|
||||||
if (EINA_UNLIKELY(_ecore_time_clock_id < 0))
|
if (EINA_UNLIKELY(_ecore_time_clock_id < 0))
|
||||||
|
@ -86,7 +86,7 @@ ecore_time_get(void)
|
||||||
EAPI double
|
EAPI double
|
||||||
ecore_time_unix_get(void)
|
ecore_time_unix_get(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETTIMEOFDAY
|
#ifdef EFL_HAVE_GETTIMEOFDAY
|
||||||
struct timeval timev;
|
struct timeval timev;
|
||||||
|
|
||||||
gettimeofday(&timev, NULL);
|
gettimeofday(&timev, NULL);
|
||||||
|
@ -136,7 +136,7 @@ ecore_loop_time_get(void)
|
||||||
void
|
void
|
||||||
_ecore_time_init(void)
|
_ecore_time_init(void)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_CLOCK_GETTIME
|
#if defined (HAVE_CLOCK_GETTIME) || defined (EXOTIC_PROVIDE_CLOCK_GETTIME)
|
||||||
struct timespec t;
|
struct timespec t;
|
||||||
|
|
||||||
if (_ecore_time_clock_id != -1) return;
|
if (_ecore_time_clock_id != -1) return;
|
||||||
|
|
Loading…
Reference in New Issue