File: drop-a-slightly-outdated-type-def-for-boolean-type.patch

package info (click to toggle)
c-blosc 1.21.5%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,620 kB
  • sloc: ansic: 7,670; python: 240; makefile: 61; sh: 3
file content (41 lines) | stat: -rw-r--r-- 1,285 bytes parent folder | 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
31
32
33
34
35
36
37
38
39
40
41
From: Georg Semmler <georg.semmler@giga-infosystems.com>
Date: Thu, 17 Apr 2025 10:19:25 +0200
Subject: Drop a slightly outdated type def for boolean type

This cases compilation errors with gcc 15 with the following error
message:

c-blosc/blosc/shuffle.c:26:15: error: 'bool' cannot be defined via 'typedef'
      | typedef _Bool bool;
      |               ^~~~
c-blosc/blosc/shuffle.c:26:15: note: 'bool' is a keyword with '-std=c23' onwards

See https://gcc.gnu.org/gcc-15/porting_to.html for details

I've choosen to remove the typedef as it seems to be unused in this
file.
---
 blosc/shuffle.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/blosc/shuffle.c b/blosc/shuffle.c
index e680a17..9e3ee3e 100644
--- a/blosc/shuffle.c
+++ b/blosc/shuffle.c
@@ -20,16 +20,6 @@
 #include <pthread.h>
 #endif
 
-/* Visual Studio < 2013 does not have stdbool.h so here it is a replacement: */
-#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
-/* have a C99 compiler */
-typedef _Bool bool;
-#else
-/* do not have a C99 compiler */
-typedef unsigned char bool;
-#endif
-
-
 #if !defined(__clang__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && \
     __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
 #define HAVE_CPU_FEAT_INTRIN