On Monday 30 August 2004 8:58 am, Alan Stern wrote:
> David:
> 
> The usb_ch9.h header file contains a number of structure size constants
> like USB_DT_DEVICE_SIZE, but oddly omits a few.

It only has the constants that were in 2.4.early ... I'd actually rather get
rid of all of them, they're no longer necessary.  (Except for backwards
compatibility with 2.4...)

You may recall that 2.4 added lots of extra host-side data to many
structures, so USB_DT_* were necessary since "sizeof" gave answers
that didn't match the USB ch9 spec.

On 2.6, that host-side data is all gone, so USB_DT_* is not needed.
For the few that have no such symbol,  they were never used with extra
host-side data ... "sizeof" always worked, USB_DT_* wasn't needed.


> This patch adds the 
> missing entries.  While they may not be strictly necessary, it's probably 
> safer to use them to guard against the possibility of some compiler not 
> computing the structure size in the expected way.  

I'm actually not keen on adding workarounds for compilers that
broken ... if it doesn't understand "packed", it's not usable with
the current USB stack, since the standard chapter 9 messages
will all be mis-handled.

- Dave



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to