summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2020-10-31 17:43:25 -0400
committerAllen Winter <allen.winter@kdab.com>2020-10-31 17:44:19 -0400
commit6e8ed4a840b2ab31b1b4968b8b66cc8273dbfb5e (patch)
tree690c28058a4593cecdea275eabf4fd85b3413758
parent555a7d3e620c48acd625218ada565ea4b5eee921 (diff)
parenta3308a23912bba2db654a8c456165c31888cc897 (diff)
downloadlibical-git-6e8ed4a840b2ab31b1b4968b8b66cc8273dbfb5e.tar.gz
Merge branch '3.0'
-rw-r--r--ConfigureChecks.cmake1
-rw-r--r--ReleaseNotes.txt1
-rw-r--r--config.h.cmake3
-rw-r--r--src/libical/icalrecur.c10
4 files changed, 13 insertions, 2 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index e4d0e2ec..bba33fa9 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -10,6 +10,7 @@ check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H)
check_include_files(fcntl.h HAVE_FCNTL_H)
check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(wctype.h HAVE_WCTYPE_H)
+check_include_files(stdbool.h HAVE_STDBOOL_H)
include(CheckFunctionExists)
if(WIN32 AND MSVC)
diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt
index 9b8bc535..61ddff4d 100644
--- a/ReleaseNotes.txt
+++ b/ReleaseNotes.txt
@@ -38,6 +38,7 @@ Version 3.0.9 (UNRELEASED):
* Add support for empty parameters, e.g. CN=""
* Accept VTIMEZONE with more than one X- property
* Fix cross-compile support in libical-glib
+ * Fix build with newer libicu
Version 3.0.8 (07 March 2020):
------------------------------
diff --git a/config.h.cmake b/config.h.cmake
index 2cea5dc9..b7e1d5c9 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -36,6 +36,9 @@
/* Define to 1 if you have the <dirent.h> header file. */
#cmakedefine HAVE_DIRENT_H 1
+/* Define to 1 if you have the <stdbool.h> header file. */
+#cmakedefine HAVE_STDBOOL_H 1
+
/* Define if we have pthread. */
#cmakedefine HAVE_PTHREAD_ATTR_GET_NP 1
#cmakedefine HAVE_PTHREAD_GETATTR_NP 1
diff --git a/src/libical/icalrecur.c b/src/libical/icalrecur.c
index 91522161..1c1344a1 100644
--- a/src/libical/icalrecur.c
+++ b/src/libical/icalrecur.c
@@ -145,6 +145,12 @@
#if defined(HAVE_LIBICU)
#include <unicode/ucal.h>
#include <unicode/ustring.h>
+#if defined(HAVE_STDBOOL_H)
+#include <stdbool.h>
+#else
+#define false 0
+#define true 1
+#endif
#else
/* The maximums below are based on Gregorian leap years */
@@ -1079,7 +1085,7 @@ icalarray *icalrecurrencetype_rscale_supported_calendars(void)
calendars = icalarray_new(sizeof(const char **), 20);
- en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status);
+ en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status);
while ((cal = uenum_next(en, NULL, &status))) {
cal = icalmemory_tmp_copy(cal);
icalarray_append(calendars, &cal);
@@ -1472,7 +1478,7 @@ static int initialize_rscale(icalrecur_iterator *impl)
}
/* Check if specified calendar is supported */
- en = ucal_getKeywordValuesForLocale("calendar", NULL, FALSE, &status);
+ en = ucal_getKeywordValuesForLocale("calendar", NULL, false, &status);
while ((cal = uenum_next(en, NULL, &status))) {
if (!strcmp(cal, rule.rscale)) {
is_hebrew = !strcmp(rule.rscale, "hebrew");