ports/132573: [patch] security/cyrus-sasl2: fix compilation with gcc44

Anonymous swell.k at gmail.com
Thu Mar 12 11:00:11 UTC 2009


>Number:         132573
>Category:       ports
>Synopsis:       [patch] security/cyrus-sasl2: fix compilation with gcc44
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 12 11:00:10 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD luffy 8.0-CURRENT FreeBSD 8.0-CURRENT #0 r189706M: Wed Mar 11 20:47:32 UTC 2009 root at luffy:/usr/obj/usr/src/sys/PHOENIX amd64

$ make showconfig
===> The following configuration options are available for cyrus-sasl-2.1.22_2:
     BDB=off "Use Berkeley DB"
     MYSQL=off "Use MySQL"
     PGSQL=off "Use PostgreSQL"
     SQLITE=off "Use SQLite"
     DEV_URANDOM=off "Use /dev/urandom"
     ALWAYSTRUE=off "Enable the alwaystrue password verifier"
     KEEP_DB_OPEN=off "Keep handle to Berkeley DB open"
     AUTHDAEMOND=off "Enable use of authdaemon"
     LOGIN=on "Enable LOGIN authentication"
     PLAIN=on "Enable PLAIN authentication"
     CRAM=on "Enable CRAM-MD5 authentication"
     DIGEST=on "Enable DIGEST-MD5 authentication"
     OTP=on "Enable OTP authentication"
     NTLM=off "Enable NTLM authentication"
>Description:
>How-To-Repeat:
Install lang/gcc44 and try to build the port with CC=gcc44.

$ make CC=gcc44
...
if /bin/sh /usr/local/bin/libtool --mode=compile gcc44 -DHAVE_CONFIG_H -I. -I. -I..  -I../include -I../lib -I../sasldb -I../include  -fPIC -DKRB5_HEIMDAL  -Wall -W -O2 -pipe -fno-strict-aliasing -MT digestmd5.lo -MD -MP -MF ".deps/digestmd5.Tpo"  -c -o digestmd5.lo `test -f 'digestmd5.c' || echo './'`digestmd5.c;  then mv ".deps/digestmd5.Tpo" ".deps/digestmd5.Plo";  else rm -f ".deps/digestmd5.Tpo"; exit 1;  fi
 gcc44 -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../lib -I../sasldb -I../include -fPIC -DKRB5_HEIMDAL -Wall -W -O2 -pipe -fno-strict-aliasing -MT digestmd5.lo -MD -MP -MF .deps/digestmd5.Tpo -c digestmd5.c  -fPIC -DPIC -o .libs/digestmd5.o
digestmd5.c:279: warning: pointer targets in initialization differ in signedness
digestmd5.c: In function 'DigestCalcResponse':
digestmd5.c:366: warning: pointer targets in passing argument 2 of 'utils->MD5Update' differ in signedness
digestmd5.c:366: note: expected 'const unsigned char *' but argument is of type 'char *'
digestmd5.c: In function 'dec_3des':
digestmd5.c:842: warning: unused parameter 'digest'
digestmd5.c: In function 'dec_des':
digestmd5.c:960: warning: unused parameter 'digest'
digestmd5.c: In function 'dec_rc4':
digestmd5.c:1211: warning: unused parameter 'digest'
digestmd5.c: In function 'digestmd5_encode':
digestmd5.c:1401: warning: pointer targets in passing argument 5 of 'text->utils->hmac_md5' differ in signedness
digestmd5.c:1401: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c: In function 'digestmd5_decode_packet':
digestmd5.c:1497: warning: pointer targets in assignment differ in signedness
digestmd5.c: In function 'digestmd5_server_mech_new':
digestmd5.c:1797: warning: unused parameter 'challenge'
digestmd5.c:1798: warning: unused parameter 'challen'
digestmd5.c: In function 'digestmd5_server_mech_step1':
digestmd5.c:1947: warning: pointer targets in passing argument 6 of 'add_to_challenge' differ in signedness
digestmd5.c:505: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:1820: warning: unused parameter 'clientin'
digestmd5.c:1821: warning: unused parameter 'clientinlen'
digestmd5.c:1824: warning: unused parameter 'oparams'
digestmd5.c: In function 'digestmd5_server_mech_step2':
digestmd5.c:2235: warning: pointer targets in passing argument 2 of '_plug_strdup' differ in signedness
plugin_common.h:147: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2238: warning: pointer targets in passing argument 2 of '_plug_strdup' differ in signedness
plugin_common.h:147: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2274: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness
/usr/include/string.h:79: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2286: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness
/usr/include/string.h:79: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2286: warning: pointer targets in passing argument 2 of 'strcmp' differ in signedness
/usr/include/string.h:79: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:2351: warning: pointer targets in passing argument 1 of 'strncpy' differ in signedness
/usr/include/string.h:100: note: expected 'char *' but argument is of type 'unsigned char *'
digestmd5.c:2369: warning: pointer targets in passing argument 2 of 'DigestCalcSecret' differ in signedness
digestmd5.c:430: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:2369: warning: pointer targets in passing argument 3 of 'DigestCalcSecret' differ in signedness
digestmd5.c:430: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:2514: warning: pointer targets in passing argument 2 of 'text->cipher_init' differ in signedness
digestmd5.c:2514: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:2514: warning: pointer targets in passing argument 3 of 'text->cipher_init' differ in signedness
digestmd5.c:2514: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:2718:15: error: #elif with no expression
digestmd5.c: In function 'make_client_response':
digestmd5.c:3010: warning: pointer targets in passing argument 3 of 'calculate_response' differ in signedness
digestmd5.c:2851: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:3010: warning: pointer targets in passing argument 11 of 'calculate_response' differ in signedness
digestmd5.c:2851: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:3034: warning: pointer targets in passing argument 6 of 'add_to_challenge' differ in signedness
digestmd5.c:505: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:3145: warning: pointer targets in passing argument 2 of 'text->cipher_init' differ in signedness
digestmd5.c:3145: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c:3145: warning: pointer targets in passing argument 3 of 'text->cipher_init' differ in signedness
digestmd5.c:3145: note: expected 'unsigned char *' but argument is of type 'char *'
digestmd5.c: In function 'digestmd5_client_mech_step1':
digestmd5.c:3732: warning: pointer targets in passing argument 2 of '_plug_strdup' differ in signedness
plugin_common.h:147: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:3735: warning: pointer targets in passing argument 2 of '_plug_strdup' differ in signedness
plugin_common.h:147: note: expected 'const char *' but argument is of type 'unsigned char *'
digestmd5.c:3703: warning: unused parameter 'serverin'
digestmd5.c:3704: warning: unused parameter 'serverinlen'
digestmd5.c: In function 'digestmd5_client_mech_step3':
digestmd5.c:3838: warning: unused parameter 'prompt_need'
digestmd5.c:3839: warning: unused parameter 'clientout'
digestmd5.c:3840: warning: unused parameter 'clientoutlen'
digestmd5.c: In function 'digestmd5_client_mech_step':
digestmd5.c:4000: warning: pointer targets in assignment differ in signedness
digestmd5.c:4037:15: error: #elif with no expression
*** Error code 1

Here is more simple example

$ cat a.c
#define FOO
#define BAR

#ifdef FOO
#error FOO defined
#elif BAR
#error BAR defined
#else
#error nothing defined
#endif

$ cc -E a.c
# 1 "a.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "a.c"
a.c:7:2: error: #error FOO defined

$ gcc44 -E a.c
# 1 "a.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "a.c"
a.c:7:2: error: #error FOO defined
a.c:8:10: error: #elif with no expression
>Fix:
--- cyrus-sasl2.diff begins here ---
Index: security/cyrus-sasl2/files/patch-plugins-digestmd5.c
===================================================================
RCS file: security/cyrus-sasl2/files/patch-plugins-digestmd5.c
diff -N security/cyrus-sasl2/files/patch-plugins-digestmd5.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ security/cyrus-sasl2/files/patch-plugins-digestmd5.c	20 Jan 2009 17:34:32 -0000
@@ -0,0 +1,20 @@
+--- plugins/digestmd5.c.orig	2006-05-17 20:46:17.000000000 +0400
++++ plugins/digestmd5.c
+@@ -2715,7 +2715,7 @@ static sasl_server_plug_t digestmd5_serv
+ 	"DIGEST-MD5",			/* mech_name */
+ #ifdef WITH_RC4
+ 	128,				/* max_ssf */
+-#elif WITH_DES
++#elif defined(WITH_DES)
+ 	112,
+ #else 
+ 	1,
+@@ -4034,7 +4034,7 @@ static sasl_client_plug_t digestmd5_clie
+ 	"DIGEST-MD5",
+ #ifdef WITH_RC4				/* mech_name */
+ 	128,				/* max ssf */
+-#elif WITH_DES
++#elif defined(WITH_DES)
+ 	112,
+ #else
+ 	1,
--- cyrus-sasl2.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list