Make ip.h and tcp.h work under -fnative-struct or -fms-bitfields

Christopher Faylor cgf@redhat.com
Mon Nov 11 08:16:00 GMT 2002


On Mon, Nov 11, 2002 at 04:55:25PM +0800, Wu Yongwei wrote:
>Hi,
>
>What's the status of this patch?
>
>----------
>ChangeLog:
>
>2002-10-28  Wu Yongwei <adah@netstd.com>
>
>    * ip.h (struct ip): Use u_char to indicate bitfields to make it
>    work with -fnative-struct/-fms-bitfields.
>    (struct ip_timestamp): Ditto.
>    * tcp.h (struct tcphdr): Ditto.
>----------
>
>Am I really going the wrong way (any examples)? Or should I submit a new 
>patch as Danny suggests?

Danny's suggestion is correct.  The rest of the header files which accomodate
this are probably using __attribute__((packed)) .  The argument that the header
works ok for you on MSVC is a non-issue for cygwin.

cgf



More information about the Cygwin-patches mailing list