ClamAV does not compile cleanly on Solaris with cc... I needed to patch the following files:
*** ./libclamav/md5.c_orig Wed Nov 13 11:17:24 2002 --- ./libclamav/md5.c Wed Nov 13 11:22:42 2002 *************** *** 220,226 **** --- 220,230 ---- size_t add = 128 - left_over > len ? len : 128 - left_over; /* Only put full words in the buffer. */ + #if defined(__SUNPRO_C) + add -= add % 4; + #else add -= add % __alignof__ (md5_uint32); + #endif memcpy (&ctx->buffer[left_over], buffer, add); ctx->buflen += add; *** ./libclamav/md5.h_orig Wed Nov 13 11:08:29 2002 --- ./libclamav/md5.h Wed Nov 13 11:16:01 2002 *************** *** 87,93 **** md5_uint32 total[2]; md5_uint32 buflen; ! #ifdef C_DARWIN char buffer[128]; #else char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32)))); --- 87,93 ---- md5_uint32 total[2]; md5_uint32 buflen; ! #if defined(C_DARWIN) || defined(__SUNPRO_C) char buffer[128]; #else char buffer[128] __attribute__ ((__aligned__ (__alignof__ (md5_uint32)))); I used the following environment to help configure: LDFLAGS=-L/opt/zlib-1.1.4/lib -R/opt/zlib-1.1.4/lib CFLAGS=-D_REENTRANT -I/opt/zlib-1.1.4/include CPPFLAGS=-D_REENTRANT -I/opt/zlib-1.1.4/include and used the following configure command: ./configure --prefix=/opt/clamav-0.54 Note the use of "-D_REENTRANT"... this is probably a good idea in general for compiling a multi-threaded program on Solaris (i.e. can we auto-add this flag on Solaris during configure run?). "-D_REENTRANT" is probably the best way to get string.h to emit the prototype for strtok_r()... otherwise, libclamav/mbox.c "breaks" having no prototype for strtok_r(). Many of the files in libclamav/zziplib have ^M (control-M) at the end of the lines so I had to wash them through "dos2unix". It'd be nice to fix this because the Sun compiler likes linefeeds-only source code. Ed Ed Phillips <[EMAIL PROTECTED]> University of Delaware (302) 831-6082 Systems Programmer III, Network and Systems Services finger -l [EMAIL PROTECTED] for PGP public key --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]