diff options
author | Josh Triplett <josh@joshtriplett.org> | 2014-03-16 15:26:26 -0700 |
---|---|---|
committer | Josh Triplett <josh@joshtriplett.org> | 2014-03-16 20:34:41 -0700 |
commit | dfdb02cc869855d3b68571e5f7aa77ae8c9d254a (patch) | |
tree | 452eaeecdc136cbf74150007f5286b590ee648b3 /testsuite | |
parent | bad8948346e9b8813023a0cc78a3b6eb8d9c14c6 (diff) | |
download | libffi-dfdb02cc869855d3b68571e5f7aa77ae8c9d254a.tar.gz |
testsuite: Introduce a __THISCALL__ compiler-specific macro
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/libffi.call/closure_thiscall.c | 5 | ||||
-rw-r--r-- | testsuite/libffi.call/ffitest.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/testsuite/libffi.call/closure_thiscall.c b/testsuite/libffi.call/closure_thiscall.c index 12a0a63..8f7d2fa 100644 --- a/testsuite/libffi.call/closure_thiscall.c +++ b/testsuite/libffi.call/closure_thiscall.c @@ -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) { diff --git a/testsuite/libffi.call/ffitest.h b/testsuite/libffi.call/ffitest.h index 2fc2535..1919375 100644 --- a/testsuite/libffi.call/ffitest.h +++ b/testsuite/libffi.call/ffitest.h @@ -22,10 +22,12 @@ #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 |