Various for tonight's -CURRENT
greg andruk
gja at meowing.net
Sat Feb 3 03:59:47 UTC 2001
1. The fix for dbz that Andrew Gierth posted to news.software.nntp.
I've only applied it to tagged hash here since that's all I tested,
but the same sections of non-tagged should be checked too. Should
really be applied to 2.3 also after some exercise.
2. storage/tradspool/tradspool.c wants <sys/uio.h> to make iovec stuff
happy.
3. innd/art.c, typecasts to make linux/glibc happy.
4. innd/python.c, compensate for ARTheadersENDOF elimination and whack
a typo.
[innd/perl.c also declares ARTheadersENDOF but doesn't seem to use
it.]
--- lib/dbz.c.orig Tue Oct 31 11:28:44 2000
+++ lib/dbz.c Fri Feb 2 21:39:05 2001
@@ -1422,7 +1422,7 @@
search(searcher *sp)
{
of_t value;
- unsigned long taboffset = 0;
+ unsigned long taboffset = sp->tabno * conf.tsize;
if (sp->aborted)
return(NOTFOUND);
@@ -1455,10 +1455,10 @@
return(NOTFOUND);
} else
value = VACANT;
+ pagtab.pos = -1;
}
-
- /* and finish up */
- pagtab.pos += sizeof(value);
+ else
+ pagtab.pos += sizeof(value);
}
/* vacant slot is always cause to return */
--- storage/tradspool/tradspool.c.orig Fri Feb 2 12:56:17 2001
+++ storage/tradspool/tradspool.c Fri Feb 2 22:23:57 2001
@@ -12,6 +12,7 @@
#include <syslog.h>
#include <sys/mman.h>
#include <sys/stat.h>
+#include <sys/uio.h>
#ifndef MAP_FAILED
# define MAP_FAILED (caddr_t) -1
--- innd/art.c.orig Fri Feb 2 12:55:33 2001
+++ innd/art.c Fri Feb 2 22:26:24 2001
@@ -516,7 +516,7 @@
if (NeedHeaders && (i + 1 == iovcnt)) {
/* body begins at last iov */
headersize = data->BytesValue +
- Article->Data + data->Body - iov[i].iov_base;
+ Article->Data + data->Body - (char *)(iov[i].iov_base);
break;
}
data->BytesValue += iov[i].iov_len;
@@ -542,7 +542,7 @@
for (i = 0 ; i < iovcnt ; i++) {
if (i + 1 == iovcnt)
BUFFappend(headers, iov[i].iov_base,
- Article->Data+ data->Body - iov[i].iov_base);
+ Article->Data+ data->Body - (char *)(iov[i].iov_base));
else
BUFFappend(headers, iov[i].iov_base, iov[i].iov_len);
}
--- innd/python.c.orig Fri Feb 2 12:55:38 2001
+++ innd/python.c Fri Feb 2 22:30:56 2001
@@ -29,7 +29,7 @@
PyObject *PYFilterModule = NULL;
/* article filter bits and pieces */
-extern ARTHEADER ARTheaders[], *ARTheadersENDOF;
+extern ARTHEADER ARTheaders[];
PyObject *PYheaders = NULL;
PyObject **PYheaditem;
PyObject **PYheadkey;
@@ -93,7 +93,7 @@
** Reject articles we don't like.
*/
char *
-PYartfilter(const ARTDATA *Data, char *artBody, long artLen, int lines)
+PYartfilter(const ARTDATA *data, char *artBody, long artLen, int lines)
{
ARTHEADER *hp;
HDRCONTENT *hc = data->HdrContent;
@@ -680,11 +680,11 @@
/* Grab space for these so we aren't forever recreating them. */
PYheaders = PyDict_New();
- PYheaditem = NEW(PyObject *, ARTheadersENDOF - ARTheaders);
- PYheadkey = NEW(PyObject *, ARTheadersENDOF - ARTheaders);
+ PYheaditem = NEW(PyObject *, ENDOF(ARTheaders) - ARTheaders);
+ PYheadkey = NEW(PyObject *, ENDOF(ARTheaders) - ARTheaders);
/* Preallocate keys for the article dictionary */
- for (hp = ARTheaders; hp < ARTheadersENDOF; hp++)
+ for (hp = ARTheaders; hp < ENDOF(ARTheaders); hp++)
PYheadkey[hp - ARTheaders] = PyString_InternFromString(hp->Name);
PYpathkey = PyString_InternFromString("Path");
PYlineskey = PyString_InternFromString("__LINES__");
More information about the inn-patches
mailing list