libprelude/master: Compilation fixes for WIN32 Python bindings
[email protected] Fri, 29 Jan 2010 18:01:00 +0100 (CET)
| Newsgroups | gmane.comp.security.ids.prelude.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 4c93305382bbb0ac632637b150202b3b9f0d9d4a Author: Yoann Vandoorselaere <[email protected]> Date: Fri Jan 29 17:14:51 2010 +0100 Compilation fixes for WIN32 Python bindings ======================================== bindings/libpreludecpp.i | 6 +++- bindings/python/libpreludecpp-python.i | 3 -- bindings/python/setup.py.in | 2 +- configure.in | 33 +++++++++++++++++-------------- 4 files changed, 23 insertions(+), 21 deletions(-) ======================================== diff --git a/bindings/libpreludecpp.i b/bindings/libpreludecpp.i index f930a9f..19a0cce 100644 --- a/bindings/libpreludecpp.i +++ b/bindings/libpreludecpp.i @@ -8,7 +8,10 @@ #include <list> #include <sstream> -#include "config.h" +#ifndef SWIGPYTHON +# include "config.h" +# include "glthread/thread.h" +#endif #include "prelude.hxx" #include "prelude-log.hxx" @@ -23,7 +26,6 @@ #include "idmef-path.hxx" #include "idmef-time.hxx" #include "idmef.hxx" -#include "glthread/thread.h" using namespace Prelude; %} diff --git a/bindings/python/libpreludecpp-python.i b/bindings/python/libpreludecpp-python.i index 82f0156..65890d7 100644 --- a/bindings/python/libpreludecpp-python.i +++ b/bindings/python/libpreludecpp-python.i @@ -15,7 +15,6 @@ int IDMEFValue_to_SWIG(const IDMEFValue &result, TARGET_LANGUAGE_OUTPUT_TYPE ret %{ -static gl_thread_t __initial_thread; PyObject *__prelude_log_func = NULL; static void _cb_python_log(int level, const char *str) @@ -160,8 +159,6 @@ PyObject *IDMEFValueList_to_SWIG(const Prelude::IDMEFValue &value) PyObject *sys = PyImport_ImportModule("sys"); PyObject *pyargv = PyObject_GetAttrString(sys, "argv"); - __initial_thread = (gl_thread_t) gl_thread_self(); - argc = PyObject_Length(pyargv); assert(argc >= 1); assert(PyList_Check(pyargv)); diff --git a/bindings/python/setup.py.in b/bindings/python/setup.py.in index ec053f8..85f0437 100644 --- a/bindings/python/setup.py.in +++ b/bindings/python/setup.py.in @@ -84,6 +84,6 @@ setup(name="PreludeEasy", py_modules=["PreludeEasy"], ext_modules=[Extension("_PreludeEasy", ["_PreludeEasy.cxx"], - extra_compile_args=split_args("-I@top_builddir@ -I@top_srcdir@/src/include -I@top_builddir@/src/include -I@top_builddir@/src/libprelude-error -I@top_srcdir@/bindings/c++/include -I@top_srcdir@/libmissing -I@top_builddir@/libmissing"), + extra_compile_args=split_args("-I@top_builddir@ -I@top_srcdir@/src/include -I@top_builddir@/src/include -I@top_builddir@/src/libprelude-error -I@top_srcdir@/bindings/c++/include"), library_dirs=[ "@top_builddir@/src/.libs/", "@top_builddir@/bindings/c++/.libs/" ], extra_link_args=split_args("-lpreludecpp -lprelude @LIBPRELUDE_LIBS@ @LIBADD_DL@ @LTLIBTHREAD@"))]) diff --git a/configure.in b/configure.in index 6e25748..b793b88 100644 --- a/configure.in +++ b/configure.in @@ -587,6 +587,24 @@ fi AM_CONDITIONAL(HAVE_VALGRIND, test x$with_valgrind = xyes) +dnl ************************************************** +dnl * Typedefs, structures, compiler characteristics.* +dnl ************************************************** + +dnl this need to be done before calling GnuLib, since +dnl GnuLib might provide replacement for the different +dnl types + +AC_C_CONST +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_CHECK_TYPES([uid_t, gid_t]) +AC_HEADER_TIME +AC_TYPE_LONG_LONG_INT +AC_C_INLINE +AC_SYS_LARGEFILE + + dnl ************************************************** dnl * Check for missing function replacement * @@ -604,21 +622,6 @@ GTK_DOC_CHECK(1.0) dnl ************************************************** -dnl * Typedefs, structures, compiler characteristics.* -dnl ************************************************** - -AC_C_CONST -AC_CHECK_TYPES([uid_t, gid_t]) -AC_TYPE_UID_T -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_HEADER_TIME -AC_TYPE_LONG_LONG_INT -AC_C_INLINE -AC_SYS_LARGEFILE - - -dnl ************************************************** dnl * Required headers / functions. * dnl ************************************************** _______________________________________________ Prelude-cvslog site list [email protected] http://lists.prelude-ids.org/mailman/listinfo/prelude-cvslog