Package: lzop / 1.03-4

static-assert.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Description: Use _Static_assert
 The previous hack for making compile-time assertions no longer works
 with GCC 6.  Use the built-in _Static_assert instead.
Origin: other, package ucl (1.03+repack-4) patch 04-Static-assert.patch
Bug-Debian: https://bugs.debian.org/812054
Forwarded: no
Last-Update: 2016-07-05

--- lzop-1.03.orig/src/miniacc.h
+++ lzop-1.03/src/miniacc.h
@@ -1699,6 +1699,9 @@ extern "C" {
 #  endif
 #endif
 #if !defined(ACC_COMPILE_TIME_ASSERT_HEADER)
+# define ACC_COMPILE_TIME_ASSERT_HEADER(e) _Static_assert(e, #e);
+#endif
+#if !defined(ACC_COMPILE_TIME_ASSERT_HEADER)
 #  if (ACC_CC_AZTECC || ACC_CC_ZORTECHC)
 #    define ACC_COMPILE_TIME_ASSERT_HEADER(e)  extern int __acc_cta[1-!(e)];
 #  elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
@@ -1710,6 +1713,9 @@ extern "C" {
 #  endif
 #endif
 #if !defined(ACC_COMPILE_TIME_ASSERT)
+# define ACC_COMPILE_TIME_ASSERT(e) _Static_assert(e, #e);
+#endif
+#if !defined(ACC_COMPILE_TIME_ASSERT)
 #  if (ACC_CC_AZTECC)
 #    define ACC_COMPILE_TIME_ASSERT(e)  {typedef int __acc_cta_t[1-!(e)];}
 #  elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)