Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] Some Mandrake 64 bit fixes

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sat, 17 Jul 2004 03:52:08 -0700
On Fri, Jul 16, 2004 at 04:40:47PM -0700, Guy Harris wrote:
>     1) I'm not sure they're guaranteed to clear "errno" on success, so we
> should clear it before calling "strtol{u}l()" if we're going to check
> "errno" afterwards;

The C89 spec doesn't appear to say they are guaranteed to clear it.

>     2) their return values should be assigned to "{unsigned} long"
> variables, so we don't lose bits, and those variables should be
> checked against the maximum (and minimum, for "strtol()") values for a
> "g{u}int32" as well (GLib 2.4 appears to have #defines for those; I
> don't know about GLib 1.2 - I'll check that at home)

GLib 1.2.10, at least, doesn't define them; I've checked in a change to
define them as the correct 32-bit values if they're not defined.