Marcus Meissner <marcus(a)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? -- Alexandre Julliard julliard(a)winehq.org
On Tue, Sep 07, 2004 at 09:35:15AM -0700, Alexandre Julliard wrote:
Marcus Meissner <marcus(a)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?
Apparently it is a GNU extension which got dropped from the new compiler. GCC Bugzilla discussion is here. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17339 I am not really happy either about it. Ciao, Marcus
Alexandre Julliard wrote:
Marcus Meissner <marcus(a)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/... 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(a)infineon.com D-81730 Muenchen | Room: 53-263
Dominik Strasser <dominik.strasser(a)infineon.com> writes:
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 ?
I don't know about nowadays, but I know we encountered that problem at some point. Anyway I have since changed the code to not require offsetof at all. -- Alexandre Julliard julliard(a)winehq.org
participants (3)
-
Alexandre Julliard -
Dominik Strasser -
Marcus Meissner