summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/w32api/ChangeLog13
-rw-r--r--winsup/w32api/include/winbase.h9
-rw-r--r--winsup/w32api/lib/kernel32.def6
3 files changed, 22 insertions, 6 deletions
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog
index 79892af2a..1b4dec611 100644
--- a/winsup/w32api/ChangeLog
+++ b/winsup/w32api/ChangeLog
@@ -1,3 +1,16 @@
+2012-08-10 Earnie Boyd <earnie@users.sourceforge.net>
+
+ Even though MSDN documents these as __cdecl the kernel32.dll library
+ exports them as __stdcall. Confirmed with gendef program.
+
+ * lib/kernel32.def (InterlockedDecrement): Revert the 2012-08-08 change.
+ (InterlockedIncrement): Ditto.
+ (InterlockedExchange): Ditto.
+ * include/winbase.h (InterlockedDecrement): Revert the 2012-08-01
+ change.
+ (InterlockedIncrement): Ditto.
+ (InterlockedExchange): Ditto.
+
2012-08-08 Earnie Boyd <earnie@users.sourceforge.net>
* lib/kernel32.def (InterlockedDecrement): Remove the @BYTE count since
diff --git a/winsup/w32api/include/winbase.h b/winsup/w32api/include/winbase.h
index aa168418b..d20bffa95 100644
--- a/winsup/w32api/include/winbase.h
+++ b/winsup/w32api/include/winbase.h
@@ -1846,8 +1846,10 @@ LONG WINAPI InterlockedCompareExchange(LONG volatile *,LONG,LONG);
/* PVOID WINAPI InterlockedCompareExchangePointer(PVOID*,PVOID,PVOID); */
#define InterlockedCompareExchangePointer(d,e,c) \
(PVOID)InterlockedCompareExchange((LONG volatile *)(d),(LONG)(e),(LONG)(c))
-LONG __cdecl InterlockedDecrement(LONG volatile *);
-LONG __cdecl InterlockedExchange(LONG volatile *,LONG);
+/* MSDN documents this as __cdecl but it is not. */
+LONG WINAPI InterlockedDecrement(LONG volatile *);
+/* MSDN documents this as __cdecl but it is not. */
+LONG WINAPI InterlockedExchange(LONG volatile *,LONG);
/* PVOID WINAPI InterlockedExchangePointer(PVOID*,PVOID); */
#define InterlockedExchangePointer(t,v) \
(PVOID)InterlockedExchange((LONG volatile *)(t),(LONG)(v))
@@ -1855,7 +1857,8 @@ LONG WINAPI InterlockedExchangeAdd(LONG volatile *,LONG);
#if (_WIN32_WINNT >= 0x0501)
PSLIST_ENTRY WINAPI InterlockedFlushSList(PSLIST_HEADER);
#endif
-LONG __cdecl InterlockedIncrement(LONG volatile *);
+/* MSDN documents this as __cdecl but it is not. */
+LONG WINAPI InterlockedIncrement(LONG volatile *);
#if (_WIN32_WINNT >= 0x0501)
PSLIST_ENTRY WINAPI InterlockedPopEntrySList(PSLIST_HEADER);
PSLIST_ENTRY WINAPI InterlockedPushEntrySList(PSLIST_HEADER,PSLIST_ENTRY);
diff --git a/winsup/w32api/lib/kernel32.def b/winsup/w32api/lib/kernel32.def
index 177160f6b..fca559aac 100644
--- a/winsup/w32api/lib/kernel32.def
+++ b/winsup/w32api/lib/kernel32.def
@@ -749,11 +749,11 @@ InitializeSListHead@4
InitializeSRWLock@4
InterlockedCompareExchange64@20
InterlockedCompareExchange@12
-InterlockedDecrement
-InterlockedExchange
+InterlockedDecrement@4
+InterlockedExchange@8
InterlockedExchangeAdd@8
InterlockedFlushSList@4
-InterlockedIncrement
+InterlockedIncrement@4
InterlockedPopEntrySList@4
InterlockedPushEntrySList@8
InvalidateConsoleDIBits@8