Nmap Development mailing list archives
Re: time_t changes in OpenBSD-current
From: Giovanni Bechis <giovanni () bigio snb it>
Date: Wed, 8 Jan 2014 23:50:16 +0100
On Tue, Jan 07, 2014 at 08:23:27AM -0800, David Fifield wrote:
On Mon, Jan 06, 2014 at 09:52:40PM -0600, Daniel Miller wrote:On Mon, Jan 6, 2014 at 9:35 PM, David Fifield <david () bamsoftware com> wrote:On Sat, Jan 04, 2014 at 05:18:41PM +0100, Giovanni Bechis wrote:in september OpenBSD changed time_t to long long on all platforms, this change broke nmap on 32 bits platforms. IMHO the main reason is that timing.cc class stores data in a double and some precision is lost. The following patch seems to fix the problem, maybe a bit more work is needed.Thanks for this patch. Do we need to also add a cast to (long long) so it will work on other platforms where time_t is long or unsigned long?Note that the %ll specifier is C99 and may not be supported on all compilers (check VC++ perhaps?)I think we already use %ll in a few places, so it should be okay.
%llu is used at least in nping/NpingOps.cc and tcpip.cc. Cheers Giovanni _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- time_t changes in OpenBSD-current Giovanni Bechis (Jan 04)
- Re: time_t changes in OpenBSD-current David Fifield (Jan 06)
- Re: time_t changes in OpenBSD-current Daniel Miller (Jan 06)
- Re: time_t changes in OpenBSD-current David Fifield (Jan 07)
- Re: time_t changes in OpenBSD-current Giovanni Bechis (Jan 09)
- Re: time_t changes in OpenBSD-current Daniel Miller (Jan 06)
- Re: time_t changes in OpenBSD-current Giovanni Bechis (Jan 10)
- Re: time_t changes in OpenBSD-current David Fifield (Jan 06)