Send inn-workers mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.isc.org/mailman/listinfo/inn-workers
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of inn-workers digest..."
Today's Topics:
1. 64bit time_t patch (S.P.Zeidler)
2. Re: 64bit time_t patch (Russ Allbery)
----------------------------------------------------------------------
Message: 1
Date: Wed, 27 Nov 2013 22:09:09 +0100
From: "S.P.Zeidler" <[email protected]>
To: [email protected]
Subject: 64bit time_t patch
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi,
my system's innd survives news.daily so much better if I have:
--- snip ---
--- cc.c.orig 2013-11-27 20:55:27.000000000 +0000
+++ cc.c
@@ -952,7 +952,7 @@ CCname(char *av[])
mode = (cp->MaxCnx > 0 && cp->ActiveCnx == 0) ? "paused" : "";
buffer_sprintf(&CCreply, true, ":%s:%ld:%s",
cp->State == CScancel ? "cancel" : "nntp",
- (long) Now.tv_sec - cp->LastActive, mode);
+ (long) (Now.tv_sec - cp->LastActive), mode);
break;
case CTlocalconn:
buffer_sprintf(&CCreply, true, ":localconn::");
--- snip ---
otherwise innd segfaults on ctlinnd name "" when peers are connected.
(64bit time_t on a 32bit machine)
best regards,
spz
--
[email protected] (S.P.Zeidler)
------------------------------
Message: 2
Date: Wed, 27 Nov 2013 13:27:08 -0800
From: Russ Allbery <[email protected]>
To: [email protected]
Subject: Re: 64bit time_t patch
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
"S.P.Zeidler" <[email protected]> writes:
> my system's innd survives news.daily so much better if I have:
> --- snip ---
> --- cc.c.orig 2013-11-27 20:55:27.000000000 +0000
> +++ cc.c
> @@ -952,7 +952,7 @@ CCname(char *av[])
> mode = (cp->MaxCnx > 0 && cp->ActiveCnx == 0) ? "paused" : "";
> buffer_sprintf(&CCreply, true, ":%s:%ld:%s",
> cp->State == CScancel ? "cancel" : "nntp",
> - (long) Now.tv_sec - cp->LastActive, mode);
> + (long) (Now.tv_sec - cp->LastActive), mode);
> break;
> case CTlocalconn:
> buffer_sprintf(&CCreply, true, ":localconn::");
> --- snip ---
> otherwise innd segfaults on ctlinnd name "" when peers are connected.
> (64bit time_t on a 32bit machine)
Yup, that looks right.
I suspect that will just be the first of a series of bugs that we'll find
after the decision to make time_t longer than a long. :/ Lots of C code
was written under the assumption that wasn't possible. For example, I bet
there are lots of places where we printf a time_t by casting it to a long
or an unsigned long.
--
Russ Allbery ([email protected]) <http://www.eyrie.org/~eagle/>
Please send questions to the list rather than mailing me directly.
<http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
------------------------------
_______________________________________________
inn-workers mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/inn-workers
End of inn-workers Digest, Vol 57, Issue 4
******************************************