Bug 132573 - [patch] security/cyrus-sasl2: fix compilation with gcc44
Summary: [patch] security/cyrus-sasl2: fix compilation with gcc44
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Hajimu UMEMOTO
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-12 11:00 UTC by swell.k
Modified: 2010-03-12 08:00 UTC (History)
0 users

See Also:


Attachments
cyrus-sasl2.diff (899 bytes, patch)
2009-03-12 11:00 UTC, swell.k
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description swell.k 2009-03-12 11:00:10 UTC

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
Comment 1 Edwin Groothuis freebsd_committer 2009-03-12 11:00:20 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ume

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Martin Wilke freebsd_committer 2009-09-19 20:14:29 UTC
State Changed
From-To: open->closed

this problem is fixed with latest update.
Comment 3 swell.k 2009-09-20 08:56:21 UTC
miwi@FreeBSD.org writes:

> Synopsis: [patch] security/cyrus-sasl2: fix compilation with gcc44
>
> State-Changed-From-To: open->closed
> State-Changed-By: miwi
> State-Changed-When: Sat Sep 19 19:14:29 UTC 2009
> State-Changed-Why: 
> this problem is fixed with latest update.

No, it wasn't fixed. I can still reproduce it on 2.1.23 using either
gcc-4.4.2.20090915
or
gcc-4.5.0.20090917

>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=132573
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2009-10-02 22:46:13 UTC
State Changed
From-To: closed->open

Submitter claims problem still exists.
Comment 5 dfilter service freebsd_committer 2010-03-12 07:50:21 UTC
ume         2010-03-12 07:50:03 UTC

  FreeBSD ports repository

  Added files:
    security/cyrus-sasl2/files patch-plugins-digestmd5.c 
  Log:
  Fix compilation with gcc44.
  It seems there is this fix in cyrus-sasl-2.1.24rc1.
  
  PR:             132573
  Submitted by:   Anonymous <swell.k__at__gmail.com>
  Reviewed by:    OISHI Masakuni <yamasa__at__bsdhouse.org>
  
  Revision  Changes    Path
  1.1       +20 -0     ports/security/cyrus-sasl2/files/patch-plugins-digestmd5.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Hajimu UMEMOTO freebsd_committer 2010-03-12 07:50:51 UTC
State Changed
From-To: open->closed

Thanks committed!