win32 build fix.

forgot to commit.
0.96
Török Edvin 16 years ago
parent 82f711fb28
commit 69650bea38
  1. 6
      clamconf/clamconf.c
  2. 2
      libclamav/bytecode_api.c
  3. 7
      libclamav/bytecode_detect.c
  4. 2
      libclamav/c++/detect.cpp
  5. 1
      win32/libclamav.def

@ -262,18 +262,18 @@ static void print_build(struct cli_environment *env)
const char *version = NULL;
printf("\nBuild information\n-----------------\n");
/* Try to print information about some commonly used compilers */
#ifdef __GNUC__
version = __VERSION__;
#endif
switch (env->compiler) {
case compiler_gnuc:
name = "GNU C";
version = __VERSION__;
break;
case compiler_clang:
name = "Clang";
version = __VERSION__;
break;
case compiler_llvm:
name = "LLVM-GCC";
version = __VERSION__;
break;
case compiler_intel:
name = "Intel Compiler";

@ -1264,7 +1264,7 @@ int32_t cli_bcapi_version_compare(struct cli_bc_ctx *ctx , const uint8_t* lhs, u
{
char *endl, *endr;
unsigned i = 0, j = 0;
unsigned long li, ri;
unsigned long li=0, ri=0;
do {
while (i < lhs_len && j < rhs_len && lhs[i] == rhs[j] &&
!isdigit(lhs[i]) && !isdigit(rhs[j])) {

@ -280,18 +280,19 @@ void cli_detect_environment(struct cli_environment *env)
{
OSVERSIONINFOEX info;
info.dwOSVersionInfoSize = sizeof(info);
if (GetVersionEx(&info) == 0 && info.dwPlatformId == VER_PLATFORM_WIN32_NT) {
if (GetVersionEx(&info) != 0 && info.dwPlatformId == VER_PLATFORM_WIN32_NT) {
if (info.wProductType == VER_NT_WORKSTATION)
INIT_STRFIELD(env->sysname, "Microsoft Windows");
else
INIT_STRFIELD(env->sysname, "Microsoft Windows Server");
snprintf(env->release, sizeof(env->release), "%d.%d SP%d.%d",
snprintf((char*)env->release, sizeof(env->release), "%d.%d SP%d.%d",
info.dwMajorVersion, info.dwMinorVersion,
info.wServicePackMajor, info.wServicePackMinor);
snprintf(env->version, sizeof(env->version),"Build %d",
snprintf((char*)env->version, sizeof(env->version),"Build %d",
info.dwBuildNumber);
}
}
#endif
if (!env->sysname[0]) {
INIT_STRFIELD(env->sysname, TARGET_OS_TYPE);

@ -55,7 +55,7 @@ void cli_detect_env_jit(struct cli_environment *env)
std::string cpu = sys::getHostCPUName();
INIT_STRFIELD(env->cpu, cpu.c_str());
if (env->big_endian != sys::isBigEndianHost()) {
if (env->big_endian != (int)sys::isBigEndianHost()) {
warn_assumptions("host endianness", env->big_endian, sys::isBigEndianHost());
env->big_endian = sys::isBigEndianHost();
}

@ -125,6 +125,7 @@ EXPORTS cli_fmap_scandesc @44340
EXPORTS cli_hashset_destroy @44341
EXPORTS cli_scandesc_stats @44342
EXPORTS cli_scanfile_stats @44343
EXPORTS cli_detect_environment @44344 NONAME
; compatibility layer, tommath, zlib
EXPORTS w32_srand @44265 NONAME

Loading…
Cancel
Save