INN 2.6.0 release candidate
Julien ÉLIE
julien at trigofacile.com
Fri May 1 21:25:32 UTC 2015
Hi Dennis,
First of all, thanks for your test.
> | dnl OSX needs -multiply_defined suppress.
> | *darwin*)
> | LDFLAGS="$LDFLAGS -multiply_defined suppress"
> | ;;
>
> However, at least in Mac OS X 10.10 this switch is marked as obsolete.
>>From ld(1):
>
> | -multiply_defined treatment
> | Previously provided a way to warn or error if any of the sym-
> | bols used from a dynamic library were also available in
> | another linked dynamic library. This option is obsolete.
>
> To continue, I've removed this from Makefile.global:
>
> | -LDFLAGS = -multiply_defined suppress
> | +LDFLAGS =
So we just have to remove the special case of darwin in configure.ac
so as to no longer add "-multiply_defined suppress" to LDFLAGS
if I understand well. In the documentation of that flag, it is said
that the default behaviour is to treat multiply defined symbols
in dynamic libraries as warnings when -twolevel_namespace is in effect.
This flag was added in 2003 (revision 6112): "add
'-multiply_defined suppress' to LDFLAGS for OSX to shut up
compilation warnings".
> | libtool: link: clang -o .libs/innfeed article.o buffer.o config_l.o config_y.o endpoint.o host.o innlistener.o main.o misc.o tape.o connection.o /Users/dennis/src/inn-2.6.0rc1/history/.libs/libinnhist.dylib /Users/dennis/src/inn-2.6.0rc1/storage/.libs/libstorage.dylib /Users/dennis/src/inn-2.6.0rc1/lib/.libs/libinn.dylib
> | imap_connection.c:57:15: error: typedef redefinition with different types
> | ('int (*)(void)' vs 'int (*)()')
> | typedef int (*sasl_callback_ft)(void);
> | ^
> | /usr/include/sasl/saslplug.h:36:15: note: previous definition is here
> | typedef int (*sasl_callback_ft)(); // APPLE: remove void
> | ^
> | 1 error generated.
> | make[1]: *** [imap_connection.o] Error 1
> | make: *** [all-innfeed] Error 2
>
> The comment indicates that the change was made intentionally (for
> whatever reason).
>
> After removing the typedef:
>
> | -typedef int (*sasl_callback_ft)(void);
> | +//typedef int (*sasl_callback_ft)(void);
>
> in innfeed/imap_connection.c I was eventually able to build inn.
Cyrus SASL 2.1.25 modified the prototype of SASL callback
functions to fix the "function declaration
isn't a prototype" warning, by adding in <sasl/saslplug.h>:
+typedef int (*sasl_callback_ft)(void);
typedef int sasl_getcallback_t(sasl_conn_t *conn,
unsigned long callbackid,
- int (**pproc)(),
+ sasl_callback_ft * pproc,
void **pcontext);
So we have in innfeed/imap_connection.c:
/* For Cyrus SASL versions < 2.1.24. */
# ifndef sasl_callback_ft
typedef int (*sasl_callback_ft)(void);
# endif
So the check should be improved...
By the way, do you know why the #ifndef clause with the typedef
is read? Isn't sasl_callback_ft already defined in your version
of Cyrus SASL?
--
Julien ÉLIE
« Felix qui potuit rerum cognoscere causas. » (Virgile)
More information about the inn-workers
mailing list