Ethereal-dev: Re: [Ethereal-dev] Portability patches

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 9 Nov 2003 14:19:40 -0800
On Sun, Nov 09, 2003 at 04:07:35AM -0600, Albert Chin wrote:
> 1. HP C compiler complains about typedef before enum declared
>    (HP-UX 10.20).

Checked in.  (Is that legal ANSI C, or is that just an HP C compiler
deficiency?  My ANSI C standard is at work....)

> 2. Trailing semicolons in packet-bssgp.c gives warnings from
>    Tru64 UNIX compiler.

Checked in.  (I suspect that's not legal ANSI C, as they amount to null
statements outside a function body.)

> 3. P_SID in <sys/procset.h> on HP-UX 10.20 and Tru64 UNIX.

I checked in a change a few days ago to get rid of includes of
<gmodule.h>, <sys/types.h>, and <netinet/in.h>; I don't think they're
needed, and they might keep <sys/procset.h> from being included.

See whether getting rid of those #includes, and reverting back to P_SID,
works.

> 4. HP C compiler on HP-UX 10.20 complains about the initializer for
>    ett ("Array size must be a constant expression.").

At least as I read that code, it *is* a constant expression; am I
missing something, or is this a deficiency of that C compiler?

> BTW, why is ett declared static? You memset it on entry to the
> function so I don't see it buying anything.

Probably because the "ett" array is static in other proto_register
routines; in those, it's not used once the function returns, so it could
be automatic, although, given that it's initialized element by element
in those other routines, you probably wouldn't save any space by making
it static, and you'd probably *lose* some space.