INN 2.6.0 release candidate

Dennis Preiser dp-inn at d--p.de
Sat May 2 08:19:40 UTC 2015


On Fri, May 01, 2015 at 11:25:32PM +0200, Julien ÉLIE wrote:
>> | -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

The current version of darwin is 14.x.y. I would suggest to check the darwin
version and set the LDFLAGS only for versions below darwin14.

Something like this (which does *not* work!, I'm not familiar with the right
syntax):

| *darwin[0-9]*|*darwin1[0-3]*)
|     LDFLAGS="$LDFLAGS -multiply_defined suppress"
|     ;;

>> | 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
> 
> 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?

As far as I know, it's not possible to detect whether a typedef was done
earlier or not. My compiler does not complain when the same typedef is done
twice. Unfortunately, Apple has change the typedef from

typedef int (*sasl_callback_ft)(void);

to

typedef int (*sasl_callback_ft)();

in /usr/include/sasl/saslplug.h. Here is the current code:

| typedef int (*sasl_callback_ft)(); // APPLE: remove void
| typedef int sasl_getcallback_t(sasl_conn_t *conn,
| 			       unsigned long callbackid,
| 			       sasl_callback_ft * pproc,
| 			       void **pcontext);

Dennis


More information about the inn-workers mailing list