[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Török Edvin edwin at clamav.net
Sun Apr 4 01:11:54 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 3ff75dbf0cc272da6eb5e5225bfc3f894970cbd1
Author: Török Edvin <edwin at clamav.net>
Date:   Fri Dec 11 20:57:41 2009 +0200

    Add clambc to the win32 build.

diff --git a/clambc/bcrun.c b/clambc/bcrun.c
index e7fb63e..8042541 100644
--- a/clambc/bcrun.c
+++ b/clambc/bcrun.c
@@ -23,7 +23,9 @@
 #include "clamav-config.h"
 #endif
 #include "cltypes.h"
+#ifndef _WIN32
 #include <sys/time.h>
+#endif
 #include <stdlib.h>
 #include "bytecode.h"
 #include "bytecode_priv.h"
@@ -35,7 +37,9 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 
 static void help(void)
 {
diff --git a/libclamav/bytecode.c b/libclamav/bytecode.c
index 65d3b32..62ca3c4 100644
--- a/libclamav/bytecode.c
+++ b/libclamav/bytecode.c
@@ -819,7 +819,7 @@ static int parseGlobals(struct cli_bc *bc, unsigned char *buffer)
 	comp = type_components(bc, bc->globaltys[i], &ok);
 	if (!ok)
 	    return CL_EMALFDB;
-	bc->globals[i] = cli_malloc(sizeof(bc->globals[0])*comp);
+	bc->globals[i] = cli_malloc(sizeof(*bc->globals[0])*comp);
 	if (!bc->globals[i])
 	    return CL_EMEM;
 	readConstant(bc, i, comp, buffer, &offset, len, &ok);
diff --git a/libclamav/bytecode_api.c b/libclamav/bytecode_api.c
index cb5e630..c2ee67c 100644
--- a/libclamav/bytecode_api.c
+++ b/libclamav/bytecode_api.c
@@ -20,8 +20,14 @@
  *  MA 02110-1301, USA.
  */
 
+#ifdef HAVE_CONFIG_H
+#include "clamav-config.h"
+#endif
+
 #define _XOPEN_SOURCE 600
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <stdlib.h>
 #include <fcntl.h>
 #include <errno.h>
diff --git a/win32/ClamAV.sln b/win32/ClamAV.sln
index 4480783..a242a89 100644
--- a/win32/ClamAV.sln
+++ b/win32/ClamAV.sln
@@ -25,6 +25,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clamconf", "clamconf.vcproj
 		{3AD5B16C-340A-40AC-96AD-6017B941A316} = {3AD5B16C-340A-40AC-96AD-6017B941A316}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "clambc", "clambc.vcproj", "{81AF8E63-81A8-4748-84E7-72DA558906B6}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -55,6 +57,10 @@ Global
 		{DEABE3C7-6F4D-4221-8EEE-AD19C8261273}.Debug|Win32.Build.0 = Debug|Win32
 		{DEABE3C7-6F4D-4221-8EEE-AD19C8261273}.Release|Win32.ActiveCfg = Release|Win32
 		{DEABE3C7-6F4D-4221-8EEE-AD19C8261273}.Release|Win32.Build.0 = Release|Win32
+		{81AF8E63-81A8-4748-84E7-72DA558906B6}.Debug|Win32.ActiveCfg = Debug|Win32
+		{81AF8E63-81A8-4748-84E7-72DA558906B6}.Debug|Win32.Build.0 = Debug|Win32
+		{81AF8E63-81A8-4748-84E7-72DA558906B6}.Release|Win32.ActiveCfg = Release|Win32
+		{81AF8E63-81A8-4748-84E7-72DA558906B6}.Release|Win32.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
diff --git a/win32/clamconf.vcproj b/win32/clambc.vcproj
similarity index 77%
copy from win32/clamconf.vcproj
copy to win32/clambc.vcproj
index fc9f83a..46417eb 100644
--- a/win32/clamconf.vcproj
+++ b/win32/clambc.vcproj
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
 	ProjectType="Visual C++"
-	Version="9,00"
-	Name="clamconf"
-	ProjectGUID="{DEABE3C7-6F4D-4221-8EEE-AD19C8261273}"
-	RootNamespace="clamconf"
+	Version="9.00"
+	Name="clambc"
+	ProjectGUID="{81AF8E63-81A8-4748-84E7-72DA558906B6}"
+	RootNamespace="clambc"
 	Keyword="Win32Proj"
 	TargetFrameworkVersion="196613"
 	>
@@ -19,9 +19,9 @@
 		<Configuration
 			Name="Debug|Win32"
 			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(SolutionDir)build\$(ProjectName)\$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="1"
-			CharacterSet="2"
+			CharacterSet="1"
 			>
 			<Tool
 				Name="VCPreBuildEventTool"
@@ -63,9 +63,10 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				LinkIncremental="1"
+				LinkIncremental="2"
 				GenerateDebugInformation="true"
 				SubSystem="1"
+				RandomizedBaseAddress="1"
 				TargetMachine="1"
 			/>
 			<Tool
@@ -93,9 +94,9 @@
 		<Configuration
 			Name="Release|Win32"
 			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="$(SolutionDir)build\$(ProjectName)\$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
 			ConfigurationType="1"
-			CharacterSet="2"
+			CharacterSet="1"
 			WholeProgramOptimization="1"
 			>
 			<Tool
@@ -117,15 +118,12 @@
 				Name="VCCLCompilerTool"
 				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;_BIND_TO_CURRENT_VCLIBS_VERSION=1"
 				RuntimeLibrary="2"
 				EnableFunctionLevelLinking="true"
 				UsePrecompiledHeader="0"
 				WarningLevel="3"
 				DebugInformationFormat="3"
-				CompileAs="1"
-				DisableSpecificWarnings="4996;4244"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -169,6 +167,10 @@
 		</Configuration>
 	</Configurations>
 	<References>
+		<ProjectReference
+			ReferencedProjectIdentifier="{3AD5B16C-340A-40AC-96AD-6017B941A316}"
+			RelativePathToProject=".\libclamav.vcproj"
+		/>
 	</References>
 	<Files>
 		<Filter
@@ -177,21 +179,17 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
-				RelativePath="..\clamconf\clamconf.c"
+				RelativePath="..\clambc\bcrun.c"
 				>
 			</File>
-			<Filter
-				Name="shared"
+			<File
+				RelativePath="..\shared\getopt.c"
 				>
-				<File
-					RelativePath="..\shared\getopt.c"
-					>
-				</File>
-				<File
-					RelativePath="..\shared\misc.c"
-					>
-				</File>
-			</Filter>
+			</File>
+			<File
+				RelativePath="..\shared\misc.c"
+				>
+			</File>
 		</Filter>
 		<Filter
 			Name="Header Files"
@@ -205,7 +203,7 @@
 			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
 			>
 			<File
-				RelativePath=".\res\clamconf.rc"
+				RelativePath=".\res\clambc.rc"
 				>
 			</File>
 		</Filter>
diff --git a/win32/clamconf.vcproj b/win32/clamconf.vcproj
index fc9f83a..25af904 100644
--- a/win32/clamconf.vcproj
+++ b/win32/clamconf.vcproj
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
 	ProjectType="Visual C++"
-	Version="9,00"
+	Version="9.00"
 	Name="clamconf"
 	ProjectGUID="{DEABE3C7-6F4D-4221-8EEE-AD19C8261273}"
 	RootNamespace="clamconf"
@@ -169,6 +169,10 @@
 		</Configuration>
 	</Configurations>
 	<References>
+		<ProjectReference
+			ReferencedProjectIdentifier="{3AD5B16C-340A-40AC-96AD-6017B941A316}"
+			RelativePathToProject=".\libclamav.vcproj"
+		/>
 	</References>
 	<Files>
 		<Filter
diff --git a/win32/libclamav.def b/win32/libclamav.def
index fb62f66..bad8742 100644
--- a/win32/libclamav.def
+++ b/win32/libclamav.def
@@ -34,6 +34,25 @@ EXPORTS cli_decodesig
 EXPORTS cli_chomp
 EXPORTS cli_strtokenize
 EXPORTS have_rar
+EXPORTS have_clamjit
+
+EXPORTS cli_bytecode_done
+EXPORTS cli_bytecode_destroy
+EXPORTS cli_bytecode_context_destroy
+EXPORTS cli_bytecode_context_getresult_int
+EXPORTS cli_bytecode_run
+EXPORTS funmap
+EXPORTS cli_bytecode_context_setfile
+EXPORTS fmap
+EXPORTS cli_bytecode_context_setparam_int
+EXPORTS cli_bytecode_context_setfuncid
+EXPORTS cli_bytecode_context_set_trace
+EXPORTS cli_bytecode_context_alloc
+EXPORTS cli_bytecode_prepare
+EXPORTS cli_bytecode_load
+EXPORTS cli_bytecode_init
+EXPORTS cli_bytecode_debug
+EXPORTS cli_bytecode_debug_printsrc
 
 ; shared stuff - to be either double compiled into the tools or treated like cli_xxx
 EXPORTS opendir
diff --git a/win32/libclamav.vcproj b/win32/libclamav.vcproj
index 871242d..5aad441 100644
--- a/win32/libclamav.vcproj
+++ b/win32/libclamav.vcproj
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="Windows-1252"?>
 <VisualStudioProject
 	ProjectType="Visual C++"
-	Version="9,00"
+	Version="9.00"
 	Name="libclamav"
 	ProjectGUID="{3AD5B16C-340A-40AC-96AD-6017B941A316}"
 	RootNamespace="libclamav"
@@ -221,6 +221,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\libclamav\bytecode_nojit.c"
+				>
+			</File>
+			<File
 				RelativePath="..\libclamav\bytecode_vm.c"
 				>
 			</File>
diff --git a/win32/platform.h b/win32/platform.h
index 1667437..1ccc320 100644
--- a/win32/platform.h
+++ b/win32/platform.h
@@ -41,7 +41,7 @@ char *strptime(const char *s, const char *format, struct tm *tm);
 #define inet_ntop w32_inet_ntop
 #define gethostbyname w32_gethostbyname
 #define select w32_select
-
+#define ftruncate _chsize
 #define getpid GetCurrentProcessId
 
 #define PATH_MAX 32767
diff --git a/win32/res/clambc.rc b/win32/res/clambc.rc
new file mode 100644
index 0000000..1b9e66f
--- /dev/null
+++ b/win32/res/clambc.rc
@@ -0,0 +1,6 @@
+#define RES_FNAME "clambc.exe"
+#define RES_NAME "clambc"
+#define RES_FDESC "ClamAV - clambc"
+#include "common.rc"
+
+1337 ICON "clam.ico"

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list