[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

1.0.2 build error on AIX 4.3.2, 4.3.3, 5.1, 5.2

From: Albert Chin <subversion-dev_at_mlists.thewrittenword.com>
Date: 2004-05-03 22:48:28 CEST

Trying to build 1.0.2 on AIX with the IBM C compiler:
...
xlc -U__STR__ -D_THREAD_SAFE -D_USE_IRS -O2 -qmaxmem=-1 -qarch=com
-qHALT=E -I./subversion/include -I.
-I/opt/build/subversion-1.0.2/neon/src
-I/opt/TWWfsw/subversion10/include/neon
-I/opt/build/subversion-1.0.2/apr/include
-I/opt/build/subversion-1.0.2/apr-util/include
-I/opt/TWWfsw/libdb42/include
-I/opt/build/subversion-1.0.2/apr-util/xml/expat/lib -c
subversion/libsvn_ra_svn/cram.c -DPIC
1506-507 (W) No licenses available. Contact your program supplier to
add additional users. Compilation will proceed shortly.
"subversion/libsvn_ra_svn/cram.c", line 99.17: 1506-280 (E) Function
argument assignment between types "unsigned char*" and "char*" is not allowed.
"subversion/libsvn_ra_svn/cram.c", line 105.17: 1506-280 (E) Function
argument assignment between types "unsigned char*" and "char*" is not allowed.

Is the patch below acceptable? The prototype for apr_md5_final() is:
  apr_status_t apr_md5_final(unsigned char digest[16],
                             apr_md5_ctx_t *context);
and digest is of type 'char *':
  static void compute_digest(char *digest, const char *challenge,
                             const char *password)

The main reason for the problem is the addition of -qHALT=E to CFLAGS
by apr/build/apr_hints.m4. This causes a compiler failure on these
errors while otherwise the compiler would not fail.

-- 
albert chin (china@thewrittenword.com)
-- snip snip
--- subversion/libsvn_ra_svn/cram.c.orig	Mon May  3 15:42:00 2004
+++ subversion/libsvn_ra_svn/cram.c	Mon May  3 15:42:08 2004
@@ -96,13 +96,13 @@
   apr_md5_init(&ctx);
   apr_md5_update(&ctx, secret, sizeof(secret));
   apr_md5_update(&ctx, challenge, strlen(challenge));
-  apr_md5_final(digest, &ctx);
+  apr_md5_final((unsigned char *)digest, &ctx);
   for (i = 0; i < sizeof(secret); i++)
     secret[i] ^= (0x36 ^ 0x5c);
   apr_md5_init(&ctx);
   apr_md5_update(&ctx, secret, sizeof(secret));
   apr_md5_update(&ctx, digest, APR_MD5_DIGESTSIZE);
-  apr_md5_final(digest, &ctx);
+  apr_md5_final((unsigned char *)digest, &ctx);
 }
 
 /* Fail the authentication, from the server's perspective. */
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 3 22:48:48 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.