Hallo, On Wed, Feb 19, 2014 at 12:00:01PM +0100, pdns-dev-requ...@mailman.powerdns.com wrote: > ---------------------------------------------------------------------- > Message: 1 > Date: Wed, 19 Feb 2014 04:55:18 +0100 > From: a b <tripivc...@hotmail.com> > To: "pdns-dev@mailman.powerdns.com" <pdns-dev@mailman.powerdns.com> > Subject: [Pdns-dev] pdns/dnspacket.cc patch > Message-ID: <dub119-w16654a605bd58041851ca1dc...@phx.gbl> > Content-Type: text/plain; charset="iso-8859-1" > > This patch fixes the compile error reported earlier with GCC 4.7.1. If > someone with more insight could review it and provide feedback, it wouldi > be much appreciated. In the patch I replaced uint64_t with long because > that is labs(3C) calls for in the prototype. However, I am not sure that > this is correct. Presumably, with uint64_t the intent was much finer time > granularity?
I think both variants (the original as well as your "correction") are not really correct. According to the man-page for the libraryfunction time() returns something from type time_t, so the variable to which this return- value is assigned, should have type time_t. And if you want to build the difference from 2 time-stamps returned by different calls to time(), you should use the function difftime, which returns the difference in seconds as a double value. I think, all other possibilities would be system-dependent and *not* really portable. regards, Juergen Ilse -- Ein Domainname (auch wenn er Teil einer Mailadresse ist) ist nur ein Name, nicht mehr und nicht weniger ... _______________________________________________ Pdns-dev mailing list Pdns-dev@mailman.powerdns.com http://mailman.powerdns.com/mailman/listinfo/pdns-dev