current: freebsd configure.in stuff, python history update
greg andruk
gja at meowing.net
Wed Jul 18 01:36:18 UTC 2001
The configure.in change adds more link crap to make the FreeBSD port of
Py2.0 happy.
The innd/python.c change is to use the new history functions.
BTW, what's with the FreeBSD crusade to stomp out "#include <malloc.h>"?
--- configure.in.orig Wed Jul 4 23:08:39 2001
+++ configure.in Tue Jul 17 20:34:50 2001
@@ -720,13 +720,14 @@
py_ver=`$_PATH_PYTHON -c 'import sys; print sys.version[[:3]]'`
py_libdir="${py_prefix}/lib/python${py_ver}"
PYTHON_INC="-I${py_prefix}/include/python${py_ver}"
- py_libs=`grep '^LIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
- py_libc=`grep '^LIBC=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
- py_libm=`grep '^LIBM=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
- py_liblocalmod=`grep '^LOCALMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
- py_libbasemod=`grep '^BASEMODLIBS=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
- py_linkforshared=`grep '^LINKFORSHARED=' $py_libdir/config/Makefile | sed -e 's/^.*=//'`
- PYTHON_LIB="-L$py_libdir/config $py_libs $py_libc $py_libm -lpython$py_ver $py_liblocalmod $py_libbasemod $py_linkforshared"
+ py_linkage=""
+ for py_linkpart in LIBS LIBC LIBM LOCALMODLIBS BASEMODLIBS \
+ LINKFORSHARED LDFLAGS ; do
+ py_linkage="$py_linkage "`grep "^${py_linkpart}=" \
+ $py_libdir/config/Makefile \
+ | sed -e 's/^.*=//'`
+ done
+ PYTHON_LIB="-L$py_libdir/config -lpython$py_ver $py_linkage"
PYTHON_LIB=`echo $PYTHON_LIB | sed -e 's/[ \\t]*/ /g'`
AC_MSG_RESULT($py_libdir)
else
--- innd/python.c.orig Sat Feb 3 13:33:24 2001
+++ innd/python.c Tue Jul 17 21:07:54 2001
@@ -248,7 +248,7 @@
if (!PyArg_ParseTuple(args, "s#", &msgid, &msgidlen))
return NULL;
- if (HIShavearticle(HashMessageID(msgid)))
+ if (HIScheck(History, msgid))
return PyInt_FromLong(1);
return PyInt_FromLong(0);
}
@@ -360,7 +360,7 @@
char *msgid;
int msgidlen;
char *p;
- TOKEN *token;
+ TOKEN token;
ARTHANDLE *art;
PyObject *header;
int headerlen;
@@ -368,10 +368,9 @@
if (!PyArg_ParseTuple(args, "s#", &msgid, &msgidlen))
return NULL;
- /* Get the article filenames/token; open the first */
- if ((token = HISfilesfor(HashMessageID(msgid))) == NULL)
+ if (! HISlookup(History, msgid, NULL, NULL, NULL, &token))
return Py_BuildValue("s", "");
- if ((art = SMretrieve(*token, RETR_HEAD)) == NULL)
+ if ((art = SMretrieve(token, RETR_HEAD)) == NULL)
return Py_BuildValue("s", "");
p = FromWireFmt(art->data, art->len, &headerlen);
SMfreearticle(art);
@@ -393,7 +392,7 @@
char *msgid;
int msgidlen;
char *p;
- TOKEN *token;
+ TOKEN token;
ARTHANDLE *arth;
PyObject *art;
int artlen;
@@ -401,10 +400,9 @@
if (!PyArg_ParseTuple(args, "s#", &msgid, &msgidlen))
return NULL;
- /* Get the article filenames; open the first file */
- if ((token = HISfilesfor(HashMessageID(msgid))) == NULL)
+ if (! HISlookup(History, msgid, NULL, NULL, NULL, &token))
return Py_BuildValue("s", "");
- if ((arth = SMretrieve(*token, RETR_ALL)) == NULL)
+ if ((arth = SMretrieve(token, RETR_ALL)) == NULL)
return Py_BuildValue("s", "");
p = FromWireFmt(arth->data, arth->len, &artlen);
SMfreearticle(arth);
More information about the inn-patches
mailing list