Re: glib/gatomic.c
- From: John Emmas <johne53 tiscali co uk>
- To: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: glib/gatomic.c
- Date: Sat, 09 Mar 2013 09:23:55 +0000
/* mingw32 does not have MemoryBarrier.
* MemoryBarrier may be defined as a macro or a function.
* Just make a failsafe version for ourselves. */
#ifdef MemoryBarrier
#define _GMemoryBarrier MemoryBarrier
#else
static inline void _GMemoryBarrier (void) {
long dummy = 0;
InterlockedExchange (&dummy, 1);
}
#endif
Unfortunately, for MSVC, the 'inline' keyword is only available when building
as C++. For standard 'C' we need to use '__inline'.
Hi Behdad,
I just updated to the latest code for gatomic.c. Although those
"#pragma instrinsics" seem to be included now, I'm still getting an
error from MSVC about the "inline" keyword (which it doesn't
recognise). It expects '__inline'. Is that something you're still
working on?
I found that the simplest fix was just to #include "gutils.h". Thanks.
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]