tcpdump mailing list archives

Re: alignment


From: Guy Harris <guy () netapp com>
Date: Wed, 11 Dec 2002 11:10:38 -0800

On Fri, Nov 08, 2002 at 06:03:40PM -0800, Guy Harris wrote:
I'd say so (as long as this doesn't involve peppering the code with
#ifdefs - if the feature *isn't* available, you still have to use the
EXTRACT macros),

Well, the feature isn't available on some compilers, e.g. Sun C, so I
checked in a change to use the EXTRACT macros.

I also tweaked the EXTRACT macros use "__attribute((packed))" if
available; however, at least on SPARC with GCC, the code generated with
and without using "__attribute((packed))" is the same - perhaps there
are platforms where the compiler can generate better code with
"__attribute((packed))" than with shift-and-OR.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


Current thread: