wok-next diff ucl/stuff/patches/04-Static-assert.patch @ rev 20663
Fix web site for the Shimmer Project themes
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu May 10 22:58:32 2018 +0300 (2018-05-10) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ucl/stuff/patches/04-Static-assert.patch Thu May 10 22:58:32 2018 +0300 1.3 @@ -0,0 +1,34 @@ 1.4 +From: Robert Luberda <robert@debian.org> 1.5 +Date: Sat, 2 Jul 2016 22:23:20 +0200 1.6 +Subject: Switch to _Static_assert 1.7 + 1.8 +Use _Static_assert for compile-time assertion to fix 1.9 +build failures with gcc-6 (closes: #811707) 1.10 +--- 1.11 + acc/acc_defs.h | 6 ++++++ 1.12 + 1 file changed, 6 insertions(+) 1.13 + 1.14 +diff --git a/acc/acc_defs.h b/acc/acc_defs.h 1.15 +index 866b7bd..5ee3761 100644 1.16 +--- a/acc/acc_defs.h 1.17 ++++ b/acc/acc_defs.h 1.18 +@@ -87,6 +87,9 @@ 1.19 + 1.20 + /* This can be put into a header file but may get ignored by some compilers. */ 1.21 + #if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) 1.22 ++# define ACC_COMPILE_TIME_ASSERT_HEADER(e) _Static_assert(e, #e); 1.23 ++#endif 1.24 ++#if !defined(ACC_COMPILE_TIME_ASSERT_HEADER) 1.25 + # if (ACC_CC_AZTECC || ACC_CC_ZORTECHC) 1.26 + # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)]; 1.27 + # elif (ACC_CC_DMC || ACC_CC_SYMANTECC) 1.28 +@@ -100,6 +103,9 @@ 1.29 + 1.30 + /* This must appear within a function body. */ 1.31 + #if !defined(ACC_COMPILE_TIME_ASSERT) 1.32 ++# define ACC_COMPILE_TIME_ASSERT(e) _Static_assert(e, #e); 1.33 ++#endif 1.34 ++#if !defined(ACC_COMPILE_TIME_ASSERT) 1.35 + # if (ACC_CC_AZTECC) 1.36 + # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __acc_cta_t[1-!(e)];} 1.37 + # elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)