[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:05:45 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit b2354dc1e74b2c7d650b465f0b12fff45e3199c0
Author: aCaB <acab at clamav.net>
Date: Thu Sep 24 19:10:27 2009 +0200
drop os2
diff --git a/ChangeLog b/ChangeLog
index 7aad9f2..bb67f1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Sep 24 19:09:38 CEST 2009 (acab)
+------------------------------------
+ * drop OS/2 "support"
+
Thu Sep 24 19:07:59 CEST 2009 (acab)
------------------------------------
* clamd, libclamav: drop INTERIX "support"
diff --git a/clamd/clamd.c b/clamd/clamd.c
index b696489..e065a0f 100644
--- a/clamd/clamd.c
+++ b/clamd/clamd.c
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
umask(0);
/* drop privileges */
-#if (!defined(C_OS2)) && (!defined(_WIN32))
+#ifndef _WIN32
if(geteuid() == 0 && (opt = optget(opts, "User"))->enabled) {
if((user = getpwnam(opt->strarg)) == NULL) {
fprintf(stderr, "ERROR: Can't get information about user %s.\n", opt->strarg);
@@ -467,7 +467,7 @@ int main(int argc, char **argv)
closesocket(lsockets[i]);
}
-#if !defined(C_OS2) && !defined(_WIN32)
+#ifndef _WIN32
if(nlsockets && localsock) {
opt = optget(opts, "LocalSocket");
if(unlink(opt->strarg) == -1)
diff --git a/freshclam/freshclam.c b/freshclam/freshclam.c
index a133e38..91b0a15 100644
--- a/freshclam/freshclam.c
+++ b/freshclam/freshclam.c
@@ -203,7 +203,7 @@ int main(int argc, char **argv)
struct sigaction sigact;
struct sigaction oldact;
#endif
-#if !defined(C_OS2) && !defined(C_WINDOWS)
+#ifndef C_WINDOWS
const char *dbowner;
struct passwd *user;
#endif
@@ -256,7 +256,7 @@ int main(int argc, char **argv)
#endif
}
-#if !defined(C_OS2) && !defined(_WIN32)
+#ifndef _WIN32
/* freshclam shouldn't work with root privileges */
dbowner = optget(opts, "DatabaseOwner")->strarg;
@@ -398,7 +398,7 @@ int main(int argc, char **argv)
bigsleep = 24 * 3600 / checks;
-#if !defined(C_OS2) && !defined(_WIN32)
+#ifndef _WIN32
if(!optget(opts, "Foreground")->enabled) {
if(daemonize() == -1) {
logg("!daemonize() failed\n");
diff --git a/libclamav/readdb.c b/libclamav/readdb.c
index f4696b7..0caa2e6 100644
--- a/libclamav/readdb.c
+++ b/libclamav/readdb.c
@@ -1843,7 +1843,7 @@ int cl_statinidir(const char *dirname, struct cl_stat *dbstat)
return CL_EMEM;
}
-#if defined(C_OS2) || defined(_WIN32)
+#ifdef _WIN32
dbstat->statdname = (char **) cli_realloc2(dbstat->statdname, dbstat->entries * sizeof(char *));
if(!dbstat->statdname) {
cl_statfree(dbstat);
@@ -1859,7 +1859,7 @@ int cl_statinidir(const char *dirname, struct cl_stat *dbstat)
return CL_EMEM;
}
sprintf(fname, "%s"PATHSEP"%s", dirname, dent->d_name);
-#if defined(C_OS2) || defined(_WIN32)
+#ifdef _WIN32
dbstat->statdname[dbstat->entries - 1] = (char *) cli_malloc(strlen(dent->d_name) + 1);
if(!dbstat->statdname[dbstat->entries - 1]) {
cl_statfree(dbstat);
@@ -1928,7 +1928,7 @@ int cl_statchkdir(const struct cl_stat *dbstat)
found = 0;
for(i = 0; i < dbstat->entries; i++)
-#if defined(C_OS2) || defined(_WIN32)
+#ifdef _WIN32
if(!strcmp(dbstat->statdname[i], dent->d_name)) {
#else
if(dbstat->stattab[i].st_ino == sb.st_ino) {
@@ -1957,7 +1957,7 @@ int cl_statfree(struct cl_stat *dbstat)
if(dbstat) {
-#if defined(C_OS2) || defined(_WIN32)
+#ifdef _WIN32
int i;
if(dbstat->statdname) {
diff --git a/shared/misc.c b/shared/misc.c
index 2657644..60d691e 100644
--- a/shared/misc.c
+++ b/shared/misc.c
@@ -221,7 +221,7 @@ int filecopy(const char *src, const char *dest)
int daemonize(void)
{
-#if defined(C_OS2) || defined(_WIN32)
+#ifdef _WIN32
fputs("Background mode is not supported on your operating system\n", stderr);
return -1;
#else
@@ -273,9 +273,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_OS2) || defined(C_WINDOWS)
- size_t len;
-
+#ifdef _WIN32
flags |= REG_ICASE; /* case insensitive on Windows */
#endif
if(cli_regcomp(®, pattern, flags) != 0)
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list