libical >= 2.0.0 support (patch)

Ondřej Surý ondrej at sury.org
Tue May 24 04:40:44 EDT 2016


Hi,

Debian has recently switched to libical >= 2.0.0 that hides some
previously exported symbols.

I rewrote custom icalrecur_add_rule to reconstruct RRULE from XML or
JSON to be reparsed again with icalrecurrencetype_from_string(char *).

I understand this is not optimal, but I believe that simplicity of the
code outweights the speed.

And I suggest to drop support for libical << 2.0.0 for simplicity. And
in that case I will weed out the HAVE_ICAL_<foo> macros and send another
patch with that (0018-* is just basic to get it compiled).

Please review (and apply) attached patch. I used buf_* functions to
reconstruct the cstring, but it desperately needs a review if I am using
those correctly and if it doesn't leak memory (it probably does? But in
that case json_x_value leaks it as well).

But hey it compiles! :)

Cheers,
-- 
Ondřej Surý <ondrej at sury.org>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server
Knot Resolver (https://www.knot-resolver.cz/) – secure, privacy-aware,
fast DNS(SEC) resolver
Vše pro chleba (https://vseprochleba.cz) – Potřeby pro pečení chleba
všeho druhu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0019-Replace-the-custom-icalrecur_add_rule-with-reconstru.patch
Type: text/x-patch
Size: 5992 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20160524/46923a33/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0018-Require-libical-2.0-and-define-the-libical-feature-m.patch
Type: text/x-patch
Size: 2102 bytes
Desc: not available
URL: <http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20160524/46923a33/attachment-0001.bin>


More information about the Cyrus-devel mailing list