Wine and C99 inline incompatibility

Alexandre Julliard julliard at
Mon Jul 2 12:02:58 CDT 2007

Zephiris <zephiris at> writes:

> Specifically, this appears to conflict with, say, when
> InterlockedExchange is actually defined later in the source file. Even
> if 'extern inline' is replaced by 'static inline', that's a
> problem. For that particular case, for instance, I tried to work
> around by only exporting separate extern declaration if _KERNEL32_ is
> defined, otherwise define the static inline part, since
> InterlockedExchange needs to be exported.
> But not so amusingly, the tools (loader, programs, etc) don't export
> __WINESRC__, so can't bring in the inlined definitions. I'm not quite
> sure how the GCC version of thing gets around that, as the extern
> inline versions aren't exported, and the tools don't depend on
> -kernel32.

Since the extern inline functions are inside a #ifdef __GNUC__ they
should be invisible to other compilers, which will use the global
definitions in kernel32/sync.c. The tools don't call Interlocked*
functions so they can't have a problem no matter which compiler is
used. I don't understand your problem, what exactly is not working?

Alexandre Julliard
julliard at

More information about the wine-devel mailing list