ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [Ethereal-dev] FT_UINT64 patch

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Ronnie Sahlberg" <rsahlber@xxxxxxxxxxxxxx>
Date: Tue, 30 Oct 2001 20:15:20 +1100
From: "Guy Harris"
Subject: Re: [Ethereal-dev] FT_UINT64 patch


[snip]
> If we ever decide that we no longer care about platforms that lack
> 64-bit integer support, we can bring them back, although we'd still have
> to continue to use "u64toa()" and "u64toh()", or put some crud into the
> autoconfigure script to figure out what format is used in "printf" for
[snip]

On a sidenote,
I think we could continue to use u64toa() and u64toh() even after every
compiler in the world supports 64bit integers.
I think that our current u64toa() implementation is vastly more CPU
efficient
and faster (optimize for speed, not memory, 2Gb RAM can be had for 92USD)
than any such implementation in printf() will ever be.
(no / or % operations in sight)
(I dont think that a generic printf() will ever be allowed to use a
dedicated 1.5kb static array only to
support %ll conversions :-) )

Another benefit is that %s is standard across every C compiler ever
implemented. %ll is not.