Article View: news.software.nntp
Article #67318Re: Perl Interface to INN Storage Manager
From: Jeffrey M. Vinocur
Date: Sun, 07 Dec 2003 23:26
Date: Sun, 07 Dec 2003 23:26
115 lines
4218 bytes
4218 bytes
[ CC'd to suto@merry.xmath.ous.ac.jp from news.software.nntp ]
In article <b0a6af8e.0312070949.3c7875a6@posting.google.com>,
Tuc <google@ttsg.com> wrote:
>Russ Allbery <rra@stanford.edu> wrote in message
>news:<87wu991yjw.fsf@windlord.stanford.edu>...
>>
>> although I expect INN::SM would probably work with a bit of tweaking.
>>
> I'm not a good tweaker of programs. I worked at it for a few
>hours and finally got too stuck to continue. Is there someone out
>there that might be able to do the tweaking?
Well, this patch gets it to compile against 2.4 -- I haven't had
a chance to test if it actually works, though.
Also, I think it still compiles against 2.3, but I don't have a
2.2 install around to test against so I may have broken
something. (Should be pretty obvious to add more #if testing
where needed, though.)
diff -ur orig/SM.xs updated/SM.xs
--- orig/SM.xs Thu May 3 11:17:53 2001
+++ updated/SM.xs Sun Dec 7 18:14:59 2003
@@ -8,14 +8,26 @@
#include "config.h"
#include "clibrary.h"
#include "libinn.h"
-#include "macros.h"
#include "paths.h"
+#include "storage.h"
+#if INN_VERSION < 20400
+#include "macros.h"
#include "qio.h"
+#else
+#include "inn/innconf.h"
+#include "inn/qio.h"
+#endif
#ifdef __cplusplus
}
#endif
+#if INN_VERSION >= 20400
+#define BOOL bool
+#define TRUE true
+#define FALSE false
+#endif
+
void
set_char_var(char *name, char *value)
{
@@ -72,7 +84,9 @@
SET_INT_VAR(refusecybercancels);
SET_INT_VAR(remembertrash);
SET_CHAR_VAR(sourceaddress);
+#if INN_VERSION < 20400
SET_INT_VAR(usecontrolchan);
+#endif
SET_INT_VAR(verifycancels);
SET_INT_VAR(wanttrash);
#if INN_VERSION >= 20300
@@ -104,10 +118,12 @@
SET_INT_VAR(articlemmap);
SET_INT_VAR(clienttimeout);
SET_INT_VAR(nnrpdcheckart);
+#if INN_VERSION < 20400
SET_INT_VAR(nnrpperlauth);
#if INN_VERSION >= 20300
SET_INT_VAR(nnrppythonauth);
#endif
+#endif
SET_INT_VAR(noreader);
SET_INT_VAR(readerswhenstopped);
SET_INT_VAR(readertrack);
@@ -140,12 +156,22 @@
SET_INT_VAR(strippostcc);
/* Posting -- Exponential Backoff */
+#if INN_VERSION < 20400
SET_INT_VAR(backoff_auth);
SET_CHAR_VAR(backoff_db);
SET_INT_VAR(backoff_k);
SET_INT_VAR(backoff_postfast);
SET_INT_VAR(backoff_postslow);
SET_INT_VAR(backoff_trigger);
+#else
+ SET_INT_VAR(backoffauth);
+ SET_CHAR_VAR(backoffdb);
+ SET_INT_VAR(backoffk);
+ SET_INT_VAR(backoffpostfast);
+ SET_INT_VAR(backoffpostslow);
+ SET_INT_VAR(backofftrigger);
+#endif
+
/* Logging */
SET_INT_VAR(logartsize);
@@ -295,7 +321,7 @@
RETVAL = 0;
for (i = 0 ; i < items ; ++i) {
- text = (char *)SvPV(ST(i), na);
+ text = (char *)SvPV(ST(i), PL_na);
if (IsToken(text))
if (SMcancel(TextToToken(text)))
--
Jeffrey M. Vinocur
jeff@litech.org
Technical Details
Message-ID:
<br0cvp$d3t$1@puck.litech.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!peer01.cox.net!peer02.cox.net!cox.net!news-xfer.cox.net!news.litech.org!not-for-mailReferences:
<b0a6af8e.0312061227.290161f1@posting.google.com> <87wu991yjw.fsf@windlord.stanford.edu> <b0a6af8e.0312070949.3c7875a6@posting.google.com>Show Full Headers
Complete Article Headers
Message-ID: <br0cvp$d3t$1@puck.litech.org> Subject: Re: Perl Interface to INN Storage Manager Date: Sun, 07 Dec 2003 23:26:49 +0000 From: jeff@litech.org (Jeffrey M. Vinocur) References: <b0a6af8e.0312061227.290161f1@posting.google.com> <87wu991yjw.fsf@windlord.stanford.edu> <b0a6af8e.0312070949.3c7875a6@posting.google.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20140818.mbox.gz!internal1.nntp.ash.giganews.com!border2.nntp.ash.giganews.com!border1.nntp.ash.giganews.com!firehose2!nntp4!intern1.nntp.aus1.giganews.com!border3.nntp.aus1.giganews.com!small1.nntp.aus1.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!peer01.cox.net!peer02.cox.net!cox.net!news-xfer.cox.net!news.litech.org!not-for-mail Newsgroups: news.software.nntp Organization: Litech Systems Design Lines: 115 Sender: jeff@litech.org NNTP-Posting-Host: puck.litech.org X-Trace: puck.litech.org 1070839609 13437 66.218.0.75 (7 Dec 2003 23:26:49 GMT) X-Complaints-To: usenet@litech.org NNTP-Posting-Date: Sun, 7 Dec 2003 23:26:49 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: jeff@litech.org (Jeffrey M. Vinocur)