Dovecots header files not optimized for external plugins

Jan Engelhardt jengelh at inai.de
Sun Nov 19 16:34:27 EET 2017


On Sunday 2017-11-19 14:19, Timo Sirainen wrote:
>
>See compile instructions for example here: https://dovecot.org/patches/2.2/imap-logout-plugin.c

Mh, that -config script should really have been a pkgconfig .pc file.
(I see it's not really a script, which is probably the reason it is not in
/usr/bin.)

>      == Problems 2
>      In file included from /usr/include/bits/byteswap.h:35:0,
>                      from /usr/include/byteswap.h:24,
>                      from a.cpp:2:
>      /usr/include/dovecot/byteorder.h:32:24: error: expected unqualified-id before
>      ‘__extension__’
>      static inline uint16_t bswap_16(uint16_t in);
>
>
>Try #undef bswap_16 (and others)? We have a patch pending that does these #undefs to fix
>compiling issue with uclibc-ng - maybe a similar problem.

That is inside out. Why mess with libc? Why reimplement byteswapping functions
at all? Why not at least prefix them e.g. dove_bswap to avoid nameclashes?


More information about the dovecot mailing list