Add clambc to the win32 build.

0.96
Török Edvin 16 years ago
parent d0934caf99
commit 3ff75dbf0c
  1. 4
      clambc/bcrun.c
  2. 2
      libclamav/bytecode.c
  3. 6
      libclamav/bytecode_api.c
  4. 6
      win32/ClamAV.sln
  5. 213
      win32/clambc.vcproj
  6. 6
      win32/clamconf.vcproj
  7. 19
      win32/libclamav.def
  8. 6
      win32/libclamav.vcproj
  9. 2
      win32/platform.h
  10. 6
      win32/res/clambc.rc

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

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

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

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

@ -0,0 +1,213 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="clambc"
ProjectGUID="{81AF8E63-81A8-4748-84E7-72DA558906B6}"
RootNamespace="clambc"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
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;_BIND_TO_CURRENT_VCLIBS_VERSION=1"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="1"
DisableSpecificWarnings="4996;4244"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
GenerateDebugInformation="true"
SubSystem="1"
RandomizedBaseAddress="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;HAVE_CONFIG_H;_BIND_TO_CURRENT_VCLIBS_VERSION=1"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
<ProjectReference
ReferencedProjectIdentifier="{3AD5B16C-340A-40AC-96AD-6017B941A316}"
RelativePathToProject=".\libclamav.vcproj"
/>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\clambc\bcrun.c"
>
</File>
<File
RelativePath="..\shared\getopt.c"
>
</File>
<File
RelativePath="..\shared\misc.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
<File
RelativePath=".\res\clambc.rc"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

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

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

@ -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"
@ -220,6 +220,10 @@
RelativePath="..\libclamav\bytecode_api_decl.c"
>
</File>
<File
RelativePath="..\libclamav\bytecode_nojit.c"
>
</File>
<File
RelativePath="..\libclamav\bytecode_vm.c"
>

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

@ -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"
Loading…
Cancel
Save