> Put the patches inline - the MLM seems to eat attachments. - libclamav.patch: The changes here are to get a compile on Interix.
diff -ru clamav-0.88.2/libclamav/mspack/system.h clamav-0.88.2-interix/libclamav/mspack/system.h --- clamav-0.88.2/libclamav/mspack/system.h Thu Jun 23 16:03:13 2005 +++ clamav-0.88.2-interix/libclamav/mspack/system.h Tue May 16 15:12:41 2006 @@ -39,6 +39,8 @@ /* validates a system structure */ extern int mspack_valid_system(struct mspack_system *sys); +/* can't redefine intrinsic memcmp and strlen with the MS C compiler */ +#if (defined __GNUC__ && defined __INTERIX) || !defined __INTERIX /* inline memcmp() */ static inline int memcmp(const void *s1, const void *s2, size_t n) { unsigned char *c1 = (unsigned char *) s1; @@ -54,5 +56,6 @@ while (*e) e++; return e - s; } +#endif #endif diff -ru clamav-0.88.2/libclamav/zziplib/zzip-conf.h clamav-0.88.2-interix/libclamav/zziplib/zzip-conf.h --- clamav-0.88.2/libclamav/zziplib/zzip-conf.h Tue May 10 21:53:40 2005 +++ clamav-0.88.2-interix/libclamav/zziplib/zzip-conf.h Tue May 16 10:50:09 2006 @@ -12,20 +12,22 @@ #define _ZZIP_CONF_H 1 #if !defined ZZIP_OMIT_CONFIG_H -# if defined _MSC_VER || defined __BORLANDC__ || defined __WATCOMC__ -# include <zzip-msvc.h> -# elif defined ZZIP_1_H -# include "zzip-1.h" -# elif defined ZZIP_2_H -# include "zzip-2.h" -# elif defined ZZIP_3_H -# include "zzip-3.h" -# elif defined ZZIP_4_H -# include "zzip-4.h" -# elif defined ZZIP_5_H -# include "zzip-5.h" -# else /* autoconf generated */ -# include <zzip-config.h> +# if !defined __INTERIX +# if defined _MSC_VER || defined __BORLANDC__ || defined __WATCOMC__ +# include <zzip-msvc.h> +# elif defined ZZIP_1_H +# include "zzip-1.h" +# elif defined ZZIP_2_H +# include "zzip-2.h" +# elif defined ZZIP_3_H +# include "zzip-3.h" +# elif defined ZZIP_4_H +# include "zzip-4.h" +# elif defined ZZIP_5_H +# include "zzip-5.h" +# else /* autoconf generated */ +# include <zzip-config.h> +# endif # endif #endif @@ -125,31 +127,37 @@ #define _zzip_inline static #endif -#if defined _MSC_VER || defined __WATCOMC__ -#include <io.h> +#if !defined __INTERIX +# if defined _MSC_VER || defined __WATCOMC__ +# include <io.h> +# endif #endif -#ifdef _MSC_VER -# if !__STDC__ -# ifndef _zzip_lseek -# define _zzip_lseek _lseek -# endif -# ifndef _zzip_read -# define _zzip_read _read -# endif +#if !defined __INTERIX +# ifdef _MSC_VER +# if !__STDC__ +# ifndef _zzip_lseek +# define _zzip_lseek _lseek +# endif +# ifndef _zzip_read +# define _zzip_read _read +# endif /* # ifndef _zzip_stat # define _zzip_stat _stat # endif */ -# endif /* !__STDC__ */ +# endif /* !__STDC__ */ +# endif #endif /*MSVC*/ -#if defined _MSC_VER || defined __WATCOMC__ -# ifndef strcasecmp -# define strcasecmp _stricmp -# endif +#if !defined __INTERIX +# if defined _MSC_VER || defined __WATCOMC__ +# ifndef strcasecmp +# define strcasecmp _stricmp +# endif +# endif #endif # ifndef _zzip_lseek @@ -178,38 +186,40 @@ /* based on zconf.h : */ /* compile with -DZZIP_DLL for Windows DLL support */ -#if defined ZZIP_DLL -# if defined _WINDOWS || defined WINDOWS || defined _WIN32 +#if !defined __INTERIX +# if defined ZZIP_DLL +# if defined _WINDOWS || defined WINDOWS || defined _WIN32 /*# include <windows.h>*/ -# endif -# if !defined _zzip_export && defined _MSC_VER && (defined WIN32 || defined _WIN32) -# define _zzip_export __declspec(dllexport) /*WINAPI*/ -# endif -# if !defined _zzip_export && defined __BORLANDC__ -# if __BORLANDC__ >= 0x0500 && defined WIN32 -# include <windows.h> -# define _zzip_export __declspec(dllexport) /*WINAPI*/ -# else -# if defined _Windows && defined __DLL__ -# define _zzip_export _export -# endif -# endif -# endif -# if !defined _zzip_export && defined __GNUC__ -# if defined __declspec -# define _zzip_export extern __declspec(dllexport) -# else -# define _zzip_export extern -# endif -# endif -# if !defined _zzip_export && defined __BEOS__ -# define _zzip_export extern __declspec(export) -# endif -# if !defined _zzip_export && defined __WATCOMC__ -# define _zzip_export extern __declspec(dllexport) -# define ZEXPORT __syscall -# define ZEXTERN extern -# endif +# endif +# if !defined _zzip_export && defined _MSC_VER && (defined WIN32 || defined _WIN32) +# define _zzip_export __declspec(dllexport) /*WINAPI*/ +# endif +# if !defined _zzip_export && defined __BORLANDC__ +# if __BORLANDC__ >= 0x0500 && defined WIN32 +# include <windows.h> +# define _zzip_export __declspec(dllexport) /*WINAPI*/ +# else +# if defined _Windows && defined __DLL__ +# define _zzip_export _export +# endif +# endif +# endif +# if !defined _zzip_export && defined __GNUC__ +# if defined __declspec +# define _zzip_export extern __declspec(dllexport) +# else +# define _zzip_export extern +# endif +# endif +# if !defined _zzip_export && defined __BEOS__ +# define _zzip_export extern __declspec(export) +# endif +# if !defined _zzip_export && defined __WATCOMC__ +# define _zzip_export extern __declspec(dllexport) +# define ZEXPORT __syscall +# define ZEXTERN extern +# endif +# endif #endif #if !defined _zzip_export Brian A. Reiter WolfeReiter, LLC : Thoughtful Computing [http://www.thoughtfulcomputing.com]
_______________________________________________ http://lurker.clamav.net/list/clamav-devel.html