~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

« back to all changes in this revision

Viewing changes to libclamav/c++/detect.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2014-07-15 01:08:10 UTC
  • mfrom: (0.35.47 sid)
  • Revision ID: package-import@ubuntu.com-20140715010810-ru66ek4fun2iseba
Tags: 0.98.4+dfsg-2~ubuntu13.10.1
No-change backport to saucy (LP: #1341962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
 
57
57
void cli_detect_env_jit(struct cli_environment *env)
58
58
{
 
59
#if LLVM_VERSION < 31
59
60
    std::string host_triple = sys::getHostTriple();
 
61
#else
 
62
    std::string host_triple = sys::getDefaultTargetTriple();
 
63
#endif
60
64
    INIT_STRFIELD(env->triple, host_triple.c_str());
61
65
 
62
66
    std::string cpu = sys::getHostCPUName();
63
67
    INIT_STRFIELD(env->cpu, cpu.c_str());
64
68
 
 
69
#if LLVM_VERSION < 33
65
70
    if (env->big_endian != (int)sys::isBigEndianHost()) {
66
71
        warn_assumptions("host endianness", env->big_endian, sys::isBigEndianHost());
67
72
        env->big_endian = sys::isBigEndianHost();
68
73
    }
 
74
#else
 
75
    if (env->big_endian != (int)sys::IsBigEndianHost) {
 
76
        warn_assumptions("host endianness", env->big_endian, sys::IsBigEndianHost);
 
77
        env->big_endian = sys::IsBigEndianHost;
 
78
    }
 
79
#endif
69
80
 
70
81
#ifdef __GNUC__
71
82
    env->cpp_version = MAKE_VERSION(0, __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
149
160
#endif
150
161
        CASE_OS(NetBSD,  os_bsd);
151
162
        CASE_OS(OpenBSD, os_bsd);
 
163
#if LLVM_VERSION < 31
152
164
        CASE_OS(Psp, os_unknown);
 
165
#endif
153
166
        CASE_OS(Solaris, os_solaris);
154
167
        case Triple::Win32:
155
168
             env->os = llvm_os_Win32;