PATCH: use standard offsetof()
Dominik Strasser
dominik.strasser at infineon.com
Wed Sep 8 11:25:36 CDT 2004
Alexandre Julliard wrote:
> Marcus Meissner <marcus at jet.franken.de> writes:
>
>
>>gcc 3.5 no longer likes our own OFFSETOF() macro in winebuild, so we should
>>use the standard one from <stddef.h>
>
>
> Not all platforms have offsetof (or even stddef.h). What's wrong with
> our definition?
offsetof is ANSI C, see
http://www.parallab.uib.no/SGI_bookshelves/SGI_Developer/books/CLanguageRef/sgi_html/ch01.html
which states:
Recommended Practices
Follow these recommendations as you code:
...
Use the offsetof() macro to derive structure member offsets. The
offsetof() macro is in <stddef.h>.
Which platforms are still not ANSI C nowadays ?
Regards
Dominik
--
Dominik Strasser | Phone: +49 89 234-43691
Infineon Technologies AG | Fax: +49 89 234-26997
CL DAT DF V | E-Mail:Dominik.Strasser at infineon.com
D-81730 Muenchen | Room: 53-263
More information about the wine-devel
mailing list