From 2f9afd5fc3d2b2b1c523a1a56433decb111b9efa Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 10 Feb 2010 17:52:45 +1100 Subject: [PATCH] When building net.c, add some code to check for python versions <2.6 and add some missing definitions so that we can still build on platforms providing python 2.4 (or earlier). Signed-off-by: Ronnie Sahlberg --- source4/utils/net/net.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/source4/utils/net/net.c b/source4/utils/net/net.c index ba935b9..a7943a7 100644 --- a/source4/utils/net/net.c +++ b/source4/utils/net/net.c @@ -52,6 +52,13 @@ #include #include "scripting/python/modules.h" + +#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) +typedef int Py_ssize_t; +#define PY_SSIZE_T_MAX INT_MAX +#define PY_SSIZE_T_MIN INT_MIN +#endif + static PyObject *py_tuple_from_argv(int argc, const char *argv[]) { PyObject *l; -- 1.5.6