8
0
Files
perl-Inline-Python/happy_gcc.patch

79 lines
2.2 KiB
Diff
Raw Normal View History

--- Inline-Python-0.30/perlmodule.c.orig 2009-07-21 16:38:37.000000000 +0200
+++ Inline-Python-0.30/perlmodule.c 2009-12-04 01:04:53.000000000 +0100
@@ -5,7 +5,7 @@ extern "C" {
#include "perl.h"
#include "XSUB.h"
-#include "Python.h"
+#include "myPython.h"
#include "perlmodule.h"
#include "py2pl.h"
#include "util.h"
--- Inline-Python-0.30/util.c.orig 2009-06-30 13:43:21.000000000 +0200
+++ Inline-Python-0.30/util.c 2009-12-04 01:01:42.000000000 +0100
@@ -5,7 +5,7 @@ extern "C" {
#include "perl.h"
#include "XSUB.h"
-#include "Python.h"
+#include "myPython.h"
#include "util.h"
#ifdef __cplusplus
}
@@ -25,6 +25,7 @@ int free_inline_py_obj(pTHX_ SV* obj, MA
else {
croak("ERROR: tried to free a non-Python object. Aborting.");
}
+ return 0;
}
PyObject * get_perl_pkg_subs(PyObject *package) {
--- Inline-Python-0.30/myPython.h.orig 2009-12-04 01:00:07.000000000 +0100
+++ Inline-Python-0.30/myPython.h 2009-12-04 01:12:42.000000000 +0100
@@ -0,0 +1,23 @@
+// avoid redefined warnings.
+#ifdef _XOPEN_SOURCE
+# define __MY__XOPEN_SOURCE _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+#endif
+#ifdef _POSIX_C_SOURCE
+# define __MY__POSIX_C_SOURCE _POSIX_C_SOURCE
+# undef _POSIX_C_SOURCE
+#endif
+
+#include "Python.h"
+
+#ifndef _XOPEN_SOURCE
+# warn "_XOPEN_SOURCE not defined in /usr/include/python2.6/Python.h, using earlier definition"
+# define _XOPEN_SOURCE __MY__XOPEN_SOURCE
+#endif
+#ifndef _POSIX_C_SOURCE
+# warn "_POSIX_C_SOURCE not defined in /usr/include/python2.6/Python.h, using earlier definition"
+# define _POSIX_C_SOURCE __MY__POSIX_C_SOURCE
+#endif
+
+#undef __MY__XOPEN_SOURCE
+#undef __MY__POSIX_C_SOURCE
--- Inline-Python-0.30/Python.xs.orig 2009-07-20 14:26:48.000000000 +0200
+++ Inline-Python-0.30/Python.xs 2009-12-04 01:00:35.000000000 +0100
@@ -3,7 +3,7 @@
#include "perl.h"
#include "XSUB.h"
-#include "Python.h"
+#include "myPython.h"
#include "py2pl.h"
#include "util.h"
--- Inline-Python-0.30/py2pl.c.orig 2009-07-08 12:45:47.000000000 +0200
+++ Inline-Python-0.30/py2pl.c 2009-12-04 01:02:05.000000000 +0100
@@ -2,7 +2,7 @@
#include "perl.h"
#include "XSUB.h"
-#include "Python.h"
+#include "myPython.h"
#include "py2pl.h"
#include "util.h"