Index: implement.h =================================================================== --- implement.h (revision 19389) +++ implement.h (revision 19390) @@ -667,8 +667,12 @@ * See ptw32_InterlockedCompareExchange.c */ #ifndef PTW32_INTERLOCKED_COMPARE_EXCHANGE +#ifdef _WIN64 +#define PTW32_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange +#else #define PTW32_INTERLOCKED_COMPARE_EXCHANGE ptw32_interlocked_compare_exchange #endif +#endif #ifndef PTW32_INTERLOCKED_EXCHANGE #define PTW32_INTERLOCKED_EXCHANGE InterlockedExchange Index: ptw32_InterlockedCompareExchange.c =================================================================== --- ptw32_InterlockedCompareExchange.c (revision 19389) +++ ptw32_InterlockedCompareExchange.c (revision 19390) @@ -34,6 +34,7 @@ * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +#ifndef _WIN64 #include "pthread.h" #include "implement.h" @@ -301,3 +302,5 @@ #endif #endif + +#endif Index: pthread_win32_attach_detach_np.c =================================================================== --- pthread_win32_attach_detach_np.c (revision 19389) +++ pthread_win32_attach_detach_np.c (revision 19390) @@ -91,6 +91,14 @@ #endif +#ifdef _WIN64 +/* + * InterlockedCompareExchange routine in WIN64 is an intrinsic function. + * See PTW32_INTERLOCKED_COMPARE_EXCHANGE implement.h + */ + +#else + #ifdef WINCE /* @@ -143,6 +151,7 @@ { ptw32_features |= PTW32_SYSTEM_INTERLOCKED_COMPARE_EXCHANGE; } +#endif /* * Load QUSEREX.DLL and try to get address of QueueUserAPCEx