Print C++ compiler version.

This requires exporting a function from libclamav, since clamconf is not C++...
0.96
Török Edvin 16 years ago
parent cf62d6d770
commit 2a7f1cdaf5
  1. 1
      clamconf/clamconf.c
  2. 1
      libclamav/bytecode.h
  3. 4
      libclamav/bytecode_nojit.c
  4. 15
      libclamav/c++/bytecode2llvm.cpp
  5. 1
      libclamav/libclamav.map
  6. 1
      win32/libclamav.def

@ -277,6 +277,7 @@ static void print_build(void)
#ifdef __SUNPRO_C
printf("Sun studio %u\n", __SUNPRO_C);
#endif
cli_printcxxver();
printf("CPPFLAGS: %s\nCFLAGS: %s\nCXXFLAGS: %s\nLDFLAGS: %s\nConfigure: %s\n",
BUILD_CPPFLAGS, BUILD_CFLAGS, BUILD_CXXFLAGS, BUILD_LDFLAGS,
BUILD_CONFIGURE_FLAGS);

@ -123,6 +123,7 @@ int bytecode_init(void);
void cli_bytecode_debug(int argc, char **argv);
void cli_bytecode_printversion(void);
void cli_bytecode_debug_printsrc(const struct cli_bc_ctx *ctx);
void cli_printcxxver(void);
typedef void (*bc_dbg_callback_trace)(struct cli_bc_ctx*, unsigned event);
typedef void (*bc_dbg_callback_trace_op)(struct cli_bc_ctx*, const char *op);

@ -74,3 +74,7 @@ void cli_bytecode_printversion(void) {
printf("LLVM not compiled in\n");
}
int have_clamjit=0;
void cli_printcxxver()
{
/* Empty */
}

@ -2013,6 +2013,21 @@ void cli_bytecode_printversion()
cl::PrintVersionMessage();
}
void cli_printcxxver()
{
/* Try to print information about some commonly used compilers */
#ifdef __GNUC__
printf("GNU C++: %s (%u.%u.%u)\n", __VERSION__, __GNUC__, __GNUC_MINOR__,
__GNUC_PATCHLEVEL__);
#endif
#ifdef __INTEL_COMPILER
printf("Intel Compiler C++ %u\n", __INTEL_COMPILER);
#endif
#ifdef _MSC_VER
printf("Microsoft Visual C++ %u\n", _MSC_VER);
#endif
}
namespace ClamBCModule {
void stop(const char *msg, llvm::Function* F, llvm::Instruction* I)
{

@ -171,6 +171,7 @@ CLAMAV_PRIVATE {
cli_bytecode_debug_printsrc;
cli_bytecode_printversion;
cli_bytecode_describe;
cli_printcxxver;
local:
*;
};

@ -94,6 +94,7 @@ EXPORTS cli_bytecode_init @44238 NONAME
EXPORTS cli_bytecode_debug @44239 NONAME
EXPORTS cli_bytecode_debug_printsrc @44240 NONAME
EXPORTS cli_bytecode_printversion @44241 NONAME
EXPORTS cli_printcxxver @44336 NONAME
EXPORTS cli_bytecode_describe @44242 NONAME
EXPORTS cli_malloc @44243 NONAME
EXPORTS cli_wm_decrypt_macro @44244 NONAME

Loading…
Cancel
Save