Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ical_file.cmake: Fix ICAL_CHECK_VERSION macro #335

Merged
merged 1 commit into from Mar 24, 2018

Conversation

dbnicholson
Copy link
Contributor

The inclusion of the icalversion.h header in ical.h breaks the
ICAL_CHECK_VERSION macro because all the \ line continuation characters
are converted to ;. This makes the macro useless. Wrapping for the sake
of readability, it currently looks like this:

#define ICAL_CHECK_VERSION(major,minor,micro) ; (ICAL_MAJOR_VERSION >
(major) || ; (ICAL_MAJOR_VERSION == (major) && ICAL_MINOR_VERSION >
(minor)) || ; (ICAL_MAJOR_VERSION == (major) && ICAL_MINOR_VERSION ==
(minor) && ; ICAL_MICRO_VERSION >= (micro)))

Setting the STRINGS NEWLINE_CONSUME option keeps the original structure
instead of terminating the lines.

The inclusion of the icalversion.h header in ical.h breaks the
ICAL_CHECK_VERSION macro because all the \ line continuation characters
are converted to ;. This makes the macro useless. Wrapping for the sake
of readability, it currently looks like this:

  #define ICAL_CHECK_VERSION(major,minor,micro) ; (ICAL_MAJOR_VERSION >
  (major) || ; (ICAL_MAJOR_VERSION == (major) && ICAL_MINOR_VERSION >
  (minor)) || ; (ICAL_MAJOR_VERSION == (major) && ICAL_MINOR_VERSION ==
  (minor) && ; ICAL_MICRO_VERSION >= (micro)))

Setting the STRINGS NEWLINE_CONSUME option keeps the original structure
instead of terminating the lines.
@dbnicholson dbnicholson changed the title ical_file.cmake: ICAL_CHECK_VERSION macro ical_file.cmake: Fix ICAL_CHECK_VERSION macro Mar 23, 2018
@winterz winterz merged commit 076626a into libical:master Mar 24, 2018
gnomesysadmins pushed a commit to GNOME/evolution-data-server that referenced this pull request Mar 27, 2018
Apparently multithreaded uses of icaltimezone has been fixed in 3.0.1[1]
and 3.0.2[2]. Don't preload the timezones in that case as they take up
an enormous amount of heap. Unfortunately, the ICAL_CHECK_VERSION macro
needed to check the version has been broken until recently[3]. Redefine
it locally until the libical build requirement is new enough to contain
the fixed macro in ical.h.

1. https://github.com/libical/libical/releases/tag/v3.0.1
2. https://github.com/libical/libical/releases/tag/v3.0.2
3. libical/libical#335
gnomesysadmins pushed a commit to GNOME/evolution-data-server that referenced this pull request Mar 27, 2018
Apparently multithreaded uses of icaltimezone has been fixed in 3.0.1[1]
and 3.0.2[2]. Don't preload the timezones in that case as they take up
an enormous amount of heap. Unfortunately, the ICAL_CHECK_VERSION macro
needed to check the version has been broken until recently[3]. Redefine
it locally until the libical build requirement is new enough to contain
the fixed macro in ical.h.

1. https://github.com/libical/libical/releases/tag/v3.0.1
2. https://github.com/libical/libical/releases/tag/v3.0.2
3. libical/libical#335
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants