Re: GAtomic ABI and win32 implementation

At 11:22 29.02.04, Sebastian Wilhelmi wrote:
Moin Hans,

> >Fixed in CVS. Thanks.
> Still wondering (I' m probably too old for so much #ifdefs; and all these
> asm doesn't improve readability either ;-)
> - Should the ABI really differ depending on the compile time switch,
> - Don't we want the fallback implementations in any case ?

Good point. However in the mean-time it was decided to move the
functions from atomic.h to atomic.c, so you better wait a bit.

Maybe the bit wasn't long enough ;-), but I've justed checked with current cvs and it breaks for the !__GNUC__ and !G_ATOMIC_OP_MEMORY_BARRIER_NEEDED with :

gatomic.c(491) : error C2059: syntax error : 'type'
gatomic.c(503) : error C2059: syntax error : 'type'

gatomic.h defines away g_atomic_(int|pointer)_get and so their implementation can't compile anymore.
To make it compile for msvc/win32 I just commited the minimal change :

2003-02-29  Hans Breuer  <hans breuer org>

        * glib/gatomic.c : added win32 api based implementation
        for G_PLATFORM_WIN32, !__GNUC__

        * glb/glib.def : change to g_atomi_* no _fallback

but this probably should be fixed more general : SUN, SGI etc. compiler ?


-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]