Re: current winex CVS doesn't compile (ntdll)
Peter Hunnisett <[email protected]>
| Newsgroups | gmane.comp.emulators.winex.devel |
|---|---|
| Message-ID | <[email protected]> |
Bryan Kadzban wrote: > Peter Hunnisett wrote: > >> [email protected] wrote: >> >>> No effect, same error. >> >> >> Not much of a surprise since it's not hooked up with anything in the >> code (although the compile test is the correct test). The problem is >> that the definition for the WINE_EXPECT is presently in winnt.h which >> cannot rely on the output of include/config.h due to winelib >> requirements. > > > Ahh, that'll teach me to not read the rest of the source. I didn't even > realize that another define was in place. *sheepish grin* > > Anyway, maybe you could do something like what the kernel does (in > include/linux/compiler.h if you want to see it), inside winnt.h? > Something like the attached patch, which is modeled on the tests for > NONAMELESSSTRUCT and the kernel sources, might suffice. > > Or is that what you were thinking of doing this week anyway? That's one approach, but I must admit that having GCC version checks in the code defeats the whole purpose of having configure. The whole WINE_* macros there aren't really in the windows headers, obviously, so it's not all that wonderful to add to them. What I was actually thinking about was taking WINE_EXPECT out of winnt.h, since it shouldn't be required for any header files anyways, and actually beefing up the configure macro emited to actually be the WINE_EXPECT macro so one just has to include config.h to get the definition. Ciao, Peter > > > Bryan > >------------------------------------------------------------------------ > >diff -u wine-old/include/winnt.h wine/include/winnt.h >--- wine-old/include/winnt.h 23 Jun 2003 01:46:24 -0000 1.9 >+++ wine/include/winnt.h 24 Jul 2003 00:01:08 -0000 >@@ -111,7 +111,12 @@ > #define WINE_PACKED __attribute__((packed)) > #define WINE_UNUSED __attribute__((unused)) > #define WINE_NORETURN __attribute__((noreturn)) >-#define WINE_EXPECT( exp, c ) __builtin_expect( (exp), (c) ) >+/* __builtin_expect support starts at gcc 2.96 */ >+# if (__GNUC__ < 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ < 96)) >+# define WINE_EXPECT( exp, c ) (exp) >+# else /* gcc is >= 2.96 */ >+# define WINE_EXPECT( exp, c ) __builtin_expect( (exp), (c) ) >+# endif /* gcc version checking */ > #else > #define WINE_PACKED /* nothing */ > #define WINE_UNUSED /* nothing */ > > ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01