summaryrefslogtreecommitdiff
path: root/app-text/calibre/files/calibre-4.22.0-icu68.patch
blob: c4b3baf05703a1b9033e342165dc19ee4c4b2030 (plain)
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
42
43
44
45
46
47
48
49
From c211f9b17af410463ce9cfc9b1b100228b51720f Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Sat, 31 Oct 2020 10:44:36 +0100
Subject: [PATCH] Fix build with icu-68.1

icu-68.1 removed public macro definitions for TRUE and FALSE

Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
---
 src/calibre/utils/icu.c     | 4 ++--
 src/calibre/utils/matcher.c | 1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/calibre/utils/icu.c b/src/calibre/utils/icu.c
index 62d05de310..4e918492d9 100644
--- a/src/calibre/utils/icu.c
+++ b/src/calibre/utils/icu.c
@@ -238,14 +238,14 @@ icu_Collator_contains(icu_Collator *self, PyObject *args) {
 
     a = python_to_icu(a_, &asz);
     if (a == NULL) goto end;
-    if (asz == 0) { found = TRUE; goto end; }
+    if (asz == 0) { found = 1; goto end; }
     b = python_to_icu(b_, &bsz);
     if (b == NULL) goto end;
 
     search = usearch_openFromCollator(a, asz, b, bsz, self->collator, NULL, &status);
     if (U_SUCCESS(status)) {
         pos = usearch_first(search, &status);
-        if (pos != USEARCH_DONE) found = TRUE;
+        if (pos != USEARCH_DONE) found = 1;
     }
 end:
     if (search != NULL) usearch_close(search);
diff --git a/src/calibre/utils/matcher.c b/src/calibre/utils/matcher.c
index f38a7082ce..8e57947867 100644
--- a/src/calibre/utils/matcher.c
+++ b/src/calibre/utils/matcher.c
@@ -15,7 +15,6 @@
 #define inline
 #endif
 
-typedef unsigned char bool;
 #define TRUE 1
 #define FALSE 0
 #define MAX(x, y) ((x > y) ? x : y)
-- 
2.29.2