Commit fba436f2 authored by Chun-wei Fan's avatar Chun-wei Fan

Fix gatomic.c compilation on Windows (MSVC)

-windows.h must be included for the functions[1] to be found during
-For Win32(x86), the InterlockedAnd, InterlockedOr and InterlockedXor
 functions need to be preceded with an underscore. This is mandated
 by the "For the x86 architecture..." clause under "Remarks"[2]
-This will close Bug 652000

parent 62072b2a
...@@ -454,6 +454,13 @@ gsize ...@@ -454,6 +454,13 @@ gsize
#elif defined (G_PLATFORM_WIN32) #elif defined (G_PLATFORM_WIN32)
#include <windows.h>
#if !defined(_M_AMD64) && !defined (_M_IA64) && !defined(_M_X64)
#define InterlockedAnd _InterlockedAnd
#define InterlockedOr _InterlockedOr
#define InterlockedXor _InterlockedXor
/* /*
* *
*/ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment