diff --git a/ChangeLog b/ChangeLog index 29b3b8fa1..ca36348c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Aug 25 23:52:04 CEST 2008 (tk) +---------------------------------- + * drop support for Cygwin (due to broken ClamAV builds) + Mon Aug 25 22:17:03 CEST 2008 (tk) ---------------------------------- * man/freshclam.1.in: fix typo (bb#1147) diff --git a/clamav-milter/clamav-milter.c b/clamav-milter/clamav-milter.c index 24cba07b5..18ff62987 100644 --- a/clamav-milter/clamav-milter.c +++ b/clamav-milter/clamav-milter.c @@ -5114,7 +5114,7 @@ qfile(struct privdata *privdata, const char *sendmailId, const char *virusname) #ifdef C_DARWIN *ptr &= '\177'; #endif -#if defined(MSDOS) || defined(C_CYGWIN) || defined(C_WINDOWS) || defined(C_OS2) +#if defined(MSDOS) || defined(C_WINDOWS) || defined(C_OS2) if(strchr("/*?<>|\\\"+=,;:\t ", *ptr)) #else if(*ptr == '/') diff --git a/clamd/scanner.c b/clamd/scanner.c index c3c46dbd6..44803def7 100644 --- a/clamd/scanner.c +++ b/clamd/scanner.c @@ -157,7 +157,7 @@ static int dirscan(const char *dirname, const char **virname, unsigned long int return 1; } -#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) && (!defined(C_CYGWIN)) +#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) if(dent->d_ino) #endif { diff --git a/clamdscan/client.c b/clamdscan/client.c index d16875522..d2d4f51a8 100644 --- a/clamdscan/client.c +++ b/clamdscan/client.c @@ -249,15 +249,11 @@ static char *abpath(const char *filename) return NULL; } else { fullpath = malloc(PATH_MAX + strlen(filename) + 10); -#ifdef C_CYGWIN - sprintf(fullpath, "%s", filename); -#else if(!getcwd(cwd, PATH_MAX)) { logg("^Can't get absolute pathname of current working directory.\n"); return NULL; } sprintf(fullpath, "%s/%s", cwd, filename); -#endif } return fullpath; diff --git a/clamscan/manager.c b/clamscan/manager.c index 0e20bb4a1..2933e051f 100644 --- a/clamscan/manager.c +++ b/clamscan/manager.c @@ -235,7 +235,7 @@ static int scandirs(const char *dirname, struct cl_engine *engine, const struct if((dd = opendir(dirname)) != NULL) { while((dent = readdir(dd))) { -#if !defined(C_INTERIX) && !defined(C_WINDOWS) && !defined(C_CYGWIN) +#if !defined(C_INTERIX) && !defined(C_WINDOWS) if(dent->d_ino) #endif { diff --git a/configure b/configure index 3ae0a2c6f..0d699863a 100755 --- a/configure +++ b/configure @@ -16819,33 +16819,6 @@ _ACEOF fi fi ;; -cygwin*) - -cat >>confdefs.h <<\_ACEOF -#define C_CYGWIN 1 -_ACEOF - - if test "$test_clamav" = "yes"; then - if test ! -r /etc/passwd; then - test_clamav="no" - fi - fi - if test "$have_pthreads" = "yes"; then - THREAD_LIBS="-lpthread" - TH_SAFE="-thread-safe" - -cat >>confdefs.h <<\_ACEOF -#define CL_THREAD_SAFE 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define _REENTRANT 1 -_ACEOF - - fi - use_gethostbyname_r="no" - ;; solaris*) FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lresolv" if test "$have_pthreads" = "yes"; then diff --git a/configure.in b/configure.in index 43ab1db34..03041ee47 100644 --- a/configure.in +++ b/configure.in @@ -756,21 +756,6 @@ kfreebsd*-gnu) fi fi ;; -cygwin*) - AC_DEFINE([C_CYGWIN],1,[os is cygwin]) - if test "$test_clamav" = "yes"; then - if test ! -r /etc/passwd; then - test_clamav="no" - fi - fi - if test "$have_pthreads" = "yes"; then - THREAD_LIBS="-lpthread" - TH_SAFE="-thread-safe" - AC_DEFINE([CL_THREAD_SAFE],1,[thread safe]) - AC_DEFINE([_REENTRANT],1,[thread safe]) - fi - use_gethostbyname_r="no" - ;; solaris*) FRESHCLAM_LIBS="$FRESHCLAM_LIBS -lresolv" if test "$have_pthreads" = "yes"; then diff --git a/freshclam/freshclam.c b/freshclam/freshclam.c index 09f8c7fa4..24525629b 100644 --- a/freshclam/freshclam.c +++ b/freshclam/freshclam.c @@ -200,7 +200,7 @@ int main(int argc, char **argv) struct sigaction sigact; struct sigaction oldact; #endif -#if !defined(C_CYGWIN) && !defined(C_OS2) && !defined(C_WINDOWS) +#if !defined(C_OS2) && !defined(C_WINDOWS) char *unpuser; struct passwd *user; #endif @@ -296,7 +296,7 @@ int main(int argc, char **argv) return 56; } -#if !defined(C_CYGWIN) && !defined(C_WINDOWS) +#ifndef C_WINDOWS if(statbuf.st_mode & (S_IRGRP | S_IWGRP | S_IXGRP | S_IROTH | S_IWOTH | S_IXOTH)) { logg("^Insecure permissions (for HTTPProxyPassword): %s must have no more than 0700 permissions.\n", cfgfile); opt_free(opt); @@ -306,7 +306,7 @@ int main(int argc, char **argv) #endif } -#if !defined(C_CYGWIN) && !defined(C_OS2) && !defined(C_WINDOWS) +#if !defined(C_OS2) && !defined(C_WINDOWS) /* freshclam shouldn't work with root privileges */ if(opt_check(opt, "user")) unpuser = opt_arg(opt, "user"); diff --git a/freshclam/manager.c b/freshclam/manager.c index 172425272..20c2afb37 100644 --- a/freshclam/manager.c +++ b/freshclam/manager.c @@ -212,7 +212,6 @@ static int wwwconnect(const char *server, const char *proxy, int pport, char *ip hostpt = proxy; if(!(port = pport)) { -#ifndef C_CYGWIN const struct servent *webcache = getservbyname("webcache", "TCP"); if(webcache) @@ -222,9 +221,6 @@ static int wwwconnect(const char *server, const char *proxy, int pport, char *ip #ifndef C_WINDOWS endservent(); -#endif -#else - port = 8080; #endif } diff --git a/libclamav/blob.c b/libclamav/blob.c index 19405a116..c3592a0d1 100644 --- a/libclamav/blob.c +++ b/libclamav/blob.c @@ -699,7 +699,7 @@ sanitiseName(char *name) * I don't know if spaces are legal in OS/2. */ if(strchr("%/*?<>|\\\"+=,;:\t ~", *name)) -#elif defined(C_CYGWIN) || defined(C_WINDOWS) +#elif defined(C_WINDOWS) if(strchr("%/*?<>|\\\"+=,;:\t~", *name)) #else if(*name == '/') diff --git a/libclamav/mbox.c b/libclamav/mbox.c index 2ac501af3..13b09b096 100644 --- a/libclamav/mbox.c +++ b/libclamav/mbox.c @@ -87,7 +87,7 @@ static char const rcsid[] = "$Id: mbox.c,v 1.381 2007/02/15 12:26:44 njh Exp $"; #ifdef CL_DEBUG -#if defined(C_LINUX) || defined(C_CYGWIN) +#if defined(C_LINUX) #include #endif @@ -3715,12 +3715,14 @@ rfc1341(message *m, const char *dir) if(id == NULL) return -1; +/* do we need this for C_WINDOWS? #ifdef C_CYGWIN if((tmpdir = getenv("TEMP")) == (char *)NULL) if((tmpdir = getenv("TMP")) == (char *)NULL) if((tmpdir = getenv("TMPDIR")) == (char *)NULL) tmpdir = "C:\\"; #else +*/ if((tmpdir = getenv("TMPDIR")) == (char *)NULL) if((tmpdir = getenv("TMP")) == (char *)NULL) if((tmpdir = getenv("TEMP")) == (char *)NULL) @@ -3728,7 +3730,6 @@ rfc1341(message *m, const char *dir) tmpdir = P_tmpdir; #else tmpdir = "/tmp"; -#endif #endif snprintf(pdir, sizeof(pdir) - 1, "%s/clamav-partial", tmpdir); @@ -3853,7 +3854,7 @@ rfc1341(message *m, const char *dir) int nblanks; struct stat statb; const char *dentry_idpart; -#if !defined (C_CYGWIN) && !defined(C_WINDOWS) +#ifndef C_WINDOWS if(dent->d_ino == 0) continue; #endif diff --git a/libclamav/others.c b/libclamav/others.c index 2fdbf1e5f..d1fa97069 100644 --- a/libclamav/others.c +++ b/libclamav/others.c @@ -672,7 +672,7 @@ int cli_rmdirs(const char *dirname) #else while((dent = readdir(dd))) { #endif -#if (!defined(C_CYGWIN)) && (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) +#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) if(dent->d_ino) #endif { diff --git a/libclamav/readdb.c b/libclamav/readdb.c index 9e44a300b..7e73ea34d 100644 --- a/libclamav/readdb.c +++ b/libclamav/readdb.c @@ -1822,7 +1822,7 @@ static int cli_loaddbdir(const char *dirname, struct cl_engine **engine, unsigne #else while((dent = readdir(dd))) { #endif -#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) && (!defined(C_CYGWIN)) +#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) if(dent->d_ino) #endif { @@ -1938,7 +1938,7 @@ int cl_statinidir(const char *dirname, struct cl_stat *dbstat) #else while((dent = readdir(dd))) { #endif -#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) && (!defined(C_CYGWIN)) +#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) if(dent->d_ino) #endif { @@ -2021,7 +2021,7 @@ int cl_statchkdir(const struct cl_stat *dbstat) #else while((dent = readdir(dd))) { #endif -#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) && (!defined(C_CYGWIN)) +#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) if(dent->d_ino) #endif { diff --git a/libclamav/scanners.c b/libclamav/scanners.c index 7f2b97fd9..cab6374c3 100644 --- a/libclamav/scanners.c +++ b/libclamav/scanners.c @@ -131,7 +131,7 @@ static int cli_scandir(const char *dirname, cli_ctx *ctx, cli_file_t container) #else while((dent = readdir(dd))) { #endif -#if (!defined(C_CYGWIN)) && (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) +#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) if(dent->d_ino) #endif { @@ -894,7 +894,7 @@ static int cli_vba_scandir(const char *dirname, cli_ctx *ctx, struct uniq *U) #else while((dent = readdir(dd))) { #endif -#if (!defined(C_CYGWIN)) && (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) +#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) if(dent->d_ino) #endif { diff --git a/shared/misc.c b/shared/misc.c index 6b14aa161..b459c9aa4 100644 --- a/shared/misc.c +++ b/shared/misc.c @@ -239,7 +239,7 @@ int dircopy(const char *src, const char *dest) } while((dent = readdir(dd))) { -#if (!defined(C_CYGWIN)) && (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) +#if (!defined(C_INTERIX)) && (!defined(C_WINDOWS)) if(dent->d_ino) #endif { @@ -341,7 +341,7 @@ int match_regex(const char *filename, const char *pattern) regex_t reg; int match, flags = REG_EXTENDED | REG_NOSUB; char fname[513]; -#if defined(C_CYGWIN) || defined(C_OS2) || defined(C_WINDOWS) +#if defined(C_OS2) || defined(C_WINDOWS) size_t len; flags |= REG_ICASE; /* case insensitive on Windows */ @@ -349,7 +349,7 @@ int match_regex(const char *filename, const char *pattern) if(cli_regcomp(®, pattern, flags) != 0) return 2; -#if !defined(C_CYGWIN) && !defined(C_OS2) && !defined(C_WINDOWS) +#if !defined(C_OS2) && !defined(C_WINDOWS) if(pattern[strlen(pattern) - 1] == '/') { snprintf(fname, 511, "%s/", filename); fname[512] = 0;