Module: wine Branch: master Commit: fcf545f449e286118c0d1b8ee8d620a81aa22114 URL: https://source.winehq.org/git/wine.git/?a=commit;h=fcf545f449e286118c0d1b8ee...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Dec 14 18:10:26 2020 +0100
winapi: Use __alignof__ on clang.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/gdi32/tests/generated.c | 2 +- dlls/kernel32/tests/generated.c | 2 +- dlls/ntdll/tests/generated.c | 2 +- dlls/rpcrt4/tests/generated.c | 2 +- dlls/shell32/tests/generated.c | 2 +- dlls/shlwapi/tests/generated.c | 2 +- dlls/urlmon/tests/generated.c | 90 +---------------------------------------- dlls/user32/tests/generated.c | 2 +- dlls/wininet/tests/generated.c | 2 +- dlls/winmm/tests/generated.c | 2 +- tools/winapi/winapi_test | 2 +- 11 files changed, 11 insertions(+), 99 deletions(-)
diff --git a/dlls/gdi32/tests/generated.c b/dlls/gdi32/tests/generated.c index 40c2b910b56..02898227b2b 100644 --- a/dlls/gdi32/tests/generated.c +++ b/dlls/gdi32/tests/generated.c @@ -25,7 +25,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) # define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) # define _TYPE_ALIGNMENT(type) __alignof__(type) #else /* diff --git a/dlls/kernel32/tests/generated.c b/dlls/kernel32/tests/generated.c index 9c83ec69f6e..1b0489094ea 100644 --- a/dlls/kernel32/tests/generated.c +++ b/dlls/kernel32/tests/generated.c @@ -25,7 +25,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) # define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) # define _TYPE_ALIGNMENT(type) __alignof__(type) #else /* diff --git a/dlls/ntdll/tests/generated.c b/dlls/ntdll/tests/generated.c index d1976e87678..995ffb90b57 100644 --- a/dlls/ntdll/tests/generated.c +++ b/dlls/ntdll/tests/generated.c @@ -25,7 +25,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) # define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) # define _TYPE_ALIGNMENT(type) __alignof__(type) #else /* diff --git a/dlls/rpcrt4/tests/generated.c b/dlls/rpcrt4/tests/generated.c index 3c143265fa7..53416566418 100644 --- a/dlls/rpcrt4/tests/generated.c +++ b/dlls/rpcrt4/tests/generated.c @@ -31,7 +31,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) # define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) # define _TYPE_ALIGNMENT(type) __alignof__(type) #else /* diff --git a/dlls/shell32/tests/generated.c b/dlls/shell32/tests/generated.c index 86e8e549480..15e44f0e8ea 100644 --- a/dlls/shell32/tests/generated.c +++ b/dlls/shell32/tests/generated.c @@ -32,7 +32,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) # define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) # define _TYPE_ALIGNMENT(type) __alignof__(type) #else /* diff --git a/dlls/shlwapi/tests/generated.c b/dlls/shlwapi/tests/generated.c index 0b9f109aa55..8465bf34475 100644 --- a/dlls/shlwapi/tests/generated.c +++ b/dlls/shlwapi/tests/generated.c @@ -30,7 +30,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) # define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) # define _TYPE_ALIGNMENT(type) __alignof__(type) #else /* diff --git a/dlls/urlmon/tests/generated.c b/dlls/urlmon/tests/generated.c index 64959493181..578f722ad16 100644 --- a/dlls/urlmon/tests/generated.c +++ b/dlls/urlmon/tests/generated.c @@ -28,7 +28,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) # define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) # define _TYPE_ALIGNMENT(type) __alignof__(type) #else /* @@ -92,81 +92,41 @@ static void test_pack_IBindHost(void) /* IBindHost */ }
-static void test_pack_IBindHostVtbl(void) -{ - /* IBindHostVtbl */ -} - static void test_pack_IBindStatusCallback(void) { /* IBindStatusCallback */ }
-static void test_pack_IBindStatusCallbackVtbl(void) -{ - /* IBindStatusCallbackVtbl */ -} - static void test_pack_IBinding(void) { /* IBinding */ }
-static void test_pack_IBindingVtbl(void) -{ - /* IBindingVtbl */ -} - static void test_pack_IInternetProtocolInfo(void) { /* IInternetProtocolInfo */ }
-static void test_pack_IInternetProtocolInfoVtbl(void) -{ - /* IInternetProtocolInfoVtbl */ -} - static void test_pack_IInternetSession(void) { /* IInternetSession */ }
-static void test_pack_IInternetSessionVtbl(void) -{ - /* IInternetSessionVtbl */ -} - static void test_pack_IPersistMoniker(void) { /* IPersistMoniker */ }
-static void test_pack_IPersistMonikerVtbl(void) -{ - /* IPersistMonikerVtbl */ -} - static void test_pack_IWinInetHttpInfo(void) { /* IWinInetHttpInfo */ }
-static void test_pack_IWinInetHttpInfoVtbl(void) -{ - /* IWinInetHttpInfoVtbl */ -} - static void test_pack_IWinInetInfo(void) { /* IWinInetInfo */ }
-static void test_pack_IWinInetInfoVtbl(void) -{ - /* IWinInetInfoVtbl */ -} - static void test_pack_LPBINDHOST(void) { /* LPBINDHOST */ @@ -346,81 +306,41 @@ static void test_pack_IBindHost(void) /* IBindHost */ }
-static void test_pack_IBindHostVtbl(void) -{ - /* IBindHostVtbl */ -} - static void test_pack_IBindStatusCallback(void) { /* IBindStatusCallback */ }
-static void test_pack_IBindStatusCallbackVtbl(void) -{ - /* IBindStatusCallbackVtbl */ -} - static void test_pack_IBinding(void) { /* IBinding */ }
-static void test_pack_IBindingVtbl(void) -{ - /* IBindingVtbl */ -} - static void test_pack_IInternetProtocolInfo(void) { /* IInternetProtocolInfo */ }
-static void test_pack_IInternetProtocolInfoVtbl(void) -{ - /* IInternetProtocolInfoVtbl */ -} - static void test_pack_IInternetSession(void) { /* IInternetSession */ }
-static void test_pack_IInternetSessionVtbl(void) -{ - /* IInternetSessionVtbl */ -} - static void test_pack_IPersistMoniker(void) { /* IPersistMoniker */ }
-static void test_pack_IPersistMonikerVtbl(void) -{ - /* IPersistMonikerVtbl */ -} - static void test_pack_IWinInetHttpInfo(void) { /* IWinInetHttpInfo */ }
-static void test_pack_IWinInetHttpInfoVtbl(void) -{ - /* IWinInetHttpInfoVtbl */ -} - static void test_pack_IWinInetInfo(void) { /* IWinInetInfo */ }
-static void test_pack_IWinInetInfoVtbl(void) -{ - /* IWinInetInfoVtbl */ -} - static void test_pack_LPBINDHOST(void) { /* LPBINDHOST */ @@ -588,21 +508,13 @@ static void test_pack(void) { test_pack_BINDINFO(); test_pack_IBindHost(); - test_pack_IBindHostVtbl(); test_pack_IBindStatusCallback(); - test_pack_IBindStatusCallbackVtbl(); test_pack_IBinding(); - test_pack_IBindingVtbl(); test_pack_IInternetProtocolInfo(); - test_pack_IInternetProtocolInfoVtbl(); test_pack_IInternetSession(); - test_pack_IInternetSessionVtbl(); test_pack_IPersistMoniker(); - test_pack_IPersistMonikerVtbl(); test_pack_IWinInetHttpInfo(); - test_pack_IWinInetHttpInfoVtbl(); test_pack_IWinInetInfo(); - test_pack_IWinInetInfoVtbl(); test_pack_LPBINDHOST(); test_pack_LPBINDING(); test_pack_LPBINDSTATUSCALLBACK(); diff --git a/dlls/user32/tests/generated.c b/dlls/user32/tests/generated.c index 7f6325fa2c9..6b80ad8d6f0 100644 --- a/dlls/user32/tests/generated.c +++ b/dlls/user32/tests/generated.c @@ -25,7 +25,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) # define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) # define _TYPE_ALIGNMENT(type) __alignof__(type) #else /* diff --git a/dlls/wininet/tests/generated.c b/dlls/wininet/tests/generated.c index 39a34f778f4..c0d9c9bd97e 100644 --- a/dlls/wininet/tests/generated.c +++ b/dlls/wininet/tests/generated.c @@ -29,7 +29,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) # define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) # define _TYPE_ALIGNMENT(type) __alignof__(type) #else /* diff --git a/dlls/winmm/tests/generated.c b/dlls/winmm/tests/generated.c index ae183afad22..5eaa6fb1cf1 100644 --- a/dlls/winmm/tests/generated.c +++ b/dlls/winmm/tests/generated.c @@ -27,7 +27,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus) # define _TYPE_ALIGNMENT(type) __alignof(type) -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(__clang__) # define _TYPE_ALIGNMENT(type) __alignof__(type) #else /* diff --git a/tools/winapi/winapi_test b/tools/winapi/winapi_test index fd801572894..716bb30ac08 100755 --- a/tools/winapi/winapi_test +++ b/tools/winapi/winapi_test @@ -544,7 +544,7 @@ sub output_header($$$) { print OUT "\n"; print OUT "#if defined(_MSC_VER) && (_MSC_VER >= 1300) && defined(__cplusplus)\n"; print OUT "# define _TYPE_ALIGNMENT(type) __alignof(type)\n"; - print OUT "#elif defined(__GNUC__)\n"; + print OUT "#elif defined(__GNUC__) || defined(__clang__)\n"; print OUT "# define _TYPE_ALIGNMENT(type) __alignof__(type)\n"; print OUT "#else\n"; print OUT "/*\n";