forked from enlightenment/efl
Evil: integrate the dlfcn code into Evil
This will remove some incompatibilities with other packages, especially for win-builds
This commit is contained in:
parent
2ac9e788c6
commit
47ed848a87
14
configure.ac
14
configure.ac
|
@ -714,8 +714,6 @@ fi
|
|||
AM_CONDITIONAL([WANT_SYSTEMD], [test "${want_systemd}" = "yes"])
|
||||
AM_CONDITIONAL([HAVE_SYSTEMD], [test "${want_systemd}" = "yes" -a "${have_systemd_pkg}" = "yes"])
|
||||
#### Platform-dependent
|
||||
DL_LIBS=""
|
||||
DL_INTERNAL_LIBS=""
|
||||
|
||||
#### Evil
|
||||
EFL_LIB_START_OPTIONAL([Evil], [test "${have_windows}" = "yes"])
|
||||
|
@ -729,10 +727,7 @@ EFL_SELECT_WINDOWS_VERSION
|
|||
|
||||
### Checks for libraries
|
||||
|
||||
EFL_ADD_LIBS([EVIL], [-lole32 -lws2_32 -lsecur32 -luuid])
|
||||
EVIL_DLFCN_LIBS="-lpsapi"
|
||||
|
||||
AC_SUBST([EVIL_DLFCN_LIBS])
|
||||
EFL_ADD_LIBS([EVIL], [-lpsapi -lole32 -lws2_32 -lsecur32 -luuid])
|
||||
|
||||
### Checks for header files
|
||||
|
||||
|
@ -742,7 +737,7 @@ AC_SUBST([EVIL_DLFCN_LIBS])
|
|||
|
||||
### Checks for compiler characteristics
|
||||
|
||||
EVIL_DLFCN_CPPFLAGS="-DEFL_EVIL_DLFCN_BUILD -DPSAPI_VERSION=1"
|
||||
EVIL_CPPFLAGS="-DPSAPI_VERSION=1"
|
||||
# TODO: should we have these at EFL (global?)
|
||||
# Note: these warnings should not be used with C++ code
|
||||
EVIL_CFLAGS_WRN="-Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls"
|
||||
|
@ -753,7 +748,7 @@ if test "x${have_win32}" = "xyes" ; then
|
|||
EVIL_CXXFLAGS="-fno-rtti -fno-exceptions -DSECURITY_WIN32 ${EVIL_CXXFLAGS}"
|
||||
fi
|
||||
|
||||
AC_SUBST([EVIL_DLFCN_CPPFLAGS])
|
||||
AC_SUBST([EVIL_CPPFLAGS])
|
||||
AC_SUBST([EVIL_CFLAGS_WRN])
|
||||
AC_SUBST([EVIL_CXXFLAGS])
|
||||
|
||||
|
@ -761,9 +756,6 @@ AC_SUBST([EVIL_CXXFLAGS])
|
|||
|
||||
### Checks for library functions
|
||||
|
||||
DL_LIBS="lib/evil/libdl.la"
|
||||
DL_INTERNAL_LIBS="lib/evil/libdl.la"
|
||||
|
||||
EFL_LIB_END_OPTIONAL([Evil])
|
||||
|
||||
AC_SUBST([USE_EVIL_CFLAGS])
|
||||
|
|
|
@ -71,7 +71,7 @@ esac
|
|||
case "$host_os" in
|
||||
mingw*)
|
||||
$2="yes"
|
||||
EFL_ADD_LIBS([$1], [lib/evil/libdl.la])
|
||||
EFL_ADD_LIBS([$1], [lib/evil/libevil.la])
|
||||
;;
|
||||
*)
|
||||
EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[
|
||||
|
@ -100,7 +100,7 @@ esac
|
|||
case "$host_os" in
|
||||
mingw*)
|
||||
$2="yes"
|
||||
EFL_ADD_LIBS([$1], [lib/evil/libdl.la])
|
||||
EFL_ADD_LIBS([$1], [lib/evil/libevil.la])
|
||||
;;
|
||||
*)
|
||||
EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[
|
||||
|
@ -125,7 +125,7 @@ esac
|
|||
case "$host_os" in
|
||||
mingw*)
|
||||
$2="yes"
|
||||
EFL_ADD_LIBS([$1], [lib/evil/libdl.la])
|
||||
EFL_ADD_LIBS([$1], [lib/evil/libevil.la])
|
||||
;;
|
||||
*)
|
||||
EFL_FIND_LIB_FOR_CODE([$1], [$dllibs], [$2], [[
|
||||
|
|
|
@ -130,8 +130,8 @@ lib_ector_libector_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
|||
@VALGRIND_CFLAGS@ \
|
||||
@SSE3_CFLAGS@
|
||||
|
||||
lib_ector_libector_la_LIBADD = @ECTOR_LIBS@ @DL_LIBS@
|
||||
lib_ector_libector_la_DEPENDENCIES = @ECTOR_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
|
||||
lib_ector_libector_la_LIBADD = @ECTOR_LIBS@
|
||||
lib_ector_libector_la_DEPENDENCIES = @ECTOR_INTERNAL_LIBS@
|
||||
lib_ector_libector_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
|
||||
|
||||
### Unit tests
|
||||
|
|
|
@ -241,8 +241,8 @@ lib_eina_libeina_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
|
|||
-DPACKAGE_DATA_DIR=\"$(datadir)/eina\" \
|
||||
@VALGRIND_CFLAGS@
|
||||
|
||||
lib_eina_libeina_la_LIBADD = @EINA_LIBS@ @DL_LIBS@ @UNWIND_LIBS@
|
||||
lib_eina_libeina_la_DEPENDENCIES = @EINA_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
|
||||
lib_eina_libeina_la_LIBADD = @EINA_LIBS@ @UNWIND_LIBS@
|
||||
lib_eina_libeina_la_DEPENDENCIES = @EINA_INTERNAL_LIBS@
|
||||
lib_eina_libeina_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
|
||||
|
||||
### Binaries
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
if HAVE_WINDOWS
|
||||
### Library
|
||||
|
||||
lib_LTLIBRARIES += lib/evil/libevil.la lib/evil/libdl.la
|
||||
lib_LTLIBRARIES += lib/evil/libevil.la
|
||||
|
||||
install_evilheadersdir = $(includedir)/evil-@VMAJ@
|
||||
dist_install_evilheaders_DATA = \
|
||||
lib/evil/Evil.h \
|
||||
lib/evil/evil_dlfcn.h \
|
||||
lib/evil/evil_fcntl.h \
|
||||
lib/evil/evil_inet.h \
|
||||
lib/evil/evil_langinfo.h \
|
||||
|
@ -22,7 +23,6 @@ lib/evil/evil_time.h \
|
|||
lib/evil/evil_unistd.h \
|
||||
lib/evil/evil_util.h \
|
||||
lib/evil/dirent.h \
|
||||
lib/evil/dlfcn.h \
|
||||
lib/evil/fnmatch.h \
|
||||
lib/evil/pwd.h
|
||||
|
||||
|
@ -32,6 +32,7 @@ lib/evil/sys/mman.h
|
|||
|
||||
lib_evil_libevil_la_SOURCES = \
|
||||
lib/evil/evil_dirent.c \
|
||||
lib/evil/evil_dlfcn.c \
|
||||
lib/evil/evil_fcntl.c \
|
||||
lib/evil/evil_fnmatch.c \
|
||||
lib/evil/evil_fnmatch_list_of_states.c \
|
||||
|
@ -51,6 +52,7 @@ lib/evil/evil_util.c \
|
|||
lib/evil/evil_private.h \
|
||||
lib/evil/evil_fnmatch_private.h
|
||||
|
||||
lib_evil_libevil_la_CPPFLAGS = @EVIL_CPPFLAGS@
|
||||
lib_evil_libevil_la_CFLAGS = @EVIL_CFLAGS@ @EVIL_CFLAGS_WRN@ -D__USE_MINGW_ANSI_STDIO
|
||||
lib_evil_libevil_la_CXXFLAGS = @EVIL_CXXFLAGS@ @EVIL_CFLAGS@
|
||||
lib_evil_libevil_la_LIBADD = @EVIL_LIBS@
|
||||
|
@ -71,23 +73,11 @@ lib/evil/regex/cname.h \
|
|||
lib/evil/regex/regex2.h \
|
||||
lib/evil/regex/utils.h
|
||||
|
||||
lib_evil_libevil_la_CPPFLAGS = \
|
||||
lib_evil_libevil_la_CPPFLAGS += \
|
||||
-I$(top_srcdir)/src/lib/evil \
|
||||
-I$(top_srcdir)/src/lib/evil/regex \
|
||||
-DPOSIX_MISTAKE
|
||||
|
||||
#libdl
|
||||
|
||||
lib_evil_libdl_la_SOURCES = lib/evil/dlfcn.c
|
||||
|
||||
lib_evil_libdl_la_CPPFLAGS = \
|
||||
-I$(top_builddir)/src/lib/efl \
|
||||
@EVIL_CFLAGS@ \
|
||||
@EVIL_DLFCN_CPPFLAGS@
|
||||
lib_evil_libdl_la_LIBADD = @USE_EVIL_LIBS@ @EVIL_DLFCN_LIBS@
|
||||
lib_evil_libdl_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
|
||||
lib_evil_libdl_la_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@
|
||||
|
||||
### Binary
|
||||
|
||||
bin_PROGRAMS += bin/evil/evil_suite bin/evil/test_evil
|
||||
|
@ -120,12 +110,12 @@ bin/evil/evil_test_util.h
|
|||
#suite_SOURCES += bin/evil/memcpy_glibc_i686.S # see EXTRA_DIST below!
|
||||
|
||||
bin_evil_evil_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EVIL_CFLAGS@
|
||||
bin_evil_evil_suite_LDADD = @USE_EVIL_LIBS@ @DL_LIBS@ -lm
|
||||
bin_evil_evil_suite_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
|
||||
bin_evil_evil_suite_LDADD = @USE_EVIL_LIBS@ -lm
|
||||
bin_evil_evil_suite_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@
|
||||
|
||||
bin_evil_test_evil_SOURCES = bin/evil/test_evil.c
|
||||
bin_evil_test_evil_LDADD = @USE_EVIL_LIBS@
|
||||
bin_evil_test_evil_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
|
||||
bin_evil_test_evil_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@
|
||||
|
||||
### Unit tests
|
||||
|
||||
|
@ -147,8 +137,8 @@ tests_evil_evil_suite_CPPFLAGS = \
|
|||
-DTESTS_BUILD_DIR=PACKAGE_BUILD_DIR \
|
||||
@CHECK_CFLAGS@ \
|
||||
@EVIL_CFLAGS@
|
||||
tests_evil_evil_suite_LDADD = @USE_EVIL_LIBS@ @DL_LIBS@ @CHECK_LIBS@
|
||||
tests_evil_evil_suite_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
|
||||
tests_evil_evil_suite_LDADD = @USE_EVIL_LIBS@ @CHECK_LIBS@
|
||||
tests_evil_evil_suite_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <string.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include <Evil.h>
|
||||
|
||||
|
|
|
@ -172,7 +172,9 @@ timerfd_settime(int fd EINA_UNUSED,
|
|||
#error No uv.h header found?
|
||||
#endif
|
||||
|
||||
#include <dlfcn.h>
|
||||
#if defined HAVE_DLOPEN && ! defined _WIN32
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
static uv_prepare_t _ecore_main_uv_prepare;
|
||||
static uv_check_t _ecore_main_uv_check;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <libgen.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_DLOPEN
|
||||
#if defined HAVE_DLOPEN && ! defined _WIN32
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
|
||||
#ifdef HAVE_DLADDR
|
||||
#if defined HAVE_DLADDR && ! defined _WIN32
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DLADDR
|
||||
#if defined HAVE_DLADDR && ! defined _WIN32
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#include <dlfcn.h>
|
||||
#include <ctype.h>
|
||||
#include <pwd.h>
|
||||
|
||||
|
|
|
@ -108,6 +108,7 @@ typedef unsigned long gid_t;
|
|||
|
||||
|
||||
#include "evil_macro.h"
|
||||
#include "evil_dlfcn.h"
|
||||
#include "evil_fcntl.h"
|
||||
#include "evil_inet.h"
|
||||
#include "evil_langinfo.h"
|
||||
|
|
|
@ -14,10 +14,9 @@
|
|||
|
||||
#include "evil_macro.h"
|
||||
#include "evil_util.h"
|
||||
#include "evil_dlfcn.h"
|
||||
#include "evil_private.h"
|
||||
|
||||
#include "dlfcn.h"
|
||||
|
||||
|
||||
static char *_dl_err = NULL;
|
||||
static int _dl_err_viewed = 0;
|
|
@ -5,30 +5,8 @@
|
|||
#include <limits.h>
|
||||
|
||||
|
||||
#ifdef EAPI
|
||||
# undef EAPI
|
||||
#endif /* EAPI */
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifdef EFL_EVIL_DLFCN_BUILD
|
||||
# ifdef DLL_EXPORT
|
||||
# define EAPI __declspec(dllexport)
|
||||
# else
|
||||
# define EAPI
|
||||
# endif /* ! DLL_EXPORT */
|
||||
# else
|
||||
# define EAPI __declspec(dllimport)
|
||||
# endif /* ! EFL_EVIL_DLFCN_BUILD */
|
||||
#endif /* _WIN32 */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @file dlfcn.h
|
||||
* @file evil_dlfcn.h
|
||||
* @brief The file that provides functions to manage dynamic-link libraries
|
||||
* @defgroup Evil_Dlfcn Functions that manage dynamic-link libraries.
|
||||
* @ingroup Evil
|
||||
|
@ -260,9 +238,4 @@ EAPI int dladdr (const void *addr, Dl_info *info);
|
|||
EAPI char *dlerror (void);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __EVIL_DLFCN_H__ */
|
|
@ -10,7 +10,6 @@
|
|||
*
|
||||
* This header provides functions ported from Unix in stdio.h.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#define EVIL_PATH_SEP_SWAP(p, s1, s2) \
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
#define GL_ERRORS_NODEF 1
|
||||
#include "evas_gl_core_private.h"
|
||||
#include "evas_gl_api_ext.h"
|
||||
#include <dlfcn.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#define EVGL_FUNC_BEGIN() if (UNLIKELY(_need_context_restore)) _context_restore()
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
|
||||
#include "evas_gl_api_ext.h"
|
||||
|
||||
#include <dlfcn.h>
|
||||
#ifndef _WIN32
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#define EVGL_FUNC_BEGIN() if (UNLIKELY(_need_context_restore)) _context_restore()
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#define GL_ERRORS_NODEF 1
|
||||
#include "evas_gl_core_private.h"
|
||||
|
||||
#include <dlfcn.h>
|
||||
#ifndef _WIN32
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#define EVGL_FUNC_BEGIN() if (UNLIKELY(_need_context_restore)) _context_restore()
|
||||
|
||||
|
|
|
@ -763,7 +763,11 @@ void pt_unref(Evas_GL_Texture_Pool *pt);
|
|||
//#define GL_ERRORS_TRACE 1
|
||||
|
||||
#ifdef GL_ERRORS
|
||||
#include <dlfcn.h>
|
||||
|
||||
# ifndef _WIN32
|
||||
# include <dlfcn.h>
|
||||
# endif
|
||||
|
||||
static inline void
|
||||
__evas_gl_errdyn(int err, const char *file, const char *func, int line, const char *op)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define _EVAS_GL_CONTEXT_C
|
||||
#include "evas_gl_private.h"
|
||||
|
||||
#ifdef HAVE_DLSYM
|
||||
#if defined HAVE_DLSYM && ! defined _WIN32
|
||||
# include <dlfcn.h> /* dlopen,dlclose,etc */
|
||||
#else
|
||||
# error gl_common should not get compiled if dlsym is not found on the system!
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#include "evas_gl_core_private.h"
|
||||
#include <dlfcn.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
// EVGL GL Format Pair
|
||||
typedef struct _GL_Format
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "software/Ector_Software.h"
|
||||
#include "cairo/Ector_Cairo.h"
|
||||
|
||||
#ifdef HAVE_DLSYM
|
||||
#if defined HAVE_DLSYM && ! defined _WIN32
|
||||
# include <dlfcn.h> /* dlopen,dlclose,etc */
|
||||
#else
|
||||
# error gl_x11 should not get compiled if dlsym is not found on the system!
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
#include "evas_private.h"
|
||||
#include "evas_engine.h"
|
||||
|
||||
#include <dlfcn.h>
|
||||
#ifndef _WIN32
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#include <SDL2/SDL_opengl.h>
|
||||
|
||||
|
|
|
@ -10,9 +10,11 @@
|
|||
#include <software/Ector_Software.h>
|
||||
#include "cairo/Ector_Cairo.h"
|
||||
|
||||
#ifdef HAVE_DLSYM
|
||||
#if defined HAVE_DLSYM && ! defined _WIN32
|
||||
# include <dlfcn.h> /* dlopen,dlclose,etc */
|
||||
#endif
|
||||
|
||||
#if defined HAVE_DLSYM
|
||||
# define EVAS_GL 1
|
||||
# define EVAS_GL_NO_GL_H_CHECK 1
|
||||
# include "Evas_GL.h"
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
# include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#define EFL_GFX_FILTER_BETA
|
||||
#include "evas_suite.h"
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <Evil.h>
|
||||
|
||||
#include "evil_suite.h"
|
||||
|
|
Loading…
Reference in New Issue