On Mon, Nov 23, 1998, [EMAIL PROTECTED] wrote:
> Full_Name: Lutz Frank
> Version: 2.1.0-1.3.
> OS: IRIX 6.2
> Submission from: mail.condor.de (194.120.164.20)
>
> Trying to compile Apache 1.3.3 with mod_ssl-2.1.0-1.3.3
> produces the following errors:
>
> "ssl_engine_scache.c", line 264: error(1138): expression must have
> pointer-to-object type
> memcpy(dbmval.dptr+sizeof(SCI->tExpiresAt), SCI->ucaData, SCI->nData);
> ^
>
> "ssl_engine_scache.c", line 323: error(1138): expression must have
> pointer-to-object type
> memcpy(SCI->ucaData, dbmval.dptr+sizeof(SCI->tExpiresAt),
> ^
> 2 errors detected in the compilation of "ssl_engine_scache.c".
I've tried it under IRIX 6.2 myself today and.. oh, this vendor compiler is
horrible ;-) But here it's right, i.e. ANSI C compliant. We have to cast the
void * to a char * before ANSI C allows us to do arithmetic with it. Apply
the appended patch to fix this. Additionally (not in the patch but committed
for mod_ssl 2.1.1) I've fixed some more ANSI C issues which popped up under
this compiler. Thanks for your feedback.
Ralf S. Engelschall
[EMAIL PROTECTED]
www.engelschall.com
Index: ssl_engine_scache.c
===================================================================
RCS file: /e/apache/SSL/REPOS/mod_ssl/pkg.apache/src/modules/ssl/ssl_engine_scache.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ssl_engine_scache.c 1998/11/17 16:27:18 1.13
+++ ssl_engine_scache.c 1998/11/23 15:19:45 1.14
@@ -261,7 +261,7 @@
dbmval.dsize = sizeof(SCI->tExpiresAt)+SCI->nData;
dbmval.dptr = (UCHAR *)malloc(dbmval.dsize);
memcpy(dbmval.dptr, &SCI->tExpiresAt, sizeof(SCI->tExpiresAt));
- memcpy(dbmval.dptr+sizeof(SCI->tExpiresAt), SCI->ucaData, SCI->nData);
+ memcpy((char *)dbmval.dptr+sizeof(SCI->tExpiresAt), SCI->ucaData, SCI->nData);
/* and store it to the DBM file */
ssl_mutex_on();
@@ -320,7 +320,7 @@
/* copy over the information to the SCI */
SCI->nData = dbmval.dsize-sizeof(SCI->tExpiresAt);
SCI->ucaData = (UCHAR *)malloc(dbmval.dsize-sizeof(SCI->tExpiresAt));
- memcpy(SCI->ucaData, dbmval.dptr+sizeof(SCI->tExpiresAt),
+ memcpy(SCI->ucaData, (char *)dbmval.dptr+sizeof(SCI->tExpiresAt),
dbmval.dsize-sizeof(SCI->tExpiresAt));
memcpy(&SCI->tExpiresAt, dbmval.dptr, sizeof(SCI->tExpiresAt));
______________________________________________________________________
Apache Interface to SSLeay (mod_ssl) www.engelschall.com/sw/mod_ssl/
Official Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]