This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: Make ip.h and tcp.h work under -fnative-struct or -fms-bitfields
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: Wu Yongwei <adah at netstd dot com>, cygwin-patches at cygwin dot com
- Date: Mon, 28 Oct 2002 20:23:43 +1100 (EST)
- Subject: Re: Make ip.h and tcp.h work under -fnative-struct or -fms-bitfields
--- Wu Yongwei <adah@netstd.com> wrote: > These header files use "u_int xxx:4,
yyy:4", which in the MS convetion
> will generate 4-byte instead of 1-byte bit fields.
>
> 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.
Changing types like that can cause problems.
Wouldn't it be better to just use __attribute__((packed)) to pack the fields?
Danny
http://careers.yahoo.com.au - Yahoo! Careers
- 1,000's of jobs waiting online for you!