[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:08:53 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 3b857f1419a2d32e9e8987d8d168df1810484229
Author: aCaB <acab at clamav.net>
Date:   Sat Oct 31 19:12:50 2009 +0100

    win32: fix warns

diff --git a/ChangeLog b/ChangeLog
index 92381a8..8b3a8c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Sat Oct 31 19:12:22 CET 2009 (acab)
+-----------------------------------
+ * win32: fix warnings
+
 Fri Oct 30 14:04:43 EET 2009 (edwin)
 ------------------------------------
  * configure, m4/acinclude.m4: Avoid trailing slash in libdir for old gcc (#1738).
diff --git a/libclamav/pe.c b/libclamav/pe.c
index 6bf1f19..eda5109 100644
--- a/libclamav/pe.c
+++ b/libclamav/pe.c
@@ -61,9 +61,9 @@
 
 #define DCONF ctx->dconf->pe
 
-#define IMAGE_DOS_SIGNATURE	    0x5a4d	    /* MZ */
-#define IMAGE_DOS_SIGNATURE_OLD	    0x4d5a          /* ZM */
-#define IMAGE_NT_SIGNATURE	    0x00004550
+#define PE_IMAGE_DOS_SIGNATURE	    0x5a4d	    /* MZ */
+#define PE_IMAGE_DOS_SIGNATURE_OLD  0x4d5a          /* ZM */
+#define PE_IMAGE_NT_SIGNATURE	    0x00004550
 #define PE32_SIGNATURE		    0x010b
 #define PE32P_SIGNATURE		    0x020b
 
@@ -429,7 +429,7 @@ int cli_scanpe(cli_ctx *ctx)
 	return CL_CLEAN;
     }
 
-    if(EC16(e_magic) != IMAGE_DOS_SIGNATURE && EC16(e_magic) != IMAGE_DOS_SIGNATURE_OLD) {
+    if(EC16(e_magic) != PE_IMAGE_DOS_SIGNATURE && EC16(e_magic) != PE_IMAGE_DOS_SIGNATURE_OLD) {
 	cli_dbgmsg("Invalid DOS signature\n");
 	return CL_CLEAN;
     }
@@ -2141,7 +2141,7 @@ int cli_peheader(fmap_t *map, struct cli_exe_info *peinfo)
 	return CL_CLEAN;
     }
 
-    if(EC16(e_magic) != IMAGE_DOS_SIGNATURE && EC16(e_magic) != IMAGE_DOS_SIGNATURE_OLD) {
+    if(EC16(e_magic) != PE_IMAGE_DOS_SIGNATURE && EC16(e_magic) != PE_IMAGE_DOS_SIGNATURE_OLD) {
 	cli_dbgmsg("Invalid DOS signature\n");
 	return -1;
     }
diff --git a/shared/optparser.c b/shared/optparser.c
index 0e4852e..d911f34 100644
--- a/shared/optparser.c
+++ b/shared/optparser.c
@@ -943,10 +943,6 @@ struct optstruct *optparse(const char *cfgfile, int argc, char **argv, int verbo
 
 		arg = NULL;
 		if(err) break;
-
-		if(sizeof(lnumarg) > sizeof(numarg) && (lnumarg >> (sizeof(numarg)<<3)) )
-		    errno = ERANGE;
-
 		if(errno == ERANGE) {
 		    if(cfgfile) {
 			fprintf(stderr, "WARNING: Numerical value for option %s too high, resetting to 4G\n", name);
diff --git a/win32/freshclam.vcproj b/win32/freshclam.vcproj
index 050d3ba..8882ec3 100644
--- a/win32/freshclam.vcproj
+++ b/win32/freshclam.vcproj
@@ -50,7 +50,7 @@
 				WarningLevel="3"
 				DebugInformationFormat="3"
 				CompileAs="1"
-				DisableSpecificWarnings="4996;4244;4018;4090;4333;4101;4146"
+				DisableSpecificWarnings="4996;4244;4018;4090;4333;4101;4146;4102"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -127,7 +127,7 @@
 				WarningLevel="3"
 				DebugInformationFormat="3"
 				CompileAs="1"
-				DisableSpecificWarnings="4996;4244;4018;4090;4333;4101;4146"
+				DisableSpecificWarnings="4996;4244;4018;4090;4333;4101;4146;4102"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
diff --git a/win32/libclamav.vcproj b/win32/libclamav.vcproj
index a3536cb..b4a621a 100644
--- a/win32/libclamav.vcproj
+++ b/win32/libclamav.vcproj
@@ -42,7 +42,7 @@
 				Name="VCCLCompilerTool"
 				Optimization="0"
 				AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)..\libclamav&quot;;&quot;$(SolutionDir)compat&quot;;&quot;$(SolutionDir)3rdparty\zlib&quot;;&quot;$(SolutionDir)3rdparty\pthreads&quot;;&quot;$(SolutionDir)3rdparty\bzip2&quot;;&quot;$(SolutionDir)..&quot;"
-				PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;PTW32_STATIC_LIB"
+				PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;PTW32_STATIC_LIB;THIS_IS_LIBCLAMAV"
 				MinimalRebuild="true"
 				BasicRuntimeChecks="3"
 				RuntimeLibrary="3"
@@ -121,7 +121,7 @@
 				Optimization="2"
 				EnableIntrinsicFunctions="true"
 				AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(SolutionDir)..\libclamav&quot;;&quot;$(SolutionDir)compat&quot;;&quot;$(SolutionDir)3rdparty\zlib&quot;;&quot;$(SolutionDir)3rdparty\pthreads&quot;;&quot;$(SolutionDir)3rdparty\bzip2&quot;;&quot;$(SolutionDir)..&quot;"
-				PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;PTW32_STATIC_LIB"
+				PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;PTW32_STATIC_LIB;THIS_IS_LIBCLAMAV"
 				RuntimeLibrary="2"
 				BufferSecurityCheck="false"
 				EnableFunctionLevelLinking="true"
diff --git a/win32/platform.h b/win32/platform.h
index b6ac953..4ea3784 100644
--- a/win32/platform.h
+++ b/win32/platform.h
@@ -67,11 +67,16 @@ typedef	unsigned	int	in_addr_t;
 
 #undef DATADIR
 #undef CONFDIR
-__declspec(dllimport) extern const char *DATADIR;
-__declspec(dllimport) extern const char *CONFDIR;
-__declspec(dllimport) extern const char *CONFDIR_CLAMD;
-__declspec(dllimport) extern const char *CONFDIR_FRESHCLAM;
-__declspec(dllimport) extern const char *CONFDIR_MILTER;
+#if !defined(THIS_IS_LIBCLAMAV) && defined(_MSC_VER)
+#define LIBCLAMAV_EXPORT __declspec(dllimport)
+#else
+#define LIBCLAMAV_EXPORT
+#endif
+LIBCLAMAV_EXPORT extern const char *DATADIR;
+LIBCLAMAV_EXPORT extern const char *CONFDIR;
+LIBCLAMAV_EXPORT extern const char *CONFDIR_CLAMD;
+LIBCLAMAV_EXPORT extern const char *CONFDIR_FRESHCLAM;
+LIBCLAMAV_EXPORT extern const char *CONFDIR_MILTER;
 #undef HAVE_CONFIG_H
 
 #endif /* __PLATFORM_H */
\ No newline at end of file

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list