[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b
aCaB
acab at clamav.net
Sun Apr 4 01:06:11 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit e0bb54d7d4af196b9b61477ca89ccdce4b18e1fb
Author: aCaB <acab at clamav.net>
Date: Wed Sep 30 00:54:04 2009 +0200
win32: s/C_WINDOWS/_WIN32/ in clamd, shared
diff --git a/ChangeLog b/ChangeLog
index 04d0c69..50b9fd3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Sep 30 00:51:19 CEST 2009 (acab)
+------------------------------------
+ * clamd, shared: merge a set of win32 patches from
+ Gianluigi Tiesi <sherpya*netfarm.it>
+
Tue Sep 29 21:40:29 CEST 2009 (tk)
----------------------------------
* libclamav/matcher-ac.c: fix matching of logical sigs (bb#1707)
diff --git a/clamd/clamd.c b/clamd/clamd.c
index e065a0f..75cc3f5 100644
--- a/clamd/clamd.c
+++ b/clamd/clamd.c
@@ -27,6 +27,8 @@
#include <string.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+#ifndef _WIN32
#include <sys/time.h>
#endif
#include <sys/types.h>
diff --git a/clamd/others.c b/clamd/others.c
index bcb014f..aab3d47 100644
--- a/clamd/others.c
+++ b/clamd/others.c
@@ -35,20 +35,17 @@
#include <time.h>
#include <sys/stat.h>
#include <errno.h>
-#ifndef C_WINDOWS
+#ifndef _WIN32
#include <sys/time.h>
#include <sys/wait.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
#endif
#if HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
-#ifndef C_WINDOWS
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#endif
-
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
diff --git a/clamd/scanner.c b/clamd/scanner.c
index e6c8041..ec269cb 100644
--- a/clamd/scanner.c
+++ b/clamd/scanner.c
@@ -31,12 +31,12 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
-#ifndef C_WINDOWS
+#include <dirent.h>
+#ifndef _WIN32
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/param.h>
#include <signal.h>
-#include <dirent.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
diff --git a/clamd/server-th.c b/clamd/server-th.c
index b5dbf08..7d20795 100644
--- a/clamd/server-th.c
+++ b/clamd/server-th.c
@@ -30,17 +30,17 @@
#include <string.h>
#include <time.h>
#include <sys/types.h>
-#ifndef C_WINDOWS
+#ifndef _WIN32
#include <sys/socket.h>
#include <sys/time.h>
#include <sys/resource.h>
+#include <arpa/inet.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <fcntl.h>
-#include <arpa/inet.h>
#include "libclamav/clamav.h"
#include "shared/output.h"
@@ -69,13 +69,13 @@ static struct cl_stat dbstat;
static void scanner_thread(void *arg)
{
client_conn_t *conn = (client_conn_t *) arg;
-#ifndef C_WINDOWS
+#ifndef _WIN32
sigset_t sigset;
#endif
int ret;
unsigned virus=0, errors = 0;
-#ifndef C_WINDOWS
+#ifndef _WIN32
/* ignore all signals */
sigfillset(&sigset);
/* The behavior of a process is undefined after it ignores a
@@ -672,7 +672,7 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
int max_threads, max_queue, readtimeout, ret = 0;
unsigned int options = 0;
char timestr[32];
-#ifndef C_WINDOWS
+#ifndef _WIN32
struct sigaction sigact;
sigset_t sigset;
struct rlimit rlim;
@@ -699,7 +699,7 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
struct thrarg *tharg = NULL; /* shut up gcc */
#endif
-#ifndef C_WINDOWS
+#ifndef _WIN32
memset(&sigact, 0, sizeof(struct sigaction));
#endif
@@ -730,7 +730,7 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
else
logg("^Limits: File size limit protection disabled.\n");
-#ifndef C_WINDOWS
+#ifndef _WIN32
if(getrlimit(RLIMIT_FSIZE, &rlim) == 0) {
if(rlim.rlim_cur < (rlim_t) cl_engine_get_num(engine, CL_ENGINE_MAX_FILESIZE, NULL))
logg("^System limit for file size is lower than engine->maxfilesize\n");
@@ -767,7 +767,7 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
else
logg("^Limits: Files limit protection disabled.\n");
-#if !defined(C_WINDOWS)
+#ifndef _WIN32
if (getrlimit(RLIMIT_CORE, &rlim) == 0) {
logg("*Limits: Core-dump limit is %lu.\n", (unsigned long)rlim.rlim_cur);
}
@@ -926,7 +926,7 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
acceptdata.commandtimeout = optget(opts, "CommandReadTimeout")->numarg;
readtimeout = optget(opts, "ReadTimeout")->numarg;
-#if !defined(C_WINDOWS) && defined(RLIMIT_NOFILE)
+#if !defined(_WIN32) && defined(RLIMIT_NOFILE)
if (getrlimit(RLIMIT_NOFILE, &rlim) == 0) {
/* don't warn if default value is too high, silently fix it */
unsigned maxrec;
@@ -986,7 +986,7 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
logg("Clamuko is not available.\n");
#endif
-#ifndef C_WINDOWS
+#ifndef _WIN32
/* set up signal handling */
sigfillset(&sigset);
sigdelset(&sigset, SIGINT);
diff --git a/clamd/session.c b/clamd/session.c
index 6918562..e3b47d3 100644
--- a/clamd/session.c
+++ b/clamd/session.c
@@ -29,12 +29,12 @@
#include <unistd.h>
#endif
#include <sys/types.h>
-#ifndef C_WINDOWS
#include <dirent.h>
+#ifndef _WIN32
+#include <sys/socket.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif
-#include <sys/socket.h>
#ifdef HAVE_FD_PASSING
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
diff --git a/clamd/tcpserver.c b/clamd/tcpserver.c
index 7766126..df98e11 100644
--- a/clamd/tcpserver.c
+++ b/clamd/tcpserver.c
@@ -28,15 +28,13 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-#ifndef C_WINDOWS
+#ifndef _WIN32
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
-#endif
-#include <errno.h>
-#ifndef C_WINDOWS
#include <netdb.h>
#endif
+#include <errno.h>
#include "libclamav/clamav.h"
diff --git a/clamd/thrmgr.h b/clamd/thrmgr.h
index 3174408..4f71e4a 100644
--- a/clamd/thrmgr.h
+++ b/clamd/thrmgr.h
@@ -24,7 +24,7 @@
#include <pthread.h>
-#ifndef C_WINDOWS
+#ifndef _WIN32
#include <sys/time.h>
#endif
diff --git a/shared/network.c b/shared/network.c
index bd2b6e7..a4a4540 100644
--- a/shared/network.c
+++ b/shared/network.c
@@ -34,7 +34,7 @@
#include <sys/types.h>
#endif
-#ifndef C_WINDOWS
+#ifndef _WIN32
#include <netdb.h>
#endif
diff --git a/shared/network.h b/shared/network.h
index 87514f9..62ebb54 100644
--- a/shared/network.h
+++ b/shared/network.h
@@ -27,7 +27,7 @@
#include <sys/types.h>
#endif
-#ifndef C_WINDOWS
+#ifndef _WIN32
#include <netdb.h>
#endif
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list