drop support for Cygwin (due to broken ClamAV builds)

git-svn: trunk@4143
0.95
Tomasz Kojm 18 years ago
parent 3e9d8b3ec2
commit 6670d61d4b
  1. 4
      ChangeLog
  2. 2
      clamav-milter/clamav-milter.c
  3. 2
      clamd/scanner.c
  4. 4
      clamdscan/client.c
  5. 2
      clamscan/manager.c
  6. 27
      configure
  7. 15
      configure.in
  8. 6
      freshclam/freshclam.c
  9. 4
      freshclam/manager.c
  10. 2
      libclamav/blob.c
  11. 7
      libclamav/mbox.c
  12. 2
      libclamav/others.c
  13. 6
      libclamav/readdb.c
  14. 4
      libclamav/scanners.c
  15. 6
      shared/misc.c

@ -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)

@ -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 == '/')

@ -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
{

@ -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;

@ -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
{

27
configure vendored

@ -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

@ -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

@ -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");

@ -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
}

@ -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 == '/')

@ -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 <features.h>
#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

@ -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
{

@ -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
{

@ -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
{

@ -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(&reg, 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;

Loading…
Cancel
Save