testsuite: Introduce a __THISCALL__ compiler-specific macro
authorJosh Triplett <josh@joshtriplett.org>
Sun, 16 Mar 2014 22:26:26 +0000 (15:26 -0700)
committerJosh Triplett <josh@joshtriplett.org>
Mon, 17 Mar 2014 03:34:41 +0000 (20:34 -0700)
testsuite/libffi.call/closure_thiscall.c
testsuite/libffi.call/ffitest.h

index 12a0a637c35275792820356828856c812218468d..8f7d2fae2a280c3cf00b693d7c9bf7ba89e2fa00 100644 (file)
@@ -23,10 +23,7 @@ closure_test_thiscall(ffi_cif* cif __UNUSED__, void* resp, void** args,
 
 }
 
-#ifndef _MSC_VER
-#define __thiscall __attribute__((thiscall))
-#endif
-typedef int (__thiscall *closure_test_type0)(int, int, int, int);
+typedef int (__THISCALL__ *closure_test_type0)(int, int, int, int);
 
 int main (void)
 {
index 2fc25357a03fe06af47653cfd2570e421752ed3f..1919375860b4afc6387868d50d09b39c4b655f17 100644 (file)
 #if defined(__GNUC__)
 #define __UNUSED__ __attribute__((__unused__))
 #define __STDCALL__ __attribute__((stdcall))
+#define __THISCALL__ __attribute__((thiscall))
 #define __FASTCALL__ __attribute__((fastcall))
 #else
 #define __UNUSED__
 #define __STDCALL__ __stdcall
+#define __THISCALL__ __thiscall
 #define __FASTCALL__ __fastcall
 #endif