diff --git a/Makefile b/Makefile index 9cfb727..a04aef6 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,38 @@ CROSS_COMPILE ?= CC := $(CROSS_COMPILE)gcc CFLAGS += -Os -g -Wall -LIB += -lcurl -lip4tc +LIB += -lcurl -lip4tc ./clamscan/clamscan.o ./clamscan/manager.o -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -lclamav ./clamscan/shared/libshared.a -lssl -lcrypto -lz -lpthread IPTC_CFLAGS += -DHAVE_CONFIG_H -I./libiptc -D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 -D_REENTRANT OBG = rhost +CL_CFLAGS += -Wall -Os -DHAVE_CONFIG_H -I./clamscan -I./clamscan/shared -I./clamscan/libclamav -I./clamscan/libclamunrar_iface -I/usr/include/json-c -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +SHARED_CFLAGS += -Wall -Os -DHAVE_CONFIG_H -I./clamscan -I./clamscan/shared -I./clamscan/libclamav -I./clamscan/libclamunrar_iface -I/usr/include/json-c -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 + + all: conf.o rhost.o libiptc.o + + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/actions.c -fPIC -DPIC -o ./clamscan/shared/actions.o + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/cdiff.c -fPIC -DPIC -o ./clamscan/shared/cdiff.o + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/cert_util.c -fPIC -DPIC -o ./clamscan/shared/cert_util.o + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/clamdcom.c -fPIC -DPIC -o ./clamscan/shared/clamdcom.o + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/getopt.c -fPIC -DPIC -o ./clamscan/shared/getopt.o + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/hostid.c -fPIC -DPIC -o ./clamscan/shared/hostid.o + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/idmef_logging.c -fPIC -DPIC -o ./clamscan/shared/idmef_logging.o + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/misc.c -fPIC -DPIC -o ./clamscan/shared/misc.o + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/optparser.c -fPIC -DPIC -o ./clamscan/shared/optparser.o + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/output.c -fPIC -DPIC -o ./clamscan/shared/output.o + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/tar.c -fPIC -DPIC -o ./clamscan/shared/tar.o + $(CC) $(SHARED_CFLAGS) -c ./clamscan/shared/linux/cert_util_linux.c -fPIC -DPIC -o ./clamscan/shared/linux/cert_util_linux.o + ar cr ./clamscan/shared/libshared.a ./clamscan/shared/actions.o ./clamscan/shared/cdiff.o ./clamscan/shared/cert_util.o ./clamscan/shared/clamdcom.o ./clamscan/shared/getopt.o ./clamscan/shared/hostid.o ./clamscan/shared/idmef_logging.o ./clamscan/shared/misc.o ./clamscan/shared/optparser.o ./clamscan/shared/output.o ./clamscan/shared/tar.o ./clamscan/shared/linux/cert_util_linux.o + $(CC) $(CL_CFLAGS) -c clamscan/clamscan.c -o clamscan/clamscan.o + $(CC) $(CL_CFLAGS) -c clamscan/manager.c -o clamscan/manager.o $(CC) $(CFLAGS) $^ -o $(OBG) $(LIB) + chmod +x $(OBG) + static: conf.o rhost.o libiptc.o $(CC) $(IPTC_CFLAGS) -c libiptc/libip4tc.c -o libiptc/libip4tc.o ar crs libiptc/libip4tc.a libiptc/libip4tc.o @@ -18,5 +40,6 @@ static: conf.o rhost.o libiptc.o clean: rm -rf *.o - rm $(OBG) rm libiptc/*.o libiptc/*.a + rm clamscan/shared/*.o clamscan/shared/libshared.a clamscan/*.o + rm $(OBG) \ No newline at end of file diff --git a/README.md b/README.md index c33aabc..682e184 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,16 @@ ssh防止暴力破解,适用Debian 8、9、11 Centos 7 支持一次运行检测、后台运行检测 ``` -Debian系统请安装libcurl库和libiptc库 - apt install libip4tc-dev libcurl4-openssl-dev (或者libcurl4-gnutls-dev) +Debian系统请安装libcurl、iptables-devel、libclamav-devel + apt install libclamav-dev libip4tc-dev libcurl4-openssl-dev #(或者libcurl4-gnutls-dev) + freshclam # 更新病毒库(必要) ``` ``` -Centos 7系统请安装libcurl库和iptables-devel库 +Centos 7系统请安装libcurl、iptables-devel、libclamav-devel + yum install clamav clamav-update clamav-lib yum install iptables-devel libcurl-devel + freshclam # 更新病毒库(必要) ``` @@ -24,6 +27,13 @@ chmod a+x /root/denyhosts/denyhosts.sh crontab 定时任务,像这样. 0 22 * * * /root/denyhosts/denyhosts.sh + + +示列: +./rhost -d -r / --exclude-dir="^/sys|^/dev|^/proc|^/opt/infected|^/root|^/home" --move=/opt/infected --max-filesize 1024M -l #后台运行并扫描病毒 + +./rhost # 只处理非法攻击 + ``` @@ -41,37 +51,41 @@ update-alternatives --set ebtables /usr/sbin/ebtables-legacy ``` 配置文件 global { - DAEMON = "off"; // on开启后台运行,off不开启 - TIME = "10"; // 睡眠时间 + DAEMON = "off"; // on开启后台运行,off不开启 + TIME = "10"; // 睡眠时间 + + CLAMAV = 1; // clamav 是否扫描病毒 + CLAMAV_TIME = "1726"; // clamav 扫描时间(小时分钟,默认每天运行) + + PUBLIC_IP = "http://inet-ip.info"; // 获取公网IP - PUBLIC_IP = "http://inet-ip.info"; // 获取公网IP + IPV4_RESTRICTION = 1; // 是否启用IP白名单 + IPV4_WHITE_LIST = "1.1.1.1 "; // IP白名单 - IPV4_RESTRICTION = 1; // 是否启用百名单 - IPV4_WHITE_LIST = "1.1.1.1 "; // IP白名单 - - - REGION = 1; // 是否启用地域白名单 - REGION_LIST = "河南 郑州"; // 地域列表 + REGION = 1; // 是否启用地域白名单 + REGION_LIST = "河南 郑州"; // 地域列表 - IS_BLOCKED = 1; // 是否封禁攻击IP - REFUSE_NUMBER = 3; // 拒绝攻击次数 + IS_BLOCKED = 1; // 是否封禁攻击IP + REFUSE_NUMBER = 3; // 拒绝攻击次数 - IS_MAIL = 0; // 开启邮件告警 + IS_MAIL = 0; // 开启邮件告警 - IS_DING_WEBHOOK = 1; // 开启叮叮告警 - PHONE = "15565979082"; // @的人手机号 + IS_DING_WEBHOOK = 0; // 开启叮叮告警 + PHONE = "15565979082"; // @的人手机号 DING_WEBHOOK = "https://oapi.dingtalk.com/robot/send?access_token=7f069c672cb878987aa6772cca336740eece4ce36bde12b51b45e9f440e0565a"; // 钉钉WEBHOOK - IS_QQMAIL = 0; // 开启QQ邮箱告警 - RECV_MAIL = "1605227279@qq.com"; // 接收者QQ + IS_QQMAIL = 0; // 开启QQ邮箱告警(默认使用gomail:https://git.aixiao.me/aixiao/gomail.git) + RECV_MAIL = "1605227279@qq.com"; // 接收者QQ } + + ``` diff --git a/clamscan.h b/clamscan.h new file mode 100644 index 0000000..ab8c2d3 --- /dev/null +++ b/clamscan.h @@ -0,0 +1,6 @@ +#ifndef CLASCAN_H +#define RHOST_H + +extern int _clamscan(int argc, char **argv); + +#endif \ No newline at end of file diff --git a/clamscan/CMakeLists.txt b/clamscan/CMakeLists.txt new file mode 100644 index 0000000..d082710 --- /dev/null +++ b/clamscan/CMakeLists.txt @@ -0,0 +1,36 @@ +# Copyright (C) 2020-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + +cmake_minimum_required( VERSION 3.12...3.13 ) + +if(WIN32) + add_definitions(-DWIN32_LEAN_AND_MEAN) + add_definitions(-DHAVE_STRUCT_TIMESPEC) + + # Windows compatibility headers + include_directories(${CMAKE_SOURCE_DIR}/win32/compat) +endif() + +# The clamscan executable. +add_executable( clamscan ) +target_sources( clamscan + PRIVATE + clamscan.c + manager.c + manager.h + global.h ) +if(WIN32) + target_sources( clamscan PRIVATE ${CMAKE_SOURCE_DIR}/win32/res/clamscan.rc ) +endif() +target_include_directories( clamscan + PRIVATE ${CMAKE_BINARY_DIR} # For clamav-config.h +) +set_target_properties( clamscan PROPERTIES COMPILE_FLAGS "${WARNCFLAGS}" ) +target_link_libraries( clamscan + PRIVATE + ClamAV::libclamav + ClamAV::shared ) +if(WIN32) + install(TARGETS clamscan DESTINATION ${CMAKE_INSTALL_PREFIX}) +else() + install(TARGETS clamscan DESTINATION ${CMAKE_INSTALL_BINDIR}) +endif() diff --git a/clamscan/Makefile b/clamscan/Makefile new file mode 100644 index 0000000..68a6276 --- /dev/null +++ b/clamscan/Makefile @@ -0,0 +1,911 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# clamscan/Makefile. Generated from Makefile.in by configure. + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + + + +# +# Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. +# Copyright (C) 2007-2013 Sourcefire, Inc. +# Copyright (C) 2002-2007 Tomasz Kojm +# +# Fixes by Arkadiusz Miskiewicz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. + + +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/clamav +pkgincludedir = $(includedir)/clamav +pkglibdir = $(libdir)/clamav +pkglibexecdir = $(libexecdir)/clamav +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = x86_64-pc-linux-gnu +host_triplet = x86_64-pc-linux-gnu +target_triplet = x86_64-pc-linux-gnu +bin_PROGRAMS = clamscan$(EXEEXT) +subdir = clamscan +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/ax_check_uname_syscall.m4 \ + $(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/lib-prelude.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltargz.m4 \ + $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \ + $(top_srcdir)/m4/reorganization/version.m4 \ + $(top_srcdir)/m4/reorganization/libclamav-only.m4 \ + $(top_srcdir)/m4/reorganization/build_tools.m4 \ + $(top_srcdir)/m4/reorganization/headers.m4 \ + $(top_srcdir)/m4/reorganization/c_options.m4 \ + $(top_srcdir)/m4/reorganization/compiler_checks.m4 \ + $(top_srcdir)/m4/reorganization/linker_checks.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/fuzz.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/functions.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \ + $(top_srcdir)/m4/reorganization/libs/xml.m4 \ + $(top_srcdir)/m4/reorganization/libs/openssl.m4 \ + $(top_srcdir)/m4/reorganization/libs/json.m4 \ + $(top_srcdir)/m4/reorganization/libs/pcre.m4 \ + $(top_srcdir)/m4/reorganization/libs/libmspack.m4 \ + $(top_srcdir)/m4/reorganization/libs/tomsfastmath.m4 \ + $(top_srcdir)/m4/reorganization/libs/libz.m4 \ + $(top_srcdir)/m4/reorganization/libs/bzip.m4 \ + $(top_srcdir)/m4/reorganization/libs/unrar.m4 \ + $(top_srcdir)/m4/reorganization/libs/systemd.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/dns.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \ + $(top_srcdir)/m4/reorganization/milter/enable.m4 \ + $(top_srcdir)/m4/reorganization/libs/iconv_check.m4 \ + $(top_srcdir)/m4/reorganization/libs/iconv.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \ + $(top_srcdir)/m4/reorganization/utility_checks/id.m4 \ + $(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \ + $(top_srcdir)/m4/reorganization/usergroup.m4 \ + $(top_srcdir)/m4/reorganization/debug.m4 \ + $(top_srcdir)/m4/reorganization/customversion.m4 \ + $(top_srcdir)/m4/reorganization/nocache.m4 \ + $(top_srcdir)/m4/reorganization/dns.m4 \ + $(top_srcdir)/m4/reorganization/bigstack.m4 \ + $(top_srcdir)/m4/reorganization/dbdir.m4 \ + $(top_srcdir)/m4/reorganization/cfgdir.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \ + $(top_srcdir)/m4/reorganization/os_checks.m4 \ + $(top_srcdir)/m4/reorganization/milter/check.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \ + $(top_srcdir)/m4/reorganization/clamav_user.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/select.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/shift.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/features.m4 \ + $(top_srcdir)/m4/reorganization/clamdtop.m4 \ + $(top_srcdir)/m4/reorganization/distcheck.m4 \ + $(top_srcdir)/m4/reorganization/llvm.m4 \ + $(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \ + $(top_srcdir)/m4/reorganization/sha_collect.m4 \ + $(top_srcdir)/m4/reorganization/yara.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/fts.m4 \ + $(top_srcdir)/m4/reorganization/prelude.m4 \ + $(top_srcdir)/m4/reorganization/bsd.m4 \ + $(top_srcdir)/m4/reorganization/clamonacc.m4 \ + $(top_srcdir)/m4/reorganization/libs/curl.m4 \ + $(top_srcdir)/m4/reorganization/substitutions.m4 \ + $(top_srcdir)/m4/reorganization/strni.m4 \ + $(top_srcdir)/m4/reorganization/types.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/clamav-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_clamscan_OBJECTS = clamscan.$(OBJEXT) manager.$(OBJEXT) +clamscan_OBJECTS = $(am_clamscan_OBJECTS) +clamscan_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_$(V)) +am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_$(V)) +am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY)) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_$(V)) +am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_$(V)) +am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I. -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/clamscan.Po ./$(DEPDIR)/manager.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_$(V)) +am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_$(V)) +am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(clamscan_SOURCES) +DIST_SOURCES = $(clamscan_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = ${SHELL} '/root/clamav/clamav-0.103.7+dfsg/config/missing' aclocal-1.16 +AMTAR = $${TAR-tar} +AM_DEFAULT_VERBOSITY = 1 +AR = ar +AUTOCONF = ${SHELL} '/root/clamav/clamav-0.103.7+dfsg/config/missing' autoconf +AUTOHEADER = ${SHELL} '/root/clamav/clamav-0.103.7+dfsg/config/missing' autoheader +AUTOMAKE = ${SHELL} '/root/clamav/clamav-0.103.7+dfsg/config/missing' automake-1.16 +AWK = mawk +BUILD_CONFIGURE_FLAGS = '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-option-checking' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--runstatedir=/run' '--disable-maintainer-mode' '--disable-dependency-tracking' 'CFLAGS=-g -O2 -ffile-prefix-map=/root/clamav/clamav-0.103.7+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -ffile-prefix-map=/root/clamav/clamav-0.103.7+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64' 'LDFLAGS=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed' '--with-dbdir=/var/lib/clamav' '--sysconfdir=/etc/clamav' '--disable-clamav' '--disable-unrar' '--enable-milter' '--enable-dns-fix' '--with-libjson' '--with-system-libmspack' '--with-libcurl=/usr' '--with-gnu-ld' '--with-systemdsystemunitdir=/lib/systemd/system' '--enable-static' 'build_alias=x86_64-linux-gnu' 'OBJCFLAGS=-g -O2 -ffile-prefix-map=/root/clamav/clamav-0.103.7+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security' +CC = gcc +CCDEPMODE = depmode=none +CFGDIR = /etc/clamav +CFLAGS = -g -O2 -ffile-prefix-map=/root/clamav/clamav-0.103.7+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +CHECK_CFLAGS = -pthread +CHECK_CPPFLAGS = -pthread +CHECK_LIBS = -lcheck_pic -pthread -lrt -lm -lsubunit +CLAMAVGROUP = +CLAMAVUSER = +CLAMAV_MILTER_CPPFLAGS = +CLAMAV_MILTER_LIBS = -lmilter -lpthread +CLAMBC_CPPFLAGS = +CLAMBC_LIBS = +CLAMCONF_CPPFLAGS = +CLAMCONF_LIBS = +CLAMDSCAN_CPPFLAGS = +CLAMDSCAN_LIBS = +CLAMDTOP_CPPFLAGS = +CLAMDTOP_LIBS = +CLAMD_CPPFLAGS = +CLAMD_LIBS = -lsystemd +CLAMMEM_CPPFLAGS = +CLAMMEM_LIBS = +CLAMONACC_CPPFLAGS = +CLAMONACC_LIBS = +CLAMSCAN_CPPFLAGS = +CLAMSCAN_LIBS = +CLAMSUBMIT_CFLAGS = +CLAMSUBMIT_LIBS = -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -lcurl +CPP = gcc -E +CPPFLAGS = -Wdate-time -D_FORTIFY_SOURCE=2 +CURL_CPPFLAGS = +CURL_LDFLAGS = -Wl,-z,relro -Wl,-z,now -Wl,--as-needed +CURL_LIBS = -lcurl +CURSES_CPPFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 +CURSES_LIBS = -lncurses -ltinfo +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=none +CXXFLAGS = -g -O2 -ffile-prefix-map=/root/clamav/clamav-0.103.7+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wall -D_FILE_OFFSET_BITS=64 +CYGPATH_W = echo +DBDIR = /var/lib/clamav +DEFINE_SF32_PREFIX = #define _SF32_PREFIX "" +DEFINE_SF64_PREFIX = #define _SF64_PREFIX "l" +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = false +DSYMUTIL = +DUMPBIN = +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +EXEEXT = +FGREP = /bin/grep -F +FRESHCLAM_CPPFLAGS = +FRESHCLAM_LIBS = -lresolv -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -lcurl +GCOV = +GENERATE_WARNING = Warning: This file is generated with ./configure. Do not edit! +GENHTML = +GETENT = +GPERF = ${SHELL} '/root/clamav/clamav-0.103.7+dfsg/config/missing' gperf +GREP = /bin/grep +HAVE_STRNI = +HAVE_YARA = +INCLTDL = +INSTALL = /usr/bin/install -c +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = $(install_sh) -c -s +INT16_DEF = +INT32_DEF = +INT64_DEF = +INT8_DEF = +INT_TYPES_HEADER = #include +JSON_CPPFLAGS = -I/usr/include/json-c +JSON_LDFLAGS = +JSON_LIBS = -ljson-c +LCOV = +LD = /usr/bin/ld -m elf_x86_64 +LDFLAGS = -Wl,-z,relro -Wl,-z,now -Wl,--as-needed +LEX = flex +LEXLIB = -lfl +LEX_OUTPUT_ROOT = lex.yy +LIBADD_DL = -ldl +LIBADD_DLD_LINK = +LIBADD_DLOPEN = -ldl +LIBADD_SHL_LOAD = +LIBBZ2 = -lbz2 +LIBBZ2_PREFIX = +LIBCLAMAV_CPPFLAGS = +LIBCLAMAV_LIBS = -lbz2 +LIBCLAMAV_VERSION = 9:5:0 +LIBCLAMAV_VERSION_NUM = 0x090500 +LIBCLAMSHARED_CPPFLAGS = +LIBFRESHCLAM_VERSION = 2:1:0 +LIBFRESHCLAM_VERSION_NUM = 0x020100 +LIBICONV = +LIBLTDL = -lltdl +LIBM = -lm +LIBMSPACK_CFLAGS = +LIBMSPACK_LIBS = -lmspack +LIBOBJS = +LIBPRELUDE_CFLAGS = +LIBPRELUDE_CONFIG = +LIBPRELUDE_CONFIG_PREFIX = +LIBPRELUDE_LDFLAGS = +LIBPRELUDE_LIBS = +LIBPRELUDE_PREFIX = +LIBPRELUDE_PTHREAD_CFLAGS = +LIBS = $(top_builddir)/libclamav/libclamav.la $(top_builddir)/shared/libshared.la -lpthread +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LIPO = +LN_S = ln -s +LTDLDEPS = +LTDLINCL = +LTDLOPEN = libltdl +LTLIBBZ2 = -lbz2 +LTLIBICONV = +LTLIBOBJS = +LT_ARGZ_H = +LT_CONFIG_H = clamav-config.h +LT_DLLOADERS = dlopen.la +LT_DLPREOPEN = -dlpreopen dlopen.la +LT_SYS_LIBRARY_PATH = +MAINT = # +MAKEINFO = ${SHELL} '/root/clamav/clamav-0.103.7+dfsg/config/missing' makeinfo +MANIFEST_TOOL = : +MKDIR_P = /bin/mkdir -p +NCURSES_CFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 +NCURSES_LIBS = -lncurses -ltinfo +NM = /usr/bin/nm -B +NMEDIT = +OBJC = gcc +OBJCDEPMODE = depmode=none +OBJCFLAGS = -g -O2 -ffile-prefix-map=/root/clamav/clamav-0.103.7+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security +OBJDUMP = objdump +OBJEXT = o +OTOOL = +OTOOL64 = +PACKAGE = clamav +PACKAGE_BUGREPORT = https://github.com/Cisco-Talos/clamav/issues +PACKAGE_NAME = ClamAV +PACKAGE_STRING = ClamAV 0.103.7 +PACKAGE_TARNAME = clamav +PACKAGE_URL = https://www.clamav.net/ +PACKAGE_VERSION = 0.103.7 +PACKAGE_VERSION_NUM = 0x006707 +PATH_SEPARATOR = : +PCRE_CFLAGS = +PCRE_CPPFLAGS = +PCRE_LIBS = -lpcre2-8 +PKG_CONFIG = /usr/bin/pkg-config +PKG_CONFIG_LIBDIR = +PKG_CONFIG_PATH = +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/bash +SIGTOOL_CPPFLAGS = +SSL_CPPFLAGS = +SSL_LDFLAGS = +SSL_LIBS = -lssl -lcrypto -lz +STRIP = strip +SYSTEMD_CFLAGS = +SYSTEMD_LIBS = -lsystemd +THREAD_LIBS = -lpthread +TH_SAFE = -thread-safe +TOMSFASTMATH_CFLAGS = +TOMSFASTMATH_LIBS = -ltfm +UINT16_DEF = +UINT32_DEF = +UINT64_DEF = +UINT8_DEF = +VERSION = 0.103.7 +VERSIONSCRIPTFLAG = --version-script +WERR_CFLAGS = +WERR_CFLAGS_MILTER = +XML_CPPFLAGS = -I/usr/include/libxml2 +XML_LIBS = -lxml2 +YACC = bison -y +YFLAGS = +ZLIB_CFLAGS = +ZLIB_LIBS = -lz +abs_builddir = /root/clamav/clamav-0.103.7+dfsg/clamscan +abs_srcdir = /root/clamav/clamav-0.103.7+dfsg/clamscan +abs_top_builddir = /root/clamav/clamav-0.103.7+dfsg +abs_top_srcdir = /root/clamav/clamav-0.103.7+dfsg +ac_ct_AR = ar +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DUMPBIN = +ac_ct_OBJC = gcc +am__include = include +am__leading_dot = . +am__quote = +am__tar = tar --format=ustar -chf - "$$tardir" +am__untar = tar -xf - +bindir = ${exec_prefix}/bin +build = x86_64-pc-linux-gnu +build_alias = x86_64-linux-gnu +build_cpu = x86_64 +build_os = linux-gnu +build_vendor = pc +builddir = . +curl_config = /usr/bin/curl-config +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = x86_64-pc-linux-gnu +host_alias = +host_cpu = x86_64 +host_os = linux-gnu +host_vendor = pc +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${prefix}/share/info +install_sh = ${SHELL} /root/clamav/clamav-0.103.7+dfsg/config/install-sh +libdir = ${prefix}/lib/x86_64-linux-gnu +libexecdir = ${exec_prefix}/libexec +llvmconfig = +localedir = ${datarootdir}/locale +localstatedir = /var +ltdl_LIBOBJS = lt__strl.o +ltdl_LTLIBOBJS = lt__strl.lo +mandir = ${prefix}/share/man +mkdir_p = $(MKDIR_P) +oldincludedir = /usr/include +pcreconfig = +pdfdir = ${docdir} +prefix = /usr +program_transform_name = s,x,x, +psdir = ${docdir} +runstatedir = /run +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +srcdir = . +subdirs = +sys_symbol_underscore = no +sysconfdir = /etc/clamav +systemdsystemunitdir = /lib/systemd/system +target = x86_64-pc-linux-gnu +target_alias = +target_cpu = x86_64 +target_os = linux-gnu +target_vendor = pc +top_build_prefix = ../ +top_builddir = .. +top_srcdir = .. +xmlconfig = /usr/bin/xml2-config +clamscan_SOURCES = \ + clamscan.c \ + global.h \ + manager.c \ + manager.h + +AM_CFLAGS = +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav -I$(top_builddir)/libclamav -I$(top_srcdir)/libclamunrar_iface -I/usr/include/json-c +CLEANFILES = *.gcda *.gcno +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign clamscan/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign clamscan/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: # $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): # $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +installcheck-binPROGRAMS: $(bin_PROGRAMS) + bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | \ + sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err &2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad + +clamscan$(EXEEXT): $(clamscan_OBJECTS) $(clamscan_DEPENDENCIES) $(EXTRA_clamscan_DEPENDENCIES) + @rm -f clamscan$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clamscan_OBJECTS) $(clamscan_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +#include ./$(DEPDIR)/clamscan.Po # am--include-marker +#include ./$(DEPDIR)/manager.Po # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +# $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +# $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +# $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) + $(AM_V_CC)$(COMPILE) -c -o $@ $< + +.c.obj: +# $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +# $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +# $(am__mv) $$depbase.Tpo $$depbase.Po +# $(AM_V_CC)source='$<' object='$@' libtool=no +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) + $(AM_V_CC)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +# $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +# $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +# $(am__mv) $$depbase.Tpo $$depbase.Plo +# $(AM_V_CC)source='$<' object='$@' libtool=yes +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) + $(AM_V_CC)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/clamscan.Po + -rm -f ./$(DEPDIR)/manager.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: installcheck-binPROGRAMS + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/clamscan.Po + -rm -f ./$(DEPDIR)/manager.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installcheck-binPROGRAMS \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/clamscan/Makefile.am b/clamscan/Makefile.am new file mode 100644 index 0000000..e081039 --- /dev/null +++ b/clamscan/Makefile.am @@ -0,0 +1,36 @@ +# +# Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. +# Copyright (C) 2007-2013 Sourcefire, Inc. +# Copyright (C) 2002-2007 Tomasz Kojm +# +# Fixes by Arkadiusz Miskiewicz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. + +bin_PROGRAMS = clamscan + +clamscan_SOURCES = \ + clamscan.c \ + global.h \ + manager.c \ + manager.h + +AM_CFLAGS=@WERR_CFLAGS@ +DEFS = @DEFS@ +LIBS = $(top_builddir)/libclamav/libclamav.la $(top_builddir)/shared/libshared.la @THREAD_LIBS@ @CLAMSCAN_LIBS@ +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav -I$(top_builddir)/libclamav -I$(top_srcdir)/libclamunrar_iface @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @PCRE_CPPFLAGS@ @CLAMSCAN_CPPFLAGS@ + +CLEANFILES=*.gcda *.gcno diff --git a/clamscan/Makefile.in b/clamscan/Makefile.in new file mode 100644 index 0000000..64aba0c --- /dev/null +++ b/clamscan/Makefile.in @@ -0,0 +1,911 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. +# Copyright (C) 2007-2013 Sourcefire, Inc. +# Copyright (C) 2002-2007 Tomasz Kojm +# +# Fixes by Arkadiusz Miskiewicz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = clamscan$(EXEEXT) +subdir = clamscan +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/ax_check_uname_syscall.m4 \ + $(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/lib-prelude.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltargz.m4 \ + $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \ + $(top_srcdir)/m4/reorganization/version.m4 \ + $(top_srcdir)/m4/reorganization/libclamav-only.m4 \ + $(top_srcdir)/m4/reorganization/build_tools.m4 \ + $(top_srcdir)/m4/reorganization/headers.m4 \ + $(top_srcdir)/m4/reorganization/c_options.m4 \ + $(top_srcdir)/m4/reorganization/compiler_checks.m4 \ + $(top_srcdir)/m4/reorganization/linker_checks.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/fuzz.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/functions.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \ + $(top_srcdir)/m4/reorganization/libs/xml.m4 \ + $(top_srcdir)/m4/reorganization/libs/openssl.m4 \ + $(top_srcdir)/m4/reorganization/libs/json.m4 \ + $(top_srcdir)/m4/reorganization/libs/pcre.m4 \ + $(top_srcdir)/m4/reorganization/libs/libmspack.m4 \ + $(top_srcdir)/m4/reorganization/libs/tomsfastmath.m4 \ + $(top_srcdir)/m4/reorganization/libs/libz.m4 \ + $(top_srcdir)/m4/reorganization/libs/bzip.m4 \ + $(top_srcdir)/m4/reorganization/libs/unrar.m4 \ + $(top_srcdir)/m4/reorganization/libs/systemd.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/dns.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \ + $(top_srcdir)/m4/reorganization/milter/enable.m4 \ + $(top_srcdir)/m4/reorganization/libs/iconv_check.m4 \ + $(top_srcdir)/m4/reorganization/libs/iconv.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \ + $(top_srcdir)/m4/reorganization/utility_checks/id.m4 \ + $(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \ + $(top_srcdir)/m4/reorganization/usergroup.m4 \ + $(top_srcdir)/m4/reorganization/debug.m4 \ + $(top_srcdir)/m4/reorganization/customversion.m4 \ + $(top_srcdir)/m4/reorganization/nocache.m4 \ + $(top_srcdir)/m4/reorganization/dns.m4 \ + $(top_srcdir)/m4/reorganization/bigstack.m4 \ + $(top_srcdir)/m4/reorganization/dbdir.m4 \ + $(top_srcdir)/m4/reorganization/cfgdir.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \ + $(top_srcdir)/m4/reorganization/os_checks.m4 \ + $(top_srcdir)/m4/reorganization/milter/check.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \ + $(top_srcdir)/m4/reorganization/clamav_user.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/select.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/shift.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/features.m4 \ + $(top_srcdir)/m4/reorganization/clamdtop.m4 \ + $(top_srcdir)/m4/reorganization/distcheck.m4 \ + $(top_srcdir)/m4/reorganization/llvm.m4 \ + $(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \ + $(top_srcdir)/m4/reorganization/sha_collect.m4 \ + $(top_srcdir)/m4/reorganization/yara.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/fts.m4 \ + $(top_srcdir)/m4/reorganization/prelude.m4 \ + $(top_srcdir)/m4/reorganization/bsd.m4 \ + $(top_srcdir)/m4/reorganization/clamonacc.m4 \ + $(top_srcdir)/m4/reorganization/libs/curl.m4 \ + $(top_srcdir)/m4/reorganization/substitutions.m4 \ + $(top_srcdir)/m4/reorganization/strni.m4 \ + $(top_srcdir)/m4/reorganization/types.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/clamav-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am_clamscan_OBJECTS = clamscan.$(OBJEXT) manager.$(OBJEXT) +clamscan_OBJECTS = $(am_clamscan_OBJECTS) +clamscan_LDADD = $(LDADD) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/clamscan.Po ./$(DEPDIR)/manager.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(clamscan_SOURCES) +DIST_SOURCES = $(clamscan_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_CONFIGURE_FLAGS = @BUILD_CONFIGURE_FLAGS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFGDIR = @CFGDIR@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_CPPFLAGS = @CHECK_CPPFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CLAMAVGROUP = @CLAMAVGROUP@ +CLAMAVUSER = @CLAMAVUSER@ +CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@ +CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@ +CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@ +CLAMBC_LIBS = @CLAMBC_LIBS@ +CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@ +CLAMCONF_LIBS = @CLAMCONF_LIBS@ +CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@ +CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@ +CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@ +CLAMDTOP_LIBS = @CLAMDTOP_LIBS@ +CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@ +CLAMD_LIBS = @CLAMD_LIBS@ +CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@ +CLAMMEM_LIBS = @CLAMMEM_LIBS@ +CLAMONACC_CPPFLAGS = @CLAMONACC_CPPFLAGS@ +CLAMONACC_LIBS = @CLAMONACC_LIBS@ +CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@ +CLAMSCAN_LIBS = @CLAMSCAN_LIBS@ +CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@ +CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CPPFLAGS = @CURL_CPPFLAGS@ +CURL_LDFLAGS = @CURL_LDFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CURSES_CPPFLAGS = @CURSES_CPPFLAGS@ +CURSES_LIBS = @CURSES_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBDIR = @DBDIR@ +DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@ +DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@ +FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ +GCOV = @GCOV@ +GENERATE_WARNING = @GENERATE_WARNING@ +GENHTML = @GENHTML@ +GETENT = @GETENT@ +GPERF = @GPERF@ +GREP = @GREP@ +HAVE_STRNI = @HAVE_STRNI@ +HAVE_YARA = @HAVE_YARA@ +INCLTDL = @INCLTDL@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT16_DEF = @INT16_DEF@ +INT32_DEF = @INT32_DEF@ +INT64_DEF = @INT64_DEF@ +INT8_DEF = @INT8_DEF@ +INT_TYPES_HEADER = @INT_TYPES_HEADER@ +JSON_CPPFLAGS = @JSON_CPPFLAGS@ +JSON_LDFLAGS = @JSON_LDFLAGS@ +JSON_LIBS = @JSON_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBADD_DL = @LIBADD_DL@ +LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ +LIBADD_DLOPEN = @LIBADD_DLOPEN@ +LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ +LIBBZ2 = @LIBBZ2@ +LIBBZ2_PREFIX = @LIBBZ2_PREFIX@ +LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@ +LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@ +LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@ +LIBCLAMAV_VERSION_NUM = @LIBCLAMAV_VERSION_NUM@ +LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@ +LIBFRESHCLAM_VERSION = @LIBFRESHCLAM_VERSION@ +LIBFRESHCLAM_VERSION_NUM = @LIBFRESHCLAM_VERSION_NUM@ +LIBICONV = @LIBICONV@ +LIBLTDL = @LIBLTDL@ +LIBM = @LIBM@ +LIBMSPACK_CFLAGS = @LIBMSPACK_CFLAGS@ +LIBMSPACK_LIBS = @LIBMSPACK_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ +LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ +LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ +LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ +LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ +LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ +LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ +LIBS = $(top_builddir)/libclamav/libclamav.la $(top_builddir)/shared/libshared.la @THREAD_LIBS@ @CLAMSCAN_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTDLDEPS = @LTDLDEPS@ +LTDLINCL = @LTDLINCL@ +LTDLOPEN = @LTDLOPEN@ +LTLIBBZ2 = @LTLIBBZ2@ +LTLIBICONV = @LTLIBICONV@ +LTLIBOBJS = @LTLIBOBJS@ +LT_ARGZ_H = @LT_ARGZ_H@ +LT_CONFIG_H = @LT_CONFIG_H@ +LT_DLLOADERS = @LT_DLLOADERS@ +LT_DLPREOPEN = @LT_DLPREOPEN@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NCURSES_CFLAGS = @NCURSES_CFLAGS@ +NCURSES_LIBS = @NCURSES_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_NUM = @PACKAGE_VERSION_NUM@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_CPPFLAGS = @PCRE_CPPFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@ +SSL_CPPFLAGS = @SSL_CPPFLAGS@ +SSL_LDFLAGS = @SSL_LDFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ +THREAD_LIBS = @THREAD_LIBS@ +TH_SAFE = @TH_SAFE@ +TOMSFASTMATH_CFLAGS = @TOMSFASTMATH_CFLAGS@ +TOMSFASTMATH_LIBS = @TOMSFASTMATH_LIBS@ +UINT16_DEF = @UINT16_DEF@ +UINT32_DEF = @UINT32_DEF@ +UINT64_DEF = @UINT64_DEF@ +UINT8_DEF = @UINT8_DEF@ +VERSION = @VERSION@ +VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@ +WERR_CFLAGS = @WERR_CFLAGS@ +WERR_CFLAGS_MILTER = @WERR_CFLAGS_MILTER@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ +ZLIB_LIBS = @ZLIB_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +curl_config = @curl_config@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +llvmconfig = @llvmconfig@ +localedir = @localedir@ +localstatedir = @localstatedir@ +ltdl_LIBOBJS = @ltdl_LIBOBJS@ +ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pcreconfig = @pcreconfig@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sys_symbol_underscore = @sys_symbol_underscore@ +sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xmlconfig = @xmlconfig@ +clamscan_SOURCES = \ + clamscan.c \ + global.h \ + manager.c \ + manager.h + +AM_CFLAGS = @WERR_CFLAGS@ +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav -I$(top_builddir)/libclamav -I$(top_srcdir)/libclamunrar_iface @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @PCRE_CPPFLAGS@ @CLAMSCAN_CPPFLAGS@ +CLEANFILES = *.gcda *.gcno +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign clamscan/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign clamscan/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +installcheck-binPROGRAMS: $(bin_PROGRAMS) + bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ + case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ + *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ + esac; \ + f=`echo "$$p" | \ + sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + for opt in --help --version; do \ + if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ + 2>c$${pid}_.err &2; bad=1; fi; \ + done; \ + done; rm -f c$${pid}_.???; exit $$bad + +clamscan$(EXEEXT): $(clamscan_OBJECTS) $(clamscan_DEPENDENCIES) $(EXTRA_clamscan_DEPENDENCIES) + @rm -f clamscan$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(clamscan_OBJECTS) $(clamscan_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clamscan.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/manager.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/clamscan.Po + -rm -f ./$(DEPDIR)/manager.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: installcheck-binPROGRAMS + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/clamscan.Po + -rm -f ./$(DEPDIR)/manager.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installcheck-binPROGRAMS \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/clamscan/clamav-config.h b/clamscan/clamav-config.h new file mode 100644 index 0000000..e02871f --- /dev/null +++ b/clamscan/clamav-config.h @@ -0,0 +1,708 @@ +/* clamav-config.h. Generated from clamav-config.h.in by configure. */ +/* clamav-config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* mmap flag for anonymous maps */ +#define ANONYMOUS_MAP MAP_ANONYMOUS + +/* enable bind8 compatibility */ +/* #undef BIND_8_COMPAT */ + +/* use ClamAuth */ +/* #undef CLAMAUTH */ + +/* name of the clamav group */ +#define CLAMAVGROUP "clamav" + +/* name of the clamav user */ +#define CLAMAVUSER "clamav" + +/* enable debugging */ +/* #undef CL_DEBUG */ + +/* enable experimental code */ +/* #undef CL_EXPERIMENTAL */ + +/* thread safe */ +#define CL_THREAD_SAFE 1 + +/* where to look for the config file */ +#define CONFDIR "/etc/clamav" + +/* curses header location */ +#define CURSES_INCLUDE + +/* os is aix */ +/* #undef C_AIX */ + +/* os is beos */ +/* #undef C_BEOS */ + +/* Increase thread stack size. */ +/* #undef C_BIGSTACK */ + +/* os is bsd flavor */ +/* #undef C_BSD */ + +/* os is darwin */ +/* #undef C_DARWIN */ + +/* target is gnu-hurd */ +/* #undef C_GNU_HURD */ + +/* os is hpux */ +/* #undef C_HPUX */ + +/* os is interix */ +/* #undef C_INTERIX */ + +/* os is irix */ +/* #undef C_IRIX */ + +/* target is kfreebsd-gnu */ +/* #undef C_KFREEBSD_GNU */ + +/* target is linux */ +#define C_LINUX 1 + +/* os is OS/2 */ +/* #undef C_OS2 */ + +/* os is osf/tru64 */ +/* #undef C_OSF */ + +/* os is QNX 6.x.x */ +/* #undef C_QNX6 */ + +/* os is solaris */ +/* #undef C_SOLARIS */ + +/* Path to virus database directory. */ +#define DATADIR "/var/lib/clamav" + +/* "default FD_SETSIZE value" */ +#define DEFAULT_FD_SETSIZE 1024 + +/* whether _XOPEN_SOURCE needs to be defined for fd passing to work */ +/* #undef FDPASS_NEED_XOPEN */ + +/* file i/o buffer size */ +#define FILEBUFF 8192 + +/* enable workaround for broken DNS servers */ +#define FRESHCLAM_DNS_FIX 1 + +/* use "Cache-Control: no-cache" in freshclam */ +/* #undef FRESHCLAM_NO_CACHE */ + +/* Define to 1 if you have the `argz_add' function. */ +#define HAVE_ARGZ_ADD 1 + +/* Define to 1 if you have the `argz_append' function. */ +#define HAVE_ARGZ_APPEND 1 + +/* Define to 1 if you have the `argz_count' function. */ +#define HAVE_ARGZ_COUNT 1 + +/* Define to 1 if you have the `argz_create_sep' function. */ +#define HAVE_ARGZ_CREATE_SEP 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ARGZ_H 1 + +/* Define to 1 if you have the `argz_insert' function. */ +#define HAVE_ARGZ_INSERT 1 + +/* Define to 1 if you have the `argz_next' function. */ +#define HAVE_ARGZ_NEXT 1 + +/* Define to 1 if you have the `argz_stringify' function. */ +#define HAVE_ARGZ_STRINGIFY 1 + +/* attrib aligned */ +#define HAVE_ATTRIB_ALIGNED 1 + +/* attrib packed */ +#define HAVE_ATTRIB_PACKED 1 + +/* have bzip2 */ +#define HAVE_BZLIB_H 1 + +/* Define to 1 if you have the `closedir' function. */ +#define HAVE_CLOSEDIR 1 + +/* Define to 1 if you have the `ctime_r' function. */ +#define HAVE_CTIME_R 1 + +/* ctime_r takes 2 arguments */ +#define HAVE_CTIME_R_2 1 + +/* ctime_r takes 3 arguments */ +/* #undef HAVE_CTIME_R_3 */ + +/* Define to 1 if you have the declaration of `cygwin_conv_path', and to 0 if + you don't. */ +/* #undef HAVE_DECL_CYGWIN_CONV_PATH */ + +/* Define to 1 if you have a deprecated version of the 'libjson' library + (-ljson). */ +/* #undef HAVE_DEPRECATED_JSON */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DIRENT_H 1 + +/* Define if you have the GNU dld library. */ +/* #undef HAVE_DLD */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLD_H */ + +/* Define to 1 if you have the `dlerror' function. */ +#define HAVE_DLERROR 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DL_H */ + +/* Define if you have the _dyld_func_lookup function. */ +/* #undef HAVE_DYLD */ + +/* Define to 1 if you have the `enable_extended_FILE_stdio' function. */ +/* #undef HAVE_ENABLE_EXTENDED_FILE_STDIO */ + +/* Define to 1 if the system has the type `error_t'. */ +#define HAVE_ERROR_T 1 + +/* have working file descriptor passing support */ +#define HAVE_FD_PASSING 1 + +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#define HAVE_FSEEKO 1 + +/* have getaddrinfo() */ +#define HAVE_GETADDRINFO 1 + +/* Define to 1 if you have the `getnameinfo' function. */ +#define HAVE_GETNAMEINFO 1 + +/* Define to 1 if getpagesize() is available */ +#define HAVE_GETPAGESIZE 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GRP_H 1 + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ICONV_H 1 + +/* Define to 1 if you have the `inet_ntop' function. */ +#define HAVE_INET_NTOP 1 + +/* Define to 1 if you have the `initgroups' function. */ +#define HAVE_INITGROUPS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_addr_t is defined */ +#define HAVE_IN_ADDR_T 1 + +/* in_port_t is defined */ +#define HAVE_IN_PORT_T 1 + +/* Define to 1 if you have the 'libjson' library (-ljson). */ +#define HAVE_JSON 1 + +/* Define to 1 if you have the `charset' library (-lcharset). */ +/* #undef HAVE_LIBCHARSET */ + +/* Define to '1' if you have the check.h library */ +/* #undef HAVE_LIBCHECK */ + +/* Define if you have the libdl library or equivalent. */ +#define HAVE_LIBDL 1 + +/* Define if libdlloader will be built on this platform */ +#define HAVE_LIBDLLOADER 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIBMILTER_MFAPI_H 1 + +/* Define to '1' if you have the ncurses.h library */ +/* #undef HAVE_LIBNCURSES */ + +/* Define to '1' if you have the curses.h library */ +/* #undef HAVE_LIBPDCURSES */ + +/* Define to 1 if you have the `ssl' library (-lssl). */ +#define HAVE_LIBSSL 1 + +/* Define to 1 if you have the 'libxml2' library (-lxml2). */ +#define HAVE_LIBXML2 1 + +/* Define to 1 if you have the `z' library (-lz). */ +#define HAVE_LIBZ 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LIMITS_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LOCALCHARSET_H */ + +/* Define to 1 if you have the `locale_charset' function. */ +/* #undef HAVE_LOCALE_CHARSET */ + +/* Define this if a modern libltdl is already installed */ +#define HAVE_LTDL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MACH_O_DYLD_H */ + +/* Define to 1 if you have the `madvise' function. */ +#define HAVE_MADVISE 1 + +/* Define to 1 if you have the `mallinfo' function. */ +#define HAVE_MALLINFO 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define to 1 if you have the `memcpy' function. */ +#define HAVE_MEMCPY 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mkstemp' function. */ +#define HAVE_MKSTEMP 1 + +/* Define to 1 if you have a working `mmap' system call that supports + MAP_PRIVATE. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the `opendir' function. */ +#define HAVE_OPENDIR 1 + +/* Define to 1 if you have a pcre library (-lpcre). */ +#define HAVE_PCRE 1 + +/* Define to 1 if you have the `poll' function. */ +#define HAVE_POLL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* "pragma pack" */ +/* #undef HAVE_PRAGMA_PACK */ + +/* "pragma pack hppa/hp-ux style" */ +/* #undef HAVE_PRAGMA_PACK_HPPA */ + +/* Define if libtool can extract symbol lists from object files. */ +#define HAVE_PRELOADED_SYMBOLS 1 + +/* Define to 1 if you have the header file */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the `pthread_yield' function. */ +#define HAVE_PTHREAD_YIELD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_PWD_H 1 + +/* Define to 1 if you have the `readdir' function. */ +#define HAVE_READDIR 1 + +/* Define to 1 if you have the `recvmsg' function. */ +#define HAVE_RECVMSG 1 + +/* have resolv.h */ +#define HAVE_RESOLV_H 1 + +/* Define signed right shift implementation */ +#define HAVE_SAR 1 + +/* Define to 1 if you have the `sched_yield' function. */ +#define HAVE_SCHED_YIELD 1 + +/* Define to 1 if you have the `sendmsg' function. */ +#define HAVE_SENDMSG 1 + +/* Define to 1 if you have the `setgroups' function. */ +#define HAVE_SETGROUPS 1 + +/* Define to 1 if you have the `setsid' function. */ +#define HAVE_SETSID 1 + +/* Define if you have the shl_load function. */ +/* #undef HAVE_SHL_LOAD */ + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* enable stat64 */ +#define HAVE_STAT64 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDBOOL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strcasestr' function. */ +#define HAVE_STRCASESTR 1 + +/* Define to 1 if you have the `strerror_r' function. */ +#define HAVE_STRERROR_R 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +/* #undef HAVE_STRLCAT */ + +/* Define to 1 if you have the `strlcpy' function. */ +/* #undef HAVE_STRLCPY */ + +/* Define to 1 if you have the `strndup' function. */ +#define HAVE_STRNDUP 1 + +/* using internal strn functions */ +/* #undef HAVE_STRNI */ + +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the `strnstr' function. */ +/* #undef HAVE_STRNSTR */ + +/* Define to 1 if sysconf(_SC_PAGESIZE) is available */ +#define HAVE_SYSCONF_SC_PAGESIZE 1 + +/* Define to 1 if you have the `sysctlbyname' function. */ +/* #undef HAVE_SYSCTLBYNAME */ + +/* systemd is supported */ +#define HAVE_SYSTEMD /**/ + +/* Use private fts() implementation which is LFS safe */ +#define HAVE_SYSTEM_LFS_FTS 1 + +/* don't link against system-wide tomsfastmath library */ +#define HAVE_SYSTEM_TOMSFASTMATH 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_CDEFS_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DL_H */ + +/* use fanotify */ +#define HAVE_SYS_FANOTIFY_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_FILIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INTTYPES_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INT_TYPES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_QUEUE_H 1 + +/* "have " */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIMES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define to 1 if you have the `timegm' function. */ +#define HAVE_TIMEGM 1 + +/* Define this if uname(2) is POSIX */ +#define HAVE_UNAME_SYSCALL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `vsnprintf' function. */ +#define HAVE_VSNPRINTF 1 + +/* This value is set to 1 to indicate that the system argz facility works */ +#define HAVE_WORKING_ARGZ 1 + +/* yara sources are compiled in */ +#define HAVE_YARA 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ZLIB_H 1 + +/* For internal use only - DO NOT DEFINE */ +/* #undef HAVE__INTERNAL__SHA_COLLECT */ + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + +/* "Full clamav library version number" */ +#define LIBCLAMAV_FULLVER "9.0.5" + +/* "Major clamav library version number" */ +#define LIBCLAMAV_MAJORVER 9 + +/* "Full freshclam library version number" */ +#define LIBFRESHCLAM_FULLVER "2.0.1" + +/* "Major freshclam library version number" */ +#define LIBFRESHCLAM_MAJORVER 2 + +/* Define if the OS needs help to load dependent libraries for dlopen(). */ +/* #undef LTDL_DLOPEN_DEPLIBS */ + +/* Define to the system default library search path. */ +#define LT_DLSEARCH_PATH "/lib:/usr/lib:/usr/lib/x86_64-linux-gnu/libfakeroot:/usr/local/lib:/opt/mysql/lib:/usr/local/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/lib32:/usr/lib32:/libx32:/usr/libx32" + +/* The archive extension */ +#define LT_LIBEXT "a" + +/* The archive prefix */ +#define LT_LIBPREFIX "lib" + +/* Define to the extension used for runtime loadable modules, say, ".so". */ +#define LT_MODULE_EXT ".so" + +/* Define to the name of the environment variable that determines the run-time + module search path. */ +#define LT_MODULE_PATH_VAR "LD_LIBRARY_PATH" + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#define LT_OBJDIR ".libs/" + +/* Define to the shared library suffix, say, ".dylib". */ +/* #undef LT_SHARED_EXT */ + +/* Define to the shared archive member specification, say "(shr.o)". */ +/* #undef LT_SHARED_LIB_MEMBER */ + +/* disable assertions */ +#define NDEBUG 1 + +/* Define if dlsym() requires a leading underscore in symbol names. */ +/* #undef NEED_USCORE */ + +/* bzip funtions do not have bz2 prefix */ +/* #undef NOBZ2PREFIX */ + +/* "no fd_set" */ +/* #undef NO_FD_SET */ + +/* Name of package */ +#define PACKAGE PACKAGE_NAME + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "https://github.com/Cisco-Talos/clamav/issues" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "ClamAV" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "ClamAV 0.103.7" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "clamav" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "https://www.clamav.net/" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "0.103.7" + +/* Libprelude support enabled */ +/* #undef PRELUDE */ + +/* Define whether application use libtool >= 2.0 */ +/* #undef PRELUDE_APPLICATION_USE_LIBTOOL2 */ + +/* scan buffer size */ +#define SCANBUFF 131072 + +/* Define to 1 if the `setpgrp' function takes no argument. */ +#define SETPGRP_VOID 1 + +/* The number of bytes in type int */ +#define SIZEOF_INT 4 + +/* The number of bytes in type long */ +#define SIZEOF_LONG 8 + +/* The number of bytes in type long long */ +#define SIZEOF_LONG_LONG 8 + +/* The number of bytes in type short */ +#define SIZEOF_SHORT 2 + +/* The number of bytes in type void * */ +#define SIZEOF_VOID_P 8 + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Support for IPv6 */ +#define SUPPORT_IPv6 1 + +/* enable memory pools */ +#define USE_MPOOL 1 + +/* use syslog */ +#define USE_SYSLOG 1 + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Define to 1 if you using the pcre2 library. */ +#define USING_PCRE2 1 + +/* Version number of package */ +#define VERSION "0.103.7" + +/* Version suffix for package */ +#define VERSION_SUFFIX "" + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +#define YYTEXT_POINTER 1 + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +/* #undef _LARGEFILE_SOURCE */ + +/* Define for large files, on AIX-style hosts. */ +/* #undef _LARGE_FILES */ + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* POSIX compatibility */ +/* #undef _POSIX_PII_SOCKET */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* thread safe */ +#define _REENTRANT 1 + +/* thread safe */ +/* #undef _THREAD_SAFE */ + +/* Define so that glibc/gnulib argp.h does not typedef error_t. */ +/* #undef __error_t_defined */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to a type to use for 'error_t' if it is not otherwise available. */ +/* #undef error_t */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ +#define restrict __restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif + +/* Define to "int" if does not define. */ +/* #undef socklen_t */ + +#include "platform.h" diff --git a/clamscan/clamscan b/clamscan/clamscan new file mode 100644 index 0000000..c2ff68c --- /dev/null +++ b/clamscan/clamscan @@ -0,0 +1,210 @@ +#! /bin/bash + +# clamscan - temporary wrapper script for .libs/clamscan +# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-15 +# +# The clamscan program cannot be directly executed until all the libtool +# libraries that it depends on are installed. +# +# This wrapper script should never be moved out of the build directory. +# If it is, it will not operate correctly. + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +sed_quote_subst='s|\([`"$\\]\)|\\\1|g' + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +relink_command="" + +# This environment variable determines our operation mode. +if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then + # install mode needs the following variables: + generated_by_libtool_version='2.4.6' + notinst_deplibs=' ../libclamav/libclamav.la' +else + # When we are sourced in execute mode, $file and $ECHO are already set. + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + file="$0" + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + ECHO="printf %s\\n" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ that is used only on +# windows platforms, and (c) all begin with the string --lt- +# (application programs are unlikely to have options that match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's ../libtool value, followed by no. +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=$0 + shift + for lt_opt + do + case "$lt_opt" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%/[^/]*$%%'` + test "X$lt_dump_D" = "X$lt_script_arg0" && lt_dump_D=. + lt_dump_F=`$ECHO "X$lt_script_arg0" | /bin/sed -e 's/^X//' -e 's%^.*/%%'` + cat "$lt_dump_D/$lt_dump_F" + exit 0 + ;; + --lt-*) + $ECHO "Unrecognized --lt- option: '$lt_opt'" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n "$lt_option_debug"; then + echo "clamscan:clamscan:$LINENO: libtool wrapper (GNU libtool) 2.4.6 Debian-2.4.6-15" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + $ECHO "clamscan:clamscan:$LINENO: newargv[$lt_dump_args_N]: $lt_arg" + lt_dump_args_N=`expr $lt_dump_args_N + 1` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ + + if test -n "$lt_option_debug"; then + $ECHO "clamscan:clamscan:$LINENO: newargv[0]: $progdir/$program" 1>&2 + func_lt_dump_args ${1+"$@"} 1>&2 + fi + exec "$progdir/$program" ${1+"$@"} + + $ECHO "$0: cannot exec $program $*" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from $@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + case " $* " in + *\ --lt-*) + for lt_wr_arg + do + case $lt_wr_arg in + --lt-*) ;; + *) set x "$@" "$lt_wr_arg"; shift;; + esac + shift + done ;; + esac + func_exec_program_core ${1+"$@"} +} + + # Parse options + func_parse_lt_options "$0" ${1+"$@"} + + # Find the directory that this script lives in. + thisdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + test "x$thisdir" = "x$file" && thisdir=. + + # Follow symbolic links until we get to the real thisdir. + file=`ls -ld "$file" | /bin/sed -n 's/.*-> //p'` + while test -n "$file"; do + destdir=`$ECHO "$file" | /bin/sed 's%/[^/]*$%%'` + + # If there was a directory component, then change thisdir. + if test "x$destdir" != "x$file"; then + case "$destdir" in + [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;; + *) thisdir="$thisdir/$destdir" ;; + esac + fi + + file=`$ECHO "$file" | /bin/sed 's%^.*/%%'` + file=`ls -ld "$thisdir/$file" | /bin/sed -n 's/.*-> //p'` + done + + # Usually 'no', except on cygwin/mingw when embedded into + # the cwrapper. + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no + if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then + # special case for '.' + if test "$thisdir" = "."; then + thisdir=`pwd` + fi + # remove .libs from thisdir + case "$thisdir" in + *[\\/].libs ) thisdir=`$ECHO "$thisdir" | /bin/sed 's%[\\/][^\\/]*$%%'` ;; + .libs ) thisdir=. ;; + esac + fi + + # Try to get the absolute directory name. + absdir=`cd "$thisdir" && pwd` + test -n "$absdir" && thisdir="$absdir" + + program='clamscan' + progdir="$thisdir/.libs" + + + if test -f "$progdir/$program"; then + # Add our own library path to LD_LIBRARY_PATH + LD_LIBRARY_PATH="/root/clamav/clamav-0.103.7+dfsg/libclamav/.libs:$LD_LIBRARY_PATH" + + # Some systems cannot cope with colon-terminated LD_LIBRARY_PATH + # The second colon is a workaround for a bug in BeOS R4 sed + LD_LIBRARY_PATH=`$ECHO "$LD_LIBRARY_PATH" | /bin/sed 's/::*$//'` + + export LD_LIBRARY_PATH + + if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then + # Run the actual program with our arguments. + func_exec_program ${1+"$@"} + fi + else + # The program doesn't exist. + $ECHO "$0: error: '$progdir/$program' does not exist" 1>&2 + $ECHO "This script is just a wrapper for $program." 1>&2 + $ECHO "See the libtool documentation for more information." 1>&2 + exit 1 + fi +fi diff --git a/clamscan/clamscan.c b/clamscan/clamscan.c new file mode 100644 index 0000000..181ef09 --- /dev/null +++ b/clamscan/clamscan.c @@ -0,0 +1,340 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2007-2013 Sourcefire, Inc. + * + * Authors: Tomasz Kojm + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#include +#include +#include +#include +#include + +#ifdef HAVE_UNISTD_H +#include +#endif +#ifndef _WIN32 +#include +#endif +#include +#ifdef C_LINUX +#include +#endif + +// libclamav +#include "clamav.h" +#include "others.h" +#include "str.h" + +// shared +#include "misc.h" +#include "output.h" +#include "actions.h" +#include "optparser.h" + +#include "global.h" +#include "manager.h" + +void help(void); + +struct s_info info; +short recursion = 0, bell = 0; +short printinfected = 0, printclean = 1; + +int _clamscan(int argc, char **argv) +{ + int ds, dms, ret; + double mb, rmb; + struct timeval t1, t2; + time_t date_start, date_end; + + char buffer[26]; +#ifndef _WIN32 + sigset_t sigset; +#endif + struct optstruct *opts; + const struct optstruct *opt; + + if (check_flevel()) + exit(2); + +#if !defined(_WIN32) + if (!setlocale(LC_CTYPE, "")) { + mprintf("^Failed to set locale\n"); + } +#if !defined(C_BEOS) + sigemptyset(&sigset); + sigaddset(&sigset, SIGXFSZ); + sigprocmask(SIG_SETMASK, &sigset, NULL); +#endif /* !C_BEOS */ +#endif /* !_WIN32 */ + + cl_initialize_crypto(); + + if ((opts = optparse(NULL, argc, argv, 1, OPT_CLAMSCAN, 0, NULL)) == NULL) { + mprintf("!Can't parse command line options\n"); + return 2; + } + + if (optget(opts, "verbose")->enabled) { + mprintf_verbose = 1; + logg_verbose = 1; + } + + if (optget(opts, "quiet")->enabled) + mprintf_quiet = 1; + + if (optget(opts, "stdout")->enabled) + mprintf_stdout = 1; + + if (optget(opts, "debug")->enabled) { +#if defined(C_LINUX) + /* njh@bandsman.co.uk: create a dump if needed */ + struct rlimit rlim; + + rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY; + if (setrlimit(RLIMIT_CORE, &rlim) < 0) + perror("setrlimit"); +#endif + cl_debug(); /* enable debug messages */ + } + + if (optget(opts, "gen-mdb")->enabled) { + cl_always_gen_section_hash(); + } + + if (optget(opts, "version")->enabled) { + print_version(optget(opts, "database")->strarg); + optfree(opts); + return 0; + } + + if (optget(opts, "help")->enabled) { + optfree(opts); + help(); + return 0; + } + + if (optget(opts, "recursive")->enabled) + recursion = 1; + + if (optget(opts, "infected")->enabled) + printinfected = 1; + + if (optget(opts, "suppress-ok-results")->enabled) + printclean = 0; + + if (optget(opts, "bell")->enabled) + bell = 1; + + /* initialize logger */ + if ((opt = optget(opts, "log"))->enabled) { + logg_file = opt->strarg; + if (logg("#\n-------------------------------------------------------------------------------\n\n")) { + mprintf("!Problem with internal logger.\n"); + optfree(opts); + return 2; + } + } else + logg_file = NULL; + + if (actsetup(opts)) { + optfree(opts); + logg_close(); + exit(2); + } + + memset(&info, 0, sizeof(struct s_info)); + + date_start = time(NULL); + gettimeofday(&t1, NULL); + + ret = scanmanager(opts); + + if (!optget(opts, "no-summary")->enabled) { + struct tm tmp; + + date_end = time(NULL); + gettimeofday(&t2, NULL); + ds = t2.tv_sec - t1.tv_sec; + dms = t2.tv_usec - t1.tv_usec; + ds -= (dms < 0) ? (1) : (0); + dms += (dms < 0) ? (1000000) : (0); + logg("\n----------- SCAN SUMMARY -----------\n"); + logg("Known viruses: %u\n", info.sigs); + logg("Engine version: %s\n", get_version()); + logg("Scanned directories: %u\n", info.dirs); + logg("Scanned files: %u\n", info.files); + logg("Infected files: %u\n", info.ifiles); + if (info.errors) + logg("Total errors: %u\n", info.errors); + if (notremoved) { + logg("Not removed: %u\n", notremoved); + } + if (notmoved) { + logg("Not %s: %u\n", optget(opts, "copy")->enabled ? "moved" : "copied", notmoved); + } + mb = info.blocks * (CL_COUNT_PRECISION / 1024) / 1024.0; + logg("Data scanned: %2.2lf MB\n", mb); + rmb = info.rblocks * (CL_COUNT_PRECISION / 1024) / 1024.0; + logg("Data read: %2.2lf MB (ratio %.2f:1)\n", rmb, info.rblocks ? (double)info.blocks / (double)info.rblocks : 0); + logg("Time: %u.%3.3u sec (%u m %u s)\n", ds, dms / 1000, ds / 60, ds % 60); + +#ifdef _WIN32 + if (0 != localtime_s(&tmp, &date_start)) { +#else + if (!localtime_r(&date_start, &tmp)) { +#endif + logg("!Failed to get local time for Start Date.\n"); + } + strftime(buffer, sizeof(buffer), "%Y:%m:%d %H:%M:%S", &tmp); + logg("Start Date: %s\n", buffer); + +#ifdef _WIN32 + if (0 != localtime_s(&tmp, &date_end)) { +#else + if (!localtime_r(&date_end, &tmp)) { +#endif + logg("!Failed to get local time for End Date.\n"); + } + strftime(buffer, sizeof(buffer), "%Y:%m:%d %H:%M:%S", &tmp); + logg("End Date: %s\n", buffer); + } + + optfree(opts); + + return ret; +} + +void help(void) +{ + mprintf_stdout = 1; + + mprintf("\n"); + mprintf(" Clam AntiVirus: Scanner %s\n", get_version()); + printf(" By The ClamAV Team: https://www.clamav.net/about.html#credits\n"); + printf(" (C) 2022 Cisco Systems, Inc.\n"); + mprintf("\n"); + mprintf(" clamscan [options] [file/directory/-]\n"); + mprintf("\n"); + mprintf(" --help -h Show this help\n"); + mprintf(" --version -V Print version number\n"); + mprintf(" --verbose -v Be verbose\n"); + mprintf(" --archive-verbose -a Show filenames inside scanned archives\n"); + mprintf(" --debug Enable libclamav's debug messages\n"); + mprintf(" --quiet Only output error messages\n"); + mprintf(" --stdout Write to stdout instead of stderr. Does not affect 'debug' messages.\n"); + mprintf(" --no-summary Disable summary at end of scanning\n"); + mprintf(" --infected -i Only print infected files\n"); + mprintf(" --suppress-ok-results -o Skip printing OK files\n"); + mprintf(" --bell Sound bell on virus detection\n"); + mprintf("\n"); + mprintf(" --tempdir=DIRECTORY Create temporary files in DIRECTORY\n"); + mprintf(" --leave-temps[=yes/no(*)] Do not remove temporary files\n"); + mprintf(" --gen-json[=yes/no(*)] Generate JSON description of scanned file(s). JSON will be printed and also-\n"); + mprintf(" dropped to the temp directory if --leave-temps is enabled.\n"); + mprintf(" --database=FILE/DIR -d FILE/DIR Load virus database from FILE or load all supported db files from DIR\n"); + mprintf(" --official-db-only[=yes/no(*)] Only load official signatures\n"); + mprintf(" --log=FILE -l FILE Save scan report to FILE\n"); + mprintf(" --recursive[=yes/no(*)] -r Scan subdirectories recursively\n"); + mprintf(" --allmatch[=yes/no(*)] -z Continue scanning within file after finding a match\n"); + mprintf(" --cross-fs[=yes(*)/no] Scan files and directories on other filesystems\n"); + mprintf(" --follow-dir-symlinks[=0/1(*)/2] Follow directory symlinks (0 = never, 1 = direct, 2 = always)\n"); + mprintf(" --follow-file-symlinks[=0/1(*)/2] Follow file symlinks (0 = never, 1 = direct, 2 = always)\n"); + mprintf(" --file-list=FILE -f FILE Scan files from FILE\n"); + mprintf(" --remove[=yes/no(*)] Remove infected files. Be careful!\n"); + mprintf(" --move=DIRECTORY Move infected files into DIRECTORY\n"); + mprintf(" --copy=DIRECTORY Copy infected files into DIRECTORY\n"); + mprintf(" --exclude=REGEX Don't scan file names matching REGEX\n"); + mprintf(" --exclude-dir=REGEX Don't scan directories matching REGEX\n"); + mprintf(" --include=REGEX Only scan file names matching REGEX\n"); + mprintf(" --include-dir=REGEX Only scan directories matching REGEX\n"); + mprintf("\n"); + mprintf(" --bytecode[=yes(*)/no] Load bytecode from the database\n"); + mprintf(" --bytecode-unsigned[=yes/no(*)] Load unsigned bytecode\n"); + mprintf(" **Caution**: You should NEVER run bytecode signatures from untrusted sources.\n"); + mprintf(" Doing so may result in arbitrary code execution.\n"); + mprintf(" --bytecode-timeout=N Set bytecode timeout (in milliseconds)\n"); + mprintf(" --statistics[=none(*)/bytecode/pcre] Collect and print execution statistics\n"); + mprintf(" --detect-pua[=yes/no(*)] Detect Possibly Unwanted Applications\n"); + mprintf(" --exclude-pua=CAT Skip PUA sigs of category CAT\n"); + mprintf(" --include-pua=CAT Load PUA sigs of category CAT\n"); + mprintf(" --detect-structured[=yes/no(*)] Detect structured data (SSN, Credit Card)\n"); + mprintf(" --structured-ssn-format=X SSN format (0=normal,1=stripped,2=both)\n"); + mprintf(" --structured-ssn-count=N Min SSN count to generate a detect\n"); + mprintf(" --structured-cc-count=N Min CC count to generate a detect\n"); + mprintf(" --structured-cc-mode=X CC mode (0=credit debit and private label, 1=credit cards only\n"); + mprintf(" --scan-mail[=yes(*)/no] Scan mail files\n"); + mprintf(" --phishing-sigs[=yes(*)/no] Enable email signature-based phishing detection\n"); + mprintf(" --phishing-scan-urls[=yes(*)/no] Enable URL signature-based phishing detection\n"); + mprintf(" --heuristic-alerts[=yes(*)/no] Heuristic alerts\n"); + mprintf(" --heuristic-scan-precedence[=yes/no(*)] Stop scanning as soon as a heuristic match is found\n"); + mprintf(" --normalize[=yes(*)/no] Normalize html, script, and text files. Use normalize=no for yara compatibility\n"); + mprintf(" --scan-pe[=yes(*)/no] Scan PE files\n"); + mprintf(" --scan-elf[=yes(*)/no] Scan ELF files\n"); + mprintf(" --scan-ole2[=yes(*)/no] Scan OLE2 containers\n"); + mprintf(" --scan-pdf[=yes(*)/no] Scan PDF files\n"); + mprintf(" --scan-swf[=yes(*)/no] Scan SWF files\n"); + mprintf(" --scan-html[=yes(*)/no] Scan HTML files\n"); + mprintf(" --scan-xmldocs[=yes(*)/no] Scan xml-based document files\n"); + mprintf(" --scan-hwp3[=yes(*)/no] Scan HWP3 files\n"); + mprintf(" --scan-archive[=yes(*)/no] Scan archive files (supported by libclamav)\n"); + mprintf(" --alert-broken[=yes/no(*)] Alert on broken executable files (PE & ELF)\n"); + mprintf(" --alert-broken-media[=yes/no(*)] Alert on broken graphics files (JPEG, TIFF, PNG, GIF)\n"); + mprintf(" --alert-encrypted[=yes/no(*)] Alert on encrypted archives and documents\n"); + mprintf(" --alert-encrypted-archive[=yes/no(*)] Alert on encrypted archives\n"); + mprintf(" --alert-encrypted-doc[=yes/no(*)] Alert on encrypted documents\n"); + mprintf(" --alert-macros[=yes/no(*)] Alert on OLE2 files containing VBA macros\n"); + mprintf(" --alert-exceeds-max[=yes/no(*)] Alert on files that exceed max file size, max scan size, or max recursion limit\n"); + mprintf(" --alert-phishing-ssl[=yes/no(*)] Alert on emails containing SSL mismatches in URLs\n"); + mprintf(" --alert-phishing-cloak[=yes/no(*)] Alert on emails containing cloaked URLs\n"); + mprintf(" --alert-partition-intersection[=yes/no(*)] Alert on raw DMG image files containing partition intersections\n"); + mprintf(" --nocerts Disable authenticode certificate chain verification in PE files\n"); + mprintf(" --dumpcerts Dump authenticode certificate chain in PE files\n"); + mprintf("\n"); + mprintf(" --max-scantime=#n Scan time longer than this will be skipped and assumed clean (milliseconds)\n"); + mprintf(" --max-filesize=#n Files larger than this will be skipped and assumed clean\n"); + mprintf(" --max-scansize=#n The maximum amount of data to scan for each container file (**)\n"); + mprintf(" --max-files=#n The maximum number of files to scan for each container file (**)\n"); + mprintf(" --max-recursion=#n Maximum archive recursion level for container file (**)\n"); + mprintf(" --max-dir-recursion=#n Maximum directory recursion level\n"); + mprintf(" --max-embeddedpe=#n Maximum size file to check for embedded PE\n"); + mprintf(" --max-htmlnormalize=#n Maximum size of HTML file to normalize\n"); + mprintf(" --max-htmlnotags=#n Maximum size of normalized HTML file to scan\n"); + mprintf(" --max-scriptnormalize=#n Maximum size of script file to normalize\n"); + mprintf(" --max-ziptypercg=#n Maximum size zip to type reanalyze\n"); + mprintf(" --max-partitions=#n Maximum number of partitions in disk image to be scanned\n"); + mprintf(" --max-iconspe=#n Maximum number of icons in PE file to be scanned\n"); + mprintf(" --max-rechwp3=#n Maximum recursive calls to HWP3 parsing function\n"); +#if HAVE_PCRE + mprintf(" --pcre-match-limit=#n Maximum calls to the PCRE match function.\n"); + mprintf(" --pcre-recmatch-limit=#n Maximum recursive calls to the PCRE match function.\n"); + mprintf(" --pcre-max-filesize=#n Maximum size file to perform PCRE subsig matching.\n"); +#endif /* HAVE_PCRE */ + mprintf(" --disable-cache Disable caching and cache checks for hash sums of scanned files.\n"); + mprintf("\n"); + mprintf("Pass in - as the filename for stdin.\n"); + mprintf("\n"); + mprintf("(*) Default scan settings\n"); + mprintf("(**) Certain files (e.g. documents, archives, etc.) may in turn contain other\n"); + mprintf(" files inside. The above options ensure safe processing of this kind of data.\n\n"); +} diff --git a/clamscan/clamscan.o b/clamscan/clamscan.o new file mode 100644 index 0000000..8af7f86 Binary files /dev/null and b/clamscan/clamscan.o differ diff --git a/clamscan/global.h b/clamscan/global.h new file mode 100644 index 0000000..51efaf0 --- /dev/null +++ b/clamscan/global.h @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2007-2013 Sourcefire, Inc. + * + * Authors: Tomasz Kojm + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef __GLOBAL_H +#define __GLOBAL_H + +struct s_info { + unsigned int sigs; /* number of signatures */ + unsigned int dirs; /* number of scanned directories */ + unsigned int files; /* number of scanned files */ + unsigned int ifiles; /* number of infected files */ + unsigned int errors; /* number of errors */ + unsigned long int blocks; /* number of *scanned* 16kb blocks */ + unsigned long int rblocks; /* number of *read* 16kb blocks */ +}; + +extern struct s_info info; +extern short recursion, bell; +extern short printinfected, printclean; + +#endif diff --git a/clamscan/libclamav/7z/7z.h b/clamscan/libclamav/7z/7z.h new file mode 100644 index 0000000..01c4cac --- /dev/null +++ b/clamscan/libclamav/7z/7z.h @@ -0,0 +1,203 @@ +/* 7z.h -- 7z interface +2010-03-11 : Igor Pavlov : Public domain */ + +#ifndef __7Z_H +#define __7Z_H + +#include "7zBuf.h" + +EXTERN_C_BEGIN + +#define k7zStartHeaderSize 0x20 +#define k7zSignatureSize 6 +extern Byte k7zSignature[k7zSignatureSize]; +#define k7zMajorVersion 0 + +enum EIdEnum +{ + k7zIdEnd, + k7zIdHeader, + k7zIdArchiveProperties, + k7zIdAdditionalStreamsInfo, + k7zIdMainStreamsInfo, + k7zIdFilesInfo, + k7zIdPackInfo, + k7zIdUnpackInfo, + k7zIdSubStreamsInfo, + k7zIdSize, + k7zIdCRC, + k7zIdFolder, + k7zIdCodersUnpackSize, + k7zIdNumUnpackStream, + k7zIdEmptyStream, + k7zIdEmptyFile, + k7zIdAnti, + k7zIdName, + k7zIdCTime, + k7zIdATime, + k7zIdMTime, + k7zIdWinAttributes, + k7zIdComment, + k7zIdEncodedHeader, + k7zIdStartPos, + k7zIdDummy +}; + +typedef struct +{ + UInt32 NumInStreams; + UInt32 NumOutStreams; + UInt64 MethodID; + CBuf Props; +} CSzCoderInfo; + +void SzCoderInfo_Init(CSzCoderInfo *p); +void SzCoderInfo_Free(CSzCoderInfo *p, ISzAlloc *alloc); + +typedef struct +{ + UInt32 InIndex; + UInt32 OutIndex; +} CSzBindPair; + +typedef struct +{ + CSzCoderInfo *Coders; + CSzBindPair *BindPairs; + UInt32 *PackStreams; + UInt64 *UnpackSizes; + UInt32 NumCoders; + UInt32 NumBindPairs; + UInt32 NumPackStreams; + int UnpackCRCDefined; + UInt32 UnpackCRC; + + UInt32 NumUnpackStreams; +} CSzFolder; + +void SzFolder_Init(CSzFolder *p); +UInt64 SzFolder_GetUnpackSize(CSzFolder *p); +int SzFolder_FindBindPairForInStream(CSzFolder *p, UInt32 inStreamIndex); +UInt32 SzFolder_GetNumOutStreams(CSzFolder *p); +UInt64 SzFolder_GetUnpackSize(CSzFolder *p); + +SRes SzFolder_Decode(const CSzFolder *folder, const UInt64 *packSizes, + ILookInStream *stream, UInt64 startPos, + Byte *outBuffer, size_t outSize, ISzAlloc *allocMain); + +typedef struct +{ + UInt32 Low; + UInt32 High; +} CNtfsFileTime; + +typedef struct +{ + CNtfsFileTime MTime; + UInt64 Size; + UInt32 Crc; + UInt32 Attrib; + Byte HasStream; + Byte IsDir; + Byte IsAnti; + Byte CrcDefined; + Byte MTimeDefined; + Byte AttribDefined; +} CSzFileItem; + +void SzFile_Init(CSzFileItem *p); + +typedef struct +{ + UInt64 *PackSizes; + Byte *PackCRCsDefined; + UInt32 *PackCRCs; + CSzFolder *Folders; + CSzFileItem *Files; + UInt32 NumPackStreams; + UInt32 NumFolders; + UInt32 NumFiles; +} CSzAr; + +void SzAr_Init(CSzAr *p); +void SzAr_Free(CSzAr *p, ISzAlloc *alloc); + + +/* + SzExtract extracts file from archive + + *outBuffer must be 0 before first call for each new archive. + + Extracting cache: + If you need to decompress more than one file, you can send + these values from previous call: + *blockIndex, + *outBuffer, + *outBufferSize + You can consider "*outBuffer" as cache of solid block. If your archive is solid, + it will increase decompression speed. + + If you use external function, you can declare these 3 cache variables + (blockIndex, outBuffer, outBufferSize) as static in that external function. + + Free *outBuffer and set *outBuffer to 0, if you want to flush cache. +*/ + +typedef struct +{ + CSzAr db; + + UInt64 startPosAfterHeader; + UInt64 dataPos; + + UInt32 *FolderStartPackStreamIndex; + UInt64 *PackStreamStartPositions; + UInt32 *FolderStartFileIndex; + UInt32 *FileIndexToFolderIndexMap; + + size_t *FileNameOffsets; /* in 2-byte steps */ + CBuf FileNames; /* UTF-16-LE */ +} CSzArEx; + +void SzArEx_Init(CSzArEx *p); +void SzArEx_Free(CSzArEx *p, ISzAlloc *alloc); +UInt64 SzArEx_GetFolderStreamPos(const CSzArEx *p, UInt32 folderIndex, UInt32 indexInFolder); +int SzArEx_GetFolderFullPackSize(const CSzArEx *p, UInt32 folderIndex, UInt64 *resSize); + +/* +if dest == NULL, the return value specifies the required size of the buffer, + in 16-bit characters, including the null-terminating character. +if dest != NULL, the return value specifies the number of 16-bit characters that + are written to the dest, including the null-terminating character. */ + +size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest); + +SRes SzArEx_Extract( + const CSzArEx *db, + ILookInStream *inStream, + UInt32 fileIndex, /* index of file */ + UInt32 *blockIndex, /* index of solid block */ + Byte **outBuffer, /* pointer to pointer to output buffer (allocated with allocMain) */ + size_t *outBufferSize, /* buffer size for output buffer */ + size_t *offset, /* offset of stream for required file in *outBuffer */ + size_t *outSizeProcessed, /* size of file in *outBuffer */ + ISzAlloc *allocMain, + ISzAlloc *allocTemp); + + +/* +SzArEx_Open Errors: +SZ_ERROR_NO_ARCHIVE +SZ_ERROR_ARCHIVE +SZ_ERROR_UNSUPPORTED +SZ_ERROR_MEM +SZ_ERROR_CRC +SZ_ERROR_INPUT_EOF +SZ_ERROR_FAIL +*/ + +SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, ISzAlloc *allocMain, ISzAlloc *allocTemp); + +EXTERN_C_END + +#endif diff --git a/clamscan/libclamav/7z/7zAlloc.c b/clamscan/libclamav/7z/7zAlloc.c new file mode 100644 index 0000000..d4211dc --- /dev/null +++ b/clamscan/libclamav/7z/7zAlloc.c @@ -0,0 +1,82 @@ +/* 7zAlloc.c -- Allocation functions +2010-10-29 : Igor Pavlov : Public domain */ + +#include "7zAlloc.h" + +#if defined(_WIN32) +#include +#include +#endif + +/* #define _SZ_ALLOC_DEBUG */ +/* use _SZ_ALLOC_DEBUG to debug alloc/free operations */ + +#ifdef _SZ_ALLOC_DEBUG + +#ifdef _WIN32 +#include +#endif + +#include +int g_allocCount = 0; +int g_allocCountTemp = 0; + +#endif +#include "clamav.h" + +void *SzAlloc(void *p, size_t size) +{ + UNUSEDPARAM(p); + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc %10d bytes; count = %10d", size, g_allocCount); + g_allocCount++; + #endif + return malloc(size); +} + +void SzFree(void *p, void *address) +{ + UNUSEDPARAM(p); + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + { + g_allocCount--; + fprintf(stderr, "\nFree; count = %10d", g_allocCount); + } + #endif + free(address); +} + +void *SzAllocTemp(void *p, size_t size) +{ + UNUSEDPARAM(p); + if (size == 0) + return 0; + #ifdef _SZ_ALLOC_DEBUG + fprintf(stderr, "\nAlloc_temp %10d bytes; count = %10d", size, g_allocCountTemp); + g_allocCountTemp++; + #ifdef _WIN32 + return HeapAlloc(GetProcessHeap(), 0, size); + #endif + #endif + return malloc(size); +} + +void SzFreeTemp(void *p, void *address) +{ + UNUSEDPARAM(p); + #ifdef _SZ_ALLOC_DEBUG + if (address != 0) + { + g_allocCountTemp--; + fprintf(stderr, "\nFree_temp; count = %10d", g_allocCountTemp); + } + #ifdef _WIN32 + HeapFree(GetProcessHeap(), 0, address); + return; + #endif + #endif + free(address); +} diff --git a/clamscan/libclamav/7z/7zAlloc.h b/clamscan/libclamav/7z/7zAlloc.h new file mode 100644 index 0000000..3344e93 --- /dev/null +++ b/clamscan/libclamav/7z/7zAlloc.h @@ -0,0 +1,15 @@ +/* 7zAlloc.h -- Allocation functions +2010-10-29 : Igor Pavlov : Public domain */ + +#ifndef __7Z_ALLOC_H +#define __7Z_ALLOC_H + +#include + +void *SzAlloc(void *p, size_t size); +void SzFree(void *p, void *address); + +void *SzAllocTemp(void *p, size_t size); +void SzFreeTemp(void *p, void *address); + +#endif diff --git a/clamscan/libclamav/7z/7zBuf.c b/clamscan/libclamav/7z/7zBuf.c new file mode 100644 index 0000000..14e7f4e --- /dev/null +++ b/clamscan/libclamav/7z/7zBuf.c @@ -0,0 +1,36 @@ +/* 7zBuf.c -- Byte Buffer +2008-03-28 +Igor Pavlov +Public domain */ + +#include "7zBuf.h" + +void Buf_Init(CBuf *p) +{ + p->data = 0; + p->size = 0; +} + +int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc) +{ + p->size = 0; + if (size == 0) + { + p->data = 0; + return 1; + } + p->data = (Byte *)alloc->Alloc(alloc, size); + if (p->data != 0) + { + p->size = size; + return 1; + } + return 0; +} + +void Buf_Free(CBuf *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->data); + p->data = 0; + p->size = 0; +} diff --git a/clamscan/libclamav/7z/7zBuf.h b/clamscan/libclamav/7z/7zBuf.h new file mode 100644 index 0000000..e9f2f31 --- /dev/null +++ b/clamscan/libclamav/7z/7zBuf.h @@ -0,0 +1,39 @@ +/* 7zBuf.h -- Byte Buffer +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __7Z_BUF_H +#define __7Z_BUF_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct +{ + Byte *data; + size_t size; +} CBuf; + +void Buf_Init(CBuf *p); +int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc); +void Buf_Free(CBuf *p, ISzAlloc *alloc); + +typedef struct +{ + Byte *data; + size_t size; + size_t pos; +} CDynBuf; + +void DynBuf_Construct(CDynBuf *p); +void DynBuf_SeekToBeg(CDynBuf *p); +int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc); +void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/clamscan/libclamav/7z/7zBuf2.c b/clamscan/libclamav/7z/7zBuf2.c new file mode 100644 index 0000000..a324d04 --- /dev/null +++ b/clamscan/libclamav/7z/7zBuf2.c @@ -0,0 +1,51 @@ +/* 7zBuf2.c -- Byte Buffer +2008-10-04 : Igor Pavlov : Public domain */ + +#include + +#if defined(_WIN32) +#include +#include +#endif + +#include "7zBuf.h" + +void DynBuf_Construct(CDynBuf *p) +{ + p->data = 0; + p->size = 0; + p->pos = 0; +} + +void DynBuf_SeekToBeg(CDynBuf *p) +{ + p->pos = 0; +} + +int DynBuf_Write(CDynBuf *p, const Byte *buf, size_t size, ISzAlloc *alloc) +{ + if (size > p->size - p->pos) + { + size_t newSize = p->pos + size; + Byte *data; + newSize += newSize / 4; + data = (Byte *)alloc->Alloc(alloc, newSize); + if (data == 0) + return 0; + p->size = newSize; + memcpy(data, p->data, p->pos); + alloc->Free(alloc, p->data); + p->data = data; + } + memcpy(p->data + p->pos, buf, size); + p->pos += size; + return 1; +} + +void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->data); + p->data = 0; + p->size = 0; + p->pos = 0; +} diff --git a/clamscan/libclamav/7z/7zCrc.c b/clamscan/libclamav/7z/7zCrc.c new file mode 100644 index 0000000..6e18efb --- /dev/null +++ b/clamscan/libclamav/7z/7zCrc.c @@ -0,0 +1,27 @@ +/* 7zCrc.c -- CRC32 calculation +2009-11-23 : Igor Pavlov : Public domain */ + +#if defined(_WIN32) +#include +#include +#endif + +#include "7zCrc.h" +#include "CpuArch.h" + +const UInt32 g_CrcTable[256] = { 0x0, 0x77073096, 0xee0e612c, 0x990951ba, 0x76dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0xedb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x9b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, 0x1db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x6b6b51f, 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0xf00f934, 0x9609a88e, 0xe10e9818, 0x7f6a0dbb, 0x86d3d2d, 0x91646c97, 0xe6635c01, 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, 0x3b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x4db2615, 0x73dc1683, 0xe3630b12, 0x94643b84, 0xd6d6a3e, 0x7a6a5aa8, 0xe40ecf0b, 0x9309ff9d, 0xa00ae27, 0x7d079eb1, 0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x26d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x5005713, 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0xcb61b38, 0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0xbdbdf21, 0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; + +#define CRC_UPDATE_BYTE_2(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt32 MY_FAST_CALL CrcUpdate(UInt32 v, const void *data, size_t size) +{ + const Byte *p = (const Byte *)data; + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + return v; +} + +UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size) +{ + return CrcUpdate(CRC_INIT_VAL, data, size) ^ CRC_INIT_VAL; +} diff --git a/clamscan/libclamav/7z/7zCrc.h b/clamscan/libclamav/7z/7zCrc.h new file mode 100644 index 0000000..ceb9dbb --- /dev/null +++ b/clamscan/libclamav/7z/7zCrc.h @@ -0,0 +1,22 @@ +/* 7zCrc.h -- CRC32 calculation +2009-11-21 : Igor Pavlov : Public domain */ + +#ifndef __7Z_CRC_H +#define __7Z_CRC_H + +#include "Types.h" + +EXTERN_C_BEGIN + +extern const UInt32 g_CrcTable[]; + +#define CRC_INIT_VAL 0xFFFFFFFF +#define CRC_GET_DIGEST(crc) ((crc) ^ CRC_INIT_VAL) +#define CRC_UPDATE_BYTE(crc, b) (g_CrcTable[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt32 MY_FAST_CALL CrcUpdate(UInt32 crc, const void *data, size_t size); +UInt32 MY_FAST_CALL CrcCalc(const void *data, size_t size); + +EXTERN_C_END + +#endif diff --git a/clamscan/libclamav/7z/7zCrcOpt.c b/clamscan/libclamav/7z/7zCrcOpt.c new file mode 100644 index 0000000..c9cfd9b --- /dev/null +++ b/clamscan/libclamav/7z/7zCrcOpt.c @@ -0,0 +1,39 @@ +/* 7zCrcOpt.c -- CRC32 calculation : optimized version +2009-11-23 : Igor Pavlov : Public domain */ + +#if defined(_WIN32) +#include +#include +#endif + +#include "CpuArch.h" + +#ifdef MY_CPU_LE + +#define CRC_UPDATE_BYTE_2(crc, b) (table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt32 MY_FAST_CALL CrcUpdateT4(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + const Byte *p = (const Byte *)data; + for (; size > 0 && ((unsigned)(ptrdiff_t)p & 3) != 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + for (; size >= 4; size -= 4, p += 4) + { + v ^= *(const UInt32 *)p; + v = + table[0x300 + (v & 0xFF)] ^ + table[0x200 + ((v >> 8) & 0xFF)] ^ + table[0x100 + ((v >> 16) & 0xFF)] ^ + table[0x000 + ((v >> 24))]; + } + for (; size > 0; size--, p++) + v = CRC_UPDATE_BYTE_2(v, *p); + return v; +} + +UInt32 MY_FAST_CALL CrcUpdateT8(UInt32 v, const void *data, size_t size, const UInt32 *table) +{ + return CrcUpdateT4(v, data, size, table); +} + +#endif diff --git a/clamscan/libclamav/7z/7zDec.c b/clamscan/libclamav/7z/7zDec.c new file mode 100644 index 0000000..12f8002 --- /dev/null +++ b/clamscan/libclamav/7z/7zDec.c @@ -0,0 +1,481 @@ +/* 7zDec.c -- Decoding from 7z folder +2010-11-02 : Igor Pavlov : Public domain */ + +#include + +#if defined(_WIN32) +#include +#include +#endif + +#define _7ZIP_PPMD_SUPPPORT + +#include "7z.h" + +#include "Bcj2.h" +#include "Bra.h" +#include "CpuArch.h" +#include "LzmaDec.h" +#include "Lzma2Dec.h" +#ifdef _7ZIP_PPMD_SUPPPORT +#include "Ppmd7.h" +#endif + +#define k_Copy 0 +#define k_LZMA2 0x21 +#define k_LZMA 0x30101 +#define k_BCJ 0x03030103 +#define k_PPC 0x03030205 +#define k_ARM 0x03030501 +#define k_ARMT 0x03030701 +#define k_SPARC 0x03030805 +#define k_BCJ2 0x0303011B + +#ifdef _7ZIP_PPMD_SUPPPORT + +#define k_PPMD 0x30401 + +typedef struct +{ + IByteIn p; + const Byte *cur; + const Byte *end; + const Byte *begin; + UInt64 processed; + Bool extra; + SRes res; + ILookInStream *inStream; +} CByteInToLook; + +static Byte ReadByte(void *pp) +{ + CByteInToLook *p = (CByteInToLook *)pp; + if (p->cur != p->end) + return *p->cur++; + if (p->res == SZ_OK) + { + size_t size = p->cur - p->begin; + p->processed += size; + p->res = p->inStream->Skip(p->inStream, size); + size = (1 << 25); + p->res = p->inStream->Look(p->inStream, (const void **)&p->begin, &size); + p->cur = p->begin; + p->end = p->begin + size; + if (size != 0) + return *p->cur++;; + } + p->extra = True; + return 0; +} + +static SRes SzDecodePpmd(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inStream, + Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain) +{ + CPpmd7 ppmd; + CByteInToLook s; + SRes res = SZ_OK; + + s.p.Read = ReadByte; + s.inStream = inStream; + s.begin = s.end = s.cur = NULL; + s.extra = False; + s.res = SZ_OK; + s.processed = 0; + + if (coder->Props.size != 5) + return SZ_ERROR_UNSUPPORTED; + + { + unsigned order = coder->Props.data[0]; + UInt32 memSize = GetUi32(coder->Props.data + 1); + if (order < PPMD7_MIN_ORDER || + order > PPMD7_MAX_ORDER || + memSize < PPMD7_MIN_MEM_SIZE || + memSize > PPMD7_MAX_MEM_SIZE) + return SZ_ERROR_UNSUPPORTED; + Ppmd7_Construct(&ppmd); + if (!Ppmd7_Alloc(&ppmd, memSize, allocMain)) + return SZ_ERROR_MEM; + Ppmd7_Init(&ppmd, order); + } + { + CPpmd7z_RangeDec rc; + Ppmd7z_RangeDec_CreateVTable(&rc); + rc.Stream = &s.p; + if (!Ppmd7z_RangeDec_Init(&rc)) + res = SZ_ERROR_DATA; + else if (s.extra) + res = (s.res != SZ_OK ? s.res : SZ_ERROR_DATA); + else + { + SizeT i; + for (i = 0; i < outSize; i++) + { + int sym = Ppmd7_DecodeSymbol(&ppmd, &rc.p); + if (s.extra || sym < 0) + break; + outBuffer[i] = (Byte)sym; + } + if (i != outSize) + res = (s.res != SZ_OK ? s.res : SZ_ERROR_DATA); + else if (s.processed + (s.cur - s.begin) != inSize || !Ppmd7z_RangeDec_IsFinishedOK(&rc)) + res = SZ_ERROR_DATA; + } + } + Ppmd7_Free(&ppmd, allocMain); + return res; +} + +#endif + + +static SRes SzDecodeLzma(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inStream, + Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain) +{ + CLzmaDec state; + SRes res = SZ_OK; + + LzmaDec_Construct(&state); + RINOK(LzmaDec_AllocateProbs(&state, coder->Props.data, (unsigned)coder->Props.size, allocMain)); + state.dic = outBuffer; + state.dicBufSize = outSize; + LzmaDec_Init(&state); + + for (;;) + { + Byte *inBuf = NULL; + size_t lookahead = (1 << 18); + if (lookahead > inSize) + lookahead = (size_t)inSize; + res = inStream->Look((void *)inStream, (const void **)&inBuf, &lookahead); + if (res != SZ_OK) + break; + + { + SizeT inProcessed = (SizeT)lookahead, dicPos = state.dicPos; + ELzmaStatus status; + res = LzmaDec_DecodeToDic(&state, outSize, inBuf, &inProcessed, LZMA_FINISH_END, &status); + lookahead -= inProcessed; + inSize -= inProcessed; + if (res != SZ_OK) + break; + if (state.dicPos == state.dicBufSize || (inProcessed == 0 && dicPos == state.dicPos)) + { + if (state.dicBufSize != outSize || lookahead != 0 || + (status != LZMA_STATUS_FINISHED_WITH_MARK && + status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK)) + res = SZ_ERROR_DATA; + break; + } + res = inStream->Skip((void *)inStream, inProcessed); + if (res != SZ_OK) + break; + } + } + + LzmaDec_FreeProbs(&state, allocMain); + return res; +} + +static SRes SzDecodeLzma2(CSzCoderInfo *coder, UInt64 inSize, ILookInStream *inStream, + Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain) +{ + CLzma2Dec state; + SRes res = SZ_OK; + + Lzma2Dec_Construct(&state); + if (coder->Props.size != 1) + return SZ_ERROR_DATA; + RINOK(Lzma2Dec_AllocateProbs(&state, coder->Props.data[0], allocMain)); + state.decoder.dic = outBuffer; + state.decoder.dicBufSize = outSize; + Lzma2Dec_Init(&state); + + for (;;) + { + Byte *inBuf = NULL; + size_t lookahead = (1 << 18); + if (lookahead > inSize) + lookahead = (size_t)inSize; + res = inStream->Look((void *)inStream, (const void **)&inBuf, &lookahead); + if (res != SZ_OK) + break; + + { + SizeT inProcessed = (SizeT)lookahead, dicPos = state.decoder.dicPos; + ELzmaStatus status; + res = Lzma2Dec_DecodeToDic(&state, outSize, inBuf, &inProcessed, LZMA_FINISH_END, &status); + lookahead -= inProcessed; + inSize -= inProcessed; + if (res != SZ_OK) + break; + if (state.decoder.dicPos == state.decoder.dicBufSize || (inProcessed == 0 && dicPos == state.decoder.dicPos)) + { + if (state.decoder.dicBufSize != outSize || lookahead != 0 || + (status != LZMA_STATUS_FINISHED_WITH_MARK)) + res = SZ_ERROR_DATA; + break; + } + res = inStream->Skip((void *)inStream, inProcessed); + if (res != SZ_OK) + break; + } + } + + Lzma2Dec_FreeProbs(&state, allocMain); + return res; +} + +static SRes SzDecodeCopy(UInt64 inSize, ILookInStream *inStream, Byte *outBuffer) +{ + while (inSize > 0) + { + void *inBuf; + size_t curSize = (1 << 18); + if (curSize > inSize) + curSize = (size_t)inSize; + RINOK(inStream->Look((void *)inStream, (const void **)&inBuf, &curSize)); + if (curSize == 0) + return SZ_ERROR_INPUT_EOF; + memcpy(outBuffer, inBuf, curSize); + outBuffer += curSize; + inSize -= curSize; + RINOK(inStream->Skip((void *)inStream, curSize)); + } + return SZ_OK; +} + +static Bool IS_MAIN_METHOD(UInt32 m) +{ + switch(m) + { + case k_Copy: + case k_LZMA: + case k_LZMA2: + #ifdef _7ZIP_PPMD_SUPPPORT + case k_PPMD: + #endif + return True; + } + return False; +} + +static Bool IS_SUPPORTED_CODER(const CSzCoderInfo *c) +{ + return + c->NumInStreams == 1 && + c->NumOutStreams == 1 && + c->MethodID <= (UInt32)0xFFFFFFFF && + IS_MAIN_METHOD((UInt32)c->MethodID); +} + +#define IS_BCJ2(c) ((c)->MethodID == k_BCJ2 && (c)->NumInStreams == 4 && (c)->NumOutStreams == 1) + +static SRes CheckSupportedFolder(const CSzFolder *f) +{ + if (f->NumCoders < 1 || f->NumCoders > 4) + return SZ_ERROR_UNSUPPORTED; + + if (f->Coders[0].MethodID == 0x06F10701) /* ACAB */ + return SZ_ERROR_ENCRYPTED; + + if (!IS_SUPPORTED_CODER(&f->Coders[0])) + return SZ_ERROR_UNSUPPORTED; + if (f->NumCoders == 1) + { + if (f->NumPackStreams != 1 || f->PackStreams[0] != 0 || f->NumBindPairs != 0) + return SZ_ERROR_UNSUPPORTED; + return SZ_OK; + } + if (f->NumCoders == 2) + { + CSzCoderInfo *c = &f->Coders[1]; + if (c->MethodID > (UInt32)0xFFFFFFFF || + c->NumInStreams != 1 || + c->NumOutStreams != 1 || + f->NumPackStreams != 1 || + f->PackStreams[0] != 0 || + f->NumBindPairs != 1 || + f->BindPairs[0].InIndex != 1 || + f->BindPairs[0].OutIndex != 0) + return SZ_ERROR_UNSUPPORTED; + switch ((UInt32)c->MethodID) + { + case k_BCJ: + case k_ARM: + break; + default: + return SZ_ERROR_UNSUPPORTED; + } + return SZ_OK; + } + if (f->NumCoders == 4) + { + if (!IS_SUPPORTED_CODER(&f->Coders[1]) || + !IS_SUPPORTED_CODER(&f->Coders[2]) || + !IS_BCJ2(&f->Coders[3])) + return SZ_ERROR_UNSUPPORTED; + if (f->NumPackStreams != 4 || + f->PackStreams[0] != 2 || + f->PackStreams[1] != 6 || + f->PackStreams[2] != 1 || + f->PackStreams[3] != 0 || + f->NumBindPairs != 3 || + f->BindPairs[0].InIndex != 5 || f->BindPairs[0].OutIndex != 0 || + f->BindPairs[1].InIndex != 4 || f->BindPairs[1].OutIndex != 1 || + f->BindPairs[2].InIndex != 3 || f->BindPairs[2].OutIndex != 2) + return SZ_ERROR_UNSUPPORTED; + return SZ_OK; + } + return SZ_ERROR_UNSUPPORTED; +} + +static UInt64 GetSum(const UInt64 *values, UInt32 index) +{ + UInt64 sum = 0; + UInt32 i; + for (i = 0; i < index; i++) + sum += values[i]; + return sum; +} + +#define CASE_BRA_CONV(isa) case k_ ## isa: isa ## _Convert(outBuffer, outSize, 0, 0); break; + +static SRes SzFolder_Decode2(const CSzFolder *folder, const UInt64 *packSizes, + ILookInStream *inStream, UInt64 startPos, + Byte *outBuffer, SizeT outSize, ISzAlloc *allocMain, + Byte *tempBuf[]) +{ + UInt32 ci; + SizeT tempSizes[3] = { 0, 0, 0}; + SizeT tempSize3 = 0; + Byte *tempBuf3 = 0; + + RINOK(CheckSupportedFolder(folder)); + + for (ci = 0; ci < folder->NumCoders; ci++) + { + CSzCoderInfo *coder = &folder->Coders[ci]; + + if (IS_MAIN_METHOD((UInt32)coder->MethodID)) + { + UInt32 si = 0; + UInt64 offset; + UInt64 inSize; + Byte *outBufCur = outBuffer; + SizeT outSizeCur = outSize; + if (folder->NumCoders == 4) + { + UInt32 indices[] = { 3, 2, 0 }; + UInt64 unpackSize = folder->UnpackSizes[ci]; + si = indices[ci]; + if (ci < 2) + { + Byte *temp; + outSizeCur = (SizeT)unpackSize; + if (outSizeCur != unpackSize) + return SZ_ERROR_MEM; + temp = (Byte *)IAlloc_Alloc(allocMain, outSizeCur); + if (temp == 0 && outSizeCur != 0) + return SZ_ERROR_MEM; + outBufCur = tempBuf[1 - ci] = temp; + tempSizes[1 - ci] = outSizeCur; + } + else if (ci == 2) + { + if (unpackSize > outSize) /* check it */ + return SZ_ERROR_PARAM; + tempBuf3 = outBufCur = outBuffer + (outSize - (size_t)unpackSize); + tempSize3 = outSizeCur = (SizeT)unpackSize; + } + else + return SZ_ERROR_UNSUPPORTED; + } + if (!packSizes) + return SZ_ERROR_FAIL; + offset = GetSum(packSizes, si); + inSize = packSizes[si]; + RINOK(LookInStream_SeekTo(inStream, startPos + offset)); + + if (coder->MethodID == k_Copy) + { + if (inSize != outSizeCur) /* check it */ + return SZ_ERROR_DATA; + RINOK(SzDecodeCopy(inSize, inStream, outBufCur)); + } + else if (coder->MethodID == k_LZMA) + { + RINOK(SzDecodeLzma(coder, inSize, inStream, outBufCur, outSizeCur, allocMain)); + } + else if (coder->MethodID == k_LZMA2) + { + RINOK(SzDecodeLzma2(coder, inSize, inStream, outBufCur, outSizeCur, allocMain)); + } + else + { + #ifdef _7ZIP_PPMD_SUPPPORT + RINOK(SzDecodePpmd(coder, inSize, inStream, outBufCur, outSizeCur, allocMain)); + #else + return SZ_ERROR_UNSUPPORTED; + #endif + } + } + else if (coder->MethodID == k_BCJ2) + { + UInt64 offset = GetSum(packSizes, 1); + UInt64 s3Size = packSizes[1]; + SRes res; + if (ci != 3) + return SZ_ERROR_UNSUPPORTED; + RINOK(LookInStream_SeekTo(inStream, startPos + offset)); + tempSizes[2] = (SizeT)s3Size; + if (tempSizes[2] != s3Size) + return SZ_ERROR_MEM; + tempBuf[2] = (Byte *)IAlloc_Alloc(allocMain, tempSizes[2]); + if (tempBuf[2] == 0 && tempSizes[2] != 0) + return SZ_ERROR_MEM; + res = SzDecodeCopy(s3Size, inStream, tempBuf[2]); + RINOK(res) + + res = Bcj2_Decode( + tempBuf3, tempSize3, + tempBuf[0], tempSizes[0], + tempBuf[1], tempSizes[1], + tempBuf[2], tempSizes[2], + outBuffer, outSize); + RINOK(res) + } + else + { + if (ci != 1) + return SZ_ERROR_UNSUPPORTED; + switch(coder->MethodID) + { + case k_BCJ: + { + UInt32 state; + x86_Convert_Init(state); + x86_Convert(outBuffer, outSize, 0, &state, 0); + break; + } + CASE_BRA_CONV(ARM) + default: + return SZ_ERROR_UNSUPPORTED; + } + } + } + return SZ_OK; +} + +SRes SzFolder_Decode(const CSzFolder *folder, const UInt64 *packSizes, + ILookInStream *inStream, UInt64 startPos, + Byte *outBuffer, size_t outSize, ISzAlloc *allocMain) +{ + Byte *tempBuf[3] = { 0, 0, 0}; + int i; + SRes res = SzFolder_Decode2(folder, packSizes, inStream, startPos, + outBuffer, (SizeT)outSize, allocMain, tempBuf); + for (i = 0; i < 3; i++) + IAlloc_Free(allocMain, tempBuf[i]); + return res; +} diff --git a/clamscan/libclamav/7z/7zFile.c b/clamscan/libclamav/7z/7zFile.c new file mode 100644 index 0000000..5764a1e --- /dev/null +++ b/clamscan/libclamav/7z/7zFile.c @@ -0,0 +1,258 @@ +/* 7zFile.c -- File IO +2009-11-24 : Igor Pavlov : Public domain */ + +#include "7zFile.h" + +#ifndef USE_WINDOWS_FILE + +#ifndef UNDER_CE +#include +#endif + +#else + +/* + ReadFile and WriteFile functions in Windows have BUG: + If you Read or Write 64MB or more (probably min_failure_size = 64MB - 32KB + 1) + from/to Network file, it returns ERROR_NO_SYSTEM_RESOURCES + (Insufficient system resources exist to complete the requested service). + Probably in some version of Windows there are problems with other sizes: + for 32 MB (maybe also for 16 MB). + And message can be "Network connection was lost" +*/ + +#define kChunkSizeMax (1 << 22) + +#endif + +void File_Construct(CSzFile *p) +{ + #ifdef USE_WINDOWS_FILE + p->handle = INVALID_HANDLE_VALUE; + #else + p->file = NULL; + #endif +} + +#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE) +static WRes File_Open(CSzFile *p, const char *name, int writeMode) +{ + #ifdef USE_WINDOWS_FILE + p->handle = CreateFileA(name, + writeMode ? GENERIC_WRITE : GENERIC_READ, + FILE_SHARE_READ, NULL, + writeMode ? CREATE_ALWAYS : OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); + return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError(); + #else + p->file = fopen(name, writeMode ? "wb+" : "rb"); + return (p->file != 0) ? 0 : + #ifdef UNDER_CE + 2; /* ENOENT */ + #else + errno; + #endif + #endif +} + +WRes InFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 0); } +WRes OutFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 1); } +#endif + +#ifdef USE_WINDOWS_FILE +static WRes File_OpenW(CSzFile *p, const WCHAR *name, int writeMode) +{ + p->handle = CreateFileW(name, + writeMode ? GENERIC_WRITE : GENERIC_READ, + FILE_SHARE_READ, NULL, + writeMode ? CREATE_ALWAYS : OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); + return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError(); +} +WRes InFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 0); } +WRes OutFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 1); } +#endif + +WRes File_Close(CSzFile *p) +{ + #ifdef USE_WINDOWS_FILE + if (p->handle != INVALID_HANDLE_VALUE) + { + if (!CloseHandle(p->handle)) + return GetLastError(); + p->handle = INVALID_HANDLE_VALUE; + } + #else + if (p->file != NULL) + { + int res = fclose(p->file); + if (res != 0) + return res; + p->file = NULL; + } + #endif + return 0; +} + +WRes File_Read(CSzFile *p, void *data, size_t *size) +{ + size_t originalSize = *size; + if (originalSize == 0) + return 0; + + #ifdef USE_WINDOWS_FILE + + *size = 0; + do + { + DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize; + DWORD processed = 0; + BOOL res = ReadFile(p->handle, data, curSize, &processed, NULL); + data = (void *)((Byte *)data + processed); + originalSize -= processed; + *size += processed; + if (!res) + return GetLastError(); + if (processed == 0) + break; + } + while (originalSize > 0); + return 0; + + #else + + *size = fread(data, 1, originalSize, p->file); + if (*size == originalSize) + return 0; + return ferror(p->file); + + #endif +} + +WRes File_Write(CSzFile *p, const void *data, size_t *size) +{ + size_t originalSize = *size; + if (originalSize == 0) + return 0; + + #ifdef USE_WINDOWS_FILE + + *size = 0; + do + { + DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize; + DWORD processed = 0; + BOOL res = WriteFile(p->handle, data, curSize, &processed, NULL); + data = (void *)((Byte *)data + processed); + originalSize -= processed; + *size += processed; + if (!res) + return GetLastError(); + if (processed == 0) + break; + } + while (originalSize > 0); + return 0; + + #else + + *size = fwrite(data, 1, originalSize, p->file); + if (*size == originalSize) + return 0; + return ferror(p->file); + + #endif +} + +WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin) +{ + #ifdef USE_WINDOWS_FILE + + LARGE_INTEGER value; + DWORD moveMethod; + value.LowPart = (DWORD)*pos; + value.HighPart = (LONG)((UInt64)*pos >> 16 >> 16); /* for case when UInt64 is 32-bit only */ + switch (origin) + { + case SZ_SEEK_SET: moveMethod = FILE_BEGIN; break; + case SZ_SEEK_CUR: moveMethod = FILE_CURRENT; break; + case SZ_SEEK_END: moveMethod = FILE_END; break; + default: return ERROR_INVALID_PARAMETER; + } + value.LowPart = SetFilePointer(p->handle, value.LowPart, &value.HighPart, moveMethod); + if (value.LowPart == 0xFFFFFFFF) + { + WRes res = GetLastError(); + if (res != NO_ERROR) + return res; + } + *pos = ((Int64)value.HighPart << 32) | value.LowPart; + return 0; + + #else + + int moveMethod; + int res; + switch (origin) + { + case SZ_SEEK_SET: moveMethod = SEEK_SET; break; + case SZ_SEEK_CUR: moveMethod = SEEK_CUR; break; + case SZ_SEEK_END: moveMethod = SEEK_END; break; + default: return 1; + } + res = fseek(p->file, (long)*pos, moveMethod); + *pos = ftell(p->file); + return res; + + #endif +} + + +/* ---------- FileSeqInStream ---------- */ + +static SRes FileSeqInStream_Read(void *pp, void *buf, size_t *size) +{ + CFileSeqInStream *p = (CFileSeqInStream *)pp; + return File_Read(&p->file, buf, size) == 0 ? SZ_OK : SZ_ERROR_READ; +} + +void FileSeqInStream_CreateVTable(CFileSeqInStream *p) +{ + p->s.Read = FileSeqInStream_Read; +} + + +/* ---------- FileInStream ---------- */ + +static SRes FileInStream_Read(void *pp, void *buf, size_t *size) +{ + CFileInStream *p = (CFileInStream *)pp; + return (File_Read(&p->file, buf, size) == 0) ? SZ_OK : SZ_ERROR_READ; +} + +static SRes FileInStream_Seek(void *pp, Int64 *pos, ESzSeek origin) +{ + CFileInStream *p = (CFileInStream *)pp; + return File_Seek(&p->file, pos, origin); +} + +void FileInStream_CreateVTable(CFileInStream *p) +{ + p->s.Read = FileInStream_Read; + p->s.Seek = FileInStream_Seek; +} + + +/* ---------- FileOutStream ---------- */ + +static size_t FileOutStream_Write(void *pp, const void *data, size_t size) +{ + CFileOutStream *p = (CFileOutStream *)pp; + File_Write(&p->file, data, &size); + return size; +} + +void FileOutStream_CreateVTable(CFileOutStream *p) +{ + p->s.Write = FileOutStream_Write; +} diff --git a/clamscan/libclamav/7z/7zFile.h b/clamscan/libclamav/7z/7zFile.h new file mode 100644 index 0000000..27ddac4 --- /dev/null +++ b/clamscan/libclamav/7z/7zFile.h @@ -0,0 +1,83 @@ +/* 7zFile.h -- File IO +2009-11-24 : Igor Pavlov : Public domain */ + +#ifndef __7Z_FILE_H +#define __7Z_FILE_H + +#ifdef _WIN32 +#define USE_WINDOWS_FILE +#endif + +#ifdef USE_WINDOWS_FILE +#include +#else +#include +#endif + +#include "Types.h" + +EXTERN_C_BEGIN + +/* ---------- File ---------- */ + +typedef struct +{ +#ifdef USE_WINDOWS_FILE + HANDLE handle; +#else + FILE *file; +#endif + fmap_t *fmap; +} CSzFile; + +void File_Construct(CSzFile *p); +#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE) +WRes InFile_Open(CSzFile *p, const char *name); +WRes OutFile_Open(CSzFile *p, const char *name); +#endif +#ifdef USE_WINDOWS_FILE +WRes InFile_OpenW(CSzFile *p, const WCHAR *name); +WRes OutFile_OpenW(CSzFile *p, const WCHAR *name); +#endif +WRes File_Close(CSzFile *p); + +/* reads max(*size, remain file's size) bytes */ +WRes File_Read(CSzFile *p, void *data, size_t *size); + +/* writes *size bytes */ +WRes File_Write(CSzFile *p, const void *data, size_t *size); + +WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin); + + +/* ---------- FileInStream ---------- */ + +typedef struct +{ + ISeqInStream s; + CSzFile file; +} CFileSeqInStream; + +void FileSeqInStream_CreateVTable(CFileSeqInStream *p); + + +typedef struct +{ + ISeekInStream s; + CSzFile file; +} CFileInStream; + +void FileInStream_CreateVTable(CFileInStream *p); + + +typedef struct +{ + ISeqOutStream s; + CSzFile file; +} CFileOutStream; + +void FileOutStream_CreateVTable(CFileOutStream *p); + +EXTERN_C_END + +#endif diff --git a/clamscan/libclamav/7z/7zIn.c b/clamscan/libclamav/7z/7zIn.c new file mode 100644 index 0000000..13e89bf --- /dev/null +++ b/clamscan/libclamav/7z/7zIn.c @@ -0,0 +1,1477 @@ +/* 7zIn.c -- 7z Input functions +2010-10-29 : Igor Pavlov : Public domain */ + +#include + +#if defined(_WIN32) +#include +#include +#endif + +#include "7z.h" +#include "7zCrc.h" +#include "CpuArch.h" + +Byte k7zSignature[k7zSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}; + +#define RINOM(x) { if ((x) == 0) return SZ_ERROR_MEM; } + +#define NUM_FOLDER_CODERS_MAX 32 +#define NUM_CODER_STREAMS_MAX 32 + +void SzFolder_Free(CSzFolder *p, ISzAlloc *alloc); +int SzFolder_FindBindPairForOutStream(CSzFolder *p, UInt32 outStreamIndex); + +void SzCoderInfo_Init(CSzCoderInfo *p) +{ + Buf_Init(&p->Props); +} + +void SzCoderInfo_Free(CSzCoderInfo *p, ISzAlloc *alloc) +{ + Buf_Free(&p->Props, alloc); + SzCoderInfo_Init(p); +} + +void SzFolder_Init(CSzFolder *p) +{ + p->Coders = 0; + p->BindPairs = 0; + p->PackStreams = 0; + p->UnpackSizes = 0; + p->NumCoders = 0; + p->NumBindPairs = 0; + p->NumPackStreams = 0; + p->UnpackCRCDefined = 0; + p->UnpackCRC = 0; + p->NumUnpackStreams = 0; +} + +void SzFolder_Free(CSzFolder *p, ISzAlloc *alloc) +{ + UInt32 i; + if (p->Coders) + for (i = 0; i < p->NumCoders; i++) + SzCoderInfo_Free(&p->Coders[i], alloc); + IAlloc_Free(alloc, p->Coders); + IAlloc_Free(alloc, p->BindPairs); + IAlloc_Free(alloc, p->PackStreams); + IAlloc_Free(alloc, p->UnpackSizes); + SzFolder_Init(p); +} + +UInt32 SzFolder_GetNumOutStreams(CSzFolder *p) +{ + UInt32 result = 0; + UInt32 i; + for (i = 0; i < p->NumCoders; i++) + result += p->Coders[i].NumOutStreams; + return result; +} + +int SzFolder_FindBindPairForInStream(CSzFolder *p, UInt32 inStreamIndex) +{ + UInt32 i; + for (i = 0; i < p->NumBindPairs; i++) + if (p->BindPairs[i].InIndex == inStreamIndex) + return i; + return -1; +} + + +int SzFolder_FindBindPairForOutStream(CSzFolder *p, UInt32 outStreamIndex) +{ + UInt32 i; + for (i = 0; i < p->NumBindPairs; i++) + if (p->BindPairs[i].OutIndex == outStreamIndex) + return i; + return -1; +} + +UInt64 SzFolder_GetUnpackSize(CSzFolder *p) +{ + int i = (int)SzFolder_GetNumOutStreams(p); + if (i == 0) + return 0; + for (i--; i >= 0; i--) + if (SzFolder_FindBindPairForOutStream(p, i) < 0) + return p->UnpackSizes[i]; + /* throw 1; */ + return 0; +} + +void SzFile_Init(CSzFileItem *p) +{ + p->HasStream = 1; + p->IsDir = 0; + p->IsAnti = 0; + p->CrcDefined = 0; + p->MTimeDefined = 0; +} + +void SzAr_Init(CSzAr *p) +{ + p->PackSizes = 0; + p->PackCRCsDefined = 0; + p->PackCRCs = 0; + p->Folders = 0; + p->Files = 0; + p->NumPackStreams = 0; + p->NumFolders = 0; + p->NumFiles = 0; +} + +void SzAr_Free(CSzAr *p, ISzAlloc *alloc) +{ + UInt32 i; + if (p->Folders) + for (i = 0; i < p->NumFolders; i++) + SzFolder_Free(&p->Folders[i], alloc); + + IAlloc_Free(alloc, p->PackSizes); + IAlloc_Free(alloc, p->PackCRCsDefined); + IAlloc_Free(alloc, p->PackCRCs); + IAlloc_Free(alloc, p->Folders); + IAlloc_Free(alloc, p->Files); + SzAr_Init(p); +} + + +void SzArEx_Init(CSzArEx *p) +{ + SzAr_Init(&p->db); + p->FolderStartPackStreamIndex = 0; + p->PackStreamStartPositions = 0; + p->FolderStartFileIndex = 0; + p->FileIndexToFolderIndexMap = 0; + p->FileNameOffsets = 0; + Buf_Init(&p->FileNames); +} + +void SzArEx_Free(CSzArEx *p, ISzAlloc *alloc) +{ + IAlloc_Free(alloc, p->FolderStartPackStreamIndex); + IAlloc_Free(alloc, p->PackStreamStartPositions); + IAlloc_Free(alloc, p->FolderStartFileIndex); + IAlloc_Free(alloc, p->FileIndexToFolderIndexMap); + + IAlloc_Free(alloc, p->FileNameOffsets); + Buf_Free(&p->FileNames, alloc); + + SzAr_Free(&p->db, alloc); + SzArEx_Init(p); +} + +/* +UInt64 GetFolderPackStreamSize(int folderIndex, int streamIndex) const +{ + return PackSizes[FolderStartPackStreamIndex[folderIndex] + streamIndex]; +} + +UInt64 GetFilePackSize(int fileIndex) const +{ + int folderIndex = FileIndexToFolderIndexMap[fileIndex]; + if (folderIndex >= 0) + { + const CSzFolder &folderInfo = Folders[folderIndex]; + if (FolderStartFileIndex[folderIndex] == fileIndex) + return GetFolderFullPackSize(folderIndex); + } + return 0; +} +*/ + +#define MY_ALLOC(T, p, size, alloc) { if ((size) == 0) p = 0; else \ + if ((p = (T *)IAlloc_Alloc(alloc, (size) * sizeof(T))) == 0) return SZ_ERROR_MEM; } + +static SRes SzArEx_Fill(CSzArEx *p, ISzAlloc *alloc) +{ + UInt32 startPos = 0; + UInt64 startPosSize = 0; + UInt32 i; + UInt32 folderIndex = 0; + UInt32 indexInFolder = 0; + MY_ALLOC(UInt32, p->FolderStartPackStreamIndex, p->db.NumFolders, alloc); + for (i = 0; i < p->db.NumFolders; i++) + { + p->FolderStartPackStreamIndex[i] = startPos; + startPos += p->db.Folders[i].NumPackStreams; + } + + MY_ALLOC(UInt64, p->PackStreamStartPositions, p->db.NumPackStreams, alloc); + + for (i = 0; i < p->db.NumPackStreams; i++) + { + p->PackStreamStartPositions[i] = startPosSize; + startPosSize += p->db.PackSizes[i]; + } + + MY_ALLOC(UInt32, p->FolderStartFileIndex, p->db.NumFolders, alloc); + MY_ALLOC(UInt32, p->FileIndexToFolderIndexMap, p->db.NumFiles, alloc); + + for (i = 0; i < p->db.NumFiles; i++) + { + CSzFileItem *file = p->db.Files + i; + int emptyStream = !file->HasStream; + if (emptyStream && indexInFolder == 0) + { + p->FileIndexToFolderIndexMap[i] = (UInt32)-1; + continue; + } + if (indexInFolder == 0) + { + /* + v3.13 incorrectly worked with empty folders + v4.07: Loop for skipping empty folders + */ + for (;;) + { + if (folderIndex >= p->db.NumFolders) + return SZ_ERROR_ARCHIVE; + p->FolderStartFileIndex[folderIndex] = i; + if (p->db.Folders[folderIndex].NumUnpackStreams != 0) + break; + folderIndex++; + } + } + p->FileIndexToFolderIndexMap[i] = folderIndex; + if (emptyStream) + continue; + indexInFolder++; + if (indexInFolder >= p->db.Folders[folderIndex].NumUnpackStreams) + { + folderIndex++; + indexInFolder = 0; + } + } + return SZ_OK; +} + + +UInt64 SzArEx_GetFolderStreamPos(const CSzArEx *p, UInt32 folderIndex, UInt32 indexInFolder) +{ + return p->dataPos + + p->PackStreamStartPositions[p->FolderStartPackStreamIndex[folderIndex] + indexInFolder]; +} + +int SzArEx_GetFolderFullPackSize(const CSzArEx *p, UInt32 folderIndex, UInt64 *resSize) +{ + UInt32 packStreamIndex = p->FolderStartPackStreamIndex[folderIndex]; + CSzFolder *folder = p->db.Folders + folderIndex; + UInt64 size = 0; + UInt32 i; + for (i = 0; i < folder->NumPackStreams; i++) + { + UInt64 t = size + p->db.PackSizes[packStreamIndex + i]; + if (t < size) /* check it */ + return SZ_ERROR_FAIL; + size = t; + } + *resSize = size; + return SZ_OK; +} + + +/* +SRes SzReadTime(const CObjectVector &dataVector, + CObjectVector &files, UInt64 type) +{ + CBoolVector boolVector; + RINOK(ReadBoolVector2(files.Size(), boolVector)) + + CStreamSwitch streamSwitch; + RINOK(streamSwitch.Set(this, &dataVector)); + + for (int i = 0; i < files.Size(); i++) + { + CSzFileItem &file = files[i]; + CArchiveFileTime fileTime; + bool defined = boolVector[i]; + if (defined) + { + UInt32 low, high; + RINOK(SzReadUInt32(low)); + RINOK(SzReadUInt32(high)); + fileTime.dwLowDateTime = low; + fileTime.dwHighDateTime = high; + } + switch(type) + { + case k7zIdCTime: file.IsCTimeDefined = defined; if (defined) file.CTime = fileTime; break; + case k7zIdATime: file.IsATimeDefined = defined; if (defined) file.ATime = fileTime; break; + case k7zIdMTime: file.IsMTimeDefined = defined; if (defined) file.MTime = fileTime; break; + } + } + return SZ_OK; +} +*/ + +static int TestSignatureCandidate(Byte *testBytes) +{ + size_t i; + for (i = 0; i < k7zSignatureSize; i++) + if (testBytes[i] != k7zSignature[i]) + return 0; + return 1; +} + +typedef struct _CSzState +{ + Byte *Data; + size_t Size; +}CSzData; + +static SRes SzReadByte(CSzData *sd, Byte *b) +{ + if (sd->Size == 0) + return SZ_ERROR_ARCHIVE; + sd->Size--; + *b = *sd->Data++; + return SZ_OK; +} + +static SRes SzReadBytes(CSzData *sd, Byte *data, size_t size) +{ + size_t i; + for (i = 0; i < size; i++) + { + RINOK(SzReadByte(sd, data + i)); + } + return SZ_OK; +} + +static SRes SzReadUInt32(CSzData *sd, UInt32 *value) +{ + int i; + *value = 0; + for (i = 0; i < 4; i++) + { + Byte b; + RINOK(SzReadByte(sd, &b)); + *value |= ((UInt32)(b) << (8 * i)); + } + return SZ_OK; +} + +static SRes SzReadNumber(CSzData *sd, UInt64 *value) +{ + Byte firstByte; + Byte mask = 0x80; + int i; + RINOK(SzReadByte(sd, &firstByte)); + *value = 0; + for (i = 0; i < 8; i++) + { + Byte b; + if ((firstByte & mask) == 0) + { + UInt64 highPart = firstByte & (mask - 1); + *value += (highPart << (8 * i)); + return SZ_OK; + } + RINOK(SzReadByte(sd, &b)); + *value |= ((UInt64)b << (8 * i)); + mask >>= 1; + } + return SZ_OK; +} + +static SRes SzReadNumber32(CSzData *sd, UInt32 *value) +{ + UInt64 value64; + RINOK(SzReadNumber(sd, &value64)); + if (value64 >= 0x80000000) + return SZ_ERROR_UNSUPPORTED; + if (value64 >= ((UInt64)(1) << ((sizeof(size_t) - 1) * 8 + 2))) + return SZ_ERROR_UNSUPPORTED; + *value = (UInt32)value64; + return SZ_OK; +} + +static SRes SzReadID(CSzData *sd, UInt64 *value) +{ + return SzReadNumber(sd, value); +} + +static SRes SzSkeepDataSize(CSzData *sd, UInt64 size) +{ + if (size > sd->Size) + return SZ_ERROR_ARCHIVE; + sd->Size -= (size_t)size; + sd->Data += (size_t)size; + return SZ_OK; +} + +static SRes SzSkeepData(CSzData *sd) +{ + UInt64 size; + RINOK(SzReadNumber(sd, &size)); + return SzSkeepDataSize(sd, size); +} + +static SRes SzReadArchiveProperties(CSzData *sd) +{ + for (;;) + { + UInt64 type; + RINOK(SzReadID(sd, &type)); + if (type == k7zIdEnd) + break; + SzSkeepData(sd); + } + return SZ_OK; +} + +static SRes SzWaitAttribute(CSzData *sd, UInt64 attribute) +{ + for (;;) + { + UInt64 type; + RINOK(SzReadID(sd, &type)); + if (type == attribute) + return SZ_OK; + if (type == k7zIdEnd) + return SZ_ERROR_ARCHIVE; + RINOK(SzSkeepData(sd)); + } +} + +static SRes SzReadBoolVector(CSzData *sd, size_t numItems, Byte **v, ISzAlloc *alloc) +{ + Byte b = 0; + Byte mask = 0; + size_t i; + /* bb#11514 - check for pre-allocation: free or error? */ + if (*v) + return SZ_ERROR_FAIL; + MY_ALLOC(Byte, *v, numItems, alloc); + for (i = 0; i < numItems; i++) + { + if (mask == 0) + { + RINOK(SzReadByte(sd, &b)); + mask = 0x80; + } + (*v)[i] = (Byte)(((b & mask) != 0) ? 1 : 0); + mask >>= 1; + } + return SZ_OK; +} + +static SRes SzReadBoolVector2(CSzData *sd, size_t numItems, Byte **v, ISzAlloc *alloc) +{ + Byte allAreDefined; + size_t i; + RINOK(SzReadByte(sd, &allAreDefined)); + if (allAreDefined == 0) + return SzReadBoolVector(sd, numItems, v, alloc); + if (*v) + return SZ_ERROR_FAIL; + MY_ALLOC(Byte, *v, numItems, alloc); + for (i = 0; i < numItems; i++) + (*v)[i] = 1; + return SZ_OK; +} + +static SRes SzReadHashDigests( + CSzData *sd, + size_t numItems, + Byte **digestsDefined, + UInt32 **digests, + ISzAlloc *alloc) +{ + size_t i; + RINOK(SzReadBoolVector2(sd, numItems, digestsDefined, alloc)); + if (*digests) + return SZ_ERROR_FAIL; + MY_ALLOC(UInt32, *digests, numItems, alloc); + for (i = 0; i < numItems; i++) + if ((*digestsDefined)[i]) + { + RINOK(SzReadUInt32(sd, (*digests) + i)); + } + return SZ_OK; +} + +static SRes SzReadPackInfo( + CSzData *sd, + UInt64 *dataOffset, + UInt32 *numPackStreams, + UInt64 **packSizes, + Byte **packCRCsDefined, + UInt32 **packCRCs, + ISzAlloc *alloc) +{ + UInt32 i; + RINOK(SzReadNumber(sd, dataOffset)); + RINOK(SzReadNumber32(sd, numPackStreams)); + + RINOK(SzWaitAttribute(sd, k7zIdSize)); + + if (*packSizes) + return SZ_ERROR_FAIL; + MY_ALLOC(UInt64, *packSizes, (size_t)*numPackStreams, alloc); + + for (i = 0; i < *numPackStreams; i++) + { + RINOK(SzReadNumber(sd, (*packSizes) + i)); + } + + for (;;) + { + UInt64 type; + RINOK(SzReadID(sd, &type)); + if (type == k7zIdEnd) + break; + if (type == k7zIdCRC) + { + RINOK(SzReadHashDigests(sd, (size_t)*numPackStreams, packCRCsDefined, packCRCs, alloc)); + continue; + } + RINOK(SzSkeepData(sd)); + } + if (*packCRCsDefined == 0) + { + if (*packCRCs) + return SZ_ERROR_FAIL; + MY_ALLOC(Byte, *packCRCsDefined, (size_t)*numPackStreams, alloc); + MY_ALLOC(UInt32, *packCRCs, (size_t)*numPackStreams, alloc); + for (i = 0; i < *numPackStreams; i++) + { + (*packCRCsDefined)[i] = 0; + (*packCRCs)[i] = 0; + } + } + return SZ_OK; +} + +static SRes SzReadSwitch(CSzData *sd) +{ + Byte external; + RINOK(SzReadByte(sd, &external)); + return (external == 0) ? SZ_OK: SZ_ERROR_UNSUPPORTED; +} + +static SRes SzGetNextFolderItem(CSzData *sd, CSzFolder *folder, ISzAlloc *alloc) +{ + UInt32 numCoders, numBindPairs, numPackStreams, i; + UInt32 numInStreams = 0, numOutStreams = 0; + + RINOK(SzReadNumber32(sd, &numCoders)); + if (numCoders > NUM_FOLDER_CODERS_MAX) + return SZ_ERROR_UNSUPPORTED; + folder->NumCoders = numCoders; + + MY_ALLOC(CSzCoderInfo, folder->Coders, (size_t)numCoders, alloc); + + for (i = 0; i < numCoders; i++) + SzCoderInfo_Init(folder->Coders + i); + + for (i = 0; i < numCoders; i++) + { + Byte mainByte; + CSzCoderInfo *coder = folder->Coders + i; + { + unsigned idSize, j; + Byte longID[15]; + RINOK(SzReadByte(sd, &mainByte)); + idSize = (unsigned)(mainByte & 0xF); + RINOK(SzReadBytes(sd, longID, idSize)); + if (idSize > sizeof(coder->MethodID)) + return SZ_ERROR_UNSUPPORTED; + coder->MethodID = 0; + for (j = 0; j < idSize; j++) + coder->MethodID |= (UInt64)longID[idSize - 1 - j] << (8 * j); + + if ((mainByte & 0x10) != 0) + { + RINOK(SzReadNumber32(sd, &coder->NumInStreams)); + RINOK(SzReadNumber32(sd, &coder->NumOutStreams)); + if (coder->NumInStreams > NUM_CODER_STREAMS_MAX || + coder->NumOutStreams > NUM_CODER_STREAMS_MAX) + return SZ_ERROR_UNSUPPORTED; + } + else + { + coder->NumInStreams = 1; + coder->NumOutStreams = 1; + } + if ((mainByte & 0x20) != 0) + { + UInt64 propertiesSize = 0; + RINOK(SzReadNumber(sd, &propertiesSize)); + if (!Buf_Create(&coder->Props, (size_t)propertiesSize, alloc)) + return SZ_ERROR_MEM; + RINOK(SzReadBytes(sd, coder->Props.data, (size_t)propertiesSize)); + } + } + while ((mainByte & 0x80) != 0) + { + RINOK(SzReadByte(sd, &mainByte)); + RINOK(SzSkeepDataSize(sd, (mainByte & 0xF))); + if ((mainByte & 0x10) != 0) + { + UInt32 n; + RINOK(SzReadNumber32(sd, &n)); + RINOK(SzReadNumber32(sd, &n)); + } + if ((mainByte & 0x20) != 0) + { + UInt64 propertiesSize = 0; + RINOK(SzReadNumber(sd, &propertiesSize)); + RINOK(SzSkeepDataSize(sd, propertiesSize)); + } + } + numInStreams += coder->NumInStreams; + numOutStreams += coder->NumOutStreams; + } + + if (numOutStreams == 0) + return SZ_ERROR_UNSUPPORTED; + + folder->NumBindPairs = numBindPairs = numOutStreams - 1; + MY_ALLOC(CSzBindPair, folder->BindPairs, (size_t)numBindPairs, alloc); + + for (i = 0; i < numBindPairs; i++) + { + CSzBindPair *bp = folder->BindPairs + i; + RINOK(SzReadNumber32(sd, &bp->InIndex)); + RINOK(SzReadNumber32(sd, &bp->OutIndex)); + } + + if (numInStreams < numBindPairs) + return SZ_ERROR_UNSUPPORTED; + + folder->NumPackStreams = numPackStreams = numInStreams - numBindPairs; + MY_ALLOC(UInt32, folder->PackStreams, (size_t)numPackStreams, alloc); + + if (numPackStreams == 1) + { + for (i = 0; i < numInStreams ; i++) + if (SzFolder_FindBindPairForInStream(folder, i) < 0) + break; + if (i == numInStreams) + return SZ_ERROR_UNSUPPORTED; + folder->PackStreams[0] = i; + } + else + for (i = 0; i < numPackStreams; i++) + { + RINOK(SzReadNumber32(sd, folder->PackStreams + i)); + } + return SZ_OK; +} + +static SRes SzReadUnpackInfo( + CSzData *sd, + UInt32 *numFolders, + CSzFolder **folders, /* for alloc */ + ISzAlloc *alloc, + ISzAlloc *allocTemp) +{ + UInt32 i; + UInt32 nfdrs; + RINOK(SzWaitAttribute(sd, k7zIdFolder)); + RINOK(SzReadNumber32(sd, &nfdrs)); + { + if (*folders) + return SZ_ERROR_FAIL; + MY_ALLOC(CSzFolder, *folders, (size_t)nfdrs, alloc); + *numFolders = nfdrs; + + for (i = 0; i < *numFolders; i++) + SzFolder_Init((*folders) + i); + + RINOK(SzReadSwitch(sd)); + + for (i = 0; i < *numFolders; i++) + { + RINOK(SzGetNextFolderItem(sd, (*folders) + i, alloc)); + } + } + + RINOK(SzWaitAttribute(sd, k7zIdCodersUnpackSize)); + + for (i = 0; i < *numFolders; i++) + { + UInt32 j; + CSzFolder *folder = (*folders) + i; + UInt32 numOutStreams = SzFolder_GetNumOutStreams(folder); + + if (folder->UnpackSizes) + return SZ_ERROR_FAIL; + MY_ALLOC(UInt64, folder->UnpackSizes, (size_t)numOutStreams, alloc); + + for (j = 0; j < numOutStreams; j++) + { + RINOK(SzReadNumber(sd, folder->UnpackSizes + j)); + } + } + + for (;;) + { + UInt64 type; + RINOK(SzReadID(sd, &type)); + if (type == k7zIdEnd) + return SZ_OK; + if (type == k7zIdCRC) + { + SRes res; + Byte *crcsDefined = 0; + UInt32 *crcs = 0; + res = SzReadHashDigests(sd, *numFolders, &crcsDefined, &crcs, allocTemp); + if (res == SZ_OK) + { + for (i = 0; i < *numFolders; i++) + { + CSzFolder *folder = (*folders) + i; + folder->UnpackCRCDefined = crcsDefined[i]; + folder->UnpackCRC = crcs[i]; + } + } + IAlloc_Free(allocTemp, crcs); + IAlloc_Free(allocTemp, crcsDefined); + RINOK(res); + continue; + } + RINOK(SzSkeepData(sd)); + } +} + +static SRes SzReadSubStreamsInfo( + CSzData *sd, + UInt32 numFolders, + CSzFolder *folders, + UInt32 *numUnpackStreams, + UInt64 **unpackSizes, + Byte **digestsDefined, + UInt32 **digests, + ISzAlloc *allocTemp) +{ + UInt64 type = 0; + UInt32 i; + UInt32 si = 0; + UInt32 numDigests = 0; + + for (i = 0; i < numFolders; i++) + folders[i].NumUnpackStreams = 1; + *numUnpackStreams = numFolders; + + for (;;) + { + RINOK(SzReadID(sd, &type)); + if (type == k7zIdNumUnpackStream) + { + *numUnpackStreams = 0; + for (i = 0; i < numFolders; i++) + { + UInt32 numStreams; + RINOK(SzReadNumber32(sd, &numStreams)); + folders[i].NumUnpackStreams = numStreams; + *numUnpackStreams += numStreams; + } + continue; + } + if (type == k7zIdCRC || type == k7zIdSize) + break; + if (type == k7zIdEnd) + break; + RINOK(SzSkeepData(sd)); + } + + if (*unpackSizes || *digestsDefined || *digests) + return SZ_ERROR_FAIL; + + if (*numUnpackStreams == 0) + { + *unpackSizes = 0; + *digestsDefined = 0; + *digests = 0; + } + else + { + *unpackSizes = (UInt64 *)IAlloc_Alloc(allocTemp, (size_t)*numUnpackStreams * sizeof(UInt64) + sizeof(UInt64)); + RINOM(*unpackSizes); + *digestsDefined = (Byte *)IAlloc_Alloc(allocTemp, (size_t)*numUnpackStreams * sizeof(Byte) + 1); + RINOM(*digestsDefined); + *digests = (UInt32 *)IAlloc_Alloc(allocTemp, (size_t)*numUnpackStreams * sizeof(UInt32) + sizeof(UInt32)); + RINOM(*digests); + } + + for (i = 0; i < numFolders; i++) + { + /* + v3.13 incorrectly worked with empty folders + v4.07: we check that folder is empty + */ + UInt64 sum = 0; + UInt32 j; + UInt32 numSubstreams = folders[i].NumUnpackStreams; + if (numSubstreams == 0) + continue; + if (type == k7zIdSize) + for (j = 1; j < numSubstreams; j++) + { + UInt64 size; + RINOK(SzReadNumber(sd, &size)); + (*unpackSizes)[si++] = size; + sum += size; + } + (*unpackSizes)[si++] = SzFolder_GetUnpackSize(folders + i) - sum; + } + if (type == k7zIdSize) + { + RINOK(SzReadID(sd, &type)); + } + + for (i = 0; i < *numUnpackStreams; i++) + { + (*digestsDefined)[i] = 0; + (*digests)[i] = 0; + } + + + for (i = 0; i < numFolders; i++) + { + UInt32 numSubstreams = folders[i].NumUnpackStreams; + if (numSubstreams != 1 || !folders[i].UnpackCRCDefined) + numDigests += numSubstreams; + } + + + si = 0; + for (;;) + { + if (type == k7zIdCRC) + { + int digestIndex = 0; + Byte *digestsDefined2 = 0; + UInt32 *digests2 = 0; + SRes res = SzReadHashDigests(sd, numDigests, &digestsDefined2, &digests2, allocTemp); + if (res == SZ_OK) + { + for (i = 0; i < numFolders; i++) + { + CSzFolder *folder = folders + i; + UInt32 numSubstreams = folder->NumUnpackStreams; + if (numSubstreams == 1 && folder->UnpackCRCDefined) + { + if (si >= *numUnpackStreams) { + cli_dbgmsg("SzReadSubStreamsInfo: more streams exist than specified, ignoring.\n"); + continue; + } + (*digestsDefined)[si] = 1; + (*digests)[si] = folder->UnpackCRC; + si++; + } + else + { + UInt32 j; + for (j = 0; j < numSubstreams; j++, digestIndex++) + { + if (si >= *numUnpackStreams) { + cli_dbgmsg("SzReadSubStreamsInfo: more streams exist than specified, ignoring(2).\n"); + continue; + } + (*digestsDefined)[si] = digestsDefined2[digestIndex]; + (*digests)[si] = digests2[digestIndex]; + si++; + } + } + } + } + IAlloc_Free(allocTemp, digestsDefined2); + IAlloc_Free(allocTemp, digests2); + RINOK(res); + } + else if (type == k7zIdEnd) + return SZ_OK; + else + { + RINOK(SzSkeepData(sd)); + } + RINOK(SzReadID(sd, &type)); + } +} + + +static SRes SzReadStreamsInfo( + CSzData *sd, + UInt64 *dataOffset, + CSzAr *p, + UInt32 *numUnpackStreams, + UInt64 **unpackSizes, /* allocTemp */ + Byte **digestsDefined, /* allocTemp */ + UInt32 **digests, /* allocTemp */ + ISzAlloc *alloc, + ISzAlloc *allocTemp) +{ + for (;;) + { + UInt64 type; + RINOK(SzReadID(sd, &type)); + if ((UInt64)(int)type != type) + return SZ_ERROR_UNSUPPORTED; + switch((int)type) + { + case k7zIdEnd: + return SZ_OK; + case k7zIdPackInfo: + { + RINOK(SzReadPackInfo(sd, dataOffset, &p->NumPackStreams, + &p->PackSizes, &p->PackCRCsDefined, &p->PackCRCs, alloc)); + break; + } + case k7zIdUnpackInfo: + { + RINOK(SzReadUnpackInfo(sd, &p->NumFolders, &p->Folders, alloc, allocTemp)); + break; + } + case k7zIdSubStreamsInfo: + { + RINOK(SzReadSubStreamsInfo(sd, p->NumFolders, p->Folders, + numUnpackStreams, unpackSizes, digestsDefined, digests, allocTemp)); + break; + } + default: + return SZ_ERROR_UNSUPPORTED; + } + } +} + +size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, UInt16 *dest) +{ + size_t len = p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex]; + if (dest != 0) + { + size_t i; + const Byte *src = p->FileNames.data + (p->FileNameOffsets[fileIndex] * 2); + for (i = 0; i < len; i++) + dest[i] = GetUi16(src + i * 2); + } + return len; +} + +static SRes SzReadFileNames(const Byte *p, size_t size, UInt32 numFiles, size_t *sizes) +{ + UInt32 i; + size_t pos = 0; + for (i = 0; i < numFiles; i++) + { + sizes[i] = pos; + for (;;) + { + if (pos >= size) + return SZ_ERROR_ARCHIVE; + if (p[pos * 2] == 0 && p[pos * 2 + 1] == 0) + break; + pos++; + } + pos++; + } + sizes[i] = pos; + return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE; +} + +static SRes SzReadHeader2( + CSzArEx *p, /* allocMain */ + CSzData *sd, + UInt64 **unpackSizes, /* allocTemp */ + Byte **digestsDefined, /* allocTemp */ + UInt32 **digests, /* allocTemp */ + Byte **emptyStreamVector, /* allocTemp */ + Byte **emptyFileVector, /* allocTemp */ + Byte **lwtVector, /* allocTemp */ + ISzAlloc *allocMain, + ISzAlloc *allocTemp) +{ + UInt64 type; + UInt32 numUnpackStreams = 0; + UInt32 numFiles = 0; + CSzFileItem *files = 0; + UInt32 numEmptyStreams = 0; + UInt32 i; + + RINOK(SzReadID(sd, &type)); + + if (type == k7zIdArchiveProperties) + { + RINOK(SzReadArchiveProperties(sd)); + RINOK(SzReadID(sd, &type)); + } + + + if (type == k7zIdMainStreamsInfo) + { + RINOK(SzReadStreamsInfo(sd, + &p->dataPos, + &p->db, + &numUnpackStreams, + unpackSizes, + digestsDefined, + digests, allocMain, allocTemp)); + p->dataPos += p->startPosAfterHeader; + RINOK(SzReadID(sd, &type)); + } + + if (type == k7zIdEnd) + return SZ_OK; + if (type != k7zIdFilesInfo) + return SZ_ERROR_ARCHIVE; + + RINOK(SzReadNumber32(sd, &numFiles)); + p->db.NumFiles = numFiles; + + MY_ALLOC(CSzFileItem, files, (size_t)numFiles, allocMain); + + p->db.Files = files; + for (i = 0; i < numFiles; i++) + SzFile_Init(files + i); + + for (;;) + { + UInt64 type; + UInt64 size; + RINOK(SzReadID(sd, &type)); + if (type == k7zIdEnd) + break; + RINOK(SzReadNumber(sd, &size)); + if (size > sd->Size) + return SZ_ERROR_ARCHIVE; + if ((UInt64)(int)type != type) + { + RINOK(SzSkeepDataSize(sd, size)); + } + else + switch((int)type) + { + case k7zIdName: + { + size_t namesSize; + RINOK(SzReadSwitch(sd)); + namesSize = (size_t)size - 1; + if ((namesSize & 1) != 0) + return SZ_ERROR_ARCHIVE; + if (!Buf_Create(&p->FileNames, namesSize, allocMain)) + return SZ_ERROR_MEM; + if (p->FileNameOffsets) + return SZ_ERROR_FAIL; + MY_ALLOC(size_t, p->FileNameOffsets, numFiles + 1, allocMain); + memcpy(p->FileNames.data, sd->Data, namesSize); + RINOK(SzReadFileNames(sd->Data, namesSize >> 1, numFiles, p->FileNameOffsets)) + RINOK(SzSkeepDataSize(sd, namesSize)); + break; + } + case k7zIdEmptyStream: + { + RINOK(SzReadBoolVector(sd, numFiles, emptyStreamVector, allocTemp)); + numEmptyStreams = 0; + for (i = 0; i < numFiles; i++) + if ((*emptyStreamVector)[i]) + numEmptyStreams++; + break; + } + case k7zIdEmptyFile: + { + RINOK(SzReadBoolVector(sd, numEmptyStreams, emptyFileVector, allocTemp)); + break; + } + case k7zIdWinAttributes: + { + RINOK(SzReadBoolVector2(sd, numFiles, lwtVector, allocTemp)); + RINOK(SzReadSwitch(sd)); + for (i = 0; i < numFiles; i++) + { + CSzFileItem *f = &files[i]; + Byte defined = (*lwtVector)[i]; + f->AttribDefined = defined; + f->Attrib = 0; + if (defined) + { + RINOK(SzReadUInt32(sd, &f->Attrib)); + } + } + IAlloc_Free(allocTemp, *lwtVector); + *lwtVector = NULL; + break; + } + case k7zIdMTime: + { + RINOK(SzReadBoolVector2(sd, numFiles, lwtVector, allocTemp)); + RINOK(SzReadSwitch(sd)); + for (i = 0; i < numFiles; i++) + { + CSzFileItem *f = &files[i]; + Byte defined = (*lwtVector)[i]; + f->MTimeDefined = defined; + f->MTime.Low = f->MTime.High = 0; + if (defined) + { + RINOK(SzReadUInt32(sd, &f->MTime.Low)); + RINOK(SzReadUInt32(sd, &f->MTime.High)); + } + } + IAlloc_Free(allocTemp, *lwtVector); + *lwtVector = NULL; + break; + } + default: + { + RINOK(SzSkeepDataSize(sd, size)); + } + } + } + + { + UInt32 emptyFileIndex = 0; + UInt32 sizeIndex = 0; + for (i = 0; i < numFiles; i++) + { + CSzFileItem *file = files + i; + file->IsAnti = 0; + if (*emptyStreamVector == 0) + file->HasStream = 1; + else + file->HasStream = (Byte)((*emptyStreamVector)[i] ? 0 : 1); + if (file->HasStream) + { + file->IsDir = 0; + if (!(*unpackSizes) || (sizeIndex > numUnpackStreams)) + return SZ_ERROR_FAIL; + file->Size = (*unpackSizes)[sizeIndex]; + file->Crc = (*digests)[sizeIndex]; + file->CrcDefined = (Byte)(*digestsDefined)[sizeIndex]; + sizeIndex++; + } + else + { + if (*emptyFileVector == 0) + file->IsDir = 1; + else + file->IsDir = (Byte)((*emptyFileVector)[emptyFileIndex] ? 0 : 1); + emptyFileIndex++; + file->Size = 0; + file->Crc = 0; + file->CrcDefined = 0; + } + } + } + return SzArEx_Fill(p, allocMain); +} + +static SRes SzReadHeader( + CSzArEx *p, + CSzData *sd, + ISzAlloc *allocMain, + ISzAlloc *allocTemp) +{ + UInt64 *unpackSizes = 0; + Byte *digestsDefined = 0; + UInt32 *digests = 0; + Byte *emptyStreamVector = 0; + Byte *emptyFileVector = 0; + Byte *lwtVector = 0; + SRes res = SzReadHeader2(p, sd, + &unpackSizes, &digestsDefined, &digests, + &emptyStreamVector, &emptyFileVector, &lwtVector, + allocMain, allocTemp); + IAlloc_Free(allocTemp, unpackSizes); + IAlloc_Free(allocTemp, digestsDefined); + IAlloc_Free(allocTemp, digests); + IAlloc_Free(allocTemp, emptyStreamVector); + IAlloc_Free(allocTemp, emptyFileVector); + IAlloc_Free(allocTemp, lwtVector); + return res; +} + +static SRes SzReadAndDecodePackedStreams2( + ILookInStream *inStream, + CSzData *sd, + CBuf *outBuffer, + UInt64 baseOffset, + CSzAr *p, + UInt64 **unpackSizes, + Byte **digestsDefined, + UInt32 **digests, + ISzAlloc *allocTemp) +{ + + UInt32 numUnpackStreams = 0; + UInt64 dataStartPos; + CSzFolder *folder; + UInt64 unpackSize; + SRes res; + + RINOK(SzReadStreamsInfo(sd, &dataStartPos, p, + &numUnpackStreams, unpackSizes, digestsDefined, digests, + allocTemp, allocTemp)); + + dataStartPos += baseOffset; + if (p->NumFolders != 1) + return SZ_ERROR_ARCHIVE; + + folder = p->Folders; + unpackSize = SzFolder_GetUnpackSize(folder); + + RINOK(LookInStream_SeekTo(inStream, dataStartPos)); + + if (!Buf_Create(outBuffer, (size_t)unpackSize, allocTemp)) + return SZ_ERROR_MEM; + + res = SzFolder_Decode(folder, p->PackSizes, + inStream, dataStartPos, + outBuffer->data, (size_t)unpackSize, allocTemp); + RINOK(res); + if (folder->UnpackCRCDefined) + if (CrcCalc(outBuffer->data, (size_t)unpackSize) != folder->UnpackCRC) + return SZ_ERROR_CRC; + return SZ_OK; +} + +static SRes SzReadAndDecodePackedStreams( + ILookInStream *inStream, + CSzData *sd, + CBuf *outBuffer, + UInt64 baseOffset, + ISzAlloc *allocTemp) +{ + CSzAr p; + UInt64 *unpackSizes = 0; + Byte *digestsDefined = 0; + UInt32 *digests = 0; + SRes res; + SzAr_Init(&p); + res = SzReadAndDecodePackedStreams2(inStream, sd, outBuffer, baseOffset, + &p, &unpackSizes, &digestsDefined, &digests, + allocTemp); + SzAr_Free(&p, allocTemp); + IAlloc_Free(allocTemp, unpackSizes); + IAlloc_Free(allocTemp, digestsDefined); + IAlloc_Free(allocTemp, digests); + return res; +} + +static SRes SzArEx_Open2( + CSzArEx *p, + ILookInStream *inStream, + ISzAlloc *allocMain, + ISzAlloc *allocTemp) +{ + Byte header[k7zStartHeaderSize]; + Int64 startArcPos; + UInt64 nextHeaderOffset, nextHeaderSize; + size_t nextHeaderSizeT; + UInt32 nextHeaderCRC; + CBuf buffer; + SRes res; + + startArcPos = 0; + RINOK(inStream->Seek(inStream, &startArcPos, SZ_SEEK_CUR)); + + RINOK(LookInStream_Read2(inStream, header, k7zStartHeaderSize, SZ_ERROR_NO_ARCHIVE)); + + if (!TestSignatureCandidate(header)) + return SZ_ERROR_NO_ARCHIVE; + if (header[6] != k7zMajorVersion) + return SZ_ERROR_UNSUPPORTED; + + nextHeaderOffset = GetUi64(header + 12); + nextHeaderSize = GetUi64(header + 20); + nextHeaderCRC = GetUi32(header + 28); + + p->startPosAfterHeader = startArcPos + k7zStartHeaderSize; + + /*aCaB - 2010-02-16 - START OF RECOVERY MODE + if (CrcCalc(header + 12, 20) != GetUi32(header + 8)) { + return SZ_ERROR_CRC; + }*/ + if(!GetUi32(header + 8) && !nextHeaderOffset && !nextHeaderSize && !nextHeaderCRC) { + int i, checkSize = 500; + Byte buf[500]; + Int64 curpos=0, endpos=0, readpos; + RINOK(inStream->Seek(inStream, &curpos, SZ_SEEK_CUR)); + RINOK(inStream->Seek(inStream, &endpos, SZ_SEEK_END)); + if(endpos-curpos < 500) checkSize = endpos-curpos; + readpos = endpos - checkSize; + RINOK(inStream->Seek(inStream, &readpos, SZ_SEEK_SET)); + RINOK(LookInStream_Read2(inStream, buf, checkSize, SZ_ERROR_ARCHIVE)); + for (i = (int)checkSize - 2; i >= 0; i--) + if((buf[i] == 0x17 && buf[i + 1] == 0x6) || (buf[i] == 0x01 && buf[i + 1] == 0x04)) + break; + if (i < 0) + return SZ_ERROR_ARCHIVE; + nextHeaderSize = checkSize - i; + nextHeaderOffset = readpos + i; + if(nextHeaderOffset < k7zStartHeaderSize) + return SZ_ERROR_INPUT_EOF; + nextHeaderOffset -= k7zStartHeaderSize; + nextHeaderCRC = CrcCalc(buf + i, (size_t)nextHeaderSize); + RINOK(inStream->Seek(inStream, &curpos, SZ_SEEK_SET)); + } + /* aCaB - 2010-02-16 - END OF RECOVERY MODE */ + + nextHeaderSizeT = (size_t)nextHeaderSize; + if (nextHeaderSizeT != nextHeaderSize) + return SZ_ERROR_MEM; + if (nextHeaderSizeT == 0) + return SZ_OK; + if (nextHeaderOffset > nextHeaderOffset + nextHeaderSize || + nextHeaderOffset > nextHeaderOffset + nextHeaderSize + k7zStartHeaderSize) + return SZ_ERROR_NO_ARCHIVE; + + { + Int64 pos = 0; + RINOK(inStream->Seek(inStream, &pos, SZ_SEEK_END)); + if ((UInt64)pos < startArcPos + nextHeaderOffset || + (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset || + (UInt64)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset + nextHeaderSize) + return SZ_ERROR_INPUT_EOF; + } + + RINOK(LookInStream_SeekTo(inStream, startArcPos + k7zStartHeaderSize + nextHeaderOffset)); + + if (!Buf_Create(&buffer, nextHeaderSizeT, allocTemp)) + return SZ_ERROR_MEM; + + res = LookInStream_Read(inStream, buffer.data, nextHeaderSizeT); + if (res == SZ_OK) + { + res = SZ_ERROR_ARCHIVE; + if (CrcCalc(buffer.data, nextHeaderSizeT) == nextHeaderCRC) + { + CSzData sd; + UInt64 type; + sd.Data = buffer.data; + sd.Size = buffer.size; + res = SzReadID(&sd, &type); + if (res == SZ_OK) + { + if (type == k7zIdEncodedHeader) + { + CBuf outBuffer; + Buf_Init(&outBuffer); + res = SzReadAndDecodePackedStreams(inStream, &sd, &outBuffer, p->startPosAfterHeader, allocTemp); + if (res != SZ_OK) + Buf_Free(&outBuffer, allocTemp); + else + { + Buf_Free(&buffer, allocTemp); + buffer.data = outBuffer.data; + buffer.size = outBuffer.size; + sd.Data = buffer.data; + sd.Size = buffer.size; + res = SzReadID(&sd, &type); + } + } + } + if (res == SZ_OK) + { + if (type == k7zIdHeader) + res = SzReadHeader(p, &sd, allocMain, allocTemp); + else + res = SZ_ERROR_UNSUPPORTED; + } + } + } + Buf_Free(&buffer, allocTemp); + return res; +} + +SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, ISzAlloc *allocMain, ISzAlloc *allocTemp) +{ + SRes res = SzArEx_Open2(p, inStream, allocMain, allocTemp); + if (res != SZ_OK) + SzArEx_Free(p, allocMain); + return res; +} + +SRes SzArEx_Extract( + const CSzArEx *p, + ILookInStream *inStream, + UInt32 fileIndex, + UInt32 *blockIndex, + Byte **outBuffer, + size_t *outBufferSize, + size_t *offset, + size_t *outSizeProcessed, + ISzAlloc *allocMain, + ISzAlloc *allocTemp) +{ + UInt32 folderIndex; + SRes res = SZ_OK; + if (!(p->FileIndexToFolderIndexMap) || (fileIndex >= p->db.NumFiles)) + return SZ_ERROR_FAIL; + folderIndex = p->FileIndexToFolderIndexMap[fileIndex]; + *offset = 0; + *outSizeProcessed = 0; + if (folderIndex == (UInt32)-1) + { + IAlloc_Free(allocMain, *outBuffer); + *blockIndex = folderIndex; + *outBuffer = 0; + *outBufferSize = 0; + return SZ_OK; + } + + if (*outBuffer == 0 || *blockIndex != folderIndex) + { + CSzFolder *folder = p->db.Folders + folderIndex; + UInt64 unpackSizeSpec = SzFolder_GetUnpackSize(folder); + size_t unpackSize = (size_t)unpackSizeSpec; + UInt64 startOffset; + if (!(p->PackStreamStartPositions) || !(p->FolderStartPackStreamIndex) || (folderIndex >= p->db.NumFolders) || + (p->FolderStartPackStreamIndex[folderIndex] >= p->db.NumPackStreams)) + return SZ_ERROR_FAIL; + startOffset = SzArEx_GetFolderStreamPos(p, folderIndex, 0); + + if (unpackSize != unpackSizeSpec) + return SZ_ERROR_MEM; + *blockIndex = folderIndex; + IAlloc_Free(allocMain, *outBuffer); + *outBuffer = 0; + + RINOK(LookInStream_SeekTo(inStream, startOffset)); + + if (res == SZ_OK) + { + *outBufferSize = unpackSize; + if (unpackSize != 0) + { + *outBuffer = (Byte *)IAlloc_Alloc(allocMain, unpackSize); + if (*outBuffer == 0) + res = SZ_ERROR_MEM; + } + if (res == SZ_OK) + { + res = SzFolder_Decode(folder, + p->db.PackSizes + p->FolderStartPackStreamIndex[folderIndex], + inStream, startOffset, + *outBuffer, unpackSize, allocTemp); + if (res == SZ_OK) + { + if (folder->UnpackCRCDefined) + { + if (CrcCalc(*outBuffer, unpackSize) != folder->UnpackCRC) + res = SZ_ERROR_CRC; + } + } + } + } + } + if (res == SZ_OK) + { + UInt32 i; + CSzFileItem *fileItem = p->db.Files + fileIndex; + *offset = 0; + if (!(p->FolderStartFileIndex) || (folderIndex >= p->db.NumFolders)) + return SZ_ERROR_FAIL; + for (i = p->FolderStartFileIndex[folderIndex]; i < fileIndex; i++) + *offset += (UInt32)p->db.Files[i].Size; + *outSizeProcessed = (size_t)fileItem->Size; + if (*offset + *outSizeProcessed > *outBufferSize) + return SZ_ERROR_FAIL; + if (fileItem->CrcDefined && CrcCalc(*outBuffer + *offset, *outSizeProcessed) != fileItem->Crc) + res = SZ_ERROR_CRC; + } + return res; +} diff --git a/clamscan/libclamav/7z/7zStream.c b/clamscan/libclamav/7z/7zStream.c new file mode 100644 index 0000000..0ebb7b5 --- /dev/null +++ b/clamscan/libclamav/7z/7zStream.c @@ -0,0 +1,169 @@ +/* 7zStream.c -- 7z Stream functions +2010-03-11 : Igor Pavlov : Public domain */ + +#include + +#include "Types.h" + +SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType) +{ + while (size != 0) + { + size_t processed = size; + RINOK(stream->Read(stream, buf, &processed)); + if (processed == 0) + return errorType; + buf = (void *)((Byte *)buf + processed); + size -= processed; + } + return SZ_OK; +} + +SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size) +{ + return SeqInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); +} + +SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf) +{ + size_t processed = 1; + RINOK(stream->Read(stream, buf, &processed)); + return (processed == 1) ? SZ_OK : SZ_ERROR_INPUT_EOF; +} + +SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset) +{ + Int64 t = offset; + return stream->Seek(stream, &t, SZ_SEEK_SET); +} + +SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size) +{ + const void *lookBuf; + if (*size == 0) + return SZ_OK; + RINOK(stream->Look(stream, &lookBuf, size)); + memcpy(buf, lookBuf, *size); + return stream->Skip(stream, *size); +} + +SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType) +{ + while (size != 0) + { + size_t processed = size; + RINOK(stream->Read(stream, buf, &processed)); + if (processed == 0) + return errorType; + buf = (void *)((Byte *)buf + processed); + size -= processed; + } + return SZ_OK; +} + +SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size) +{ + return LookInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); +} + +static SRes LookToRead_Look_Lookahead(void *pp, const void **buf, size_t *size) +{ + SRes res = SZ_OK; + CLookToRead *p = (CLookToRead *)pp; + size_t size2 = p->size - p->pos; + if (size2 == 0 && *size > 0) + { + p->pos = 0; + size2 = LookToRead_BUF_SIZE; + res = p->realStream->Read(p->realStream, p->buf, &size2); + p->size = size2; + } + if (size2 < *size) + *size = size2; + *buf = p->buf + p->pos; + return res; +} + +static SRes LookToRead_Look_Exact(void *pp, const void **buf, size_t *size) +{ + SRes res = SZ_OK; + CLookToRead *p = (CLookToRead *)pp; + size_t size2 = p->size - p->pos; + if (size2 == 0 && *size > 0) + { + p->pos = 0; + if (*size > LookToRead_BUF_SIZE) + *size = LookToRead_BUF_SIZE; + res = p->realStream->Read(p->realStream, p->buf, size); + size2 = p->size = *size; + } + if (size2 < *size) + *size = size2; + *buf = p->buf + p->pos; + return res; +} + +static SRes LookToRead_Skip(void *pp, size_t offset) +{ + CLookToRead *p = (CLookToRead *)pp; + p->pos += offset; + return SZ_OK; +} + +static SRes LookToRead_Read(void *pp, void *buf, size_t *size) +{ + CLookToRead *p = (CLookToRead *)pp; + size_t rem = p->size - p->pos; + if (rem == 0) + return p->realStream->Read(p->realStream, buf, size); + if (rem > *size) + rem = *size; + memcpy(buf, p->buf + p->pos, rem); + p->pos += rem; + *size = rem; + return SZ_OK; +} + +static SRes LookToRead_Seek(void *pp, Int64 *pos, ESzSeek origin) +{ + CLookToRead *p = (CLookToRead *)pp; + p->pos = p->size = 0; + return p->realStream->Seek(p->realStream, pos, origin); +} + +void LookToRead_CreateVTable(CLookToRead *p, int lookahead) +{ + p->s.Look = lookahead ? + LookToRead_Look_Lookahead : + LookToRead_Look_Exact; + p->s.Skip = LookToRead_Skip; + p->s.Read = LookToRead_Read; + p->s.Seek = LookToRead_Seek; +} + +void LookToRead_Init(CLookToRead *p) +{ + p->pos = p->size = 0; +} + +static SRes SecToLook_Read(void *pp, void *buf, size_t *size) +{ + CSecToLook *p = (CSecToLook *)pp; + return LookInStream_LookRead(p->realStream, buf, size); +} + +void SecToLook_CreateVTable(CSecToLook *p) +{ + p->s.Read = SecToLook_Read; +} + +static SRes SecToRead_Read(void *pp, void *buf, size_t *size) +{ + CSecToRead *p = (CSecToRead *)pp; + return p->realStream->Read(p->realStream, buf, size); +} + +void SecToRead_CreateVTable(CSecToRead *p) +{ + p->s.Read = SecToRead_Read; +} diff --git a/clamscan/libclamav/7z/7zVersion.h b/clamscan/libclamav/7z/7zVersion.h new file mode 100644 index 0000000..9d99c5d --- /dev/null +++ b/clamscan/libclamav/7z/7zVersion.h @@ -0,0 +1,7 @@ +#define MY_VER_MAJOR 9 +#define MY_VER_MINOR 20 +#define MY_VER_BUILD 0 +#define MY_VERSION "9.20" +#define MY_DATE "2010-11-18" +#define MY_COPYRIGHT ": Igor Pavlov : Public domain" +#define MY_VERSION_COPYRIGHT_DATE MY_VERSION " " MY_COPYRIGHT " : " MY_DATE diff --git a/clamscan/libclamav/7z/Alloc.h b/clamscan/libclamav/7z/Alloc.h new file mode 100644 index 0000000..b8e4143 --- /dev/null +++ b/clamscan/libclamav/7z/Alloc.h @@ -0,0 +1,38 @@ +/* Alloc.h -- Memory allocation functions +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __COMMON_ALLOC_H +#define __COMMON_ALLOC_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +void *MyAlloc(size_t size); +void MyFree(void *address); + +#ifdef _WIN32 + +void SetLargePageSize(); + +void *MidAlloc(size_t size); +void MidFree(void *address); +void *BigAlloc(size_t size); +void BigFree(void *address); + +#else + +#define MidAlloc(size) MyAlloc(size) +#define MidFree(address) MyFree(address) +#define BigAlloc(size) MyAlloc(size) +#define BigFree(address) MyFree(address) + +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/clamscan/libclamav/7z/Bcj2.c b/clamscan/libclamav/7z/Bcj2.c new file mode 100644 index 0000000..20199ce --- /dev/null +++ b/clamscan/libclamav/7z/Bcj2.c @@ -0,0 +1,132 @@ +/* Bcj2.c -- Converter for x86 code (BCJ2) +2008-10-04 : Igor Pavlov : Public domain */ + +#include "Bcj2.h" + +#ifdef _LZMA_PROB32 +#define CProb UInt32 +#else +#define CProb UInt16 +#endif + +#define IsJcc(b0, b1) ((b0) == 0x0F && ((b1) & 0xF0) == 0x80) +#define IsJ(b0, b1) ((b1 & 0xFE) == 0xE8 || IsJcc(b0, b1)) + +#define kNumTopBits 24 +#define kTopValue ((UInt32)1 << kNumTopBits) + +#define kNumBitModelTotalBits 11 +#define kBitModelTotal (1 << kNumBitModelTotalBits) +#define kNumMoveBits 5 + +#define RC_READ_BYTE (*buffer++) +#define RC_TEST { if (buffer == bufferLim) return SZ_ERROR_DATA; } +#define RC_INIT2 code = 0; range = 0xFFFFFFFF; \ + { int i; for (i = 0; i < 5; i++) { RC_TEST; code = (code << 8) | RC_READ_BYTE; }} + +#define NORMALIZE if (range < kTopValue) { RC_TEST; range <<= 8; code = (code << 8) | RC_READ_BYTE; } + +#define IF_BIT_0(p) ttt = *(p); bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) +#define UPDATE_0(p) range = bound; *(p) = (CProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); NORMALIZE; +#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CProb)(ttt - (ttt >> kNumMoveBits)); NORMALIZE; + +int Bcj2_Decode( + const Byte *buf0, SizeT size0, + const Byte *buf1, SizeT size1, + const Byte *buf2, SizeT size2, + const Byte *buf3, SizeT size3, + Byte *outBuf, SizeT outSize) +{ + CProb p[256 + 2]; + SizeT inPos = 0, outPos = 0; + + const Byte *buffer, *bufferLim; + UInt32 range, code; + Byte prevByte = 0; + + unsigned int i; + for (i = 0; i < sizeof(p) / sizeof(p[0]); i++) + p[i] = kBitModelTotal >> 1; + + buffer = buf3; + bufferLim = buffer + size3; + RC_INIT2 + + if (outSize == 0) + return SZ_OK; + + for (;;) + { + Byte b; + CProb *prob; + UInt32 bound; + UInt32 ttt; + + SizeT limit = size0 - inPos; + if (outSize - outPos < limit) + limit = outSize - outPos; + while (limit != 0) + { + Byte b = buf0[inPos]; + outBuf[outPos++] = b; + if (IsJ(prevByte, b)) + break; + inPos++; + prevByte = b; + limit--; + } + + if (limit == 0 || outPos == outSize) + break; + + b = buf0[inPos++]; + + if (b == 0xE8) + prob = p + prevByte; + else if (b == 0xE9) + prob = p + 256; + else + prob = p + 257; + + IF_BIT_0(prob) + { + UPDATE_0(prob) + prevByte = b; + } + else + { + UInt32 dest; + const Byte *v; + UPDATE_1(prob) + if (b == 0xE8) + { + v = buf1; + if (size1 < 4) + return SZ_ERROR_DATA; + buf1 += 4; + size1 -= 4; + } + else + { + v = buf2; + if (size2 < 4) + return SZ_ERROR_DATA; + buf2 += 4; + size2 -= 4; + } + dest = (((UInt32)v[0] << 24) | ((UInt32)v[1] << 16) | + ((UInt32)v[2] << 8) | ((UInt32)v[3])) - ((UInt32)outPos + 4); + outBuf[outPos++] = (Byte)dest; + if (outPos == outSize) + break; + outBuf[outPos++] = (Byte)(dest >> 8); + if (outPos == outSize) + break; + outBuf[outPos++] = (Byte)(dest >> 16); + if (outPos == outSize) + break; + outBuf[outPos++] = prevByte = (Byte)(dest >> 24); + } + } + return (outPos == outSize) ? SZ_OK : SZ_ERROR_DATA; +} diff --git a/clamscan/libclamav/7z/Bcj2.h b/clamscan/libclamav/7z/Bcj2.h new file mode 100644 index 0000000..dbc0541 --- /dev/null +++ b/clamscan/libclamav/7z/Bcj2.h @@ -0,0 +1,38 @@ +/* Bcj2.h -- Converter for x86 code (BCJ2) +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __BCJ2_H +#define __BCJ2_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +Conditions: + outSize <= FullOutputSize, + where FullOutputSize is full size of output stream of x86_2 filter. + +If buf0 overlaps outBuf, there are two required conditions: + 1) (buf0 >= outBuf) + 2) (buf0 + size0 >= outBuf + FullOutputSize). + +Returns: + SZ_OK + SZ_ERROR_DATA - Data error +*/ + +int Bcj2_Decode( + const Byte *buf0, SizeT size0, + const Byte *buf1, SizeT size1, + const Byte *buf2, SizeT size2, + const Byte *buf3, SizeT size3, + Byte *outBuf, SizeT outSize); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/clamscan/libclamav/7z/Bra.c b/clamscan/libclamav/7z/Bra.c new file mode 100644 index 0000000..2e47b14 --- /dev/null +++ b/clamscan/libclamav/7z/Bra.c @@ -0,0 +1,133 @@ +/* Bra.c -- Converters for RISC code +2010-04-16 : Igor Pavlov : Public domain */ + +#include "Bra.h" + +SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + SizeT i; + if (size < 4) + return 0; + size -= 4; + ip += 8; + for (i = 0; i <= size; i += 4) + { + if (data[i + 3] == 0xEB) + { + UInt32 dest; + UInt32 src = ((UInt32)data[i + 2] << 16) | ((UInt32)data[i + 1] << 8) | (data[i + 0]); + src <<= 2; + if (encoding) + dest = ip + (UInt32)i + src; + else + dest = src - (ip + (UInt32)i); + dest >>= 2; + data[i + 2] = (Byte)(dest >> 16); + data[i + 1] = (Byte)(dest >> 8); + data[i + 0] = (Byte)dest; + } + } + return i; +} + +SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + SizeT i; + if (size < 4) + return 0; + size -= 4; + ip += 4; + for (i = 0; i <= size; i += 2) + { + if ((data[i + 1] & 0xF8) == 0xF0 && + (data[i + 3] & 0xF8) == 0xF8) + { + UInt32 dest; + UInt32 src = + (((UInt32)data[i + 1] & 0x7) << 19) | + ((UInt32)data[i + 0] << 11) | + (((UInt32)data[i + 3] & 0x7) << 8) | + (data[i + 2]); + + src <<= 1; + if (encoding) + dest = ip + (UInt32)i + src; + else + dest = src - (ip + (UInt32)i); + dest >>= 1; + + data[i + 1] = (Byte)(0xF0 | ((dest >> 19) & 0x7)); + data[i + 0] = (Byte)(dest >> 11); + data[i + 3] = (Byte)(0xF8 | ((dest >> 8) & 0x7)); + data[i + 2] = (Byte)dest; + i += 2; + } + } + return i; +} + +SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + SizeT i; + if (size < 4) + return 0; + size -= 4; + for (i = 0; i <= size; i += 4) + { + if ((data[i] >> 2) == 0x12 && (data[i + 3] & 3) == 1) + { + UInt32 src = ((UInt32)(data[i + 0] & 3) << 24) | + ((UInt32)data[i + 1] << 16) | + ((UInt32)data[i + 2] << 8) | + ((UInt32)data[i + 3] & (~3)); + + UInt32 dest; + if (encoding) + dest = ip + (UInt32)i + src; + else + dest = src - (ip + (UInt32)i); + data[i + 0] = (Byte)(0x48 | ((dest >> 24) & 0x3)); + data[i + 1] = (Byte)(dest >> 16); + data[i + 2] = (Byte)(dest >> 8); + data[i + 3] &= 0x3; + data[i + 3] |= dest; + } + } + return i; +} + +SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + UInt32 i; + if (size < 4) + return 0; + size -= 4; + for (i = 0; i <= size; i += 4) + { + if ((data[i] == 0x40 && (data[i + 1] & 0xC0) == 0x00) || + (data[i] == 0x7F && (data[i + 1] & 0xC0) == 0xC0)) + { + UInt32 src = + ((UInt32)data[i + 0] << 24) | + ((UInt32)data[i + 1] << 16) | + ((UInt32)data[i + 2] << 8) | + ((UInt32)data[i + 3]); + UInt32 dest; + + src <<= 2; + if (encoding) + dest = ip + i + src; + else + dest = src - (ip + i); + dest >>= 2; + + dest = (((0 - ((dest >> 22) & 1)) << 22) & 0x3FFFFFFF) | (dest & 0x3FFFFF) | 0x40000000; + + data[i + 0] = (Byte)(dest >> 24); + data[i + 1] = (Byte)(dest >> 16); + data[i + 2] = (Byte)(dest >> 8); + data[i + 3] = (Byte)dest; + } + } + return i; +} diff --git a/clamscan/libclamav/7z/Bra.h b/clamscan/libclamav/7z/Bra.h new file mode 100644 index 0000000..5748c1c --- /dev/null +++ b/clamscan/libclamav/7z/Bra.h @@ -0,0 +1,68 @@ +/* Bra.h -- Branch converters for executables +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __BRA_H +#define __BRA_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* +These functions convert relative addresses to absolute addresses +in CALL instructions to increase the compression ratio. + + In: + data - data buffer + size - size of data + ip - current virtual Instruction Pinter (IP) value + state - state variable for x86 converter + encoding - 0 (for decoding), 1 (for encoding) + + Out: + state - state variable for x86 converter + + Returns: + The number of processed bytes. If you call these functions with multiple calls, + you must start next call with first byte after block of processed bytes. + + Type Endian Alignment LookAhead + + x86 little 1 4 + ARMT little 2 2 + ARM little 4 0 + PPC big 4 0 + SPARC big 4 0 + IA64 little 16 0 + + size must be >= Alignment + LookAhead, if it's not last block. + If (size < Alignment + LookAhead), converter returns 0. + + Example: + + UInt32 ip = 0; + for () + { + ; size must be >= Alignment + LookAhead, if it's not last block + SizeT processed = Convert(data, size, ip, 1); + data += processed; + size -= processed; + ip += processed; + } +*/ + +#define x86_Convert_Init(state) { state = 0; } +SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding); +SizeT ARM_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); +SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/clamscan/libclamav/7z/Bra86.c b/clamscan/libclamav/7z/Bra86.c new file mode 100644 index 0000000..1ee0e70 --- /dev/null +++ b/clamscan/libclamav/7z/Bra86.c @@ -0,0 +1,85 @@ +/* Bra86.c -- Converter for x86 code (BCJ) +2008-10-04 : Igor Pavlov : Public domain */ + +#include "Bra.h" + +#define Test86MSByte(b) ((b) == 0 || (b) == 0xFF) + +const Byte kMaskToAllowedStatus[8] = {1, 1, 1, 0, 1, 0, 0, 0}; +const Byte kMaskToBitNumber[8] = {0, 1, 2, 2, 3, 3, 3, 3}; + +SizeT x86_Convert(Byte *data, SizeT size, UInt32 ip, UInt32 *state, int encoding) +{ + SizeT bufferPos = 0, prevPosT; + UInt32 prevMask = *state & 0x7; + if (size < 5) + return 0; + ip += 5; + prevPosT = (SizeT)0 - 1; + + for (;;) + { + Byte *p = data + bufferPos; + Byte *limit = data + size - 4; + for (; p < limit; p++) + if ((*p & 0xFE) == 0xE8) + break; + bufferPos = (SizeT)(p - data); + if (p >= limit) + break; + prevPosT = bufferPos - prevPosT; + if (prevPosT > 3) + prevMask = 0; + else + { + prevMask = (prevMask << ((int)prevPosT - 1)) & 0x7; + if (prevMask != 0) + { + Byte b = p[4 - kMaskToBitNumber[prevMask]]; + if (!kMaskToAllowedStatus[prevMask] || Test86MSByte(b)) + { + prevPosT = bufferPos; + prevMask = ((prevMask << 1) & 0x7) | 1; + bufferPos++; + continue; + } + } + } + prevPosT = bufferPos; + + if (Test86MSByte(p[4])) + { + UInt32 src = ((UInt32)p[4] << 24) | ((UInt32)p[3] << 16) | ((UInt32)p[2] << 8) | ((UInt32)p[1]); + UInt32 dest; + for (;;) + { + Byte b; + int index; + if (encoding) + dest = (ip + (UInt32)bufferPos) + src; + else + dest = src - (ip + (UInt32)bufferPos); + if (prevMask == 0) + break; + index = kMaskToBitNumber[prevMask] * 8; + b = (Byte)(dest >> (24 - index)); + if (!Test86MSByte(b)) + break; + src = dest ^ ((1 << (32 - index)) - 1); + } + p[4] = (Byte)(~(((dest >> 24) & 1) - 1)); + p[3] = (Byte)(dest >> 16); + p[2] = (Byte)(dest >> 8); + p[1] = (Byte)dest; + bufferPos += 5; + } + else + { + prevMask = ((prevMask << 1) & 0x7) | 1; + bufferPos++; + } + } + prevPosT = bufferPos - prevPosT; + *state = ((prevPosT > 3) ? 0 : ((prevMask << ((int)prevPosT - 1)) & 0x7)); + return bufferPos; +} diff --git a/clamscan/libclamav/7z/BraIA64.c b/clamscan/libclamav/7z/BraIA64.c new file mode 100644 index 0000000..0b4ee85 --- /dev/null +++ b/clamscan/libclamav/7z/BraIA64.c @@ -0,0 +1,67 @@ +/* BraIA64.c -- Converter for IA-64 code +2008-10-04 : Igor Pavlov : Public domain */ + +#include "Bra.h" + +static const Byte kBranchTable[32] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 4, 4, 6, 6, 0, 0, 7, 7, + 4, 4, 0, 0, 4, 4, 0, 0 +}; + +SizeT IA64_Convert(Byte *data, SizeT size, UInt32 ip, int encoding) +{ + SizeT i; + if (size < 16) + return 0; + size -= 16; + for (i = 0; i <= size; i += 16) + { + UInt32 instrTemplate = data[i] & 0x1F; + UInt32 mask = kBranchTable[instrTemplate]; + UInt32 bitPos = 5; + int slot; + for (slot = 0; slot < 3; slot++, bitPos += 41) + { + UInt32 bytePos, bitRes; + UInt64 instruction, instNorm; + int j; + if (((mask >> slot) & 1) == 0) + continue; + bytePos = (bitPos >> 3); + bitRes = bitPos & 0x7; + instruction = 0; + for (j = 0; j < 6; j++) + instruction += (UInt64)data[i + j + bytePos] << (8 * j); + + instNorm = instruction >> bitRes; + if (((instNorm >> 37) & 0xF) == 0x5 && ((instNorm >> 9) & 0x7) == 0) + { + UInt32 src = (UInt32)((instNorm >> 13) & 0xFFFFF); + UInt32 dest; + src |= ((UInt32)(instNorm >> 36) & 1) << 20; + + src <<= 4; + + if (encoding) + dest = ip + (UInt32)i + src; + else + dest = src - (ip + (UInt32)i); + + dest >>= 4; + + instNorm &= ~((UInt64)(0x8FFFFF) << 13); + instNorm |= ((UInt64)(dest & 0xFFFFF) << 13); + instNorm |= ((UInt64)(dest & 0x100000) << (36 - 20)); + + instruction &= (1 << bitRes) - 1; + instruction |= (instNorm << bitRes); + for (j = 0; j < 6; j++) + data[i + j + bytePos] = (Byte)(instruction >> (8 * j)); + } + } + } + return i; +} diff --git a/clamscan/libclamav/7z/CpuArch.c b/clamscan/libclamav/7z/CpuArch.c new file mode 100644 index 0000000..56b04a0 --- /dev/null +++ b/clamscan/libclamav/7z/CpuArch.c @@ -0,0 +1,173 @@ +/* CpuArch.c -- CPU specific code +2010-10-26: Igor Pavlov : Public domain */ + +#if defined(_WIN32) +#include +#include +#endif + +#include "CpuArch.h" + +#ifdef MY_CPU_X86_OR_AMD64 + +#if (defined(_MSC_VER) && !defined(MY_CPU_AMD64)) || defined(__GNUC__) +#define USE_ASM +#endif + +#if defined(USE_ASM) && !defined(MY_CPU_AMD64) +static UInt32 CheckFlag(UInt32 flag) +{ + #ifdef _MSC_VER + __asm pushfd; + __asm pop EAX; + __asm mov EDX, EAX; + __asm xor EAX, flag; + __asm push EAX; + __asm popfd; + __asm pushfd; + __asm pop EAX; + __asm xor EAX, EDX; + __asm push EDX; + __asm popfd; + __asm and flag, EAX; + #else + __asm__ __volatile__ ( + "pushf\n\t" + "pop %%EAX\n\t" + "movl %%EAX,%%EDX\n\t" + "xorl %0,%%EAX\n\t" + "push %%EAX\n\t" + "popf\n\t" + "pushf\n\t" + "pop %%EAX\n\t" + "xorl %%EDX,%%EAX\n\t" + "push %%EDX\n\t" + "popf\n\t" + "andl %%EAX, %0\n\t": + "=c" (flag) : "c" (flag)); + #endif + return flag; +} +#define CHECK_CPUID_IS_SUPPORTED if (CheckFlag(1 << 18) == 0 || CheckFlag(1 << 21) == 0) return False; +#else +#define CHECK_CPUID_IS_SUPPORTED +#endif + +static void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d) +{ + #ifdef USE_ASM + + #ifdef _MSC_VER + + UInt32 a2, b2, c2, d2; + __asm xor EBX, EBX; + __asm xor ECX, ECX; + __asm xor EDX, EDX; + __asm mov EAX, function; + __asm cpuid; + __asm mov a2, EAX; + __asm mov b2, EBX; + __asm mov c2, ECX; + __asm mov d2, EDX; + + *a = a2; + *b = b2; + *c = c2; + *d = d2; + + #else + + __asm__ __volatile__ ( + "cpuid" + : "=a" (*a) , + "=b" (*b) , + "=c" (*c) , + "=d" (*d) + : "0" (function)) ; + + #endif + + #else + + int CPUInfo[4]; + __cpuid(CPUInfo, function); + *a = CPUInfo[0]; + *b = CPUInfo[1]; + *c = CPUInfo[2]; + *d = CPUInfo[3]; + + #endif +} + +Bool x86cpuid_CheckAndRead(Cx86cpuid *p) +{ + CHECK_CPUID_IS_SUPPORTED + MyCPUID(0, &p->maxFunc, &p->vendor[0], &p->vendor[2], &p->vendor[1]); + MyCPUID(1, &p->ver, &p->b, &p->c, &p->d); + return True; +} + +static UInt32 kVendors[][3] = +{ + { 0x756E6547, 0x49656E69, 0x6C65746E}, + { 0x68747541, 0x69746E65, 0x444D4163}, + { 0x746E6543, 0x48727561, 0x736C7561} +}; + +int x86cpuid_GetFirm(const Cx86cpuid *p) +{ + unsigned i; + for (i = 0; i < sizeof(kVendors) / sizeof(kVendors[i]); i++) + { + const UInt32 *v = kVendors[i]; + if (v[0] == p->vendor[0] && + v[1] == p->vendor[1] && + v[2] == p->vendor[2]) + return (int)i; + } + return -1; +} + +Bool CPU_Is_InOrder() +{ + Cx86cpuid p; + int firm; + UInt32 family, model; + if (!x86cpuid_CheckAndRead(&p)) + return True; + family = x86cpuid_GetFamily(&p); + model = x86cpuid_GetModel(&p); + firm = x86cpuid_GetFirm(&p); + switch (firm) + { + case CPU_FIRM_INTEL: return (family < 6 || (family == 6 && model == 0x100C)); + case CPU_FIRM_AMD: return (family < 5 || (family == 5 && (model < 6 || model == 0xA))); + case CPU_FIRM_VIA: return (family < 6 || (family == 6 && model < 0xF)); + } + return True; +} + +#if !defined(MY_CPU_AMD64) && defined(_WIN32) +static Bool CPU_Sys_Is_SSE_Supported() +{ + OSVERSIONINFO vi; + vi.dwOSVersionInfoSize = sizeof(vi); + if (!GetVersionEx(&vi)) + return False; + return (vi.dwMajorVersion >= 5); +} +#define CHECK_SYS_SSE_SUPPORT if (!CPU_Sys_Is_SSE_Supported()) return False; +#else +#define CHECK_SYS_SSE_SUPPORT +#endif + +Bool CPU_Is_Aes_Supported() +{ + Cx86cpuid p; + CHECK_SYS_SSE_SUPPORT + if (!x86cpuid_CheckAndRead(&p)) + return False; + return (p.c >> 25) & 1; +} + +#endif diff --git a/clamscan/libclamav/7z/CpuArch.h b/clamscan/libclamav/7z/CpuArch.h new file mode 100644 index 0000000..fbb9019 --- /dev/null +++ b/clamscan/libclamav/7z/CpuArch.h @@ -0,0 +1,37 @@ +/* CpuArch.h -- CPU specific code +2010-10-26: Igor Pavlov : Public domain */ + +#ifndef __CPU_ARCH_H +#define __CPU_ARCH_H + +#include "Types.h" +#include "others.h" + +EXTERN_C_BEGIN + +/* +MY_CPU_LE means that CPU is LITTLE ENDIAN. +If MY_CPU_LE is not defined, we don't know about that property of platform (it can be LITTLE ENDIAN). + +MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned memory accesses. +If MY_CPU_LE_UNALIGN is not defined, we don't know about these properties of platform. +*/ + +#define GetUi16(p) (cli_readint16(p)) +#define GetUi32(p) (cli_readint32(p)) + +#define GetUi64(p) (GetUi32(p) | ((UInt64)GetUi32(((const Byte *)(p)) + 4) << 32)) + +#define SetUi16(p, d) { UInt32 _x_ = (d); \ + ((Byte *)(p))[0] = (Byte)_x_; \ + ((Byte *)(p))[1] = (Byte)(_x_ >> 8); } + +#define SetUi32(p, d) (cli_writeint32(p, d)) + +#define SetUi64(p, d) { UInt64 _x64_ = (d); \ + SetUi32(p, (UInt32)_x64_); \ + SetUi32(((Byte *)(p)) + 4, (UInt32)(_x64_ >> 32)); } + +#define GetBe16(p) (((UInt16)((const Byte *)(p))[0] << 8) | ((const Byte *)(p))[1]) + +#endif diff --git a/clamscan/libclamav/7z/Delta.c b/clamscan/libclamav/7z/Delta.c new file mode 100644 index 0000000..2b327f1 --- /dev/null +++ b/clamscan/libclamav/7z/Delta.c @@ -0,0 +1,62 @@ +/* Delta.c -- Delta converter +2009-05-26 : Igor Pavlov : Public domain */ + +#include "Delta.h" + +void Delta_Init(Byte *state) +{ + unsigned i; + for (i = 0; i < DELTA_STATE_SIZE; i++) + state[i] = 0; +} + +static void MyMemCpy(Byte *dest, const Byte *src, unsigned size) +{ + unsigned i; + for (i = 0; i < size; i++) + dest[i] = src[i]; +} + +void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size) +{ + Byte buf[DELTA_STATE_SIZE]; + unsigned j = 0; + MyMemCpy(buf, state, delta); + { + SizeT i; + for (i = 0; i < size;) + { + for (j = 0; j < delta && i < size; i++, j++) + { + Byte b = data[i]; + data[i] = (Byte)(b - buf[j]); + buf[j] = b; + } + } + } + if (j == delta) + j = 0; + MyMemCpy(state, buf + j, delta - j); + MyMemCpy(state + delta - j, buf, j); +} + +void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size) +{ + Byte buf[DELTA_STATE_SIZE]; + unsigned j = 0; + MyMemCpy(buf, state, delta); + { + SizeT i; + for (i = 0; i < size;) + { + for (j = 0; j < delta && i < size; i++, j++) + { + buf[j] = data[i] = (Byte)(buf[j] + data[i]); + } + } + } + if (j == delta) + j = 0; + MyMemCpy(state, buf + j, delta - j); + MyMemCpy(state + delta - j, buf, j); +} diff --git a/clamscan/libclamav/7z/Delta.h b/clamscan/libclamav/7z/Delta.h new file mode 100644 index 0000000..0d4cd62 --- /dev/null +++ b/clamscan/libclamav/7z/Delta.h @@ -0,0 +1,23 @@ +/* Delta.h -- Delta converter +2009-04-15 : Igor Pavlov : Public domain */ + +#ifndef __DELTA_H +#define __DELTA_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define DELTA_STATE_SIZE 256 + +void Delta_Init(Byte *state); +void Delta_Encode(Byte *state, unsigned delta, Byte *data, SizeT size); +void Delta_Decode(Byte *state, unsigned delta, Byte *data, SizeT size); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/clamscan/libclamav/7z/Lzma2Dec.c b/clamscan/libclamav/7z/Lzma2Dec.c new file mode 100644 index 0000000..7ea1cc9 --- /dev/null +++ b/clamscan/libclamav/7z/Lzma2Dec.c @@ -0,0 +1,356 @@ +/* Lzma2Dec.c -- LZMA2 Decoder +2009-05-03 : Igor Pavlov : Public domain */ + +/* #define SHOW_DEBUG_INFO */ + +#ifdef SHOW_DEBUG_INFO +#include +#endif + +#include + +#include "Lzma2Dec.h" + +/* +00000000 - EOS +00000001 U U - Uncompressed Reset Dic +00000010 U U - Uncompressed No Reset +100uuuuu U U P P - LZMA no reset +101uuuuu U U P P - LZMA reset state +110uuuuu U U P P S - LZMA reset state + new prop +111uuuuu U U P P S - LZMA reset state + new prop + reset dic + + u, U - Unpack Size + P - Pack Size + S - Props +*/ + +#define LZMA2_CONTROL_LZMA (1 << 7) +#define LZMA2_CONTROL_COPY_NO_RESET 2 +#define LZMA2_CONTROL_COPY_RESET_DIC 1 +#define LZMA2_CONTROL_EOF 0 + +#define LZMA2_IS_UNCOMPRESSED_STATE(p) (((p)->control & LZMA2_CONTROL_LZMA) == 0) + +#define LZMA2_GET_LZMA_MODE(p) (((p)->control >> 5) & 3) +#define LZMA2_IS_THERE_PROP(mode) ((mode) >= 2) + +#define LZMA2_LCLP_MAX 4 +#define LZMA2_DIC_SIZE_FROM_PROP(p) (((UInt32)2 | ((p) & 1)) << ((p) / 2 + 11)) + +#ifdef SHOW_DEBUG_INFO +#define PRF(x) x +#else +#define PRF(x) +#endif + +typedef enum +{ + LZMA2_STATE_CONTROL, + LZMA2_STATE_UNPACK0, + LZMA2_STATE_UNPACK1, + LZMA2_STATE_PACK0, + LZMA2_STATE_PACK1, + LZMA2_STATE_PROP, + LZMA2_STATE_DATA, + LZMA2_STATE_DATA_CONT, + LZMA2_STATE_FINISHED, + LZMA2_STATE_ERROR +} ELzma2State; + +static SRes Lzma2Dec_GetOldProps(Byte prop, Byte *props) +{ + UInt32 dicSize; + if (prop > 40) + return SZ_ERROR_UNSUPPORTED; + dicSize = (prop == 40) ? 0xFFFFFFFF : LZMA2_DIC_SIZE_FROM_PROP(prop); + props[0] = (Byte)LZMA2_LCLP_MAX; + props[1] = (Byte)(dicSize); + props[2] = (Byte)(dicSize >> 8); + props[3] = (Byte)(dicSize >> 16); + props[4] = (Byte)(dicSize >> 24); + return SZ_OK; +} + +SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAlloc *alloc) +{ + Byte props[LZMA_PROPS_SIZE]; + RINOK(Lzma2Dec_GetOldProps(prop, props)); + return LzmaDec_AllocateProbs(&p->decoder, props, LZMA_PROPS_SIZE, alloc); +} + +SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAlloc *alloc) +{ + Byte props[LZMA_PROPS_SIZE]; + RINOK(Lzma2Dec_GetOldProps(prop, props)); + return LzmaDec_Allocate(&p->decoder, props, LZMA_PROPS_SIZE, alloc); +} + +void Lzma2Dec_Init(CLzma2Dec *p) +{ + p->state = LZMA2_STATE_CONTROL; + p->needInitDic = True; + p->needInitState = True; + p->needInitProp = True; + LzmaDec_Init(&p->decoder); +} + +static ELzma2State Lzma2Dec_UpdateState(CLzma2Dec *p, Byte b) +{ + switch(p->state) + { + case LZMA2_STATE_CONTROL: + p->control = b; + PRF(printf("\n %4X ", p->decoder.dicPos)); + PRF(printf(" %2X", b)); + if (p->control == 0) + return LZMA2_STATE_FINISHED; + if (LZMA2_IS_UNCOMPRESSED_STATE(p)) + { + if ((p->control & 0x7F) > 2) + return LZMA2_STATE_ERROR; + p->unpackSize = 0; + } + else + p->unpackSize = (UInt32)(p->control & 0x1F) << 16; + return LZMA2_STATE_UNPACK0; + + case LZMA2_STATE_UNPACK0: + p->unpackSize |= (UInt32)b << 8; + return LZMA2_STATE_UNPACK1; + + case LZMA2_STATE_UNPACK1: + p->unpackSize |= (UInt32)b; + p->unpackSize++; + PRF(printf(" %8d", p->unpackSize)); + return (LZMA2_IS_UNCOMPRESSED_STATE(p)) ? LZMA2_STATE_DATA : LZMA2_STATE_PACK0; + + case LZMA2_STATE_PACK0: + p->packSize = (UInt32)b << 8; + return LZMA2_STATE_PACK1; + + case LZMA2_STATE_PACK1: + p->packSize |= (UInt32)b; + p->packSize++; + PRF(printf(" %8d", p->packSize)); + return LZMA2_IS_THERE_PROP(LZMA2_GET_LZMA_MODE(p)) ? LZMA2_STATE_PROP: + (p->needInitProp ? LZMA2_STATE_ERROR : LZMA2_STATE_DATA); + + case LZMA2_STATE_PROP: + { + int lc, lp; + if (b >= (9 * 5 * 5)) + return LZMA2_STATE_ERROR; + lc = b % 9; + b /= 9; + p->decoder.prop.pb = b / 5; + lp = b % 5; + if (lc + lp > LZMA2_LCLP_MAX) + return LZMA2_STATE_ERROR; + p->decoder.prop.lc = lc; + p->decoder.prop.lp = lp; + p->needInitProp = False; + return LZMA2_STATE_DATA; + } + } + return LZMA2_STATE_ERROR; +} + +static void LzmaDec_UpdateWithUncompressed(CLzmaDec *p, const Byte *src, SizeT size) +{ + memcpy(p->dic + p->dicPos, src, size); + p->dicPos += size; + if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= size) + p->checkDicSize = p->prop.dicSize; + p->processedPos += (UInt32)size; +} + +void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState); + +SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT inSize = *srcLen; + *srcLen = 0; + *status = LZMA_STATUS_NOT_SPECIFIED; + + while (p->state != LZMA2_STATE_FINISHED) + { + SizeT dicPos = p->decoder.dicPos; + if (p->state == LZMA2_STATE_ERROR) + return SZ_ERROR_DATA; + if (dicPos == dicLimit && finishMode == LZMA_FINISH_ANY) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_OK; + } + if (p->state != LZMA2_STATE_DATA && p->state != LZMA2_STATE_DATA_CONT) + { + if (*srcLen == inSize) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + (*srcLen)++; + p->state = Lzma2Dec_UpdateState(p, *src++); + continue; + } + { + SizeT destSizeCur = dicLimit - dicPos; + SizeT srcSizeCur = inSize - *srcLen; + ELzmaFinishMode curFinishMode = LZMA_FINISH_ANY; + + if (p->unpackSize <= destSizeCur) + { + destSizeCur = (SizeT)p->unpackSize; + curFinishMode = LZMA_FINISH_END; + } + + if (LZMA2_IS_UNCOMPRESSED_STATE(p)) + { + if (*srcLen == inSize) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + + if (p->state == LZMA2_STATE_DATA) + { + Bool initDic = (p->control == LZMA2_CONTROL_COPY_RESET_DIC); + if (initDic) + p->needInitProp = p->needInitState = True; + else if (p->needInitDic) + return SZ_ERROR_DATA; + p->needInitDic = False; + LzmaDec_InitDicAndState(&p->decoder, initDic, False); + } + + if (srcSizeCur > destSizeCur) + srcSizeCur = destSizeCur; + + if (srcSizeCur == 0) + return SZ_ERROR_DATA; + + LzmaDec_UpdateWithUncompressed(&p->decoder, src, srcSizeCur); + + src += srcSizeCur; + *srcLen += srcSizeCur; + p->unpackSize -= (UInt32)srcSizeCur; + p->state = (p->unpackSize == 0) ? LZMA2_STATE_CONTROL : LZMA2_STATE_DATA_CONT; + } + else + { + SizeT outSizeProcessed; + SRes res; + + if (p->state == LZMA2_STATE_DATA) + { + int mode = LZMA2_GET_LZMA_MODE(p); + Bool initDic = (mode == 3); + Bool initState = (mode > 0); + if ((!initDic && p->needInitDic) || (!initState && p->needInitState)) + return SZ_ERROR_DATA; + + LzmaDec_InitDicAndState(&p->decoder, initDic, initState); + p->needInitDic = False; + p->needInitState = False; + p->state = LZMA2_STATE_DATA_CONT; + } + if (srcSizeCur > p->packSize) + srcSizeCur = (SizeT)p->packSize; + + res = LzmaDec_DecodeToDic(&p->decoder, dicPos + destSizeCur, src, &srcSizeCur, curFinishMode, status); + + src += srcSizeCur; + *srcLen += srcSizeCur; + p->packSize -= (UInt32)srcSizeCur; + + outSizeProcessed = p->decoder.dicPos - dicPos; + p->unpackSize -= (UInt32)outSizeProcessed; + + RINOK(res); + if (*status == LZMA_STATUS_NEEDS_MORE_INPUT) + return res; + + if (srcSizeCur == 0 && outSizeProcessed == 0) + { + if (*status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK || + p->unpackSize != 0 || p->packSize != 0) + return SZ_ERROR_DATA; + p->state = LZMA2_STATE_CONTROL; + } + if (*status == LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK) + *status = LZMA_STATUS_NOT_FINISHED; + } + } + } + *status = LZMA_STATUS_FINISHED_WITH_MARK; + return SZ_OK; +} + +SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT outSize = *destLen, inSize = *srcLen; + *srcLen = *destLen = 0; + for (;;) + { + SizeT srcSizeCur = inSize, outSizeCur, dicPos; + ELzmaFinishMode curFinishMode; + SRes res; + if (p->decoder.dicPos == p->decoder.dicBufSize) + p->decoder.dicPos = 0; + dicPos = p->decoder.dicPos; + if (outSize > p->decoder.dicBufSize - dicPos) + { + outSizeCur = p->decoder.dicBufSize; + curFinishMode = LZMA_FINISH_ANY; + } + else + { + outSizeCur = dicPos + outSize; + curFinishMode = finishMode; + } + + res = Lzma2Dec_DecodeToDic(p, outSizeCur, src, &srcSizeCur, curFinishMode, status); + src += srcSizeCur; + inSize -= srcSizeCur; + *srcLen += srcSizeCur; + outSizeCur = p->decoder.dicPos - dicPos; + memcpy(dest, p->decoder.dic + dicPos, outSizeCur); + dest += outSizeCur; + outSize -= outSizeCur; + *destLen += outSizeCur; + if (res != 0) + return res; + if (outSizeCur == 0 || outSize == 0) + return SZ_OK; + } +} + +SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc) +{ + CLzma2Dec decoder; + SRes res; + SizeT outSize = *destLen, inSize = *srcLen; + Byte props[LZMA_PROPS_SIZE]; + + Lzma2Dec_Construct(&decoder); + + *destLen = *srcLen = 0; + *status = LZMA_STATUS_NOT_SPECIFIED; + decoder.decoder.dic = dest; + decoder.decoder.dicBufSize = outSize; + + RINOK(Lzma2Dec_GetOldProps(prop, props)); + RINOK(LzmaDec_AllocateProbs(&decoder.decoder, props, LZMA_PROPS_SIZE, alloc)); + + *srcLen = inSize; + res = Lzma2Dec_DecodeToDic(&decoder, outSize, src, srcLen, finishMode, status); + *destLen = decoder.decoder.dicPos; + if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) + res = SZ_ERROR_INPUT_EOF; + + LzmaDec_FreeProbs(&decoder.decoder, alloc); + return res; +} diff --git a/clamscan/libclamav/7z/Lzma2Dec.h b/clamscan/libclamav/7z/Lzma2Dec.h new file mode 100644 index 0000000..6bc07bb --- /dev/null +++ b/clamscan/libclamav/7z/Lzma2Dec.h @@ -0,0 +1,84 @@ +/* Lzma2Dec.h -- LZMA2 Decoder +2009-05-03 : Igor Pavlov : Public domain */ + +#ifndef __LZMA2_DEC_H +#define __LZMA2_DEC_H + +#include "LzmaDec.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* ---------- State Interface ---------- */ + +typedef struct +{ + CLzmaDec decoder; + UInt32 packSize; + UInt32 unpackSize; + int state; + Byte control; + Bool needInitDic; + Bool needInitState; + Bool needInitProp; +} CLzma2Dec; + +#define Lzma2Dec_Construct(p) LzmaDec_Construct(&(p)->decoder) +#define Lzma2Dec_FreeProbs(p, alloc) LzmaDec_FreeProbs(&(p)->decoder, alloc); +#define Lzma2Dec_Free(p, alloc) LzmaDec_Free(&(p)->decoder, alloc); + +SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAlloc *alloc); +SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAlloc *alloc); +void Lzma2Dec_Init(CLzma2Dec *p); + + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen or dicLimit). + LZMA_FINISH_ANY - use smallest number of input bytes + LZMA_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_NEEDS_MORE_INPUT + SZ_ERROR_DATA - Data error +*/ + +SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + +SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- One Call Interface ---------- */ + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - use smallest number of input bytes + LZMA_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + +SRes Lzma2Decode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + Byte prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/clamscan/libclamav/7z/LzmaDec.c b/clamscan/libclamav/7z/LzmaDec.c new file mode 100644 index 0000000..2a5ae1b --- /dev/null +++ b/clamscan/libclamav/7z/LzmaDec.c @@ -0,0 +1,1001 @@ +/* LzmaDec.c -- LZMA Decoder +2009-09-20 : Igor Pavlov : Public domain */ + +#include "LzmaDec.h" + +#include + +#define kNumTopBits 24 +#define kTopValue ((UInt32)1 << kNumTopBits) + +#define kNumBitModelTotalBits 11 +#define kBitModelTotal (1 << kNumBitModelTotalBits) +#define kNumMoveBits 5 + +#define RC_INIT_SIZE 5 + +#define NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0(p) ttt = *(p); NORMALIZE; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) +#define UPDATE_0(p) range = bound; *(p) = (CLzmaProb)(ttt + ((kBitModelTotal - ttt) >> kNumMoveBits)); +#define UPDATE_1(p) range -= bound; code -= bound; *(p) = (CLzmaProb)(ttt - (ttt >> kNumMoveBits)); +#define GET_BIT2(p, i, A0, A1) IF_BIT_0(p) \ + { UPDATE_0(p); i = (i + i); A0; } else \ + { UPDATE_1(p); i = (i + i) + 1; A1; } +#define GET_BIT(p, i) GET_BIT2(p, i, ; , ;) + +#define TREE_GET_BIT(probs, i) { GET_BIT((probs + i), i); } +#define TREE_DECODE(probs, limit, i) \ + { i = 1; do { TREE_GET_BIT(probs, i); } while (i < limit); i -= limit; } + +/* #define _LZMA_SIZE_OPT */ + +#ifdef _LZMA_SIZE_OPT +#define TREE_6_DECODE(probs, i) TREE_DECODE(probs, (1 << 6), i) +#else +#define TREE_6_DECODE(probs, i) \ + { i = 1; \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + TREE_GET_BIT(probs, i); \ + i -= 0x40; } +#endif + +#define NORMALIZE_CHECK if (range < kTopValue) { if (buf >= bufLimit) return DUMMY_ERROR; range <<= 8; code = (code << 8) | (*buf++); } + +#define IF_BIT_0_CHECK(p) ttt = *(p); NORMALIZE_CHECK; bound = (range >> kNumBitModelTotalBits) * ttt; if (code < bound) +#define UPDATE_0_CHECK range = bound; +#define UPDATE_1_CHECK range -= bound; code -= bound; +#define GET_BIT2_CHECK(p, i, A0, A1) IF_BIT_0_CHECK(p) \ + { UPDATE_0_CHECK; i = (i + i); A0; } else \ + { UPDATE_1_CHECK; i = (i + i) + 1; A1; } +#define GET_BIT_CHECK(p, i) GET_BIT2_CHECK(p, i, ; , ;) +#define TREE_DECODE_CHECK(probs, limit, i) \ + { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; } + + +#define kNumPosBitsMax 4 +#define kNumPosStatesMax (1 << kNumPosBitsMax) + +#define kLenNumLowBits 3 +#define kLenNumLowSymbols (1 << kLenNumLowBits) +#define kLenNumMidBits 3 +#define kLenNumMidSymbols (1 << kLenNumMidBits) +#define kLenNumHighBits 8 +#define kLenNumHighSymbols (1 << kLenNumHighBits) + +#define LenChoice 0 +#define LenChoice2 (LenChoice + 1) +#define LenLow (LenChoice2 + 1) +#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits)) +#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits)) +#define kNumLenProbs (LenHigh + kLenNumHighSymbols) + + +#define kNumStates 12 +#define kNumLitStates 7 + +#define kStartPosModelIndex 4 +#define kEndPosModelIndex 14 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1)) + +#define kNumPosSlotBits 6 +#define kNumLenToPosStates 4 + +#define kNumAlignBits 4 +#define kAlignTableSize (1 << kNumAlignBits) + +#define kMatchMinLen 2 +#define kMatchSpecLenStart (kMatchMinLen + kLenNumLowSymbols + kLenNumMidSymbols + kLenNumHighSymbols) + +#define IsMatch 0 +#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax)) +#define IsRepG0 (IsRep + kNumStates) +#define IsRepG1 (IsRepG0 + kNumStates) +#define IsRepG2 (IsRepG1 + kNumStates) +#define IsRep0Long (IsRepG2 + kNumStates) +#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax)) +#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits)) +#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex) +#define LenCoder (Align + kAlignTableSize) +#define RepLenCoder (LenCoder + kNumLenProbs) +#define Literal (RepLenCoder + kNumLenProbs) + +#define LZMA_BASE_SIZE 1846 +#define LZMA_LIT_SIZE 768 + +#define LzmaProps_GetNumProbs(p) ((UInt32)LZMA_BASE_SIZE + (LZMA_LIT_SIZE << ((p)->lc + (p)->lp))) + +#if Literal != LZMA_BASE_SIZE +StopCompilingDueBUG +#endif + +#define LZMA_DIC_MIN (1 << 12) + +void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState); + +/* First LZMA-symbol is always decoded. +And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization +Out: + Result: + SZ_OK - OK + SZ_ERROR_DATA - Error + p->remainLen: + < kMatchSpecLenStart : normal remain + = kMatchSpecLenStart : finished + = kMatchSpecLenStart + 1 : Flush marker + = kMatchSpecLenStart + 2 : State Init Marker +*/ + +static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + CLzmaProb *probs = p->probs; + + unsigned state = p->state; + UInt32 rep0 = p->reps[0], rep1 = p->reps[1], rep2 = p->reps[2], rep3 = p->reps[3]; + unsigned pbMask = ((unsigned)1 << (p->prop.pb)) - 1; + unsigned lpMask = ((unsigned)1 << (p->prop.lp)) - 1; + unsigned lc = p->prop.lc; + + Byte *dic = p->dic; + SizeT dicBufSize = p->dicBufSize; + SizeT dicPos = p->dicPos; + + UInt32 processedPos = p->processedPos; + UInt32 checkDicSize = p->checkDicSize; + unsigned len = 0; + + const Byte *buf = p->buf; + UInt32 range = p->range; + UInt32 code = p->code; + + do + { + CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = processedPos & pbMask; + + prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; + IF_BIT_0(prob) + { + unsigned symbol; + UPDATE_0(prob); + prob = probs + Literal; + if (checkDicSize != 0 || processedPos != 0) + prob += (LZMA_LIT_SIZE * (((processedPos & lpMask) << lc) + + (dic[(dicPos == 0 ? dicBufSize : dicPos) - 1] >> (8 - lc)))); + + if (state < kNumLitStates) + { + state -= (state < 4) ? state : 3; + symbol = 1; + do { GET_BIT(prob + symbol, symbol) } while (symbol < 0x100); + } + else + { + unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + unsigned offs = 0x100; + state -= (state < 10) ? 3 : 6; + symbol = 1; + do + { + unsigned bit; + CLzmaProb *probLit; + matchByte <<= 1; + bit = (matchByte & offs); + probLit = prob + offs + bit + symbol; + GET_BIT2(probLit, symbol, offs &= ~bit, offs &= bit) + } + while (symbol < 0x100); + } + dic[dicPos++] = (Byte)symbol; + processedPos++; + continue; + } + else + { + UPDATE_1(prob); + prob = probs + IsRep + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + state += kNumStates; + prob = probs + LenCoder; + } + else + { + UPDATE_1(prob); + if (checkDicSize == 0 && processedPos == 0) + return SZ_ERROR_DATA; + prob = probs + IsRepG0 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; + IF_BIT_0(prob) + { + UPDATE_0(prob); + dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + dicPos++; + processedPos++; + state = state < kNumLitStates ? 9 : 11; + continue; + } + UPDATE_1(prob); + } + else + { + UInt32 distance; + UPDATE_1(prob); + prob = probs + IsRepG1 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep1; + } + else + { + UPDATE_1(prob); + prob = probs + IsRepG2 + state; + IF_BIT_0(prob) + { + UPDATE_0(prob); + distance = rep2; + } + else + { + UPDATE_1(prob); + distance = rep3; + rep3 = rep2; + } + rep2 = rep1; + } + rep1 = rep0; + rep0 = distance; + } + state = state < kNumLitStates ? 8 : 11; + prob = probs + RepLenCoder; + } + { + unsigned limit, offset; + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenLow + (posState << kLenNumLowBits); + offset = 0; + limit = (1 << kLenNumLowBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenChoice2; + IF_BIT_0(probLen) + { + UPDATE_0(probLen); + probLen = prob + LenMid + (posState << kLenNumMidBits); + offset = kLenNumLowSymbols; + limit = (1 << kLenNumMidBits); + } + else + { + UPDATE_1(probLen); + probLen = prob + LenHigh; + offset = kLenNumLowSymbols + kLenNumMidSymbols; + limit = (1 << kLenNumHighBits); + } + } + TREE_DECODE(probLen, limit, len); + len += offset; + } + + if (state >= kNumStates) + { + UInt32 distance; + prob = probs + PosSlot + + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << kNumPosSlotBits); + TREE_6_DECODE(prob, distance); + if (distance >= kStartPosModelIndex) + { + unsigned posSlot = (unsigned)distance; + int numDirectBits = (int)(((distance >> 1) - 1)); + distance = (2 | (distance & 1)); + if (posSlot < kEndPosModelIndex) + { + distance <<= numDirectBits; + prob = probs + SpecPos + distance - posSlot - 1; + { + UInt32 mask = 1; + unsigned i = 1; + do + { + GET_BIT2(prob + i, i, ; , distance |= mask); + mask <<= 1; + } + while (--numDirectBits != 0); + } + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE + range >>= 1; + + { + UInt32 t; + code -= range; + t = (0 - ((UInt32)code >> 31)); /* (UInt32)((Int32)code >> 31) */ + distance = (distance << 1) + (t + 1); + code += range & t; + } + /* + distance <<= 1; + if (code >= range) + { + code -= range; + distance |= 1; + } + */ + } + while (--numDirectBits != 0); + prob = probs + Align; + distance <<= kNumAlignBits; + { + unsigned i = 1; + GET_BIT2(prob + i, i, ; , distance |= 1); + GET_BIT2(prob + i, i, ; , distance |= 2); + GET_BIT2(prob + i, i, ; , distance |= 4); + GET_BIT2(prob + i, i, ; , distance |= 8); + } + if (distance == (UInt32)0xFFFFFFFF) + { + len += kMatchSpecLenStart; + state -= kNumStates; + break; + } + } + } + rep3 = rep2; + rep2 = rep1; + rep1 = rep0; + rep0 = distance + 1; + if (checkDicSize == 0) + { + if (distance >= processedPos) + return SZ_ERROR_DATA; + } + else if (distance >= checkDicSize) + return SZ_ERROR_DATA; + state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3; + } + + len += kMatchMinLen; + + if (limit == dicPos) + return SZ_ERROR_DATA; + { + SizeT rem = limit - dicPos; + unsigned curLen = ((rem < len) ? (unsigned)rem : len); + SizeT pos = (dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0); + + processedPos += curLen; + + len -= curLen; + if (pos + curLen <= dicBufSize) + { + Byte *dest = dic + dicPos; + ptrdiff_t src = (ptrdiff_t)pos - (ptrdiff_t)dicPos; + const Byte *lim = dest + curLen; + dicPos += curLen; + do + *(dest) = (Byte)*(dest + src); + while (++dest != lim); + } + else + { + do + { + dic[dicPos++] = dic[pos]; + if (++pos == dicBufSize) + pos = 0; + } + while (--curLen != 0); + } + } + } + } + while (dicPos < limit && buf < bufLimit); + NORMALIZE; + p->buf = buf; + p->range = range; + p->code = code; + p->remainLen = len; + p->dicPos = dicPos; + p->processedPos = processedPos; + p->reps[0] = rep0; + p->reps[1] = rep1; + p->reps[2] = rep2; + p->reps[3] = rep3; + p->state = state; + + return SZ_OK; +} + +static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, SizeT limit) +{ + if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) + { + Byte *dic = p->dic; + SizeT dicPos = p->dicPos; + SizeT dicBufSize = p->dicBufSize; + unsigned len = p->remainLen; + UInt32 rep0 = p->reps[0]; + if (limit - dicPos < len) + len = (unsigned)(limit - dicPos); + + if (p->checkDicSize == 0 && p->prop.dicSize - p->processedPos <= len) + p->checkDicSize = p->prop.dicSize; + + p->processedPos += len; + p->remainLen -= len; + while (len-- != 0) + { + dic[dicPos] = dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)]; + dicPos++; + } + p->dicPos = dicPos; + } +} + +static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, SizeT limit, const Byte *bufLimit) +{ + do + { + SizeT limit2 = limit; + if (p->checkDicSize == 0) + { + UInt32 rem = p->prop.dicSize - p->processedPos; + if (limit - p->dicPos > rem) + limit2 = p->dicPos + rem; + } + RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit)); + if (p->processedPos >= p->prop.dicSize) + p->checkDicSize = p->prop.dicSize; + LzmaDec_WriteRem(p, limit); + } + while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); + + if (p->remainLen > kMatchSpecLenStart) + { + p->remainLen = kMatchSpecLenStart; + } + return 0; +} + +typedef enum +{ + DUMMY_ERROR, /* unexpected end of input stream */ + DUMMY_LIT, + DUMMY_MATCH, + DUMMY_REP +} ELzmaDummy; + +static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inSize) +{ + UInt32 range = p->range; + UInt32 code = p->code; + const Byte *bufLimit = buf + inSize; + CLzmaProb *probs = p->probs; + unsigned state = p->state; + ELzmaDummy res; + + { + CLzmaProb *prob; + UInt32 bound; + unsigned ttt; + unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1); + + prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK + + /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ + + prob = probs + Literal; + if (p->checkDicSize != 0 || p->processedPos != 0) + prob += (LZMA_LIT_SIZE * + ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + + (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); + + if (state < kNumLitStates) + { + unsigned symbol = 1; + do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); + } + else + { + unsigned matchByte = p->dic[p->dicPos - p->reps[0] + + ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)]; + unsigned offs = 0x100; + unsigned symbol = 1; + do + { + unsigned bit; + CLzmaProb *probLit; + matchByte <<= 1; + bit = (matchByte & offs); + probLit = prob + offs + bit + symbol; + GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) + } + while (symbol < 0x100); + } + res = DUMMY_LIT; + } + else + { + unsigned len; + UPDATE_1_CHECK; + + prob = probs + IsRep + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + state = 0; + prob = probs + LenCoder; + res = DUMMY_MATCH; + } + else + { + UPDATE_1_CHECK; + res = DUMMY_REP; + prob = probs + IsRepG0 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + NORMALIZE_CHECK; + return DUMMY_REP; + } + else + { + UPDATE_1_CHECK; + } + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG1 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + prob = probs + IsRepG2 + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + } + else + { + UPDATE_1_CHECK; + } + } + } + state = kNumStates; + prob = probs + RepLenCoder; + } + { + unsigned limit, offset; + CLzmaProb *probLen = prob + LenChoice; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenLow + (posState << kLenNumLowBits); + offset = 0; + limit = 1 << kLenNumLowBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenChoice2; + IF_BIT_0_CHECK(probLen) + { + UPDATE_0_CHECK; + probLen = prob + LenMid + (posState << kLenNumMidBits); + offset = kLenNumLowSymbols; + limit = 1 << kLenNumMidBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenHigh; + offset = kLenNumLowSymbols + kLenNumMidSymbols; + limit = 1 << kLenNumHighBits; + } + } + TREE_DECODE_CHECK(probLen, limit, len); + len += offset; + } + + if (state < 4) + { + unsigned posSlot; + prob = probs + PosSlot + + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << + kNumPosSlotBits); + TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); + if (posSlot >= kStartPosModelIndex) + { + int numDirectBits = ((posSlot >> 1) - 1); + + /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ + + if (posSlot < kEndPosModelIndex) + { + prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1; + } + else + { + numDirectBits -= kNumAlignBits; + do + { + NORMALIZE_CHECK + range >>= 1; + code -= range & (((code - range) >> 31) - 1); + /* if (code >= range) code -= range; */ + } + while (--numDirectBits != 0); + prob = probs + Align; + numDirectBits = kNumAlignBits; + } + { + unsigned i = 1; + do + { + GET_BIT_CHECK(prob + i, i); + } + while (--numDirectBits != 0); + } + } + } + } + } + NORMALIZE_CHECK; + return res; +} + + +static void LzmaDec_InitRc(CLzmaDec *p, const Byte *data) +{ + p->code = ((UInt32)data[1] << 24) | ((UInt32)data[2] << 16) | ((UInt32)data[3] << 8) | ((UInt32)data[4]); + p->range = 0xFFFFFFFF; + p->needFlush = 0; +} + +void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState) +{ + p->needFlush = 1; + p->remainLen = 0; + p->tempBufSize = 0; + + if (initDic) + { + p->processedPos = 0; + p->checkDicSize = 0; + p->needInitState = 1; + } + if (initState) + p->needInitState = 1; +} + +void LzmaDec_Init(CLzmaDec *p) +{ + p->dicPos = 0; + LzmaDec_InitDicAndState(p, True, True); +} + +static void LzmaDec_InitStateReal(CLzmaDec *p) +{ + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp)); + UInt32 i; + CLzmaProb *probs = p->probs; + for (i = 0; i < numProbs; i++) + probs[i] = kBitModelTotal >> 1; + p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; + p->state = 0; + p->needInitState = 0; +} + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, + ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT inSize = *srcLen; + (*srcLen) = 0; + LzmaDec_WriteRem(p, dicLimit); + + *status = LZMA_STATUS_NOT_SPECIFIED; + + while (p->remainLen != kMatchSpecLenStart) + { + int checkEndMarkNow; + + if (p->needFlush != 0) + { + for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) + p->tempBuf[p->tempBufSize++] = *src++; + if (p->tempBufSize < RC_INIT_SIZE) + { + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (p->tempBuf[0] != 0) + return SZ_ERROR_DATA; + + LzmaDec_InitRc(p, p->tempBuf); + p->tempBufSize = 0; + } + + checkEndMarkNow = 0; + if (p->dicPos >= dicLimit) + { + if (p->remainLen == 0 && p->code == 0) + { + *status = LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK; + return SZ_OK; + } + if (finishMode == LZMA_FINISH_ANY) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_OK; + } + if (p->remainLen != 0) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + checkEndMarkNow = 1; + } + + if (p->needInitState) + LzmaDec_InitStateReal(p); + + if (p->tempBufSize == 0) + { + SizeT processed; + const Byte *bufLimit; + if (inSize < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, src, inSize); + if (dummyRes == DUMMY_ERROR) + { + memcpy(p->tempBuf, src, inSize); + p->tempBufSize = (unsigned)inSize; + (*srcLen) += inSize; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + bufLimit = src; + } + else + bufLimit = src + inSize - LZMA_REQUIRED_INPUT_MAX; + p->buf = src; + if (LzmaDec_DecodeReal2(p, dicLimit, bufLimit) != 0) + return SZ_ERROR_DATA; + processed = (SizeT)(p->buf - src); + (*srcLen) += processed; + src += processed; + inSize -= processed; + } + else + { + unsigned rem = p->tempBufSize, lookAhead = 0; + while (rem < LZMA_REQUIRED_INPUT_MAX && lookAhead < inSize) + p->tempBuf[rem++] = src[lookAhead++]; + p->tempBufSize = rem; + if (rem < LZMA_REQUIRED_INPUT_MAX || checkEndMarkNow) + { + int dummyRes = LzmaDec_TryDummy(p, p->tempBuf, rem); + if (dummyRes == DUMMY_ERROR) + { + (*srcLen) += lookAhead; + *status = LZMA_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + if (checkEndMarkNow && dummyRes != DUMMY_MATCH) + { + *status = LZMA_STATUS_NOT_FINISHED; + return SZ_ERROR_DATA; + } + } + p->buf = p->tempBuf; + if (LzmaDec_DecodeReal2(p, dicLimit, p->buf) != 0) + return SZ_ERROR_DATA; + lookAhead -= (rem - (unsigned)(p->buf - p->tempBuf)); + (*srcLen) += lookAhead; + src += lookAhead; + inSize -= lookAhead; + p->tempBufSize = 0; + } + } + if (p->code == 0) + *status = LZMA_STATUS_FINISHED_WITH_MARK; + return (p->code == 0) ? SZ_OK : SZ_ERROR_DATA; +} + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) +{ + SizeT outSize = *destLen; + SizeT inSize = *srcLen; + *srcLen = *destLen = 0; + for (;;) + { + SizeT inSizeCur = inSize, outSizeCur, dicPos; + ELzmaFinishMode curFinishMode; + SRes res; + if (p->dicPos == p->dicBufSize) + p->dicPos = 0; + dicPos = p->dicPos; + if (outSize > p->dicBufSize - dicPos) + { + outSizeCur = p->dicBufSize; + curFinishMode = LZMA_FINISH_ANY; + } + else + { + outSizeCur = dicPos + outSize; + curFinishMode = finishMode; + } + + res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status); + src += inSizeCur; + inSize -= inSizeCur; + *srcLen += inSizeCur; + outSizeCur = p->dicPos - dicPos; + memcpy(dest, p->dic + dicPos, outSizeCur); + dest += outSizeCur; + outSize -= outSizeCur; + *destLen += outSizeCur; + if (res != 0) + return res; + if (outSizeCur == 0 || outSize == 0) + return SZ_OK; + } +} + +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->probs); + p->probs = 0; +} + +static void LzmaDec_FreeDict(CLzmaDec *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->dic); + p->dic = 0; +} + +void LzmaDec_Free(CLzmaDec *p, ISzAlloc *alloc) +{ + LzmaDec_FreeProbs(p, alloc); + LzmaDec_FreeDict(p, alloc); +} + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size) +{ + UInt32 dicSize; + Byte d; + + if (size < LZMA_PROPS_SIZE) + return SZ_ERROR_UNSUPPORTED; + else + dicSize = data[1] | ((UInt32)data[2] << 8) | ((UInt32)data[3] << 16) | ((UInt32)data[4] << 24); + + if (dicSize < LZMA_DIC_MIN) + dicSize = LZMA_DIC_MIN; + p->dicSize = dicSize; + + d = data[0]; + if (d >= (9 * 5 * 5)) + return SZ_ERROR_UNSUPPORTED; + + p->lc = d % 9; + d /= 9; + p->pb = d / 5; + p->lp = d % 5; + + return SZ_OK; +} + +static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc) +{ + UInt32 numProbs = LzmaProps_GetNumProbs(propNew); + if (p->probs == 0 || numProbs != p->numProbs) + { + LzmaDec_FreeProbs(p, alloc); + p->probs = (CLzmaProb *)alloc->Alloc(alloc, numProbs * sizeof(CLzmaProb)); + p->numProbs = numProbs; + if (p->probs == 0) + return SZ_ERROR_MEM; + } + return SZ_OK; +} + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) +{ + CLzmaProps propNew; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDec_Allocate(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc) +{ + CLzmaProps propNew; + SizeT dicBufSize; + RINOK(LzmaProps_Decode(&propNew, props, propsSize)); + RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + dicBufSize = propNew.dicSize; + if (p->dic == 0 || dicBufSize != p->dicBufSize) + { + LzmaDec_FreeDict(p, alloc); + p->dic = (Byte *)alloc->Alloc(alloc, dicBufSize); + if (p->dic == 0) + { + LzmaDec_FreeProbs(p, alloc); + return SZ_ERROR_MEM; + } + } + p->dicBufSize = dicBufSize; + p->prop = propNew; + return SZ_OK; +} + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAlloc *alloc) +{ + CLzmaDec p; + SRes res; + SizeT inSize = *srcLen; + SizeT outSize = *destLen; + *srcLen = *destLen = 0; + if (inSize < RC_INIT_SIZE) + return SZ_ERROR_INPUT_EOF; + + LzmaDec_Construct(&p); + res = LzmaDec_AllocateProbs(&p, propData, propSize, alloc); + if (res != 0) + return res; + p.dic = dest; + p.dicBufSize = outSize; + + LzmaDec_Init(&p); + + *srcLen = inSize; + res = LzmaDec_DecodeToDic(&p, outSize, src, srcLen, finishMode, status); + + if (res == SZ_OK && *status == LZMA_STATUS_NEEDS_MORE_INPUT) + res = SZ_ERROR_INPUT_EOF; + + (*destLen) = p.dicPos; + LzmaDec_FreeProbs(&p, alloc); + return res; +} diff --git a/clamscan/libclamav/7z/LzmaDec.h b/clamscan/libclamav/7z/LzmaDec.h new file mode 100644 index 0000000..bf7f084 --- /dev/null +++ b/clamscan/libclamav/7z/LzmaDec.h @@ -0,0 +1,231 @@ +/* LzmaDec.h -- LZMA Decoder +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __LZMA_DEC_H +#define __LZMA_DEC_H + +#include "Types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* #define _LZMA_PROB32 */ +/* _LZMA_PROB32 can increase the speed on some CPUs, + but memory usage for CLzmaDec::probs will be doubled in that case */ + +#ifdef _LZMA_PROB32 +#define CLzmaProb UInt32 +#else +#define CLzmaProb UInt16 +#endif + + +/* ---------- LZMA Properties ---------- */ + +#define LZMA_PROPS_SIZE 5 + +typedef struct _CLzmaProps +{ + unsigned lc, lp, pb; + UInt32 dicSize; +} CLzmaProps; + +/* LzmaProps_Decode - decodes properties +Returns: + SZ_OK + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size); + + +/* ---------- LZMA Decoder state ---------- */ + +/* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case. + Num bits = log2((2^11 / 31) ^ 22) + 26 < 134 + 26 = 160; */ + +#define LZMA_REQUIRED_INPUT_MAX 20 + +typedef struct +{ + CLzmaProps prop; + CLzmaProb *probs; + Byte *dic; + const Byte *buf; + UInt32 range, code; + SizeT dicPos; + SizeT dicBufSize; + UInt32 processedPos; + UInt32 checkDicSize; + unsigned state; + UInt32 reps[4]; + unsigned remainLen; + int needFlush; + int needInitState; + UInt32 numProbs; + unsigned tempBufSize; + Byte tempBuf[LZMA_REQUIRED_INPUT_MAX]; +} CLzmaDec; + +#define LzmaDec_Construct(p) { (p)->dic = 0; (p)->probs = 0; } + +void LzmaDec_Init(CLzmaDec *p); + +/* There are two types of LZMA streams: + 0) Stream with end mark. That end mark adds about 6 bytes to compressed size. + 1) Stream without end mark. You must know exact uncompressed size to decompress such stream. */ + +typedef enum +{ + LZMA_FINISH_ANY, /* finish at any point */ + LZMA_FINISH_END /* block must be finished at the end */ +} ELzmaFinishMode; + +/* ELzmaFinishMode has meaning only if the decoding reaches output limit !!! + + You must use LZMA_FINISH_END, when you know that current output buffer + covers last bytes of block. In other cases you must use LZMA_FINISH_ANY. + + If LZMA decoder sees end marker before reaching output limit, it returns SZ_OK, + and output value of destLen will be less than output buffer size limit. + You can check status result also. + + You can use multiple checks to test data integrity after full decompression: + 1) Check Result and "status" variable. + 2) Check that output(destLen) = uncompressedSize, if you know real uncompressedSize. + 3) Check that output(srcLen) = compressedSize, if you know real compressedSize. + You must use correct finish mode in that case. */ + +typedef enum +{ + LZMA_STATUS_NOT_SPECIFIED, /* use main error code instead */ + LZMA_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ + LZMA_STATUS_NOT_FINISHED, /* stream was not finished */ + LZMA_STATUS_NEEDS_MORE_INPUT, /* you must provide more input bytes */ + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK /* there is probability that stream was finished without end mark */ +} ELzmaStatus; + +/* ELzmaStatus is used only as output value for function call */ + + +/* ---------- Interfaces ---------- */ + +/* There are 3 levels of interfaces: + 1) Dictionary Interface + 2) Buffer Interface + 3) One Call Interface + You can select any of these interfaces, but don't mix functions from different + groups for same object. */ + + +/* There are two variants to allocate state for Dictionary Interface: + 1) LzmaDec_Allocate / LzmaDec_Free + 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs + You can use variant 2, if you set dictionary buffer manually. + For Buffer Interface you must always use variant 1. + +LzmaDec_Allocate* can return: + SZ_OK + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties +*/ + +SRes LzmaDec_AllocateProbs(CLzmaDec *p, const Byte *props, unsigned propsSize, ISzAlloc *alloc); +void LzmaDec_FreeProbs(CLzmaDec *p, ISzAlloc *alloc); + +SRes LzmaDec_Allocate(CLzmaDec *state, const Byte *prop, unsigned propsSize, ISzAlloc *alloc); +void LzmaDec_Free(CLzmaDec *state, ISzAlloc *alloc); + +/* ---------- Dictionary Interface ---------- */ + +/* You can use it, if you want to eliminate the overhead for data copying from + dictionary to some other external buffer. + You must work with CLzmaDec variables directly in this interface. + + STEPS: + LzmaDec_Constr() + LzmaDec_Allocate() + for (each new stream) + { + LzmaDec_Init() + while (it needs more decompression) + { + LzmaDec_DecodeToDic() + use data from CLzmaDec::dic and update CLzmaDec::dicPos + } + } + LzmaDec_Free() +*/ + +/* LzmaDec_DecodeToDic + + The decoding to internal dictionary buffer (CLzmaDec::dic). + You must manually update CLzmaDec::dicPos, if it reaches CLzmaDec::dicBufSize !!! + +finishMode: + It has meaning only if the decoding reaches output limit (dicLimit). + LZMA_FINISH_ANY - Decode just dicLimit bytes. + LZMA_FINISH_END - Stream must be finished after dicLimit. + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_NEEDS_MORE_INPUT + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error +*/ + +SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- Buffer Interface ---------- */ + +/* It's zlib-like interface. + See LzmaDec_DecodeToDic description for information about STEPS and return results, + but you must use LzmaDec_DecodeToBuf instead of LzmaDec_DecodeToDic and you don't need + to work with CLzmaDec variables manually. + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). +*/ + +SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); + + +/* ---------- One Call Interface ---------- */ + +/* LzmaDecode + +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - Decode just destLen bytes. + LZMA_FINISH_END - Stream must be finished after (*destLen). + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + +SRes LzmaDecode(Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + const Byte *propData, unsigned propSize, ELzmaFinishMode finishMode, + ELzmaStatus *status, ISzAlloc *alloc); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/clamscan/libclamav/7z/Ppmd.h b/clamscan/libclamav/7z/Ppmd.h new file mode 100644 index 0000000..72a1cc5 --- /dev/null +++ b/clamscan/libclamav/7z/Ppmd.h @@ -0,0 +1,81 @@ +/* Ppmd.h -- PPMD codec common code +2010-03-12 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#ifndef __PPMD_H +#define __PPMD_H + +#include "Types.h" +#include "CpuArch.h" + +EXTERN_C_BEGIN + +#ifdef MY_CPU_32BIT + #define PPMD_32BIT +#endif + +#define PPMD_INT_BITS 7 +#define PPMD_PERIOD_BITS 7 +#define PPMD_BIN_SCALE (1 << (PPMD_INT_BITS + PPMD_PERIOD_BITS)) + +#define PPMD_GET_MEAN_SPEC(summ, shift, round) (((summ) + (1 << ((shift) - (round)))) >> (shift)) +#define PPMD_GET_MEAN(summ) PPMD_GET_MEAN_SPEC((summ), PPMD_PERIOD_BITS, 2) +#define PPMD_UPDATE_PROB_0(prob) ((prob) + (1 << PPMD_INT_BITS) - PPMD_GET_MEAN(prob)) +#define PPMD_UPDATE_PROB_1(prob) ((prob) - PPMD_GET_MEAN(prob)) + +#define PPMD_N1 4 +#define PPMD_N2 4 +#define PPMD_N3 4 +#define PPMD_N4 ((128 + 3 - 1 * PPMD_N1 - 2 * PPMD_N2 - 3 * PPMD_N3) / 4) +#define PPMD_NUM_INDEXES (PPMD_N1 + PPMD_N2 + PPMD_N3 + PPMD_N4) + +/* SEE-contexts for PPM-contexts with masked symbols */ +typedef struct +{ + UInt16 Summ; /* Freq */ + Byte Shift; /* Speed of Freq change; low Shift is for fast change */ + Byte Count; /* Count to next change of Shift */ +} CPpmd_See; + +#define Ppmd_See_Update(p) if ((p)->Shift < PPMD_PERIOD_BITS && --(p)->Count == 0) \ + { (p)->Summ <<= 1; (p)->Count = (Byte)(3 << (p)->Shift++); } + +typedef struct +{ + Byte Symbol; + Byte Freq; + UInt16 SuccessorLow; + UInt16 SuccessorHigh; +} CPpmd_State; + +typedef + #ifdef PPMD_32BIT + CPpmd_State * + #else + UInt32 + #endif + CPpmd_State_Ref; + +typedef + #ifdef PPMD_32BIT + void * + #else + UInt32 + #endif + CPpmd_Void_Ref; + +typedef + #ifdef PPMD_32BIT + Byte * + #else + UInt32 + #endif + CPpmd_Byte_Ref; + +#define PPMD_SetAllBitsIn256Bytes(p) \ + { unsigned i; for (i = 0; i < 256 / sizeof(p[0]); i += 8) { \ + p[i+7] = p[i+6] = p[i+5] = p[i+4] = p[i+3] = p[i+2] = p[i+1] = p[i+0] = ~(size_t)0; }} + +EXTERN_C_END + +#endif diff --git a/clamscan/libclamav/7z/Ppmd7.c b/clamscan/libclamav/7z/Ppmd7.c new file mode 100644 index 0000000..c934264 --- /dev/null +++ b/clamscan/libclamav/7z/Ppmd7.c @@ -0,0 +1,713 @@ +/* Ppmd7.c -- PPMdH codec +2010-03-12 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#include + +#include "Ppmd7.h" + +const Byte PPMD7_kExpEscape[16] = { 25, 14, 9, 7, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 2 }; +static const UInt16 kInitBinEsc[] = { 0x3CDD, 0x1F3F, 0x59BF, 0x48F3, 0x64A1, 0x5ABC, 0x6632, 0x6051}; + +#define MAX_FREQ 124 +#define UNIT_SIZE 12 + +#define U2B(nu) ((UInt32)(nu) * UNIT_SIZE) +#define U2I(nu) (p->Units2Indx[(nu) - 1]) +#define I2U(indx) (p->Indx2Units[indx]) + +#ifdef PPMD_32BIT + #define REF(ptr) (ptr) +#else + #define REF(ptr) ((UInt32)((Byte *)(ptr) - (p)->Base)) +#endif + +#define STATS_REF(ptr) ((CPpmd_State_Ref)REF(ptr)) + +#define CTX(ref) ((CPpmd7_Context *)Ppmd7_GetContext(p, ref)) +#define STATS(ctx) Ppmd7_GetStats(p, ctx) +#define ONE_STATE(ctx) Ppmd7Context_OneState(ctx) +#define SUFFIX(ctx) CTX((ctx)->Suffix) + +typedef CPpmd7_Context * CTX_PTR; + +struct CPpmd7_Node_; + +typedef + #ifdef PPMD_32BIT + struct CPpmd7_Node_ * + #else + UInt32 + #endif + CPpmd7_Node_Ref; + +typedef struct CPpmd7_Node_ +{ + UInt16 Stamp; /* must be at offset 0 as CPpmd7_Context::NumStats. Stamp=0 means free */ + UInt16 NU; + CPpmd7_Node_Ref Next; /* must be at offset >= 4 */ + CPpmd7_Node_Ref Prev; +} CPpmd7_Node; + +union NodeOrRef { + CPpmd7_Node node; + CPpmd7_Node_Ref ref; +}; + +#ifdef PPMD_32BIT + #define NODE(ptr) (ptr) +#else + #define NODE(offs) ((CPpmd7_Node *)(p->Base + (offs))) +#endif + +void Ppmd7_Construct(CPpmd7 *p) +{ + unsigned i, k, m; + + p->Base = 0; + + for (i = 0, k = 0; i < PPMD_NUM_INDEXES; i++) + { + unsigned step = (i >= 12 ? 4 : (i >> 2) + 1); + do { p->Units2Indx[k++] = (Byte)i; } while(--step); + p->Indx2Units[i] = (Byte)k; + } + + p->NS2BSIndx[0] = (0 << 1); + p->NS2BSIndx[1] = (1 << 1); + memset(p->NS2BSIndx + 2, (2 << 1), 9); + memset(p->NS2BSIndx + 11, (3 << 1), 256 - 11); + + for (i = 0; i < 3; i++) + p->NS2Indx[i] = (Byte)i; + for (m = i, k = 1; i < 256; i++) + { + p->NS2Indx[i] = (Byte)m; + if (--k == 0) + k = (++m) - 2; + } + + memset(p->HB2Flag, 0, 0x40); + memset(p->HB2Flag + 0x40, 8, 0x100 - 0x40); +} + +void Ppmd7_Free(CPpmd7 *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->Base); + p->Size = 0; + p->Base = 0; +} + +Bool Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAlloc *alloc) +{ + if (p->Base == 0 || p->Size != size) + { + Ppmd7_Free(p, alloc); + p->AlignOffset = + #ifdef PPMD_32BIT + (4 - size) & 3; + #else + 4 - (size & 3); + #endif + if ((p->Base = (Byte *)alloc->Alloc(alloc, p->AlignOffset + size + #ifndef PPMD_32BIT + + UNIT_SIZE + #endif + )) == 0) + return False; + p->Size = size; + } + return True; +} + +static void InsertNode(CPpmd7 *p, void *node, unsigned indx) +{ + *((CPpmd_Void_Ref *)node) = p->FreeList[indx]; + p->FreeList[indx] = REF(node); +} + +static void *RemoveNode(CPpmd7 *p, unsigned indx) +{ + CPpmd_Void_Ref *node = (CPpmd_Void_Ref *)Ppmd7_GetPtr(p, p->FreeList[indx]); + p->FreeList[indx] = *node; + return node; +} + +static void SplitBlock(CPpmd7 *p, void *ptr, unsigned oldIndx, unsigned newIndx) +{ + unsigned i, nu = I2U(oldIndx) - I2U(newIndx); + ptr = (Byte *)ptr + U2B(I2U(newIndx)); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, ((Byte *)ptr) + U2B(k), nu - k - 1); + } + InsertNode(p, ptr, i); +} + +static void GlueFreeBlocks(CPpmd7 *p) +{ + #ifdef PPMD_32BIT + CPpmd7_Node headItem; + CPpmd7_Node_Ref head = &headItem; + #else + CPpmd7_Node_Ref head = p->AlignOffset + p->Size; + #endif + + CPpmd7_Node_Ref n = head; + unsigned i; + + p->GlueCount = 255; + + /* create doubly-linked list of free blocks */ + for (i = 0; i < PPMD_NUM_INDEXES; i++) + { + UInt16 nu = I2U(i); + CPpmd7_Node_Ref next = (CPpmd7_Node_Ref)p->FreeList[i]; + p->FreeList[i] = 0; + while (next != 0) + { + CPpmd7_Node *node = NODE(next); + node->Next = n; + n = NODE(n)->Prev = next; + next = ((const union NodeOrRef *)node)->ref; + node->Stamp = 0; + node->NU = (UInt16)nu; + } + } + NODE(head)->Stamp = 1; + NODE(head)->Next = n; + NODE(n)->Prev = head; + if (p->LoUnit != p->HiUnit) + ((CPpmd7_Node *)p->LoUnit)->Stamp = 1; + + /* Glue free blocks */ + while (n != head) + { + CPpmd7_Node *node = NODE(n); + UInt32 nu = (UInt32)node->NU; + for (;;) + { + CPpmd7_Node *node2 = NODE(n) + nu; + nu += node2->NU; + if (node2->Stamp != 0 || nu >= 0x10000) + break; + NODE(node2->Prev)->Next = node2->Next; + NODE(node2->Next)->Prev = node2->Prev; + node->NU = (UInt16)nu; + } + n = node->Next; + } + + /* Fill lists of free blocks */ + for (n = NODE(head)->Next; n != head;) + { + CPpmd7_Node *node = NODE(n); + unsigned nu; + CPpmd7_Node_Ref next = node->Next; + for (nu = node->NU; nu > 128; nu -= 128, node += 128) + InsertNode(p, node, PPMD_NUM_INDEXES - 1); + if (I2U(i = U2I(nu)) != nu) + { + unsigned k = I2U(--i); + InsertNode(p, node + k, nu - k - 1); + } + InsertNode(p, node, i); + n = next; + } +} + +static void *AllocUnitsRare(CPpmd7 *p, unsigned indx) +{ + unsigned i; + void *retVal; + if (p->GlueCount == 0) + { + GlueFreeBlocks(p); + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + } + i = indx; + do + { + if (++i == PPMD_NUM_INDEXES) + { + UInt32 numBytes = U2B(I2U(indx)); + p->GlueCount--; + return ((UInt32)(p->UnitsStart - p->Text) > numBytes) ? (p->UnitsStart -= numBytes) : (NULL); + } + } + while (p->FreeList[i] == 0); + retVal = RemoveNode(p, i); + SplitBlock(p, retVal, i, indx); + return retVal; +} + +static void *AllocUnits(CPpmd7 *p, unsigned indx) +{ + UInt32 numBytes; + if (p->FreeList[indx] != 0) + return RemoveNode(p, indx); + numBytes = U2B(I2U(indx)); + if (numBytes <= (UInt32)(p->HiUnit - p->LoUnit)) + { + void *retVal = p->LoUnit; + p->LoUnit += numBytes; + return retVal; + } + return AllocUnitsRare(p, indx); +} + +#define MyMem12Cpy(dest, src, num) \ + { UInt32 *d = (UInt32 *)dest; const UInt32 *s = (const UInt32 *)src; UInt32 n = num; \ + do { d[0] = s[0]; d[1] = s[1]; d[2] = s[2]; s += 3; d += 3; } while(--n); } + +static void *ShrinkUnits(CPpmd7 *p, void *oldPtr, unsigned oldNU, unsigned newNU) +{ + unsigned i0 = U2I(oldNU); + unsigned i1 = U2I(newNU); + if (i0 == i1) + return oldPtr; + if (p->FreeList[i1] != 0) + { + void *ptr = RemoveNode(p, i1); + MyMem12Cpy(ptr, oldPtr, newNU); + InsertNode(p, oldPtr, i0); + return ptr; + } + SplitBlock(p, oldPtr, i0, i1); + return oldPtr; +} + +#define SUCCESSOR(p) ((CPpmd_Void_Ref)((p)->SuccessorLow | ((UInt32)(p)->SuccessorHigh << 16))) + +static void SetSuccessor(CPpmd_State *p, CPpmd_Void_Ref v) +{ + (p)->SuccessorLow = (UInt16)((UInt32)(v) & 0xFFFF); + (p)->SuccessorHigh = (UInt16)(((UInt32)(v) >> 16) & 0xFFFF); +} + +static void RestartModel(CPpmd7 *p) +{ + unsigned i, k, m; + + memset(p->FreeList, 0, sizeof(p->FreeList)); + p->Text = p->Base + p->AlignOffset; + p->HiUnit = p->Text + p->Size; + p->LoUnit = p->UnitsStart = p->HiUnit - p->Size / 8 / UNIT_SIZE * 7 * UNIT_SIZE; + p->GlueCount = 0; + + p->OrderFall = p->MaxOrder; + p->RunLength = p->InitRL = -(Int32)((p->MaxOrder < 12) ? p->MaxOrder : 12) - 1; + p->PrevSuccess = 0; + + p->MinContext = p->MaxContext = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); /* AllocContext(p); */ + p->MinContext->Suffix = 0; + p->MinContext->NumStats = 256; + p->MinContext->SummFreq = 256 + 1; + p->FoundState = (CPpmd_State *)p->LoUnit; /* AllocUnits(p, PPMD_NUM_INDEXES - 1); */ + p->LoUnit += U2B(256 / 2); + p->MinContext->Stats = REF(p->FoundState); + for (i = 0; i < 256; i++) + { + CPpmd_State *s = &p->FoundState[i]; + s->Symbol = (Byte)i; + s->Freq = 1; + SetSuccessor(s, 0); + } + + for (i = 0; i < 128; i++) + for (k = 0; k < 8; k++) + { + UInt16 *dest = p->BinSumm[i] + k; + UInt16 val = (UInt16)(PPMD_BIN_SCALE - kInitBinEsc[k] / (i + 2)); + for (m = 0; m < 64; m += 8) + dest[m] = val; + } + + for (i = 0; i < 25; i++) + for (k = 0; k < 16; k++) + { + CPpmd_See *s = &p->See[i][k]; + s->Summ = (UInt16)((5 * i + 10) << (s->Shift = PPMD_PERIOD_BITS - 4)); + s->Count = 4; + } +} + +void Ppmd7_Init(CPpmd7 *p, unsigned maxOrder) +{ + p->MaxOrder = maxOrder; + RestartModel(p); + p->DummySee.Shift = PPMD_PERIOD_BITS; + p->DummySee.Summ = 0; /* unused */ + p->DummySee.Count = 64; /* unused */ +} + +static CTX_PTR CreateSuccessors(CPpmd7 *p, Bool skip) +{ + CPpmd_State upState; + CTX_PTR c = p->MinContext; + CPpmd_Byte_Ref upBranch = (CPpmd_Byte_Ref)SUCCESSOR(p->FoundState); + CPpmd_State *ps[PPMD7_MAX_ORDER]; + unsigned numPs = 0; + + if (!skip) + ps[numPs++] = p->FoundState; + + while (c->Suffix) + { + CPpmd_Void_Ref successor; + CPpmd_State *s; + c = SUFFIX(c); + if (c->NumStats != 1) + { + for (s = STATS(c); s->Symbol != p->FoundState->Symbol; s++); + } + else + s = ONE_STATE(c); + successor = SUCCESSOR(s); + if (successor != upBranch) + { + c = CTX(successor); + if (numPs == 0) + return c; + break; + } + ps[numPs++] = s; + } + + upState.Symbol = *(const Byte *)Ppmd7_GetPtr(p, upBranch); + SetSuccessor(&upState, upBranch + 1); + + if (c->NumStats == 1) + upState.Freq = ONE_STATE(c)->Freq; + else + { + UInt32 cf, s0; + CPpmd_State *s; + for (s = STATS(c); s->Symbol != upState.Symbol; s++); + cf = s->Freq - 1; + s0 = c->SummFreq - c->NumStats - cf; + upState.Freq = (Byte)(1 + ((2 * cf <= s0) ? (5 * cf > s0) : ((2 * cf + 3 * s0 - 1) / (2 * s0)))); + } + + do + { + /* Create Child */ + CTX_PTR c1; /* = AllocContext(p); */ + if (p->HiUnit != p->LoUnit) + c1 = (CTX_PTR)(p->HiUnit -= UNIT_SIZE); + else if (p->FreeList[0] != 0) + c1 = (CTX_PTR)RemoveNode(p, 0); + else + { + c1 = (CTX_PTR)AllocUnitsRare(p, 0); + if (!c1) + return NULL; + } + c1->NumStats = 1; + *ONE_STATE(c1) = upState; + c1->Suffix = REF(c); + SetSuccessor(ps[--numPs], REF(c1)); + c = c1; + } + while (numPs != 0); + + return c; +} + +static void SwapStates(CPpmd_State *t1, CPpmd_State *t2) +{ + CPpmd_State tmp = *t1; + *t1 = *t2; + *t2 = tmp; +} + +static void UpdateModel(CPpmd7 *p) +{ + CPpmd_Void_Ref successor, fSuccessor = SUCCESSOR(p->FoundState); + CTX_PTR c; + unsigned s0, ns; + + if (p->FoundState->Freq < MAX_FREQ / 4 && p->MinContext->Suffix != 0) + { + c = SUFFIX(p->MinContext); + + if (c->NumStats == 1) + { + CPpmd_State *s = ONE_STATE(c); + if (s->Freq < 32) + s->Freq++; + } + else + { + CPpmd_State *s = STATS(c); + if (s->Symbol != p->FoundState->Symbol) + { + do { s++; } while (s->Symbol != p->FoundState->Symbol); + if (s[0].Freq >= s[-1].Freq) + { + SwapStates(&s[0], &s[-1]); + s--; + } + } + if (s->Freq < MAX_FREQ - 9) + { + s->Freq += 2; + c->SummFreq += 2; + } + } + } + + if (p->OrderFall == 0) + { + p->MinContext = p->MaxContext = CreateSuccessors(p, True); + if (p->MinContext == 0) + { + RestartModel(p); + return; + } + SetSuccessor(p->FoundState, REF(p->MinContext)); + return; + } + + *p->Text++ = p->FoundState->Symbol; + successor = REF(p->Text); + if (p->Text >= p->UnitsStart) + { + RestartModel(p); + return; + } + + if (fSuccessor) + { + if (fSuccessor <= successor) + { + CTX_PTR cs = CreateSuccessors(p, False); + if (cs == NULL) + { + RestartModel(p); + return; + } + fSuccessor = REF(cs); + } + if (--p->OrderFall == 0) + { + successor = fSuccessor; + p->Text -= (p->MaxContext != p->MinContext); + } + } + else + { + SetSuccessor(p->FoundState, successor); + fSuccessor = REF(p->MinContext); + } + + s0 = p->MinContext->SummFreq - (ns = p->MinContext->NumStats) - (p->FoundState->Freq - 1); + + for (c = p->MaxContext; c != p->MinContext; c = SUFFIX(c)) + { + unsigned ns1; + UInt32 cf, sf; + if ((ns1 = c->NumStats) != 1) + { + if ((ns1 & 1) == 0) + { + /* Expand for one UNIT */ + unsigned oldNU = ns1 >> 1; + unsigned i = U2I(oldNU); + if (i != U2I(oldNU + 1)) + { + void *ptr = AllocUnits(p, i + 1); + void *oldPtr; + if (!ptr) + { + RestartModel(p); + return; + } + oldPtr = STATS(c); + MyMem12Cpy(ptr, oldPtr, oldNU); + InsertNode(p, oldPtr, i); + c->Stats = STATS_REF(ptr); + } + } + c->SummFreq = (UInt16)(c->SummFreq + (2 * ns1 < ns) + 2 * ((4 * ns1 <= ns) & (c->SummFreq <= 8 * ns1))); + } + else + { + CPpmd_State *s = (CPpmd_State*)AllocUnits(p, 0); + if (!s) + { + RestartModel(p); + return; + } + *s = *ONE_STATE(c); + c->Stats = REF(s); + if (s->Freq < MAX_FREQ / 4 - 1) + s->Freq <<= 1; + else + s->Freq = MAX_FREQ - 4; + c->SummFreq = (UInt16)(s->Freq + p->InitEsc + (ns > 3)); + } + cf = 2 * (UInt32)p->FoundState->Freq * (c->SummFreq + 6); + sf = (UInt32)s0 + c->SummFreq; + if (cf < 6 * sf) + { + cf = 1 + (cf > sf) + (cf >= 4 * sf); + c->SummFreq += 3; + } + else + { + cf = 4 + (cf >= 9 * sf) + (cf >= 12 * sf) + (cf >= 15 * sf); + c->SummFreq = (UInt16)(c->SummFreq + cf); + } + { + CPpmd_State *s = STATS(c) + ns1; + SetSuccessor(s, successor); + s->Symbol = p->FoundState->Symbol; + s->Freq = (Byte)cf; + c->NumStats = (UInt16)(ns1 + 1); + } + } + p->MaxContext = p->MinContext = CTX(fSuccessor); +} + +static void Rescale(CPpmd7 *p) +{ + unsigned i, adder, sumFreq, escFreq; + CPpmd_State *stats = STATS(p->MinContext); + CPpmd_State *s = p->FoundState; + { + CPpmd_State tmp = *s; + for (; s != stats; s--) + s[0] = s[-1]; + *s = tmp; + } + escFreq = p->MinContext->SummFreq - s->Freq; + s->Freq += 4; + adder = (p->OrderFall != 0); + s->Freq = (Byte)((s->Freq + adder) >> 1); + sumFreq = s->Freq; + + i = p->MinContext->NumStats - 1; + do + { + escFreq -= (++s)->Freq; + s->Freq = (Byte)((s->Freq + adder) >> 1); + sumFreq += s->Freq; + if (s[0].Freq > s[-1].Freq) + { + CPpmd_State *s1 = s; + CPpmd_State tmp = *s1; + do + s1[0] = s1[-1]; + while (--s1 != stats && tmp.Freq > s1[-1].Freq); + *s1 = tmp; + } + } + while (--i); + + if (s->Freq == 0) + { + unsigned numStats = p->MinContext->NumStats; + unsigned n0, n1; + do { i++; } while ((--s)->Freq == 0); + escFreq += i; + p->MinContext->NumStats = (UInt16)(p->MinContext->NumStats - i); + if (p->MinContext->NumStats == 1) + { + CPpmd_State tmp = *stats; + do + { + tmp.Freq = (Byte)(tmp.Freq - (tmp.Freq >> 1)); + escFreq >>= 1; + } + while (escFreq > 1); + InsertNode(p, stats, U2I(((numStats + 1) >> 1))); + *(p->FoundState = ONE_STATE(p->MinContext)) = tmp; + return; + } + n0 = (numStats + 1) >> 1; + n1 = (p->MinContext->NumStats + 1) >> 1; + if (n0 != n1) + p->MinContext->Stats = STATS_REF(ShrinkUnits(p, stats, n0, n1)); + } + p->MinContext->SummFreq = (UInt16)(sumFreq + escFreq - (escFreq >> 1)); + p->FoundState = STATS(p->MinContext); +} + +CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *escFreq) +{ + CPpmd_See *see; + unsigned nonMasked = p->MinContext->NumStats - numMasked; + if (p->MinContext->NumStats != 256) + { + see = p->See[p->NS2Indx[nonMasked - 1]] + + (nonMasked < (unsigned)SUFFIX(p->MinContext)->NumStats - p->MinContext->NumStats) + + 2 * (p->MinContext->SummFreq < 11 * p->MinContext->NumStats) + + 4 * (numMasked > nonMasked) + + p->HiBitsFlag; + { + unsigned r = (see->Summ >> see->Shift); + see->Summ = (UInt16)(see->Summ - r); + *escFreq = r + (r == 0); + } + } + else + { + see = &p->DummySee; + *escFreq = 1; + } + return see; +} + +static void NextContext(CPpmd7 *p) +{ + CTX_PTR c = CTX(SUCCESSOR(p->FoundState)); + if (p->OrderFall == 0 && (Byte *)c > p->Text) + p->MinContext = p->MaxContext = c; + else + UpdateModel(p); +} + +void Ppmd7_Update1(CPpmd7 *p) +{ + CPpmd_State *s = p->FoundState; + s->Freq += 4; + p->MinContext->SummFreq += 4; + if (s[0].Freq > s[-1].Freq) + { + SwapStates(&s[0], &s[-1]); + p->FoundState = --s; + if (s->Freq > MAX_FREQ) + Rescale(p); + } + NextContext(p); +} + +void Ppmd7_Update1_0(CPpmd7 *p) +{ + p->PrevSuccess = (2 * p->FoundState->Freq > p->MinContext->SummFreq); + p->RunLength += p->PrevSuccess; + p->MinContext->SummFreq += 4; + if ((p->FoundState->Freq += 4) > MAX_FREQ) + Rescale(p); + NextContext(p); +} + +void Ppmd7_UpdateBin(CPpmd7 *p) +{ + p->FoundState->Freq = (Byte)(p->FoundState->Freq + (p->FoundState->Freq < 128 ? 1: 0)); + p->PrevSuccess = 1; + p->RunLength++; + NextContext(p); +} + +void Ppmd7_Update2(CPpmd7 *p) +{ + p->MinContext->SummFreq += 4; + if ((p->FoundState->Freq += 4) > MAX_FREQ) + Rescale(p); + p->RunLength = p->InitRL; + UpdateModel(p); +} diff --git a/clamscan/libclamav/7z/Ppmd7.h b/clamscan/libclamav/7z/Ppmd7.h new file mode 100644 index 0000000..96521c3 --- /dev/null +++ b/clamscan/libclamav/7z/Ppmd7.h @@ -0,0 +1,140 @@ +/* Ppmd7.h -- PPMdH compression codec +2010-03-12 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +/* This code supports virtual RangeDecoder and includes the implementation +of RangeCoder from 7z, instead of RangeCoder from original PPMd var.H. +If you need the compatibility with original PPMd var.H, you can use external RangeDecoder */ + +#ifndef __PPMD7_H +#define __PPMD7_H + +#include "Ppmd.h" + +EXTERN_C_BEGIN + +#define PPMD7_MIN_ORDER 2 +#define PPMD7_MAX_ORDER 64 + +#define PPMD7_MIN_MEM_SIZE (1 << 11) +#define PPMD7_MAX_MEM_SIZE (0xFFFFFFFF - 12 * 3) + +struct CPpmd7_Context_; + +typedef + #ifdef PPMD_32BIT + struct CPpmd7_Context_ * + #else + UInt32 + #endif + CPpmd7_Context_Ref; + +typedef struct CPpmd7_Context_ +{ + UInt16 NumStats; + UInt16 SummFreq; + CPpmd_State_Ref Stats; + CPpmd7_Context_Ref Suffix; +} CPpmd7_Context; + +#define Ppmd7Context_OneState(p) ((CPpmd_State *)&(p)->SummFreq) + +typedef struct +{ + CPpmd7_Context *MinContext, *MaxContext; + CPpmd_State *FoundState; + unsigned OrderFall, InitEsc, PrevSuccess, MaxOrder, HiBitsFlag; + Int32 RunLength, InitRL; /* must be 32-bit at least */ + + UInt32 Size; + UInt32 GlueCount; + Byte *Base, *LoUnit, *HiUnit, *Text, *UnitsStart; + UInt32 AlignOffset; + + Byte Indx2Units[PPMD_NUM_INDEXES]; + Byte Units2Indx[128]; + CPpmd_Void_Ref FreeList[PPMD_NUM_INDEXES]; + Byte NS2Indx[256], NS2BSIndx[256], HB2Flag[256]; + CPpmd_See DummySee, See[25][16]; + UInt16 BinSumm[128][64]; +} CPpmd7; + +void Ppmd7_Construct(CPpmd7 *p); +Bool Ppmd7_Alloc(CPpmd7 *p, UInt32 size, ISzAlloc *alloc); +void Ppmd7_Free(CPpmd7 *p, ISzAlloc *alloc); +void Ppmd7_Init(CPpmd7 *p, unsigned maxOrder); +#define Ppmd7_WasAllocated(p) ((p)->Base != NULL) + + +/* ---------- Internal Functions ---------- */ + +extern const Byte PPMD7_kExpEscape[16]; + +#ifdef PPMD_32BIT + #define Ppmd7_GetPtr(p, ptr) (ptr) + #define Ppmd7_GetContext(p, ptr) (ptr) + #define Ppmd7_GetStats(p, ctx) ((ctx)->Stats) +#else + #define Ppmd7_GetPtr(p, offs) ((void *)((p)->Base + (offs))) + #define Ppmd7_GetContext(p, offs) ((CPpmd7_Context *)Ppmd7_GetPtr((p), (offs))) + #define Ppmd7_GetStats(p, ctx) ((CPpmd_State *)Ppmd7_GetPtr((p), ((ctx)->Stats))) +#endif + +void Ppmd7_Update1(CPpmd7 *p); +void Ppmd7_Update1_0(CPpmd7 *p); +void Ppmd7_Update2(CPpmd7 *p); +void Ppmd7_UpdateBin(CPpmd7 *p); + +#define Ppmd7_GetBinSumm(p) \ + &p->BinSumm[Ppmd7Context_OneState(p->MinContext)->Freq - 1][p->PrevSuccess + \ + p->NS2BSIndx[Ppmd7_GetContext(p, p->MinContext->Suffix)->NumStats - 1] + \ + (p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]) + \ + 2 * p->HB2Flag[Ppmd7Context_OneState(p->MinContext)->Symbol] + \ + ((p->RunLength >> 26) & 0x20)] + +CPpmd_See *Ppmd7_MakeEscFreq(CPpmd7 *p, unsigned numMasked, UInt32 *scale); + + +/* ---------- Decode ---------- */ + +typedef struct +{ + UInt32 (*GetThreshold)(void *p, UInt32 total); + void (*Decode)(void *p, UInt32 start, UInt32 size); + UInt32 (*DecodeBit)(void *p, UInt32 size0); +} IPpmd7_RangeDec; + +typedef struct +{ + IPpmd7_RangeDec p; + UInt32 Range; + UInt32 Code; + IByteIn *Stream; +} CPpmd7z_RangeDec; + +void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p); +Bool Ppmd7z_RangeDec_Init(CPpmd7z_RangeDec *p); +#define Ppmd7z_RangeDec_IsFinishedOK(p) ((p)->Code == 0) + +int Ppmd7_DecodeSymbol(CPpmd7 *p, IPpmd7_RangeDec *rc); + + +/* ---------- Encode ---------- */ + +typedef struct +{ + UInt64 Low; + UInt32 Range; + Byte Cache; + UInt64 CacheSize; + IByteOut *Stream; +} CPpmd7z_RangeEnc; + +void Ppmd7z_RangeEnc_Init(CPpmd7z_RangeEnc *p); +void Ppmd7z_RangeEnc_FlushData(CPpmd7z_RangeEnc *p); + +void Ppmd7_EncodeSymbol(CPpmd7 *p, CPpmd7z_RangeEnc *rc, int symbol); + +EXTERN_C_END + +#endif diff --git a/clamscan/libclamav/7z/Ppmd7Dec.c b/clamscan/libclamav/7z/Ppmd7Dec.c new file mode 100644 index 0000000..68438d5 --- /dev/null +++ b/clamscan/libclamav/7z/Ppmd7Dec.c @@ -0,0 +1,187 @@ +/* Ppmd7Dec.c -- PPMdH Decoder +2010-03-12 : Igor Pavlov : Public domain +This code is based on PPMd var.H (2001): Dmitry Shkarin : Public domain */ + +#include "Ppmd7.h" + +#define kTopValue (1 << 24) + +Bool Ppmd7z_RangeDec_Init(CPpmd7z_RangeDec *p) +{ + unsigned i; + p->Code = 0; + p->Range = 0xFFFFFFFF; + if (p->Stream->Read((void *)p->Stream) != 0) + return False; + for (i = 0; i < 4; i++) + p->Code = (p->Code << 8) | p->Stream->Read((void *)p->Stream); + return (p->Code < 0xFFFFFFFF); +} + +static UInt32 Range_GetThreshold(void *pp, UInt32 total) +{ + CPpmd7z_RangeDec *p = (CPpmd7z_RangeDec *)pp; + return (p->Code) / (p->Range /= total); +} + +static void Range_Normalize(CPpmd7z_RangeDec *p) +{ + if (p->Range < kTopValue) + { + p->Code = (p->Code << 8) | p->Stream->Read((void *)p->Stream); + p->Range <<= 8; + if (p->Range < kTopValue) + { + p->Code = (p->Code << 8) | p->Stream->Read((void *)p->Stream); + p->Range <<= 8; + } + } +} + +static void Range_Decode(void *pp, UInt32 start, UInt32 size) +{ + CPpmd7z_RangeDec *p = (CPpmd7z_RangeDec *)pp; + p->Code -= start * p->Range; + p->Range *= size; + Range_Normalize(p); +} + +static UInt32 Range_DecodeBit(void *pp, UInt32 size0) +{ + CPpmd7z_RangeDec *p = (CPpmd7z_RangeDec *)pp; + UInt32 newBound = (p->Range >> 14) * size0; + UInt32 symbol; + if (p->Code < newBound) + { + symbol = 0; + p->Range = newBound; + } + else + { + symbol = 1; + p->Code -= newBound; + p->Range -= newBound; + } + Range_Normalize(p); + return symbol; +} + +void Ppmd7z_RangeDec_CreateVTable(CPpmd7z_RangeDec *p) +{ + p->p.GetThreshold = Range_GetThreshold; + p->p.Decode = Range_Decode; + p->p.DecodeBit = Range_DecodeBit; +} + + +#define MASK(sym) ((signed char *)charMask)[sym] + +int Ppmd7_DecodeSymbol(CPpmd7 *p, IPpmd7_RangeDec *rc) +{ + size_t charMask[256 / sizeof(size_t)]; + if (p->MinContext->NumStats != 1) + { + CPpmd_State *s = Ppmd7_GetStats(p, p->MinContext); + unsigned i; + UInt32 count, hiCnt; + if ((count = rc->GetThreshold(rc, p->MinContext->SummFreq)) < (hiCnt = s->Freq)) + { + Byte symbol; + rc->Decode(rc, 0, s->Freq); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update1_0(p); + return symbol; + } + p->PrevSuccess = 0; + i = p->MinContext->NumStats - 1; + do + { + if ((hiCnt += (++s)->Freq) > count) + { + Byte symbol; + rc->Decode(rc, hiCnt - s->Freq, s->Freq); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update1(p); + return symbol; + } + } + while (--i); + if (count >= p->MinContext->SummFreq) + return -2; + p->HiBitsFlag = p->HB2Flag[p->FoundState->Symbol]; + rc->Decode(rc, hiCnt, p->MinContext->SummFreq - hiCnt); + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(s->Symbol) = 0; + i = p->MinContext->NumStats - 1; + do { MASK((--s)->Symbol) = 0; } while (--i); + } + else + { + UInt16 *prob = Ppmd7_GetBinSumm(p); + if (rc->DecodeBit(rc, *prob) == 0) + { + Byte symbol; + *prob = (UInt16)PPMD_UPDATE_PROB_0(*prob); + symbol = (p->FoundState = Ppmd7Context_OneState(p->MinContext))->Symbol; + Ppmd7_UpdateBin(p); + return symbol; + } + *prob = (UInt16)PPMD_UPDATE_PROB_1(*prob); + p->InitEsc = PPMD7_kExpEscape[*prob >> 10]; + PPMD_SetAllBitsIn256Bytes(charMask); + MASK(Ppmd7Context_OneState(p->MinContext)->Symbol) = 0; + p->PrevSuccess = 0; + } + for (;;) + { + CPpmd_State *ps[256], *s; + UInt32 freqSum, count, hiCnt; + CPpmd_See *see; + unsigned i, num, numMasked = p->MinContext->NumStats; + do + { + p->OrderFall++; + if (!p->MinContext->Suffix) + return -1; + p->MinContext = Ppmd7_GetContext(p, p->MinContext->Suffix); + } + while (p->MinContext->NumStats == numMasked); + hiCnt = 0; + s = Ppmd7_GetStats(p, p->MinContext); + i = 0; + num = p->MinContext->NumStats - numMasked; + do + { + int k = (int)(MASK(s->Symbol)); + hiCnt += (s->Freq & k); + ps[i] = s++; + i -= k; + } + while (i != num); + + see = Ppmd7_MakeEscFreq(p, numMasked, &freqSum); + freqSum += hiCnt; + count = rc->GetThreshold(rc, freqSum); + + if (count < hiCnt) + { + Byte symbol; + CPpmd_State **pps = ps; + for (hiCnt = 0; (hiCnt += (*pps)->Freq) <= count; pps++); + s = *pps; + rc->Decode(rc, hiCnt - s->Freq, s->Freq); + Ppmd_See_Update(see); + p->FoundState = s; + symbol = s->Symbol; + Ppmd7_Update2(p); + return symbol; + } + if (count >= freqSum) + return -2; + rc->Decode(rc, hiCnt, freqSum - hiCnt); + see->Summ = (UInt16)(see->Summ + freqSum); + do { MASK(ps[--i]->Symbol) = 0; } while (i != 0); + } +} diff --git a/clamscan/libclamav/7z/RotateDefs.h b/clamscan/libclamav/7z/RotateDefs.h new file mode 100644 index 0000000..c3a1385 --- /dev/null +++ b/clamscan/libclamav/7z/RotateDefs.h @@ -0,0 +1,20 @@ +/* RotateDefs.h -- Rotate functions +2009-02-07 : Igor Pavlov : Public domain */ + +#ifndef __ROTATE_DEFS_H +#define __ROTATE_DEFS_H + +#ifdef _MSC_VER + +#include +#define rotlFixed(x, n) _rotl((x), (n)) +#define rotrFixed(x, n) _rotr((x), (n)) + +#else + +#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) +#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) + +#endif + +#endif diff --git a/clamscan/libclamav/7z/Types.h b/clamscan/libclamav/7z/Types.h new file mode 100644 index 0000000..bec00e2 --- /dev/null +++ b/clamscan/libclamav/7z/Types.h @@ -0,0 +1,262 @@ +/* Types.h -- Basic types +2010-10-09 : Igor Pavlov : Public domain */ + +#ifndef __7Z_TYPES_H +#define __7Z_TYPES_H + +#include + +#ifdef _WIN32 +#include +#endif + +#include + +#ifndef EXTERN_C_BEGIN +#ifdef __cplusplus +#define EXTERN_C_BEGIN extern "C" { +#define EXTERN_C_END } +#else +#define EXTERN_C_BEGIN +#define EXTERN_C_END +#endif +#endif + +EXTERN_C_BEGIN +#include "fmap.h" +#define SZ_OK 0 + +#define SZ_ERROR_DATA 1 +#define SZ_ERROR_MEM 2 +#define SZ_ERROR_CRC 3 +#define SZ_ERROR_UNSUPPORTED 4 +#define SZ_ERROR_PARAM 5 +#define SZ_ERROR_INPUT_EOF 6 +#define SZ_ERROR_OUTPUT_EOF 7 +#define SZ_ERROR_READ 8 +#define SZ_ERROR_WRITE 9 +#define SZ_ERROR_PROGRESS 10 +#define SZ_ERROR_FAIL 11 +#define SZ_ERROR_THREAD 12 + +#define SZ_ERROR_ARCHIVE 16 +#define SZ_ERROR_NO_ARCHIVE 17 + +/* ACAB */ +#define SZ_ERROR_ENCRYPTED 18 + +typedef int SRes; + +#ifdef _WIN32 +typedef DWORD WRes; +#else +typedef int WRes; +#endif + +#ifndef RINOK +#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } +#endif + +/* aCaB -- use Byte defined in zconf.h +typedef unsigned char Byte; +*/ +typedef short Int16; +typedef unsigned short UInt16; + +#ifdef _LZMA_UINT32_IS_ULONG +typedef long Int32; +typedef unsigned long UInt32; +#else +typedef int Int32; +typedef unsigned int UInt32; +#endif + +#ifdef _SZ_NO_INT_64 + +/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers. + NOTES: Some code will work incorrectly in that case! */ + +typedef long Int64; +typedef unsigned long UInt64; + +#else + +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef __int64 Int64; +typedef unsigned __int64 UInt64; +#define UINT64_CONST(n) n +#else +typedef long long int Int64; +typedef unsigned long long int UInt64; +#define UINT64_CONST(n) n ## ULL +#endif + +#endif + +#ifdef _LZMA_NO_SYSTEM_SIZE_T +typedef UInt32 SizeT; +#else +typedef size_t SizeT; +#endif + +typedef int Bool; +#define True 1 +#define False 0 + + +#ifdef _WIN32 +#define MY_STD_CALL __stdcall +#else +#define MY_STD_CALL +#endif + +#ifdef _MSC_VER + +#if _MSC_VER >= 1300 +#define MY_NO_INLINE __declspec(noinline) +#else +#define MY_NO_INLINE +#endif + +#define MY_CDECL __cdecl +#define MY_FAST_CALL __fastcall + +#else + +#define MY_CDECL +#define MY_FAST_CALL + +#endif + + +/* The following interfaces use first parameter as pointer to structure */ + +typedef struct +{ + Byte (*Read)(void *p); /* reads one byte, returns 0 in case of EOF or error */ +} IByteIn; + +typedef struct +{ + void (*Write)(void *p, Byte b); +} IByteOut; + +typedef struct +{ + SRes (*Read)(void *p, void *buf, size_t *size); + /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. + (output(*size) < input(*size)) is allowed */ +} ISeqInStream; + +/* it can return SZ_ERROR_INPUT_EOF */ +SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size); +SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType); +SRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf); + +typedef struct +{ + size_t (*Write)(void *p, const void *buf, size_t size); + /* Returns: result - the number of actually written bytes. + (result < size) means error */ +} ISeqOutStream; + +typedef enum +{ + SZ_SEEK_SET = 0, + SZ_SEEK_CUR = 1, + SZ_SEEK_END = 2 +} ESzSeek; + +typedef struct +{ + SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */ + SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); + off_t curpos; +} ISeekInStream; + +typedef struct +{ + SRes (*Look)(void *p, const void **buf, size_t *size); + /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. + (output(*size) > input(*size)) is not allowed + (output(*size) < input(*size)) is allowed */ + SRes (*Skip)(void *p, size_t offset); + /* offset must be <= output(*size) of Look */ + + SRes (*Read)(void *p, void *buf, size_t *size); + /* reads directly (without buffer). It's same as ISeqInStream::Read */ + SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin); +} ILookInStream; + +SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size); +SRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset); + +/* reads via ILookInStream::Read */ +SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType); +SRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size); + +#define LookToRead_BUF_SIZE (1 << 14) + +typedef struct +{ + ILookInStream s; + ISeekInStream *realStream; + size_t pos; + size_t size; + Byte buf[LookToRead_BUF_SIZE]; +} CLookToRead; + +void LookToRead_CreateVTable(CLookToRead *p, int lookahead); +void LookToRead_Init(CLookToRead *p); + +typedef struct +{ + ISeqInStream s; + ILookInStream *realStream; +} CSecToLook; + +void SecToLook_CreateVTable(CSecToLook *p); + +typedef struct +{ + ISeqInStream s; + ILookInStream *realStream; +} CSecToRead; + +void SecToRead_CreateVTable(CSecToRead *p); + +typedef struct +{ + SRes (*Progress)(void *p, UInt64 inSize, UInt64 outSize); + /* Returns: result. (result != SZ_OK) means break. + Value (UInt64)(Int64)-1 for size means unknown value. */ +} ICompressProgress; + +typedef struct +{ + void *(*Alloc)(void *p, size_t size); + void (*Free)(void *p, void *address); /* address can be 0 */ +} ISzAlloc; + +#define IAlloc_Alloc(p, size) (p)->Alloc((p), size) +#define IAlloc_Free(p, a) (p)->Free((p), a) + +#ifdef _WIN32 + +#define CHAR_PATH_SEPARATOR '\\' +#define WCHAR_PATH_SEPARATOR L'\\' +#define STRING_PATH_SEPARATOR "\\" +#define WSTRING_PATH_SEPARATOR L"\\" + +#else + +#define CHAR_PATH_SEPARATOR '/' +#define WCHAR_PATH_SEPARATOR L'/' +#define STRING_PATH_SEPARATOR "/" +#define WSTRING_PATH_SEPARATOR L"/" + +#endif + +EXTERN_C_END + +#endif diff --git a/clamscan/libclamav/7z/Xz.c b/clamscan/libclamav/7z/Xz.c new file mode 100644 index 0000000..6e07022 --- /dev/null +++ b/clamscan/libclamav/7z/Xz.c @@ -0,0 +1,102 @@ +/* Xz.c - Xz +2009-04-15 : Igor Pavlov : Public domain */ + +#if defined(_WIN32) +#include +#include +#endif + +#include "7zCrc.h" +#include "CpuArch.h" +#include "Xz.h" +#include "XzCrc64.h" + +Byte XZ_SIG[XZ_SIG_SIZE] = { 0xFD, '7', 'z', 'X', 'Z', 0 }; +Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE] = { 'Y', 'Z' }; + +unsigned Xz_WriteVarInt(Byte *buf, UInt64 v) +{ + unsigned i = 0; + do + { + buf[i++] = (Byte)((v & 0x7F) | 0x80); + v >>= 7; + } + while (v != 0); + buf[i - 1] &= 0x7F; + return i; +} + +void Xz_Construct(CXzStream *p) +{ + p->numBlocks = p->numBlocksAllocated = 0; + p->blocks = 0; + p->flags = 0; +} + +void Xz_Free(CXzStream *p, ISzAlloc *alloc) +{ + alloc->Free(alloc, p->blocks); + p->numBlocks = p->numBlocksAllocated = 0; + p->blocks = 0; +} + +unsigned XzFlags_GetCheckSize(CXzStreamFlags f) +{ + int t = XzFlags_GetCheckType(f); + return (t == 0) ? 0 : (4 << ((t - 1) / 3)); +} + +void XzCheck_Init(CXzCheck *p, int mode) +{ + p->mode = mode; + switch (mode) + { + case XZ_CHECK_CRC32: p->crc = CRC_INIT_VAL; break; + case XZ_CHECK_CRC64: p->crc64 = CRC64_INIT_VAL; break; + case XZ_CHECK_SHA256: + p->sha = cl_hash_init("sha256"); + break; + } +} + +void XzCheck_Update(CXzCheck *p, const void *data, size_t size) +{ + switch (p->mode) + { + case XZ_CHECK_CRC32: p->crc = CrcUpdate(p->crc, data, size); break; + case XZ_CHECK_CRC64: p->crc64 = Crc64Update(p->crc64, data, size); break; + case XZ_CHECK_SHA256: + if ((p->sha)) + cl_update_hash(p->sha, (void *)data, size); + break; + } +} + +int XzCheck_Final(CXzCheck *p, Byte *digest) +{ + switch (p->mode) + { + case XZ_CHECK_CRC32: + SetUi32(digest, CRC_GET_DIGEST(p->crc)); + break; + case XZ_CHECK_CRC64: + { + int i; + UInt64 v = CRC64_GET_DIGEST(p->crc64); + for (i = 0; i < 8; i++, v >>= 8) + digest[i] = (Byte)(v & 0xFF); + break; + } + case XZ_CHECK_SHA256: + if (!(p->sha)) + return 0; + + cl_finish_hash(p->sha, digest); + p->sha = NULL; + break; + default: + return 0; + } + return 1; +} diff --git a/clamscan/libclamav/7z/Xz.h b/clamscan/libclamav/7z/Xz.h new file mode 100644 index 0000000..e6500e3 --- /dev/null +++ b/clamscan/libclamav/7z/Xz.h @@ -0,0 +1,254 @@ +/* Xz.h - Xz interface +2010-09-17 : Igor Pavlov : Public domain */ + +#ifndef __XZ_H +#define __XZ_H + +#include "Types.h" + +#define SHA256_DIGEST_SIZE 32 + +EXTERN_C_BEGIN + +#define XZ_ID_Subblock 1 +#define XZ_ID_Delta 3 +#define XZ_ID_X86 4 +#define XZ_ID_PPC 5 +#define XZ_ID_IA64 6 +#define XZ_ID_ARM 7 +#define XZ_ID_ARMT 8 +#define XZ_ID_SPARC 9 +#define XZ_ID_LZMA2 0x21 + +unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value); +unsigned Xz_WriteVarInt(Byte *buf, UInt64 v); + +/* ---------- xz block ---------- */ + +#define XZ_BLOCK_HEADER_SIZE_MAX 1024 + +#define XZ_NUM_FILTERS_MAX 4 +#define XZ_BF_NUM_FILTERS_MASK 3 +#define XZ_BF_PACK_SIZE (1 << 6) +#define XZ_BF_UNPACK_SIZE (1 << 7) + +#define XZ_FILTER_PROPS_SIZE_MAX 20 + +typedef struct +{ + UInt64 id; + UInt32 propsSize; + Byte props[XZ_FILTER_PROPS_SIZE_MAX]; +} CXzFilter; + +typedef struct +{ + UInt64 packSize; + UInt64 unpackSize; + Byte flags; + CXzFilter filters[XZ_NUM_FILTERS_MAX]; +} CXzBlock; + +#define XzBlock_GetNumFilters(p) (((p)->flags & XZ_BF_NUM_FILTERS_MASK) + 1) +#define XzBlock_HasPackSize(p) (((p)->flags & XZ_BF_PACK_SIZE) != 0) +#define XzBlock_HasUnpackSize(p) (((p)->flags & XZ_BF_UNPACK_SIZE) != 0) + +SRes XzBlock_Parse(CXzBlock *p, const Byte *header); +SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, Bool *isIndex, UInt32 *headerSizeRes); + +/* ---------- xz stream ---------- */ + +#define XZ_SIG_SIZE 6 +#define XZ_FOOTER_SIG_SIZE 2 + +extern Byte XZ_SIG[XZ_SIG_SIZE]; +extern Byte XZ_FOOTER_SIG[XZ_FOOTER_SIG_SIZE]; + +#define XZ_STREAM_FLAGS_SIZE 2 +#define XZ_STREAM_CRC_SIZE 4 + +#define XZ_STREAM_HEADER_SIZE (XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE + XZ_STREAM_CRC_SIZE) +#define XZ_STREAM_FOOTER_SIZE (XZ_FOOTER_SIG_SIZE + XZ_STREAM_FLAGS_SIZE + XZ_STREAM_CRC_SIZE + 4) + +#define XZ_CHECK_MASK 0xF +#define XZ_CHECK_NO 0 +#define XZ_CHECK_CRC32 1 +#define XZ_CHECK_CRC64 4 +#define XZ_CHECK_SHA256 10 + +typedef struct +{ + int mode; + UInt32 crc; + UInt64 crc64; + void *sha; +} CXzCheck; + +void XzCheck_Init(CXzCheck *p, int mode); +void XzCheck_Update(CXzCheck *p, const void *data, size_t size); +int XzCheck_Final(CXzCheck *p, Byte *digest); + +typedef UInt16 CXzStreamFlags; + +#define XzFlags_IsSupported(f) ((f) <= XZ_CHECK_MASK) +#define XzFlags_GetCheckType(f) ((f) & XZ_CHECK_MASK) +#define XzFlags_HasDataCrc32(f) (Xz_GetCheckType(f) == XZ_CHECK_CRC32) +unsigned XzFlags_GetCheckSize(CXzStreamFlags f); + +SRes Xz_ParseHeader(CXzStreamFlags *p, const Byte *buf); +SRes Xz_ReadHeader(CXzStreamFlags *p, ISeqInStream *inStream); + +typedef struct +{ + UInt64 unpackSize; + UInt64 totalSize; +} CXzBlockSizes; + +typedef struct +{ + CXzStreamFlags flags; + size_t numBlocks; + size_t numBlocksAllocated; + CXzBlockSizes *blocks; + UInt64 startOffset; +} CXzStream; + +void Xz_Construct(CXzStream *p); +void Xz_Free(CXzStream *p, ISzAlloc *alloc); + +#define XZ_SIZE_OVERFLOW ((UInt64)(Int64)-1) + +UInt64 Xz_GetUnpackSize(const CXzStream *p); +UInt64 Xz_GetPackSize(const CXzStream *p); + +typedef struct +{ + size_t num; + size_t numAllocated; + CXzStream *streams; +} CXzs; + +void Xzs_Construct(CXzs *p); +void Xzs_Free(CXzs *p, ISzAlloc *alloc); +SRes Xzs_ReadBackward(CXzs *p, ILookInStream *inStream, Int64 *startOffset, ICompressProgress *progress, ISzAlloc *alloc); + +UInt64 Xzs_GetNumBlocks(const CXzs *p); +UInt64 Xzs_GetUnpackSize(const CXzs *p); + +typedef enum +{ + CODER_STATUS_NOT_SPECIFIED, /* use main error code instead */ + CODER_STATUS_FINISHED_WITH_MARK, /* stream was finished with end mark. */ + CODER_STATUS_NOT_FINISHED, /* stream was not finished */ + CODER_STATUS_NEEDS_MORE_INPUT /* you must provide more input bytes */ +} ECoderStatus; + +typedef enum +{ + CODER_FINISH_ANY, /* finish at any point */ + CODER_FINISH_END /* block must be finished at the end */ +} ECoderFinishMode; + +typedef struct _IStateCoder +{ + void *p; + void (*Free)(void *p, ISzAlloc *alloc); + SRes (*SetProps)(void *p, const Byte *props, size_t propSize, ISzAlloc *alloc); + void (*Init)(void *p); + SRes (*Code)(void *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, int *wasFinished); +} IStateCoder; + +#define MIXCODER_NUM_FILTERS_MAX 4 + +typedef struct +{ + ISzAlloc *alloc; + Byte *buf; + int numCoders; + int finished[MIXCODER_NUM_FILTERS_MAX - 1]; + size_t pos[MIXCODER_NUM_FILTERS_MAX - 1]; + size_t size[MIXCODER_NUM_FILTERS_MAX - 1]; + UInt64 ids[MIXCODER_NUM_FILTERS_MAX]; + IStateCoder coders[MIXCODER_NUM_FILTERS_MAX]; +} CMixCoder; + +void MixCoder_Construct(CMixCoder *p, ISzAlloc *alloc); +void MixCoder_Free(CMixCoder *p); +void MixCoder_Init(CMixCoder *p); +SRes MixCoder_SetFromMethod(CMixCoder *p, int coderIndex, UInt64 methodId); +SRes MixCoder_Code(CMixCoder *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int srcWasFinished, + ECoderFinishMode finishMode, ECoderStatus *status); + +typedef enum +{ + XZ_STATE_STREAM_HEADER, + XZ_STATE_STREAM_INDEX, + XZ_STATE_STREAM_INDEX_CRC, + XZ_STATE_STREAM_FOOTER, + XZ_STATE_STREAM_PADDING, + XZ_STATE_BLOCK_HEADER, + XZ_STATE_BLOCK, + XZ_STATE_BLOCK_FOOTER +} EXzState; + +typedef struct +{ + EXzState state; + UInt32 pos; + unsigned alignPos; + unsigned indexPreSize; + + CXzStreamFlags streamFlags; + + UInt32 blockHeaderSize; + UInt64 packSize; + UInt64 unpackSize; + + UInt64 numBlocks; + UInt64 indexSize; + UInt64 indexPos; + UInt64 padSize; + + UInt64 numStreams; + + UInt32 crc; + CMixCoder decoder; + CXzBlock block; + CXzCheck check; + void *sha; + Byte shaDigest[SHA256_DIGEST_SIZE]; + Byte buf[XZ_BLOCK_HEADER_SIZE_MAX]; +} CXzUnpacker; + +SRes XzUnpacker_Create(CXzUnpacker *p, ISzAlloc *alloc); +void XzUnpacker_Free(CXzUnpacker *p); + +/* +finishMode: + It has meaning only if the decoding reaches output limit (*destLen). + LZMA_FINISH_ANY - use smallest number of input bytes + LZMA_FINISH_END - read EndOfStream marker after decoding + +Returns: + SZ_OK + status: + LZMA_STATUS_FINISHED_WITH_MARK + LZMA_STATUS_NOT_FINISHED + SZ_ERROR_DATA - Data error + SZ_ERROR_MEM - Memory allocation error + SZ_ERROR_UNSUPPORTED - Unsupported properties + SZ_ERROR_INPUT_EOF - It needs more bytes in input buffer (src). +*/ + + +SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, /* int srcWasFinished, */ int finishMode, + ECoderStatus *status); + +Bool XzUnpacker_IsStreamWasFinished(CXzUnpacker *p); + +EXTERN_C_END + +#endif diff --git a/clamscan/libclamav/7z/XzCrc64.c b/clamscan/libclamav/7z/XzCrc64.c new file mode 100644 index 0000000..0369554 --- /dev/null +++ b/clamscan/libclamav/7z/XzCrc64.c @@ -0,0 +1,33 @@ +/* XzCrc64.c -- CRC64 calculation +2010-04-16 : Igor Pavlov : Public domain */ + +#include "XzCrc64.h" + +#define kCrc64Poly UINT64_CONST(0xC96C5795D7870F42) +UInt64 g_Crc64Table[256]; + +void MY_FAST_CALL Crc64GenerateTable(void) +{ + UInt32 i; + for (i = 0; i < 256; i++) + { + UInt64 r = i; + int j; + for (j = 0; j < 8; j++) + r = (r >> 1) ^ ((UInt64)kCrc64Poly & ~((r & 1) - 1)); + g_Crc64Table[i] = r; + } +} + +UInt64 MY_FAST_CALL Crc64Update(UInt64 v, const void *data, size_t size) +{ + const Byte *p = (const Byte *)data; + for (; size > 0 ; size--, p++) + v = CRC64_UPDATE_BYTE(v, *p); + return v; +} + +UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size) +{ + return CRC64_GET_DIGEST(Crc64Update(CRC64_INIT_VAL, data, size)); +} diff --git a/clamscan/libclamav/7z/XzCrc64.h b/clamscan/libclamav/7z/XzCrc64.h new file mode 100644 index 0000000..0e8efd7 --- /dev/null +++ b/clamscan/libclamav/7z/XzCrc64.h @@ -0,0 +1,26 @@ +/* XzCrc64.h -- CRC64 calculation +2010-04-16 : Igor Pavlov : Public domain */ + +#ifndef __XZ_CRC64_H +#define __XZ_CRC64_H + +#include + +#include "Types.h" + +EXTERN_C_BEGIN + +extern UInt64 g_Crc64Table[]; + +void MY_FAST_CALL Crc64GenerateTable(void); + +#define CRC64_INIT_VAL UINT64_CONST(0xFFFFFFFFFFFFFFFF) +#define CRC64_GET_DIGEST(crc) ((crc) ^ CRC64_INIT_VAL) +#define CRC64_UPDATE_BYTE(crc, b) (g_Crc64Table[((crc) ^ (b)) & 0xFF] ^ ((crc) >> 8)) + +UInt64 MY_FAST_CALL Crc64Update(UInt64 crc, const void *data, size_t size); +UInt64 MY_FAST_CALL Crc64Calc(const void *data, size_t size); + +EXTERN_C_END + +#endif diff --git a/clamscan/libclamav/7z/XzDec.c b/clamscan/libclamav/7z/XzDec.c new file mode 100644 index 0000000..00a2870 --- /dev/null +++ b/clamscan/libclamav/7z/XzDec.c @@ -0,0 +1,905 @@ +/* XzDec.c -- Xz Decode +2010-04-16 : Igor Pavlov : Public domain */ + +/* #define XZ_DUMP */ + +#ifdef XZ_DUMP +#include +#endif + +#include +#include + +#if defined(_WIN32) +#include +#include +#endif + +#include "clamav.h" +#include "7zCrc.h" +#include "Alloc.h" +#include "Bra.h" +#include "CpuArch.h" +#include "Delta.h" +#include "Lzma2Dec.h" + +#ifdef USE_SUBBLOCK +#include "SbDec.h" +#endif + +#include "Xz.h" + +#define XZ_CHECK_SIZE_MAX 64 + +#define CODER_BUF_SIZE (1 << 17) + +void BraState_Free(void *pp, ISzAlloc *alloc); +SRes BraState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *alloc); +void BraState_Init(void *pp); +SRes BraState_SetFromMethod(IStateCoder *p, UInt64 id, ISzAlloc *alloc); + +unsigned Xz_ReadVarInt(const Byte *p, size_t maxSize, UInt64 *value) +{ + int i, limit; + *value = 0; + limit = (maxSize > 9) ? 9 : (int)maxSize; + + for (i = 0; i < limit;) + { + Byte b = p[i]; + *value |= (UInt64)(b & 0x7F) << (7 * i++); + if ((b & 0x80) == 0) + return (b == 0 && i != 1) ? 0 : i; + } + return 0; +} + +/* ---------- BraState ---------- */ + +#define BRA_BUF_SIZE (1 << 14) + +typedef struct +{ + size_t bufPos; + size_t bufConv; + size_t bufTotal; + + UInt32 methodId; + int encodeMode; + UInt32 delta; + UInt32 ip; + UInt32 x86State; + Byte deltaState[DELTA_STATE_SIZE]; + + Byte buf[BRA_BUF_SIZE]; +} CBraState; + +void BraState_Free(void *pp, ISzAlloc *alloc) +{ + alloc->Free(alloc, pp); +} + +SRes BraState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *alloc) +{ + CBraState *p = ((CBraState *)pp); + UNUSEDPARAM(alloc); + p->encodeMode = 0; + p->ip = 0; + if (p->methodId == XZ_ID_Delta) + { + if (propSize != 1) + return SZ_ERROR_UNSUPPORTED; + p->delta = (unsigned)props[0] + 1; + } + else + { + if (propSize == 4) + { + UInt32 v = GetUi32(props); + switch(p->methodId) + { + case XZ_ID_PPC: + case XZ_ID_ARM: + case XZ_ID_SPARC: + if ((v & 3) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + case XZ_ID_ARMT: + if ((v & 1) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + case XZ_ID_IA64: + if ((v & 0xF) != 0) + return SZ_ERROR_UNSUPPORTED; + break; + } + p->ip = v; + } + else if (propSize != 0) + return SZ_ERROR_UNSUPPORTED; + } + return SZ_OK; +} + +void BraState_Init(void *pp) +{ + CBraState *p = ((CBraState *)pp); + p->bufPos = p->bufConv = p->bufTotal = 0; + x86_Convert_Init(p->x86State); + if (p->methodId == XZ_ID_Delta) + Delta_Init(p->deltaState); +} + +#define CASE_BRA_CONV(isa) case XZ_ID_ ## isa: p->bufConv = isa ## _Convert(p->buf, p->bufTotal, p->ip, p->encodeMode); break; + +static SRes BraState_Code(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, int *wasFinished) +{ + CBraState *p = ((CBraState *)pp); + SizeT destLenOrig = *destLen; + SizeT srcLenOrig = *srcLen; + UNUSEDPARAM(finishMode); + *destLen = 0; + *srcLen = 0; + *wasFinished = 0; + while (destLenOrig > 0) + { + if (p->bufPos != p->bufConv) + { + size_t curSize = p->bufConv - p->bufPos; + if (curSize > destLenOrig) + curSize = destLenOrig; + memcpy(dest, p->buf + p->bufPos, curSize); + p->bufPos += curSize; + *destLen += curSize; + dest += curSize; + destLenOrig -= curSize; + continue; + } + p->bufTotal -= p->bufPos; + memmove(p->buf, p->buf + p->bufPos, p->bufTotal); + p->bufPos = 0; + p->bufConv = 0; + { + size_t curSize = BRA_BUF_SIZE - p->bufTotal; + if (curSize > srcLenOrig) + curSize = srcLenOrig; + memcpy(p->buf + p->bufTotal, src, curSize); + *srcLen += curSize; + src += curSize; + srcLenOrig -= curSize; + p->bufTotal += curSize; + } + if (p->bufTotal == 0) + break; + switch(p->methodId) + { + case XZ_ID_Delta: + if (p->encodeMode) + Delta_Encode(p->deltaState, p->delta, p->buf, p->bufTotal); + else + Delta_Decode(p->deltaState, p->delta, p->buf, p->bufTotal); + p->bufConv = p->bufTotal; + break; + case XZ_ID_X86: + p->bufConv = x86_Convert(p->buf, p->bufTotal, p->ip, &p->x86State, p->encodeMode); + break; + CASE_BRA_CONV(PPC) + CASE_BRA_CONV(IA64) + CASE_BRA_CONV(ARM) + CASE_BRA_CONV(ARMT) + CASE_BRA_CONV(SPARC) + default: + return SZ_ERROR_UNSUPPORTED; + } + p->ip += (UInt32)p->bufConv; + + if (p->bufConv == 0) + { + if (!srcWasFinished) + break; + p->bufConv = p->bufTotal; + } + } + if (p->bufTotal == p->bufPos && srcLenOrig == 0 && srcWasFinished) + *wasFinished = 1; + return SZ_OK; +} + +SRes BraState_SetFromMethod(IStateCoder *p, UInt64 id, ISzAlloc *alloc) +{ + CBraState *decoder; + if (id != XZ_ID_Delta && + id != XZ_ID_X86 && + id != XZ_ID_PPC && + id != XZ_ID_IA64 && + id != XZ_ID_ARM && + id != XZ_ID_ARMT && + id != XZ_ID_SPARC) + return SZ_ERROR_UNSUPPORTED; + p->p = 0; + decoder = alloc->Alloc(alloc, sizeof(CBraState)); + if (decoder == 0) + return SZ_ERROR_MEM; + decoder->methodId = (UInt32)id; + p->p = decoder; + p->Free = BraState_Free; + p->SetProps = BraState_SetProps; + p->Init = BraState_Init; + p->Code = BraState_Code; + return SZ_OK; +} + +/* ---------- SbState ---------- */ + +#ifdef USE_SUBBLOCK + +static void SbState_Free(void *pp, ISzAlloc *alloc) +{ + CSubblockDec *p = (CSubblockDec *)pp; + SubblockDec_Free(p, alloc); + alloc->Free(alloc, pp); +} + +static SRes SbState_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *alloc) +{ + pp = pp; + props = props; + alloc = alloc; + return (propSize == 0) ? SZ_OK : SZ_ERROR_UNSUPPORTED; +} + +static void SbState_Init(void *pp) +{ + SubblockDec_Init((CSubblockDec *)pp); +} + +static SRes SbState_Code(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, int *wasFinished) +{ + ECoderStatus status; + SRes res = SubblockDec_Decode((CSubblockDec *)pp, dest, destLen, src, srcLen, finishMode, &status); + srcWasFinished = srcWasFinished; + *wasFinished = (status == LZMA_STATUS_FINISHED_WITH_MARK); + return res; +} + +SRes SbState_SetFromMethod(IStateCoder *p, ISzAlloc *alloc) +{ + CSubblockDec *decoder; + p->p = 0; + decoder = alloc->Alloc(alloc, sizeof(CSubblockDec)); + if (decoder == 0) + return SZ_ERROR_MEM; + p->p = decoder; + p->Free = SbState_Free; + p->SetProps = SbState_SetProps; + p->Init = SbState_Init; + p->Code = SbState_Code; + SubblockDec_Construct(decoder); + return SZ_OK; +} +#endif + +/* ---------- Lzma2State ---------- */ + +static void Lzma2State_Free(void *pp, ISzAlloc *alloc) +{ + Lzma2Dec_Free((CLzma2Dec *)pp, alloc); + alloc->Free(alloc, pp); +} + +static SRes Lzma2State_SetProps(void *pp, const Byte *props, size_t propSize, ISzAlloc *alloc) +{ + if (propSize != 1) + return SZ_ERROR_UNSUPPORTED; + return Lzma2Dec_Allocate((CLzma2Dec *)pp, props[0], alloc); +} + +static void Lzma2State_Init(void *pp) +{ + Lzma2Dec_Init((CLzma2Dec *)pp); +} + +static SRes Lzma2State_Code(void *pp, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, + int srcWasFinished, ECoderFinishMode finishMode, int *wasFinished) +{ + ELzmaStatus status; + /* ELzmaFinishMode fm = (finishMode == LZMA_FINISH_ANY) ? LZMA_FINISH_ANY : LZMA_FINISH_END; */ + SRes res = Lzma2Dec_DecodeToBuf((CLzma2Dec *)pp, dest, destLen, src, srcLen, finishMode, &status); + UNUSEDPARAM(srcWasFinished); + *wasFinished = (status == LZMA_STATUS_FINISHED_WITH_MARK); + return res; +} + +static SRes Lzma2State_SetFromMethod(IStateCoder *p, ISzAlloc *alloc) +{ + CLzma2Dec *decoder = alloc->Alloc(alloc, sizeof(CLzma2Dec)); + p->p = decoder; + if (decoder == 0) + return SZ_ERROR_MEM; + p->Free = Lzma2State_Free; + p->SetProps = Lzma2State_SetProps; + p->Init = Lzma2State_Init; + p->Code = Lzma2State_Code; + Lzma2Dec_Construct(decoder); + return SZ_OK; +} + + +void MixCoder_Construct(CMixCoder *p, ISzAlloc *alloc) +{ + int i; + p->alloc = alloc; + p->buf = NULL; + p->numCoders = 0; + for (i = 0; i < MIXCODER_NUM_FILTERS_MAX; i++) + p->coders[i].p = NULL; +} + +void MixCoder_Free(CMixCoder *p) +{ + int i; + for (i = 0; i < p->numCoders; i++) + { + IStateCoder *sc = &p->coders[i]; + if (p->alloc && sc->p) + sc->Free(sc->p, p->alloc); + } + p->numCoders = 0; + if (p->buf) + { + p->alloc->Free(p->alloc, p->buf); + p->buf = NULL; /* 9.31: the BUG was fixed */ + } +} + +void MixCoder_Init(CMixCoder *p) +{ + int i; + for (i = 0; i < p->numCoders - 1; i++) + { + p->size[i] = 0; + p->pos[i] = 0; + p->finished[i] = 0; + } + for (i = 0; i < p->numCoders; i++) + { + IStateCoder *coder = &p->coders[i]; + coder->Init(coder->p); + } +} + +SRes MixCoder_SetFromMethod(CMixCoder *p, int coderIndex, UInt64 methodId) +{ + IStateCoder *sc = &p->coders[coderIndex]; + p->ids[coderIndex] = methodId; + switch(methodId) + { + case XZ_ID_LZMA2: return Lzma2State_SetFromMethod(sc, p->alloc); + #ifdef USE_SUBBLOCK + case XZ_ID_Subblock: return SbState_SetFromMethod(sc, p->alloc); + #endif + } + if (coderIndex == 0) + return SZ_ERROR_UNSUPPORTED; + return BraState_SetFromMethod(sc, methodId, p->alloc); +} + +SRes MixCoder_Code(CMixCoder *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int srcWasFinished, + ECoderFinishMode finishMode, ECoderStatus *status) +{ + SizeT destLenOrig = *destLen; + SizeT srcLenOrig = *srcLen; + Bool allFinished = True; + *destLen = 0; + *srcLen = 0; + *status = CODER_STATUS_NOT_FINISHED; + + if (p->buf == 0) + { + p->buf = p->alloc->Alloc(p->alloc, CODER_BUF_SIZE * (MIXCODER_NUM_FILTERS_MAX - 1)); + if (p->buf == 0) + return SZ_ERROR_MEM; + } + + if (p->numCoders != 1) + finishMode = CODER_FINISH_ANY; + + for (;;) + { + Bool processed = False; + int i; + /* + if (p->numCoders == 1 && *destLen == destLenOrig && finishMode == LZMA_FINISH_ANY) + break; + */ + + for (i = 0; i < p->numCoders; i++) + { + SRes res; + IStateCoder *coder = &p->coders[i]; + Byte *destCur; + SizeT destLenCur, srcLenCur; + const Byte *srcCur; + int srcFinishedCur; + int encodingWasFinished; + + if (i == 0) + { + srcCur = src; + srcLenCur = srcLenOrig - *srcLen; + srcFinishedCur = srcWasFinished; + } + else + { + srcCur = p->buf + (CODER_BUF_SIZE * (i - 1)) + p->pos[i - 1]; + srcLenCur = p->size[i - 1] - p->pos[i - 1]; + srcFinishedCur = p->finished[i - 1]; + } + + if (i == p->numCoders - 1) + { + destCur = dest; + destLenCur = destLenOrig - *destLen; + } + else + { + if (p->pos[i] != p->size[i]) + continue; + destCur = p->buf + (CODER_BUF_SIZE * i); + destLenCur = CODER_BUF_SIZE; + } + + res = coder->Code(coder->p, destCur, &destLenCur, srcCur, &srcLenCur, srcFinishedCur, finishMode, &encodingWasFinished); + + if (!encodingWasFinished) + allFinished = False; + + if (i == 0) + { + *srcLen += srcLenCur; + src += srcLenCur; + } + else + { + p->pos[i - 1] += srcLenCur; + } + + if (i == p->numCoders - 1) + { + *destLen += destLenCur; + dest += destLenCur; + } + else + { + p->size[i] = destLenCur; + p->pos[i] = 0; + p->finished[i] = encodingWasFinished; + } + + if (res != SZ_OK) + return res; + + if (destLenCur != 0 || srcLenCur != 0) + processed = True; + } + if (!processed) + break; + } + if (allFinished) + *status = CODER_STATUS_FINISHED_WITH_MARK; + return SZ_OK; +} + +SRes Xz_ParseHeader(CXzStreamFlags *p, const Byte *buf) +{ + *p = (CXzStreamFlags)GetBe16(buf + XZ_SIG_SIZE); + if (CrcCalc(buf + XZ_SIG_SIZE, XZ_STREAM_FLAGS_SIZE) != + GetUi32(buf + XZ_SIG_SIZE + XZ_STREAM_FLAGS_SIZE)) + return SZ_ERROR_NO_ARCHIVE; + return XzFlags_IsSupported(*p) ? SZ_OK : SZ_ERROR_UNSUPPORTED; +} + +static Bool Xz_CheckFooter(CXzStreamFlags flags, UInt64 indexSize, const Byte *buf) +{ + return + indexSize == (((UInt64)GetUi32(buf + 4) + 1) << 2) && + (GetUi32(buf) == CrcCalc(buf + 4, 6) && + flags == GetBe16(buf + 8) && + memcmp(buf + 10, XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE) == 0); +} + +#define READ_VARINT_AND_CHECK(buf, pos, size, res) \ + { unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \ + if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; } + + +SRes XzBlock_Parse(CXzBlock *p, const Byte *header) +{ + unsigned pos; + int numFilters, i; + UInt32 headerSize = (UInt32)header[0] << 2; + + if (CrcCalc(header, headerSize) != GetUi32(header + headerSize)) + return SZ_ERROR_ARCHIVE; + + pos = 1; + if (pos == headerSize) + return SZ_ERROR_ARCHIVE; + p->flags = header[pos++]; + + if (XzBlock_HasPackSize(p)) + { + READ_VARINT_AND_CHECK(header, pos, headerSize, &p->packSize); + if (p->packSize == 0 || p->packSize + headerSize >= (UInt64)1 << 63) + return SZ_ERROR_ARCHIVE; + } + + if (XzBlock_HasUnpackSize(p)) + READ_VARINT_AND_CHECK(header, pos, headerSize, &p->unpackSize); + + numFilters = XzBlock_GetNumFilters(p); + for (i = 0; i < numFilters; i++) + { + CXzFilter *filter = p->filters + i; + UInt64 size; + READ_VARINT_AND_CHECK(header, pos, headerSize, &filter->id); + READ_VARINT_AND_CHECK(header, pos, headerSize, &size); + if (size > headerSize - pos || size > XZ_FILTER_PROPS_SIZE_MAX) + return SZ_ERROR_ARCHIVE; + filter->propsSize = (UInt32)size; + memcpy(filter->props, header + pos, (size_t)size); + pos += (unsigned)size; + + #ifdef XZ_DUMP + printf("\nf[%d] = %2X: ", i, filter->id); + { + int i; + for (i = 0; i < size; i++) + printf(" %2X", filter->props[i]); + } + #endif + } + + while (pos < headerSize) + if (header[pos++] != 0) + return SZ_ERROR_ARCHIVE; + return SZ_OK; +} + +SRes XzDec_Init(CMixCoder *p, const CXzBlock *block) +{ + int i; + Bool needReInit = True; + int numFilters = XzBlock_GetNumFilters(block); + if (numFilters == p->numCoders) + { + for (i = 0; i < numFilters; i++) + if (p->ids[i] != block->filters[numFilters - 1 - i].id) + break; + needReInit = (i != numFilters); + } + if (needReInit) + { + MixCoder_Free(p); + p->numCoders = numFilters; + for (i = 0; i < numFilters; i++) + { + const CXzFilter *f = &block->filters[numFilters - 1 - i]; + RINOK(MixCoder_SetFromMethod(p, i, f->id)); + } + } + for (i = 0; i < numFilters; i++) + { + const CXzFilter *f = &block->filters[numFilters - 1 - i]; + IStateCoder *sc = &p->coders[i]; + RINOK(sc->SetProps(sc->p, f->props, f->propsSize, p->alloc)); + } + MixCoder_Init(p); + return SZ_OK; +} + +SRes XzUnpacker_Create(CXzUnpacker *p, ISzAlloc *alloc) +{ + MixCoder_Construct(&p->decoder, alloc); + p->state = XZ_STATE_STREAM_HEADER; + p->pos = 0; + p->numStreams = 0; + p->numBlocks = 0; + p->padSize = 0; + return SZ_OK; +} + +void XzUnpacker_Free(CXzUnpacker *p) +{ + if (!p) + return; + MixCoder_Free(&p->decoder); + cl_hash_destroy(p->check.sha); + cl_hash_destroy(p->sha); + p->sha = NULL; +} + +SRes XzUnpacker_Code(CXzUnpacker *p, Byte *dest, SizeT *destLen, + const Byte *src, SizeT *srcLen, int finishMode, ECoderStatus *status) +{ + SizeT destLenOrig = *destLen; + SizeT srcLenOrig = *srcLen; + *destLen = 0; + *srcLen = 0; + *status = CODER_STATUS_NOT_SPECIFIED; + for (;;) + { + SizeT srcRem = srcLenOrig - *srcLen; + + if (p->state == XZ_STATE_BLOCK) + { + SizeT destLen2 = destLenOrig - *destLen; + SizeT srcLen2 = srcLenOrig - *srcLen; + SRes res; + if (srcLen2 == 0 && destLen2 == 0) + { + *status = CODER_STATUS_NOT_FINISHED; + return SZ_OK; + } + + res = MixCoder_Code(&p->decoder, dest, &destLen2, src, &srcLen2, False, finishMode, status); + XzCheck_Update(&p->check, dest, destLen2); + + (*srcLen) += srcLen2; + src += srcLen2; + p->packSize += srcLen2; + + (*destLen) += destLen2; + dest += destLen2; + p->unpackSize += destLen2; + + RINOK(res); + + if (*status == CODER_STATUS_FINISHED_WITH_MARK) + { + Byte temp[32]; + unsigned num = Xz_WriteVarInt(temp, p->packSize + p->blockHeaderSize + XzFlags_GetCheckSize(p->streamFlags)); + num += Xz_WriteVarInt(temp + num, p->unpackSize); + if ((p->sha)) + cl_update_hash(p->sha, temp, num); + p->indexSize += num; + p->numBlocks++; + + p->state = XZ_STATE_BLOCK_FOOTER; + p->pos = 0; + p->alignPos = 0; + } + else if (srcLen2 == 0 && destLen2 == 0) + return SZ_OK; + + continue; + } + + if (srcRem == 0) + { + *status = CODER_STATUS_NEEDS_MORE_INPUT; + return SZ_OK; + } + + switch(p->state) + { + case XZ_STATE_STREAM_HEADER: + { + if (p->pos < XZ_STREAM_HEADER_SIZE) + { + if (p->pos < XZ_SIG_SIZE && *src != XZ_SIG[p->pos]) + return SZ_ERROR_NO_ARCHIVE; + p->buf[p->pos++] = *src++; + (*srcLen)++; + } + else + { + RINOK(Xz_ParseHeader(&p->streamFlags, p->buf)); + p->state = XZ_STATE_BLOCK_HEADER; + p->sha = cl_hash_init("sha256"); + p->indexSize = 0; + p->numBlocks = 0; + p->pos = 0; + } + break; + } + + case XZ_STATE_BLOCK_HEADER: + { + if (p->pos == 0) + { + p->buf[p->pos++] = *src++; + (*srcLen)++; + if (p->buf[0] == 0) + { + p->indexPreSize = 1 + Xz_WriteVarInt(p->buf + 1, p->numBlocks); + p->indexPos = p->indexPreSize; + p->indexSize += p->indexPreSize; + if ((p->sha)) { + cl_finish_hash(p->sha, p->shaDigest); + p->sha = cl_hash_init("sha256"); + } + p->crc = CrcUpdate(CRC_INIT_VAL, p->buf, p->indexPreSize); + p->state = XZ_STATE_STREAM_INDEX; + } + p->blockHeaderSize = ((UInt32)p->buf[0] << 2) + 4; + } + else if (p->pos != p->blockHeaderSize) + { + UInt32 cur = p->blockHeaderSize - p->pos; + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + } + else + { + RINOK(XzBlock_Parse(&p->block, p->buf)); + p->state = XZ_STATE_BLOCK; + p->packSize = 0; + p->unpackSize = 0; + XzCheck_Init(&p->check, XzFlags_GetCheckType(p->streamFlags)); + RINOK(XzDec_Init(&p->decoder, &p->block)); + } + break; + } + + case XZ_STATE_BLOCK_FOOTER: + { + if (((p->packSize + p->alignPos) & 3) != 0) + { + (*srcLen)++; + p->alignPos++; + if (*src++ != 0) + return SZ_ERROR_CRC; + } + else + { + UInt32 checkSize = XzFlags_GetCheckSize(p->streamFlags); + UInt32 cur = checkSize - p->pos; + if (cur != 0) + { + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + } + else + { + Byte digest[XZ_CHECK_SIZE_MAX]; + p->state = XZ_STATE_BLOCK_HEADER; + p->pos = 0; + if (XzCheck_Final(&p->check, digest) && memcmp(digest, p->buf, checkSize) != 0) + return SZ_ERROR_CRC; + } + } + break; + } + + case XZ_STATE_STREAM_INDEX: + { + if (p->pos < p->indexPreSize) + { + (*srcLen)++; + if (*src++ != p->buf[p->pos++]) + return SZ_ERROR_CRC; + } + else + { + if (p->indexPos < p->indexSize) + { + UInt64 cur = p->indexSize - p->indexPos; + if (srcRem > cur) + srcRem = (SizeT)cur; + p->crc = CrcUpdate(p->crc, src, srcRem); + if ((p->sha)) + cl_update_hash(p->sha, (void *)src, srcRem); + (*srcLen) += srcRem; + src += srcRem; + p->indexPos += srcRem; + } + else if ((p->indexPos & 3) != 0) + { + Byte b = *src++; + p->crc = CRC_UPDATE_BYTE(p->crc, b); + (*srcLen)++; + p->indexPos++; + p->indexSize++; + if (b != 0) + return SZ_ERROR_CRC; + } + else + { + Byte digest[SHA256_DIGEST_SIZE]; + memset(&digest, 0, SHA256_DIGEST_SIZE); + p->state = XZ_STATE_STREAM_INDEX_CRC; + p->indexSize += 4; + p->pos = 0; + if ((p->sha)) { + cl_finish_hash(p->sha, digest); + p->sha = NULL; + } + + if (memcmp(digest, p->shaDigest, SHA256_DIGEST_SIZE) != 0) + return SZ_ERROR_CRC; + } + } + break; + } + + case XZ_STATE_STREAM_INDEX_CRC: + { + if (p->pos < 4) + { + (*srcLen)++; + p->buf[p->pos++] = *src++; + } + else + { + p->state = XZ_STATE_STREAM_FOOTER; + p->pos = 0; + if (CRC_GET_DIGEST(p->crc) != GetUi32(p->buf)) + return SZ_ERROR_CRC; + } + break; + } + + case XZ_STATE_STREAM_FOOTER: + { + UInt32 cur = XZ_STREAM_FOOTER_SIZE - p->pos; + if (cur > srcRem) + cur = (UInt32)srcRem; + memcpy(p->buf + p->pos, src, cur); + p->pos += cur; + (*srcLen) += cur; + src += cur; + if (p->pos == XZ_STREAM_FOOTER_SIZE) + { + p->state = XZ_STATE_STREAM_PADDING; + p->numStreams++; + p->padSize = 0; + if (!Xz_CheckFooter(p->streamFlags, p->indexSize, p->buf)) + return SZ_ERROR_CRC; + } + break; + } + + case XZ_STATE_STREAM_PADDING: + { + if (*src != 0) + { + if (((UInt32)p->padSize & 3) != 0) + return SZ_ERROR_NO_ARCHIVE; + p->pos = 0; + p->state = XZ_STATE_STREAM_HEADER; + } + else + { + (*srcLen)++; + src++; + p->padSize++; + } + break; + } + + case XZ_STATE_BLOCK: break; /* to disable GCC warning */ + } + } + /* + if (p->state == XZ_STATE_FINISHED) + *status = CODER_STATUS_FINISHED_WITH_MARK; + return SZ_OK; + */ +} + +Bool XzUnpacker_IsStreamWasFinished(CXzUnpacker *p) +{ + return (p->state == XZ_STATE_STREAM_PADDING) && (((UInt32)p->padSize & 3) == 0); +} diff --git a/clamscan/libclamav/7z/XzIn.c b/clamscan/libclamav/7z/XzIn.c new file mode 100644 index 0000000..3a463c4 --- /dev/null +++ b/clamscan/libclamav/7z/XzIn.c @@ -0,0 +1,312 @@ +/* XzIn.c - Xz input +2009-06-19 : Igor Pavlov : Public domain */ + +#include + +#if defined(_WIN32) +#include +#include +#endif + +#include "clamav.h" +#include "7zCrc.h" +#include "CpuArch.h" +#include "Xz.h" + +SRes Xz_ReadHeader(CXzStreamFlags *p, ISeqInStream *inStream) +{ + Byte sig[XZ_STREAM_HEADER_SIZE]; + RINOK(SeqInStream_Read2(inStream, sig, XZ_STREAM_HEADER_SIZE, SZ_ERROR_NO_ARCHIVE)); + if (memcmp(sig, XZ_SIG, XZ_SIG_SIZE) != 0) + return SZ_ERROR_NO_ARCHIVE; + return Xz_ParseHeader(p, sig); +} + +#define READ_VARINT_AND_CHECK(buf, pos, size, res) \ + { unsigned s = Xz_ReadVarInt(buf + pos, size - pos, res); \ + if (s == 0) return SZ_ERROR_ARCHIVE; pos += s; } + +SRes XzBlock_ReadHeader(CXzBlock *p, ISeqInStream *inStream, Bool *isIndex, UInt32 *headerSizeRes) +{ + Byte header[XZ_BLOCK_HEADER_SIZE_MAX]; + unsigned headerSize; + *headerSizeRes = 0; + RINOK(SeqInStream_ReadByte(inStream, &header[0])); + headerSize = ((unsigned)header[0] << 2) + 4; + if (headerSize == 0) + { + *headerSizeRes = 1; + *isIndex = True; + return SZ_OK; + } + + *isIndex = False; + *headerSizeRes = headerSize; + RINOK(SeqInStream_Read(inStream, header + 1, headerSize - 1)); + return XzBlock_Parse(p, header); +} + +#define ADD_SIZE_CHECH(size, val) \ + { UInt64 newSize = size + (val); if (newSize < size) return XZ_SIZE_OVERFLOW; size = newSize; } + +UInt64 Xz_GetUnpackSize(const CXzStream *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->numBlocks; i++) + ADD_SIZE_CHECH(size, p->blocks[i].unpackSize); + return size; +} + +UInt64 Xz_GetPackSize(const CXzStream *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->numBlocks; i++) + ADD_SIZE_CHECH(size, (p->blocks[i].totalSize + 3) & ~(UInt64)3); + return size; +} + +/* +SRes XzBlock_ReadFooter(CXzBlock *p, CXzStreamFlags f, ISeqInStream *inStream) +{ + return SeqInStream_Read(inStream, p->check, XzFlags_GetCheckSize(f)); +} +*/ + +static SRes Xz_ReadIndex2(CXzStream *p, const Byte *buf, size_t size, ISzAlloc *alloc) +{ + size_t i, numBlocks, crcStartPos, pos = 1; + UInt32 crc; + + if (size < 5 || buf[0] != 0) + return SZ_ERROR_ARCHIVE; + + size -= 4; + crc = CrcCalc(buf, size); + if (crc != GetUi32(buf + size)) + return SZ_ERROR_ARCHIVE; + + { + UInt64 numBlocks64; + READ_VARINT_AND_CHECK(buf, pos, size, &numBlocks64); + numBlocks = (size_t)numBlocks64; + if (numBlocks != numBlocks64 || numBlocks * 2 > size) + return SZ_ERROR_ARCHIVE; + } + + crcStartPos = pos; + Xz_Free(p, alloc); + if (numBlocks != 0) + { + p->numBlocks = numBlocks; + p->numBlocksAllocated = numBlocks; + p->blocks = alloc->Alloc(alloc, sizeof(CXzBlockSizes) * numBlocks); + if (p->blocks == 0) + return SZ_ERROR_MEM; + for (i = 0; i < numBlocks; i++) + { + CXzBlockSizes *block = &p->blocks[i]; + READ_VARINT_AND_CHECK(buf, pos, size, &block->totalSize); + READ_VARINT_AND_CHECK(buf, pos, size, &block->unpackSize); + if (block->totalSize == 0) + return SZ_ERROR_ARCHIVE; + } + } + while ((pos & 3) != 0) + if (buf[pos++] != 0) + return SZ_ERROR_ARCHIVE; + return (pos == size) ? SZ_OK : SZ_ERROR_ARCHIVE; +} + +static SRes Xz_ReadIndex(CXzStream *p, ILookInStream *stream, UInt64 indexSize, ISzAlloc *alloc) +{ + SRes res; + size_t size; + Byte *buf; + if (indexSize > ((UInt32)1 << 31)) + return SZ_ERROR_UNSUPPORTED; + size = (size_t)indexSize; + if (size != indexSize) + return SZ_ERROR_UNSUPPORTED; + buf = alloc->Alloc(alloc, size); + if (buf == 0) + return SZ_ERROR_MEM; + res = LookInStream_Read2(stream, buf, size, SZ_ERROR_UNSUPPORTED); + if (res == SZ_OK) + res = Xz_ReadIndex2(p, buf, size, alloc); + alloc->Free(alloc, buf); + return res; +} + +static SRes SeekFromCur(ILookInStream *inStream, Int64 *res) +{ + return inStream->Seek(inStream, res, SZ_SEEK_CUR); +} + +static SRes Xz_ReadBackward(CXzStream *p, ILookInStream *stream, Int64 *startOffset, ISzAlloc *alloc) +{ + UInt64 indexSize; + Byte buf[XZ_STREAM_FOOTER_SIZE]; + + if ((*startOffset & 3) != 0 || *startOffset < XZ_STREAM_FOOTER_SIZE) + return SZ_ERROR_NO_ARCHIVE; + *startOffset = -XZ_STREAM_FOOTER_SIZE; + RINOK(SeekFromCur(stream, startOffset)); + + RINOK(LookInStream_Read2(stream, buf, XZ_STREAM_FOOTER_SIZE, SZ_ERROR_NO_ARCHIVE)); + + if (memcmp(buf + 10, XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE) != 0) + { + Int64 i = 0; + *startOffset += XZ_STREAM_FOOTER_SIZE; + for (;;) + { + int j; + size_t processedSize; + #define TEMP_BUF_SIZE (1 << 10) + Byte tempBuf[TEMP_BUF_SIZE]; + if (*startOffset < XZ_STREAM_FOOTER_SIZE || i > (1 << 16)) + return SZ_ERROR_NO_ARCHIVE; + processedSize = (*startOffset > TEMP_BUF_SIZE) ? TEMP_BUF_SIZE : (size_t)*startOffset; + i += processedSize; + *startOffset = -(Int64)processedSize; + RINOK(SeekFromCur(stream, startOffset)); + RINOK(LookInStream_Read2(stream, tempBuf, processedSize, SZ_ERROR_NO_ARCHIVE)); + for (j = (int)processedSize; j >= 0; j--) + if (tempBuf[j -1] != 0) + break; + if (j != 0) + { + if ((j & 3) != 0) + return SZ_ERROR_NO_ARCHIVE; + *startOffset += j; + if (*startOffset < XZ_STREAM_FOOTER_SIZE) + return SZ_ERROR_NO_ARCHIVE; + *startOffset -= XZ_STREAM_FOOTER_SIZE; + RINOK(stream->Seek(stream, startOffset, SZ_SEEK_SET)); + RINOK(LookInStream_Read2(stream, buf, XZ_STREAM_FOOTER_SIZE, SZ_ERROR_NO_ARCHIVE)); + if (memcmp(buf + 10, XZ_FOOTER_SIG, XZ_FOOTER_SIG_SIZE) != 0) + return SZ_ERROR_NO_ARCHIVE; + break; + } + } + } + + p->flags = (CXzStreamFlags)GetBe16(buf + 8); + + if (!XzFlags_IsSupported(p->flags)) + return SZ_ERROR_UNSUPPORTED; + + if (GetUi32(buf) != CrcCalc(buf + 4, 6)) + return SZ_ERROR_ARCHIVE; + + indexSize = ((UInt64)GetUi32(buf + 4) + 1) << 2; + + *startOffset = -(Int64)(indexSize + XZ_STREAM_FOOTER_SIZE); + RINOK(SeekFromCur(stream, startOffset)); + + RINOK(Xz_ReadIndex(p, stream, indexSize, alloc)); + + { + UInt64 totalSize = Xz_GetPackSize(p); + UInt64 sum = XZ_STREAM_HEADER_SIZE + totalSize + indexSize; + if (totalSize == XZ_SIZE_OVERFLOW || + sum >= ((UInt64)1 << 63) || + totalSize >= ((UInt64)1 << 63)) + return SZ_ERROR_ARCHIVE; + *startOffset = -(Int64)sum; + RINOK(SeekFromCur(stream, startOffset)); + } + { + CXzStreamFlags headerFlags; + CSecToRead secToRead; + SecToRead_CreateVTable(&secToRead); + secToRead.realStream = stream; + + RINOK(Xz_ReadHeader(&headerFlags, &secToRead.s)); + return (p->flags == headerFlags) ? SZ_OK : SZ_ERROR_ARCHIVE; + } +} + + +/* ---------- Xz Streams ---------- */ + +void Xzs_Construct(CXzs *p) +{ + p->num = p->numAllocated = 0; + p->streams = 0; +} + +void Xzs_Free(CXzs *p, ISzAlloc *alloc) +{ + size_t i; + for (i = 0; i < p->num; i++) + Xz_Free(&p->streams[i], alloc); + alloc->Free(alloc, p->streams); + p->num = p->numAllocated = 0; + p->streams = 0; +} + +UInt64 Xzs_GetNumBlocks(const CXzs *p) +{ + UInt64 num = 0; + size_t i; + for (i = 0; i < p->num; i++) + num += p->streams[i].numBlocks; + return num; +} + +UInt64 Xzs_GetUnpackSize(const CXzs *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->num; i++) + ADD_SIZE_CHECH(size, Xz_GetUnpackSize(&p->streams[i])); + return size; +} + +/* +UInt64 Xzs_GetPackSize(const CXzs *p) +{ + UInt64 size = 0; + size_t i; + for (i = 0; i < p->num; i++) + ADD_SIZE_CHECH(size, Xz_GetTotalSize(&p->streams[i])); + return size; +} +*/ + +SRes Xzs_ReadBackward(CXzs *p, ILookInStream *stream, Int64 *startOffset, ICompressProgress *progress, ISzAlloc *alloc) +{ + Int64 endOffset = 0; + RINOK(stream->Seek(stream, &endOffset, SZ_SEEK_END)); + *startOffset = endOffset; + for (;;) + { + CXzStream st; + SRes res; + Xz_Construct(&st); + res = Xz_ReadBackward(&st, stream, startOffset, alloc); + st.startOffset = *startOffset; + RINOK(res); + if (p->num == p->numAllocated) + { + size_t newNum = p->num + p->num / 4 + 1; + Byte *data = (Byte *)alloc->Alloc(alloc, newNum * sizeof(CXzStream)); + if (data == 0) + return SZ_ERROR_MEM; + p->numAllocated = newNum; + memcpy(data, p->streams, p->num * sizeof(CXzStream)); + alloc->Free(alloc, p->streams); + p->streams = (CXzStream *)data; + } + p->streams[p->num++] = st; + if (*startOffset == 0) + break; + RINOK(stream->Seek(stream, startOffset, SZ_SEEK_SET)); + if (progress && progress->Progress(progress, endOffset - *startOffset, (UInt64)(Int64)-1) != SZ_OK) + return SZ_ERROR_PROGRESS; + } + return SZ_OK; +} diff --git a/clamscan/libclamav/7z_iface.c b/clamscan/libclamav/7z_iface.c new file mode 100644 index 0000000..69a3c8c --- /dev/null +++ b/clamscan/libclamav/7z_iface.c @@ -0,0 +1,228 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2011-2013 Sourcefire, Inc. + * + * Authors: aCaB + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#if defined(_WIN32) +#include +#include +#endif + +#include "clamav.h" +#include "7z_iface.h" +#include "lzma_iface.h" +#include "scanners.h" +#include "others.h" +#include "fmap.h" + +#include "7z/7z.h" +#include "7z/7zAlloc.h" +#include "7z/7zFile.h" + +static ISzAlloc allocImp = {__lzma_wrap_alloc, __lzma_wrap_free}, allocTempImp = {__lzma_wrap_alloc, __lzma_wrap_free}; + +static SRes FileInStream_fmap_Read(void *pp, void *buf, size_t *size) +{ + CFileInStream *p = (CFileInStream *)pp; + size_t read_sz; + + if (*size == 0) + return 0; + + read_sz = fmap_readn(p->file.fmap, buf, p->s.curpos, *size); + if (read_sz == (size_t)-1) { + *size = 0; + return SZ_ERROR_READ; + } + + p->s.curpos += read_sz; + + *size = read_sz; + return SZ_OK; +} + +static SRes FileInStream_fmap_Seek(void *pp, Int64 *pos, ESzSeek origin) +{ + CFileInStream *p = (CFileInStream *)pp; + + switch (origin) { + case SZ_SEEK_SET: + p->s.curpos = *pos; + break; + case SZ_SEEK_CUR: + p->s.curpos += *pos; + *pos = p->s.curpos; + break; + case SZ_SEEK_END: + p->s.curpos = p->file.fmap->len + *pos; + *pos = p->s.curpos; + break; + default: + return 1; + } + return 0; +} + +#define UTFBUFSZ 256 +int cli_7unz(cli_ctx *ctx, size_t offset) +{ + CFileInStream archiveStream; + CLookToRead lookStream; + CSzArEx db; + SRes res; + UInt16 utf16buf[UTFBUFSZ], *utf16name = utf16buf; + int namelen = UTFBUFSZ; + cl_error_t found = CL_CLEAN; + Int64 begin_of_archive = offset; + UInt32 viruses_found = 0; + + /* Replacement for + FileInStream_CreateVTable(&archiveStream); */ + archiveStream.s.Read = FileInStream_fmap_Read; + archiveStream.s.Seek = FileInStream_fmap_Seek; + archiveStream.s.curpos = 0; + archiveStream.file.fmap = ctx->fmap; + + LookToRead_CreateVTable(&lookStream, False); + + if (archiveStream.s.Seek(&archiveStream.s, &begin_of_archive, SZ_SEEK_SET) != 0) + return CL_CLEAN; + + lookStream.realStream = &archiveStream.s; + LookToRead_Init(&lookStream); + + SzArEx_Init(&db); + res = SzArEx_Open(&db, &lookStream.s, &allocImp, &allocTempImp); + if (res == SZ_ERROR_ENCRYPTED && SCAN_HEURISTIC_ENCRYPTED_ARCHIVE) { + cli_dbgmsg("cli_7unz: Encrypted header found in archive.\n"); + found = cli_append_virus(ctx, "Heuristics.Encrypted.7Zip"); + } else if (res == SZ_OK) { + UInt32 i, blockIndex = 0xFFFFFFFF; + Byte *outBuffer = 0; + size_t outBufferSize = 0; + unsigned int encrypted = 0; + + for (i = 0; i < db.db.NumFiles; i++) { + size_t offset = 0; + size_t outSizeProcessed = 0; + const CSzFileItem *f = db.db.Files + i; + char *name; + char *tmp_name; + size_t j; + int newnamelen, fd; + + if ((found = cli_checklimits("7unz", ctx, 0, 0, 0))) + break; + + if (f->IsDir) + continue; + + if (cli_checklimits("7unz", ctx, f->Size, 0, 0)) + continue; + + if (!db.FileNameOffsets) + newnamelen = 0; /* no filename */ + else { + newnamelen = SzArEx_GetFileNameUtf16(&db, i, NULL); + if (newnamelen > namelen) { + if (namelen > UTFBUFSZ) + free(utf16name); + utf16name = cli_malloc(newnamelen * 2); + if (!utf16name) { + found = CL_EMEM; + break; + } + namelen = newnamelen; + } + SzArEx_GetFileNameUtf16(&db, i, utf16name); + } + + name = (char *)utf16name; + for (j = 0; j < (size_t)newnamelen; j++) /* FIXME */ + name[j] = utf16name[j]; + name[j] = 0; + cli_dbgmsg("cli_7unz: extracting %s\n", name); + + res = SzArEx_Extract(&db, &lookStream.s, i, &blockIndex, &outBuffer, &outBufferSize, &offset, &outSizeProcessed, &allocImp, &allocTempImp); + if (res == SZ_ERROR_ENCRYPTED) { + encrypted = 1; + if (SCAN_HEURISTIC_ENCRYPTED_ARCHIVE) { + cli_dbgmsg("cli_7unz: Encrypted files found in archive.\n"); + found = cli_append_virus(ctx, "Heuristics.Encrypted.7Zip"); + if (found != CL_CLEAN) { + if (found == CL_VIRUS) { + if (SCAN_ALLMATCHES) + viruses_found++; + } else + break; + } + } + } + if (cli_matchmeta(ctx, name, 0, f->Size, encrypted, i, f->CrcDefined ? f->Crc : 0, NULL)) { + found = CL_VIRUS; + viruses_found++; + if (!SCAN_ALLMATCHES) + break; + } + if (res != SZ_OK) + cli_dbgmsg("cli_unz: extraction failed with %d\n", res); + else if ((outBuffer == NULL) || (outSizeProcessed == 0)) { + cli_dbgmsg("cli_unz: extracted empty file\n"); + } else { + if ((found = cli_gentempfd(ctx->sub_tmpdir, &tmp_name, &fd))) + break; + + cli_dbgmsg("cli_7unz: Saving to %s\n", tmp_name); + if (cli_writen(fd, outBuffer + offset, outSizeProcessed) != outSizeProcessed) + found = CL_EWRITE; + else if ((found = cli_magic_scan_desc(fd, tmp_name, ctx, name)) == CL_VIRUS) + viruses_found++; + close(fd); + if (!ctx->engine->keeptmp && cli_unlink(tmp_name)) + found = CL_EUNLINK; + + free(tmp_name); + if (found != CL_CLEAN) + if (!(SCAN_ALLMATCHES && found == CL_VIRUS)) + break; + } + } + IAlloc_Free(&allocImp, outBuffer); + } + SzArEx_Free(&db, &allocImp); + if (namelen > UTFBUFSZ) + free(utf16name); + + if (res == SZ_OK) + cli_dbgmsg("cli_7unz: completed successfully\n"); + else if (res == SZ_ERROR_UNSUPPORTED) + cli_dbgmsg("cli_7unz: unsupported\n"); + else if (res == SZ_ERROR_MEM) + cli_dbgmsg("cli_7unz: oom\n"); + else if (res == SZ_ERROR_CRC) + cli_dbgmsg("cli_7unz: crc mismatch\n"); + else if (res == SZ_ERROR_ENCRYPTED) + cli_dbgmsg("cli_7unz: encrypted\n"); + else + cli_dbgmsg("cli_7unz: error %d\n", res); + + if (SCAN_ALLMATCHES && viruses_found) + return CL_VIRUS; + return found; +} diff --git a/clamscan/libclamav/7z_iface.h b/clamscan/libclamav/7z_iface.h new file mode 100644 index 0000000..0556e52 --- /dev/null +++ b/clamscan/libclamav/7z_iface.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2011-2013 Sourcefire, Inc. + * + * Authors: aCaB + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef __7Z_IFACE_H +#define __7Z_IFACE_H + +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#include "others.h" + +int cli_7unz(cli_ctx *, size_t); + +#endif diff --git a/clamscan/libclamav/CMakeLists.txt b/clamscan/libclamav/CMakeLists.txt new file mode 100644 index 0000000..65ebafb --- /dev/null +++ b/clamscan/libclamav/CMakeLists.txt @@ -0,0 +1,626 @@ +# Copyright (C) 2020-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + +cmake_minimum_required( VERSION 3.12...3.13 ) + +include_directories( + ${LIBXML2_INCLUDE_DIR} + ${OPENSSL_INCLUDE_DIR} + ${ZLIB_INCLUDE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + $ + ${CMAKE_CURRENT_SOURCE_DIR}/.. +) + +configure_file(version.h.in version.h) + +if(WIN32) + add_definitions(-DWIN32_LEAN_AND_MEAN) + add_definitions(-DHAVE_STRUCT_TIMESPEC) + + # Windows compatibility headers + include_directories(${CMAKE_SOURCE_DIR}/win32/compat) +endif() + +# 3rd party libraries included in libclamav +add_library( regex OBJECT ) +target_sources( regex + PRIVATE + regex/strlcpy.c + regex/regcomp.c + regex/regerror.c + regex/regexec.c + regex/regfree.c + PUBLIC + regex/cclass.h + regex/cname.h + regex/regex.h + regex/regex2.h + regex/utils.h ) +target_include_directories( regex + PRIVATE ${CMAKE_BINARY_DIR} + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) +set_target_properties(regex PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}") +target_link_libraries( regex + PRIVATE + PCRE2::pcre2 + JSONC::jsonc ) + +add_library( lzma_sdk OBJECT ) +target_sources( lzma_sdk + PRIVATE + 7z/7zAlloc.c + 7z/7zBuf.c + 7z/7zBuf2.c + 7z/7zCrc.c + 7z/7zCrcOpt.c + 7z/7zDec.c + 7z/7zFile.c + 7z/7zIn.c + 7z/7zStream.c + 7z/Bcj2.c + 7z/Bra.c + 7z/Bra86.c + 7z/BraIA64.c + 7z/CpuArch.c + 7z/Delta.c + 7z/Lzma2Dec.c + 7z/LzmaDec.c + 7z/Ppmd7.c + 7z/Ppmd7Dec.c + 7z/Xz.c + 7z/XzCrc64.c + 7z/XzDec.c + 7z/XzIn.c + PUBLIC + 7z/7z.h + 7z/Xz.h + 7z/Alloc.h + 7z/7zFile.h + 7z/XzCrc64.h + 7z/RotateDefs.h + 7z/Types.h + 7z/Ppmd7.h + 7z/LzmaDec.h + 7z/Ppmd.h + 7z/Lzma2Dec.h + 7z/Delta.h + 7z/CpuArch.h + 7z/CpuArch.h + 7z/Bra.h + 7z/Bcj2.h + 7z/7zVersion.h + 7z/7zCrc.h + 7z/7zBuf.h + 7z/7zAlloc.h ) +target_include_directories( lzma_sdk + PRIVATE ${CMAKE_BINARY_DIR} + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) +set_target_properties(lzma_sdk PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}") +target_link_libraries( lzma_sdk + PRIVATE + PCRE2::pcre2 + JSONC::jsonc ) + +if(MAINTAINER_MODE) + bison_target( yara_grammar + yara_grammar.y ${CMAKE_CURRENT_SOURCE_DIR}/yara_grammar.c ) + flex_target( yara_lexer + yara_lexer.l ${CMAKE_CURRENT_SOURCE_DIR}/yara_lexer.c ) + add_flex_bison_dependency(yara_lexer yara_grammar) +endif() + +add_library( yara OBJECT ) +target_sources( yara + PRIVATE + yara_compiler.c + yara_exec.c + yara_hash.c + yara_parser.c + yara_arena.c + ${BISON_yara_grammar_OUTPUTS} + ${FLEX_yara_lexer_OUTPUTS} + PUBLIC + yara_arena.h + yara_compiler.h + yara_clam.h + yara_hash.h + yara_exec.h + yara_parser.h ) + +if(MAINTAINER_MODE) + target_sources( yara + PRIVATE + ${BISON_yara_grammar_OUTPUTS} + ${FLEX_yara_lexer_OUTPUTS} ) +else() + target_sources( yara + PRIVATE + yara_grammar.c + yara_lexer.c ) +endif() + +target_include_directories( yara + PRIVATE + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} ) +set_target_properties(yara PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}") +target_link_libraries( yara + PRIVATE + PCRE2::pcre2 + JSONC::jsonc ) + +add_library( tomsfastmath OBJECT ) +target_sources( tomsfastmath + PRIVATE + tomsfastmath/addsub/fp_add.c + tomsfastmath/addsub/fp_add_d.c + tomsfastmath/addsub/fp_addmod.c + tomsfastmath/addsub/fp_cmp.c + tomsfastmath/addsub/fp_cmp_d.c + tomsfastmath/addsub/fp_cmp_mag.c + tomsfastmath/addsub/fp_sub.c + tomsfastmath/addsub/fp_sub_d.c + tomsfastmath/addsub/fp_submod.c + tomsfastmath/addsub/s_fp_add.c + tomsfastmath/addsub/s_fp_sub.c + tomsfastmath/bin/fp_radix_size.c + tomsfastmath/bin/fp_read_radix.c + tomsfastmath/bin/fp_read_signed_bin.c + tomsfastmath/bin/fp_read_unsigned_bin.c + tomsfastmath/bin/fp_reverse.c + tomsfastmath/bin/fp_s_rmap.c + tomsfastmath/bin/fp_signed_bin_size.c + tomsfastmath/bin/fp_to_signed_bin.c + tomsfastmath/bin/fp_to_unsigned_bin.c + tomsfastmath/bin/fp_toradix.c + tomsfastmath/bin/fp_toradix_n.c + tomsfastmath/bin/fp_unsigned_bin_size.c + tomsfastmath/bit/fp_cnt_lsb.c + tomsfastmath/bit/fp_count_bits.c + tomsfastmath/bit/fp_div_2.c + tomsfastmath/bit/fp_div_2d.c + tomsfastmath/bit/fp_lshd.c + tomsfastmath/bit/fp_mod_2d.c + tomsfastmath/bit/fp_rshd.c + tomsfastmath/divide/fp_div.c + tomsfastmath/divide/fp_div_d.c + tomsfastmath/divide/fp_mod.c + tomsfastmath/divide/fp_mod_d.c + tomsfastmath/exptmod/fp_2expt.c + tomsfastmath/exptmod/fp_exptmod.c + tomsfastmath/misc/fp_ident.c + tomsfastmath/misc/fp_set.c + tomsfastmath/mont/fp_montgomery_calc_normalization.c + tomsfastmath/mont/fp_montgomery_reduce.c + tomsfastmath/mont/fp_montgomery_setup.c + tomsfastmath/mul/fp_mul.c + tomsfastmath/mul/fp_mul_comba.c + tomsfastmath/mul/fp_mul_2.c + tomsfastmath/mul/fp_mul_2d.c + tomsfastmath/mul/fp_mul_comba_12.c + tomsfastmath/mul/fp_mul_comba_17.c + tomsfastmath/mul/fp_mul_comba_20.c + tomsfastmath/mul/fp_mul_comba_24.c + tomsfastmath/mul/fp_mul_comba_28.c + tomsfastmath/mul/fp_mul_comba_3.c + tomsfastmath/mul/fp_mul_comba_32.c + tomsfastmath/mul/fp_mul_comba_4.c + tomsfastmath/mul/fp_mul_comba_48.c + tomsfastmath/mul/fp_mul_comba_6.c + tomsfastmath/mul/fp_mul_comba_64.c + tomsfastmath/mul/fp_mul_comba_7.c + tomsfastmath/mul/fp_mul_comba_8.c + tomsfastmath/mul/fp_mul_comba_9.c + tomsfastmath/mul/fp_mul_comba_small_set.c + tomsfastmath/mul/fp_mul_d.c + tomsfastmath/mul/fp_mulmod.c + tomsfastmath/numtheory/fp_invmod.c + tomsfastmath/sqr/fp_sqr.c + tomsfastmath/sqr/fp_sqr_comba_12.c + tomsfastmath/sqr/fp_sqr_comba_17.c + tomsfastmath/sqr/fp_sqr_comba_20.c + tomsfastmath/sqr/fp_sqr_comba_24.c + tomsfastmath/sqr/fp_sqr_comba_28.c + tomsfastmath/sqr/fp_sqr_comba_3.c + tomsfastmath/sqr/fp_sqr_comba_32.c + tomsfastmath/sqr/fp_sqr_comba_4.c + tomsfastmath/sqr/fp_sqr_comba_48.c + tomsfastmath/sqr/fp_sqr_comba_6.c + tomsfastmath/sqr/fp_sqr_comba_64.c + tomsfastmath/sqr/fp_sqr_comba_7.c + tomsfastmath/sqr/fp_sqr_comba_8.c + tomsfastmath/sqr/fp_sqr_comba_9.c + tomsfastmath/sqr/fp_sqr_comba_generic.c + tomsfastmath/sqr/fp_sqr_comba_small_set.c + tomsfastmath/sqr/fp_sqrmod.c + PUBLIC + bignum.h + bignum_fast.h ) +target_include_directories( tomsfastmath + PRIVATE ${CMAKE_BINARY_DIR} + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) +set_target_properties(tomsfastmath PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}") + +# Bytecode Runtime +add_library( bytecode_runtime OBJECT ) +if(LLVM_FOUND) + target_sources( bytecode_runtime + PRIVATE + c++/detect.cpp + c++/ClamBCRTChecks.cpp + c++/bytecode2llvm.cpp + bytecode_priv.h + bytecode.h ) + set_target_properties(bytecode_runtime PROPERTIES + COMPILE_FLAGS "${WARNCXXFLAGS} ${CXX1XCXXFLAGS}") +else() + target_sources( bytecode_runtime + PRIVATE + bytecode_nojit.c + bytecode_priv.h + bytecode.h ) + set_target_properties(bytecode_runtime PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}") +endif() +target_include_directories( bytecode_runtime + PRIVATE ${CMAKE_BINARY_DIR} + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) +target_link_libraries( bytecode_runtime + PRIVATE + PCRE2::pcre2 + JSONC::jsonc ) + +# clamav clamav_obj +add_library( clamav_obj OBJECT ) +target_sources( clamav_obj + PRIVATE + # Utils + blob.c blob.h + conv.c conv.h + fpu.c fpu.h + hashtab.c hashtab.h + iowrap.c iowrap.h + json_api.c json_api.h + jsparse/textbuf.h + others_common.c others.h + qsort.c + sf_base64decode.c sf_base64decode.h + str.c str.h + strlcat.c + table.c table.h + text.c text.h + uniq.c uniq.h + www.c www.h + # Utils Disasm + disasm-common.h disasm.c disasm.h disasmpriv.h + # Matcher + filtering.c filtering.h + matcher-ac.c matcher-ac.h + matcher-bm.c matcher-bm.h + matcher-byte-comp.c matcher-byte-comp.h + matcher-hash.c matcher-hash.h + matcher-pcre.c matcher-pcre.h + matcher.c matcher.h + regex_pcre.c regex_pcre.h + # Database + cvd.c cvd.h + dconf.c dconf.h + dsig.c dsig.h + readdb.c readdb.h + # Core + cache.c cache.h + crtmgr.c crtmgr.h + crypto.c + default.h + filetypes_int.h filetypes.c filetypes.h + fmap.c fmap.h + mpool.c mpool.h + others.c + perflogging.c perflogging.h + scanners.c scanners.h + textdet.c textdet.h + version.c + # file normalization (for matching) + htmlnorm.c htmlnorm.h + jsparse/generated/keywords.h + jsparse/generated/operators.h + jsparse/js-norm.c + jsparse/js-norm.h + jsparse/lexglobal.h + textnorm.c textnorm.h + # heuristics (hardcoded exploit/malware detection) + partition_intersection.c partition_intersection.h + special.c special.h + # clamav statistics + hostid_internal.c hostid_internal.h + stats_json.c stats_json.h + stats.c stats.h + # clamav bytecode support + bcfeatures.h + builtin_bytecodes.h + bytecode_api_decl.c + bytecode_api_impl.h + bytecode_api.c bytecode_api.h + bytecode_detect.c bytecode_detect.h + bytecode_hooks.h + bytecode_priv.h + bytecode_vm.c + bytecode.c bytecode.h + events.c events.h + type_desc.h + # utils: compression + 7z_iface.c 7z_iface.h + explode.c explode.h + inffixed64.h + inflate64_priv.h inflate64.c inflate64.h + lzma_iface.c lzma_iface.h + lzw/lzwdec.c lzw/lzwdec.h + xz_iface.c xz_iface.h + # utils: encryption + arc4.c arc4.h + rijndael.c rijndael.h + # utils: text conversion + encoding_aliases.h + entconv.c entconv.h + entitylist.h + # Data-Loss-Prevention + dlp.c dlp.h + # + # FILE PARSERS + # + # autoit + autoit.c autoit.h + # binhex + binhex.c binhex.h + # cpio + cpio.c cpio.h + # install shield + ishield.c ishield.h + # cab / chm + libmspack.c libmspack.h + # msszdd + msexpand.c msexpand.h + # nsis + nsis/bzlib_private.h + nsis/bzlib.c + nsis/infblock.c + nsis/nsis_bzlib.h + nsis/nsis_zconf.h + nsis/nsis_zlib.h + nsis/nsis_zutil.h + nsis/nulsft.c nsis/nulsft.h + # office docs + hwp.c hwp.h + msdoc.c msdoc.h + msxml_parser.c msxml_parser.h + msxml.c msxml.h + ole2_extract.c ole2_extract.h + xlm_extract.c xlm_extract.h + ooxml.c ooxml.h + rtf.c rtf.h + vba_extract.c vba_extract.h + # executables + asn1.c asn1.h + elf.c elf.h + execs.c execs.h + macho.c macho.h + pe_icons.c pe_icons.h + pe_structs.h + pe.c pe.h + rebuildpe.c rebuildpe.h + # executable unpackers + aspack.c aspack.h + fsg.c fsg.h + mew.c mew.h + packlibs.c packlibs.h + petite.c petite.h + spin.c spin.h + unsp.c unsp.h + upack.c upack.h + upx.c upx.h + wwunpack.c wwunpack.h + yc.c yc.h + # mail & phishing + iana_cctld.h + iana_tld.h + line.c line.h + mbox.c mbox.h + message.c message.h + phish_domaincheck_db.c phish_domaincheck_db.h + phish_whitelist.c phish_whitelist.h + phishcheck.c phishcheck.h + regex_list.c regex_list.h + regex_suffix.c regex_suffix.h + # sis + sis.c sis.h + # tnef + tnef.c tnef.h + # uuencode + uuencode.c uuencode.h + # swf (flash) + swf.c swf.h + # pdf + pdf.c pdf.h + pdfng.c + pdfdecode.c pdfdecode.h + # xdp + xdp.c xdp.h + # ARJ archive + unarj.c unarj.h + # TAR archive + is_tar.c is_tar.h + untar.c untar.h + # ZIP archive + unzip.c unzip.h + # DMG archive + adc.c adc.h + dmg.c dmg.h + # XAR archive + xar.c xar.h + # EGG archive + egg.c egg.h + # Master Boot Record partition + mbr.c mbr.h + # GUID Parition Table partition + gpt.c gpt.h + # Apple Partition Map partition + apm.c apm.h + # HFS+ partition + hfsplus.c hfsplus.h + # iso9660 partition + iso9660.c iso9660.h + # OpenIOC + openioc.c openioc.h + # JPEG image format checker + jpeg.c jpeg.h + # PNG image format checker + png.c png.h + # TIFF image format checker + tiff.c tiff.h + # GIF image format checker + gif.c gif.h + PUBLIC + clamav.h ) + +if(WIN32) + target_sources( clamav_obj PRIVATE libclamav_main.c ) +endif() + +target_include_directories( clamav_obj + PRIVATE ${CMAKE_BINARY_DIR} ${JSONC_INCLUDE_DIRS} + PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} + INTERFACE ${CMAKE_BINARY_DIR} ) +target_link_libraries( clamav_obj + PUBLIC + regex + lzma_sdk + yara + tomsfastmath + bytecode_runtime + ClamAV::libmspack + ClamAV::libclamunrar_iface_iface + OpenSSL::SSL + OpenSSL::Crypto + ZLIB::ZLIB + BZip2::BZip2 + PCRE2::pcre2 + LibXml2::LibXml2 + JSONC::jsonc ) +if (WIN32) + target_link_libraries( clamav_obj + PUBLIC + PThreadW32::pthreadw32 + ClamAV::win32_compat + wsock32 ws2_32 ) +else() + target_link_libraries( clamav_obj + PUBLIC + Threads::Threads + Iconv::Iconv + ${CMAKE_DL_LIBS} + m ) +endif() +set_target_properties(clamav_obj PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}") + +if(ENABLE_SHARED_LIB) + # The clamav shared library. + add_library( clamav SHARED ) + set_target_properties(clamav PROPERTIES + VERSION ${LIBCLAMAV_VERSION} + SOVERSION ${LIBCLAMAV_SOVERSION}) + target_sources( clamav + PUBLIC + clamav.h ) + target_link_libraries( clamav + PUBLIC + clamav_obj + regex + lzma_sdk + yara + tomsfastmath + bytecode_runtime + ClamAV::libmspack + ClamAV::libclamunrar_iface_iface + OpenSSL::SSL + OpenSSL::Crypto + ZLIB::ZLIB + BZip2::BZip2 + PCRE2::pcre2 + LibXml2::LibXml2 + JSONC::jsonc ) + set_target_properties(clamav PROPERTIES + COMPILE_FLAGS "${WARNCFLAGS}" + VERSION ${LIBCLAMAV_VERSION} SOVERSION ${LIBCLAMAV_SOVERSION}) + if(WIN32) + set_target_properties(clamav PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON) + else() + target_link_libraries( clamav PUBLIC Iconv::Iconv ) + endif() + if(WIN32) + install(TARGETS clamav DESTINATION ${CMAKE_INSTALL_PREFIX}) + else() + install(TARGETS clamav DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + if(LLVM_FOUND) + target_link_directories( clamav PRIVATE ${LLVM_LIBRARY_DIRS} ) + target_link_libraries( clamav PRIVATE ${LLVM_LIBRARIES} ) + endif() + + add_library( ClamAV::libclamav ALIAS clamav ) +endif() + +if(ENABLE_STATIC_LIB) + # The clamav static library. + add_library(clamav_static STATIC) + target_sources(clamav_static + PUBLIC + clamav.h ) + target_link_libraries(clamav_static + PUBLIC + clamav_obj + regex + lzma_sdk + yara + tomsfastmath + bytecode_runtime + ClamAV::libmspack + ClamAV::libclamunrar_iface_iface + OpenSSL::SSL + OpenSSL::Crypto + ZLIB::ZLIB + BZip2::BZip2 + PCRE2::pcre2 + LibXml2::LibXml2 + JSONC::jsonc ) + if(NOT WIN32) + target_link_libraries( clamav PUBLIC Iconv::Iconv ) + endif() + set_target_properties(clamav_static PROPERTIES + ARCHIVE_OUTPUT_NAME clamav_static + COMPILE_FLAGS "${WARNCFLAGS}" + VERSION ${LIBCLAMAV_VERSION} SOVERSION ${LIBCLAMAV_SOVERSION}) + target_compile_definitions(clamav_static PUBLIC clamav_staticLIB) + if(WIN32) + install(TARGETS clamav_static DESTINATION ${CMAKE_INSTALL_PREFIX}) + else() + install(TARGETS clamav_static DESTINATION ${CMAKE_INSTALL_LIBDIR}) + endif() + + add_library( ClamAV::libclamav_static ALIAS clamav_static ) +endif() + +install( + FILES + clamav.h + ${CMAKE_BINARY_DIR}/clamav-types.h + ${CMAKE_BINARY_DIR}/clamav-version.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) diff --git a/clamscan/libclamav/Makefile.am b/clamscan/libclamav/Makefile.am new file mode 100644 index 0000000..14dd631 --- /dev/null +++ b/clamscan/libclamav/Makefile.am @@ -0,0 +1,732 @@ +# +# Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. +# Copyright (C) 2007-2013 Sourcefire, Inc. +# Copyright (C) 2002-2007 Tomasz Kojm +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. + +AM_YFLAGS = -d +AM_LFLAGS = -d +AM_CPPFLAGS = -I$(top_srcdir) -I@srcdir@/nsis $(LTDLINCL) +AM_CFLAGS=@WERR_CFLAGS@ +lib_LTLIBRARIES = +COMMON_CLEANFILES = +EXTRA_DIST = c++/Makefile.nollvm.in +if ENABLE_UNRAR + +AM_CPPFLAGS += -DWARN_DLOPEN_FAIL +libclamunrar_la_CXXFLAGS = $(AM_CPPFLAGS) -DRARDLL -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else +libclamunrar_la_LDFLAGS = @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined + +if VERSIONSCRIPT +libclamunrar_la_LDFLAGS += -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamunrar/libclamunrar.map +endif + +libclamunrar_la_SOURCES = \ + ../libclamunrar/archive.cpp \ + ../libclamunrar/arcread.cpp \ + ../libclamunrar/blake2s.cpp \ + ../libclamunrar/cmddata.cpp \ + ../libclamunrar/consio.cpp \ + ../libclamunrar/crc.cpp \ + ../libclamunrar/crypt.cpp \ + ../libclamunrar/dll.cpp \ + ../libclamunrar/encname.cpp \ + ../libclamunrar/errhnd.cpp \ + ../libclamunrar/extinfo.cpp \ + ../libclamunrar/extract.cpp \ + ../libclamunrar/filcreat.cpp \ + ../libclamunrar/file.cpp \ + ../libclamunrar/filefn.cpp \ + ../libclamunrar/filestr.cpp \ + ../libclamunrar/find.cpp \ + ../libclamunrar/getbits.cpp \ + ../libclamunrar/global.cpp \ + ../libclamunrar/hash.cpp \ + ../libclamunrar/headers.cpp \ + ../libclamunrar/list.cpp \ + ../libclamunrar/match.cpp \ + ../libclamunrar/options.cpp \ + ../libclamunrar/pathfn.cpp \ + ../libclamunrar/qopen.cpp \ + ../libclamunrar/rar.cpp \ + ../libclamunrar/rarvm.cpp \ + ../libclamunrar/rawread.cpp \ + ../libclamunrar/rdwrfn.cpp \ + ../libclamunrar/recvol.cpp \ + ../libclamunrar/resource.cpp \ + ../libclamunrar/rijndael.cpp \ + ../libclamunrar/rs.cpp \ + ../libclamunrar/rs16.cpp \ + ../libclamunrar/scantree.cpp \ + ../libclamunrar/secpassword.cpp \ + ../libclamunrar/sha1.cpp \ + ../libclamunrar/sha256.cpp \ + ../libclamunrar/smallfn.cpp \ + ../libclamunrar/strfn.cpp \ + ../libclamunrar/strlist.cpp \ + ../libclamunrar/system.cpp \ + ../libclamunrar/threadpool.cpp \ + ../libclamunrar/timefn.cpp \ + ../libclamunrar/ui.cpp \ + ../libclamunrar/unicode.cpp \ + ../libclamunrar/unpack.cpp \ + ../libclamunrar/volume.cpp + +lib_LTLIBRARIES += libclamunrar.la +EXTRA_DIST += @top_srcdir@/libclamunrar/libclamunrar.map + +libclamunrar_iface_la_CXXFLAGS = $(AM_CPPFLAGS) -I@top_srcdir@/libclamunrar +libclamunrar_iface_la_LIBADD = libclamunrar.la +libclamunrar_iface_la_LDFLAGS = -module @TH_SAFE@ -version-info @LIBCLAMAV_VERSION@ -no-undefined + +if VERSIONSCRIPT +libclamunrar_iface_la_LDFLAGS += -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamunrar_iface/libclamunrar_iface.map +endif + +libclamunrar_iface_la_SOURCES = \ + ../libclamunrar_iface/unrar_iface.cpp \ + ../libclamunrar_iface/unrar_iface.h + +lib_LTLIBRARIES += libclamunrar_iface.la +EXTRA_DIST += @top_srcdir@/libclamunrar_iface/libclamunrar_iface.map + +IFACELIBADD = -dlopen libclamunrar_iface.la +IFACEDEP = libclamunrar_iface.la +endif + +# We need libclamunrar_iface in the include path even if we don't build it, +# because we #include "unrar_iface.h" +# We still want to support unrar if it is later provided, which is why we don't +# just wrap all the unrar scanners code with #ifdefs. +IFACE_CFLAGS = -I@top_srcdir@/libclamunrar_iface + +if USE_INTERNAL_MSPACK +# libmspack version: 0.8alpha (1:0:1) +LIBMSPACK_VERSION = 1:0:1 + +libclammspack_la_CFLAGS = -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wno-unused-parameter -I@top_srcdir@/libclammspack/mspack +libclammspack_la_LDFLAGS = -version-info $(LIBMSPACK_VERSION) -no-undefined -export-symbols-regex '^mspack_' + +# if VERSIONSCRIPT +# libclammspack_la_LDFLAGS += -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclammspack/libclammspack.map +# endif + +libclammspack_la_SOURCES = \ + ../libclammspack/mspack/cab.h \ + ../libclammspack/mspack/cabc.c \ + ../libclammspack/mspack/cabd.c \ + ../libclammspack/mspack/chm.h \ + ../libclammspack/mspack/chmc.c \ + ../libclammspack/mspack/chmd.c \ + ../libclammspack/mspack/crc32.c \ + ../libclammspack/mspack/crc32.h \ + ../libclammspack/mspack/des.h \ + ../libclammspack/mspack/hlp.h \ + ../libclammspack/mspack/hlpc.c \ + ../libclammspack/mspack/hlpd.c \ + ../libclammspack/mspack/kwaj.h \ + ../libclammspack/mspack/kwajc.c \ + ../libclammspack/mspack/kwajd.c \ + ../libclammspack/mspack/lit.h \ + ../libclammspack/mspack/litc.c \ + ../libclammspack/mspack/litd.c \ + ../libclammspack/mspack/lzss.h \ + ../libclammspack/mspack/lzssd.c \ + ../libclammspack/mspack/lzx.h \ + ../libclammspack/mspack/lzxc.c \ + ../libclammspack/mspack/lzxd.c \ + ../libclammspack/mspack/mspack.h \ + ../libclammspack/mspack/mszip.h \ + ../libclammspack/mspack/mszipc.c \ + ../libclammspack/mspack/mszipd.c \ + ../libclammspack/mspack/oab.h \ + ../libclammspack/mspack/oabc.c \ + ../libclammspack/mspack/oabd.c \ + ../libclammspack/mspack/qtm.h \ + ../libclammspack/mspack/qtmd.c \ + ../libclammspack/mspack/readbits.h \ + ../libclammspack/mspack/readhuff.h \ + ../libclammspack/mspack/sha.h \ + ../libclammspack/mspack/system.c \ + ../libclammspack/mspack/system.h \ + ../libclammspack/mspack/szdd.h \ + ../libclammspack/mspack/szddc.c \ + ../libclammspack/mspack/szddd.c + +lib_LTLIBRARIES += libclammspack.la +# EXTRA_DIST += @top_srcdir@/libclammspack/libclammspack.map + +MSPACK_CFLAGS = -I@top_srcdir@/libclammspack/mspack -DHAVE_INTERNAL_MSPACK +MSPACKLIBADD = -lclammspack +MSPACKDEP = libclammspack.la + +else +MSPACK_CFLAGS = $(LIBMSPACK_CFLAGS) +MSPACKLIBADD = $(LIBMSPACK_LIBS) +MSPACKDEP = + +libmspack/Makefile: +.PHONY: distdir distclean maintainer-clean +distdir: + echo "make distdir requires --with-system-libmspack=no" + exit 1 + +# nothing to do here, rules must exist for distclean to succeed +distclean: + -rm -f Makefile +maintainer-clean: + +distclean-recursive distdir maintainer-clean-recursive: libmspack/Makefile +endif + +libclamav_internal_utils_la_SOURCES= \ + conv.c \ + conv.h \ + crypto.c \ + iowrap.c \ + iowrap.h \ + others_common.c \ + others.h \ + qsort.c \ + regex/cclass.h \ + regex/cname.h \ + regex/regcomp.c \ + regex/regerror.c \ + regex/regex.h \ + regex/regex2.h \ + regex/regexec.c \ + regex/regfree.c \ + regex/strlcpy.c \ + regex/utils.h \ + str.c \ + str.h \ + strlcat.c + +libclamav_internal_utils_la_LDFLAGS=-static @SSL_LDFLAGS@ @JSON_LDFLAGS@ +libclamav_internal_utils_la_CFLAGS=$(AM_CFLAGS) $(IFACE_CFLAGS) -fPIC -DPIC @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @PCRE_CPPFLAGS@ @XML_CPPFLAGS@ +libclamav_internal_utils_la_LIBADD=@SSL_LIBS@ @PCRE_LIBS@ + +SUBDIRS= + +if ENABLE_LLVM +LLVMLIBADD=c++/libclamavcxx.la -lstdc++ -lm +LLVMDEP=c++/libclamavcxx.la +SUBDIRS+=c++ +else +LLVMLIBADD=libclamav_nocxx.la +LLVMDEP=libclamav_nocxx.la +c++/Makefile: c++/Makefile.nollvm.in + $(AM_V_at) cp $< $@ +distclean-recursive distdir maintainer-clean-recursive: c++/Makefile +endif + +if ENABLE_YARA +YARA_CFLAGS=-DHAVE_YARA +endif + +libclamav_nocxx_la_SOURCES = bytecode_nojit.c +libclamav_nocxx_la_CFLAGS=$(AM_CFLAGS) $(IFACE_CFLAGS) @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @ZLIB_CFLAGS@ @PCRE_CPPFLAGS@ + +libclamav_la_LIBADD = @SSL_LIBS@ @JSON_LIBS@ @PCRE_LIBS@ @LIBCLAMAV_LIBS@ @ZLIB_LIBS@ @LIBLTDL@ $(XML_LIBS) $(IFACELIBADD) $(MSPACKLIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @THREAD_LIBS@ @LIBM@ +libclamav_la_DEPENDENCIES = @LTDLDEPS@ $(IFACEDEP) $(LLVMDEP) $(MSPACKDEP) libclamav_internal_utils.la +libclamav_la_CFLAGS = $(IFACE_CFLAGS) $(MSPACK_CFLAGS) $(AM_CFLAGS) $(YARA_CFLAGS) -DSEARCH_LIBDIR=\"$(libdir)\" @LIBCLAMAV_CPPFLAGS@ @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @ZLIB_CFLAGS@ @PCRE_CPPFLAGS@ @XML_CPPFLAGS@ +libclamav_la_LDFLAGS = @SSL_LDFLAGS@ @TH_SAFE@ @JSON_LDFLAGS@ @LIBICONV@ $(XML_LIBS) -version-info @LIBCLAMAV_VERSION@ -no-undefined + +if VERSIONSCRIPT +libclamav_la_LDFLAGS += -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamav/libclamav.map +endif + +include_HEADERS = clamav.h + +libclamav_la_SOURCES = \ + matcher-ac.c \ + matcher-ac.h \ + matcher-bm.c \ + matcher-bm.h \ + matcher-hash.c \ + matcher-hash.h \ + matcher.c \ + matcher.h \ + others.c \ + others.h \ + readdb.c \ + readdb.h \ + cvd.c \ + cvd.h \ + dsig.c \ + dsig.h \ + scanners.c \ + scanners.h \ + textdet.c \ + textdet.h \ + filetypes.c \ + filetypes.h \ + filetypes_int.h \ + rtf.c \ + rtf.h \ + blob.c \ + blob.h \ + mbox.c \ + mbox.h \ + message.c \ + message.h \ + table.c \ + table.h \ + text.c \ + text.h \ + ole2_extract.c \ + ole2_extract.h \ + vba_extract.c \ + vba_extract.h \ + xlm_extract.c \ + xlm_extract.h \ + msexpand.c \ + msexpand.h \ + pe.c \ + pe.h \ + pe_icons.c \ + pe_icons.h \ + pe_structs.h \ + disasm.c \ + disasm.h \ + disasm-common.h \ + disasmpriv.h \ + upx.c \ + upx.h \ + htmlnorm.c \ + htmlnorm.h \ + libmspack.c \ + libmspack.h \ + rebuildpe.c \ + rebuildpe.h \ + petite.c \ + petite.h \ + wwunpack.c \ + wwunpack.h \ + unsp.c \ + unsp.h \ + aspack.c \ + aspack.h \ + packlibs.c \ + packlibs.h \ + fsg.c \ + fsg.h \ + mew.c \ + mew.h \ + upack.c \ + upack.h \ + line.c \ + line.h \ + untar.c \ + untar.h \ + unzip.c \ + unzip.h \ + ooxml.c \ + ooxml.h \ + inflate64.c \ + inflate64.h \ + inffixed64.h \ + inflate64_priv.h \ + special.c \ + special.h \ + binhex.c \ + binhex.h \ + is_tar.c \ + is_tar.h \ + tnef.c \ + tnef.h \ + autoit.c \ + autoit.h \ + unarj.c \ + unarj.h \ + nsis/bzlib.c \ + nsis/bzlib_private.h \ + nsis/nsis_bzlib.h \ + nsis/nulsft.c \ + nsis/nulsft.h \ + nsis/infblock.c \ + nsis/nsis_zconf.h \ + nsis/nsis_zlib.h \ + nsis/nsis_zutil.h \ + pdf.c \ + pdf.h \ + pdfng.c \ + pdfdecode.c \ + pdfdecode.h \ + spin.c \ + spin.h \ + yc.c \ + yc.h \ + elf.c \ + elf.h \ + execs.h \ + execs.c \ + sis.c \ + sis.h \ + uuencode.c \ + uuencode.h \ + phishcheck.c \ + phishcheck.h \ + phish_domaincheck_db.c \ + phish_domaincheck_db.h \ + phish_whitelist.c \ + phish_whitelist.h \ + iana_cctld.h \ + iana_tld.h \ + regex_list.c \ + regex_list.h \ + regex_suffix.c \ + regex_suffix.h \ + entconv.c \ + entconv.h \ + entitylist.h \ + encoding_aliases.h \ + hashtab.c \ + hashtab.h \ + dconf.c \ + dconf.h \ + lzma_iface.c \ + lzma_iface.h \ + 7z_iface.c \ + 7z_iface.h \ + 7z/7z.h \ + 7z/7zAlloc.c \ + 7z/7zAlloc.h \ + 7z/7zBuf.c \ + 7z/7zBuf.h \ + 7z/7zBuf2.c \ + 7z/7zCrc.c \ + 7z/7zCrc.h \ + 7z/7zDec.c \ + 7z/7zFile.c \ + 7z/7zFile.h \ + 7z/7zIn.c \ + 7z/7zStream.c \ + 7z/7zVersion.h \ + 7z/Bcj2.c \ + 7z/Bcj2.h \ + 7z/Bra.c \ + 7z/Bra.h \ + 7z/Bra86.c \ + 7z/CpuArch.h \ + 7z/Lzma2Dec.c \ + 7z/Lzma2Dec.h \ + 7z/LzmaDec.c \ + 7z/LzmaDec.h \ + 7z/Ppmd.h \ + 7z/Ppmd7.c \ + 7z/Ppmd7.h \ + 7z/Ppmd7Dec.c \ + 7z/Types.h \ + 7z/Xz.c \ + 7z/Xz.h \ + 7z/XzCrc64.c \ + 7z/XzCrc64.h \ + 7z/XzDec.c \ + 7z/XzIn.c \ + 7z/Delta.c \ + 7z/Delta.h \ + 7z/Alloc.h \ + 7z/BraIA64.c \ + 7z/CpuArch.c \ + 7z/CpuArch.h \ + 7z/7zCrcOpt.c \ + 7z/RotateDefs.h \ + explode.c \ + explode.h \ + textnorm.c \ + textnorm.h \ + dlp.c \ + dlp.h \ + jsparse/js-norm.c \ + jsparse/js-norm.h \ + jsparse/lexglobal.h \ + jsparse/textbuf.h \ + uniq.c \ + uniq.h \ + version.c\ + version.h\ + mpool.c\ + mpool.h \ + filtering.h\ + filtering.c\ + fmap.c \ + fmap.h \ + perflogging.c\ + perflogging.h\ + default.h\ + bytecode.c\ + bytecode.h\ + bytecode_vm.c\ + bytecode_priv.h\ + clambc.h \ + cpio.c \ + cpio.h \ + macho.c \ + macho.h \ + ishield.c \ + ishield.h \ + type_desc.h \ + bcfeatures.h \ + bytecode_api.c \ + bytecode_api_decl.c \ + bytecode_api.h \ + bytecode_api_impl.h \ + bytecode_hooks.h \ + cache.c \ + cache.h \ + bytecode_detect.c \ + bytecode_detect.h\ + builtin_bytecodes.h\ + events.c\ + events.h \ + adc.c \ + adc.h \ + dmg.c \ + dmg.h \ + xar.c \ + xar.h \ + xdp.c \ + xdp.h \ + mbr.c \ + mbr.h \ + gpt.c \ + gpt.h \ + apm.c \ + apm.h \ + partition_intersection.c \ + partition_intersection.h \ + json_api.c\ + json_api.h\ + xz_iface.c \ + xz_iface.h \ + sf_base64decode.c \ + sf_base64decode.h \ + hfsplus.c \ + hfsplus.h \ + swf.c \ + swf.h \ + gif.c \ + gif.h \ + jpeg.c \ + jpeg.h \ + png.c \ + png.h \ + iso9660.c \ + iso9660.h \ + arc4.c \ + arc4.h \ + rijndael.c \ + rijndael.h \ + crtmgr.c \ + crtmgr.h \ + asn1.c \ + asn1.h \ + fpu.c \ + fpu.h \ + stats.c \ + stats.h \ + www.c \ + www.h \ + stats_json.c \ + stats_json.h \ + hostid_internal.c \ + hostid_internal.h \ + openioc.c \ + openioc.h \ + msdoc.c \ + msdoc.h \ + matcher-pcre.c \ + matcher-pcre.h \ + regex_pcre.c \ + regex_pcre.h \ + msxml.c \ + msxml.h \ + msxml_parser.c \ + msxml_parser.h \ + tiff.c \ + tiff.h \ + hwp.c \ + hwp.h \ + lzw/lzwdec.c \ + lzw/lzwdec.h \ + matcher-byte-comp.c \ + matcher-byte-comp.h \ + egg.c \ + egg.h \ + queue.h + +if ENABLE_YARA +libclamav_la_SOURCES += yara_arena.c \ + yara_arena.h \ + yara_compiler.c \ + yara_compiler.h \ + yara_exec.c \ + yara_exec.h \ + yara_hash.c \ + yara_hash.h \ + yara_grammar.y \ + yara_lexer.l \ + yara_lexer.h \ + yara_parser.c \ + yara_parser.h \ + yara_clam.h +endif + +libclamav_la_SOURCES += bignum.h\ + bignum_fast.h\ + tomsfastmath/addsub/fp_add.c\ + tomsfastmath/addsub/fp_add_d.c\ + tomsfastmath/addsub/fp_addmod.c\ + tomsfastmath/addsub/fp_cmp.c\ + tomsfastmath/addsub/fp_cmp_d.c\ + tomsfastmath/addsub/fp_cmp_mag.c\ + tomsfastmath/addsub/fp_sub.c\ + tomsfastmath/addsub/fp_sub_d.c\ + tomsfastmath/addsub/fp_submod.c\ + tomsfastmath/addsub/s_fp_add.c\ + tomsfastmath/addsub/s_fp_sub.c\ + tomsfastmath/bin/fp_radix_size.c\ + tomsfastmath/bin/fp_read_radix.c\ + tomsfastmath/bin/fp_read_signed_bin.c\ + tomsfastmath/bin/fp_read_unsigned_bin.c\ + tomsfastmath/bin/fp_reverse.c\ + tomsfastmath/bin/fp_s_rmap.c\ + tomsfastmath/bin/fp_signed_bin_size.c\ + tomsfastmath/bin/fp_to_signed_bin.c\ + tomsfastmath/bin/fp_to_unsigned_bin.c\ + tomsfastmath/bin/fp_toradix.c\ + tomsfastmath/bin/fp_toradix_n.c\ + tomsfastmath/bin/fp_unsigned_bin_size.c\ + tomsfastmath/bit/fp_cnt_lsb.c\ + tomsfastmath/bit/fp_count_bits.c\ + tomsfastmath/bit/fp_div_2.c\ + tomsfastmath/bit/fp_div_2d.c\ + tomsfastmath/bit/fp_lshd.c\ + tomsfastmath/bit/fp_mod_2d.c\ + tomsfastmath/bit/fp_rshd.c\ + tomsfastmath/divide/fp_div.c\ + tomsfastmath/divide/fp_div_d.c\ + tomsfastmath/divide/fp_mod.c\ + tomsfastmath/divide/fp_mod_d.c\ + tomsfastmath/exptmod/fp_2expt.c\ + tomsfastmath/exptmod/fp_exptmod.c\ + tomsfastmath/misc/fp_ident.c\ + tomsfastmath/misc/fp_set.c\ + tomsfastmath/mont/fp_montgomery_calc_normalization.c\ + tomsfastmath/mont/fp_montgomery_reduce.c\ + tomsfastmath/mont/fp_montgomery_setup.c\ + tomsfastmath/mul/fp_mul.c\ + tomsfastmath/mul/fp_mul_comba.c\ + tomsfastmath/mul/fp_mul_2.c\ + tomsfastmath/mul/fp_mul_2d.c\ + tomsfastmath/mul/fp_mul_comba_12.c\ + tomsfastmath/mul/fp_mul_comba_17.c\ + tomsfastmath/mul/fp_mul_comba_20.c\ + tomsfastmath/mul/fp_mul_comba_24.c\ + tomsfastmath/mul/fp_mul_comba_28.c\ + tomsfastmath/mul/fp_mul_comba_3.c\ + tomsfastmath/mul/fp_mul_comba_32.c\ + tomsfastmath/mul/fp_mul_comba_4.c\ + tomsfastmath/mul/fp_mul_comba_48.c\ + tomsfastmath/mul/fp_mul_comba_6.c\ + tomsfastmath/mul/fp_mul_comba_64.c\ + tomsfastmath/mul/fp_mul_comba_7.c\ + tomsfastmath/mul/fp_mul_comba_8.c\ + tomsfastmath/mul/fp_mul_comba_9.c\ + tomsfastmath/mul/fp_mul_comba_small_set.c\ + tomsfastmath/mul/fp_mul_d.c\ + tomsfastmath/mul/fp_mulmod.c\ + tomsfastmath/numtheory/fp_invmod.c\ + tomsfastmath/sqr/fp_sqr.c\ + tomsfastmath/sqr/fp_sqr_comba_12.c\ + tomsfastmath/sqr/fp_sqr_comba_17.c\ + tomsfastmath/sqr/fp_sqr_comba_20.c\ + tomsfastmath/sqr/fp_sqr_comba_24.c\ + tomsfastmath/sqr/fp_sqr_comba_28.c\ + tomsfastmath/sqr/fp_sqr_comba_3.c\ + tomsfastmath/sqr/fp_sqr_comba_32.c\ + tomsfastmath/sqr/fp_sqr_comba_4.c\ + tomsfastmath/sqr/fp_sqr_comba_48.c\ + tomsfastmath/sqr/fp_sqr_comba_6.c\ + tomsfastmath/sqr/fp_sqr_comba_64.c\ + tomsfastmath/sqr/fp_sqr_comba_7.c\ + tomsfastmath/sqr/fp_sqr_comba_8.c\ + tomsfastmath/sqr/fp_sqr_comba_9.c\ + tomsfastmath/sqr/fp_sqr_comba_generic.c\ + tomsfastmath/sqr/fp_sqr_comba_small_set.c\ + tomsfastmath/sqr/fp_sqrmod.c + +.PHONY2: version.h.tmp +version.c: version.h +version.h: version.h.tmp + $(AM_V_GEN) if test -f version.h.static; then\ + cp version.h.static version.h;\ + elif ! diff $@ version.h.tmp >/dev/null 2>/dev/null; then\ + cp version.h.tmp $@;\ + fi + +version.h.tmp: + $(AM_V_GEN) test -f version.h || touch version.h;\ + rm -f $@;\ + REVISION="$$(LANG=C git --git-dir "$(top_srcdir)"/.git describe --always 2>/dev/null || echo "exported")";\ + if test "$$REVISION" = "exported"; then\ + REVISION="";\ + fi;\ + if test -n "$$REVISION"; then\ + echo "#define REPO_VERSION \"devel-$$REVISION\"" >> $@;\ + else\ + touch version.h.tmp;\ + fi + +lib_LTLIBRARIES += libclamav.la +noinst_LTLIBRARIES = libclamav_internal_utils.la libclamav_nocxx.la +EXTRA_DIST += regex/engine.c tomsfastmath/sqr/fp_sqr_comba.c tomsfastmath/mul/fp_mul_comba.c libclamav.map libclamav_main.c \ + jsparse/generated/operators.h jsparse/generated/keywords.h jsparse/future_reserved_words.list\ + jsparse/keywords.list jsparse/special_keywords.list jsparse/operators.gperf version.h.in +COMMON_CLEANFILES+=version.h version.h.tmp *.gcda *.gcno + +BUILT_SOURCES = yara_grammar.h + +if MAINTAINER_MODE +BUILT_SOURCES += jsparse/generated/operators.h jsparse/generated/keywords.h jsparse-keywords.gperf + +GPERF_FLAGS=-E -t -L ANSI-C -C -F ', TOK_ERROR' -c + +jsparse-keywords.gperf: jsparse/keywords.list jsparse/future_reserved_words.list jsparse/special_keywords.list + echo -e "struct keyword { const char *name; int val; };\n%%" >keywords-g-tmp + for i in `cat @srcdir@/jsparse/keywords.list`; do j=`echo $$i |tr \[a-z\] \[A-Z\]`; echo "$$i, TOK_$$j" >>keywords-g-tmp; done + for i in `cat @srcdir@/jsparse/future_reserved_words.list`; do echo "$$i, TOK_FUTURE_RESERVED_WORD" >>keywords-g-tmp; done + cat @srcdir@/jsparse/special_keywords.list >>keywords-g-tmp + mv keywords-g-tmp $@ + +jsparse/generated/operators.h: jsparse/operators.gperf + $(GPERF) $(GPERF_FLAGS) -H op_hash -N in_op_set -W oplist $< >operators-tmp-g + grep -v '^#line' operators-tmp + rm operators-tmp-g + mv operators-tmp @srcdir@/jsparse/generated/operators.h + +jsparse/generated/keywords.h: jsparse-keywords.gperf + $(GPERF) $(GPERF_FLAGS) $< >keywords-tmp-g + grep -v '^#line' keywords-tmp + rm keywords-tmp-g + mv keywords-tmp @srcdir@/jsparse/generated/keywords.h + +CLEANFILES=$(COMMON_CLEANFILES) @srcdir@/jsparse/generated/operators.h @srcdir@/jsparse/generated/keywords.h +else +CLEANFILES=$(COMMON_CLEANFILES) +endif diff --git a/clamscan/libclamav/Makefile.in b/clamscan/libclamav/Makefile.in new file mode 100644 index 0000000..f2811d4 --- /dev/null +++ b/clamscan/libclamav/Makefile.in @@ -0,0 +1,5298 @@ +# Makefile.in generated by automake 1.15.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2017 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. +# Copyright (C) 2007-2013 Sourcefire, Inc. +# Copyright (C) 2002-2007 Tomasz Kojm +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. + + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +@ENABLE_UNRAR_TRUE@am__append_1 = -DWARN_DLOPEN_FAIL +@ENABLE_UNRAR_TRUE@@VERSIONSCRIPT_TRUE@am__append_2 = -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamunrar/libclamunrar.map +@ENABLE_UNRAR_TRUE@am__append_3 = libclamunrar.la \ +@ENABLE_UNRAR_TRUE@ libclamunrar_iface.la +@ENABLE_UNRAR_TRUE@am__append_4 = \ +@ENABLE_UNRAR_TRUE@ @top_srcdir@/libclamunrar/libclamunrar.map \ +@ENABLE_UNRAR_TRUE@ @top_srcdir@/libclamunrar_iface/libclamunrar_iface.map +@ENABLE_UNRAR_TRUE@@VERSIONSCRIPT_TRUE@am__append_5 = -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamunrar_iface/libclamunrar_iface.map +@USE_INTERNAL_MSPACK_TRUE@am__append_6 = libclammspack.la +@ENABLE_LLVM_TRUE@am__append_7 = c++ +@VERSIONSCRIPT_TRUE@am__append_8 = -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclamav/libclamav.map +@ENABLE_YARA_TRUE@am__append_9 = yara_arena.c \ +@ENABLE_YARA_TRUE@ yara_arena.h \ +@ENABLE_YARA_TRUE@ yara_compiler.c \ +@ENABLE_YARA_TRUE@ yara_compiler.h \ +@ENABLE_YARA_TRUE@ yara_exec.c \ +@ENABLE_YARA_TRUE@ yara_exec.h \ +@ENABLE_YARA_TRUE@ yara_hash.c \ +@ENABLE_YARA_TRUE@ yara_hash.h \ +@ENABLE_YARA_TRUE@ yara_grammar.y \ +@ENABLE_YARA_TRUE@ yara_lexer.l \ +@ENABLE_YARA_TRUE@ yara_lexer.h \ +@ENABLE_YARA_TRUE@ yara_parser.c \ +@ENABLE_YARA_TRUE@ yara_parser.h \ +@ENABLE_YARA_TRUE@ yara_clam.h + +@MAINTAINER_MODE_TRUE@am__append_10 = jsparse/generated/operators.h jsparse/generated/keywords.h jsparse-keywords.gperf +subdir = libclamav +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \ + $(top_srcdir)/m4/ax_check_uname_syscall.m4 \ + $(top_srcdir)/m4/fdpassing.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/lib-prelude.m4 $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/llvm.m4 $(top_srcdir)/m4/ltargz.m4 \ + $(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mmap_private.m4 $(top_srcdir)/m4/resolv.m4 \ + $(top_srcdir)/m4/reorganization/version.m4 \ + $(top_srcdir)/m4/reorganization/libclamav-only.m4 \ + $(top_srcdir)/m4/reorganization/build_tools.m4 \ + $(top_srcdir)/m4/reorganization/headers.m4 \ + $(top_srcdir)/m4/reorganization/c_options.m4 \ + $(top_srcdir)/m4/reorganization/compiler_checks.m4 \ + $(top_srcdir)/m4/reorganization/linker_checks.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/fuzz.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/functions.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/mpool.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/unit_tests.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/coverage.m4 \ + $(top_srcdir)/m4/reorganization/libs/xml.m4 \ + $(top_srcdir)/m4/reorganization/libs/openssl.m4 \ + $(top_srcdir)/m4/reorganization/libs/json.m4 \ + $(top_srcdir)/m4/reorganization/libs/pcre.m4 \ + $(top_srcdir)/m4/reorganization/libs/libmspack.m4 \ + $(top_srcdir)/m4/reorganization/libs/libz.m4 \ + $(top_srcdir)/m4/reorganization/libs/bzip.m4 \ + $(top_srcdir)/m4/reorganization/libs/unrar.m4 \ + $(top_srcdir)/m4/reorganization/libs/systemd.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/ipv6.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/dns.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/fanotify.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/setpgrp.m4 \ + $(top_srcdir)/m4/reorganization/milter/enable.m4 \ + $(top_srcdir)/m4/reorganization/libs/iconv_check.m4 \ + $(top_srcdir)/m4/reorganization/libs/iconv.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/pthreads.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/reentrant.m4 \ + $(top_srcdir)/m4/reorganization/utility_checks/id.m4 \ + $(top_srcdir)/m4/reorganization/utility_checks/yp.m4 \ + $(top_srcdir)/m4/reorganization/usergroup.m4 \ + $(top_srcdir)/m4/reorganization/debug.m4 \ + $(top_srcdir)/m4/reorganization/customversion.m4 \ + $(top_srcdir)/m4/reorganization/nocache.m4 \ + $(top_srcdir)/m4/reorganization/dns.m4 \ + $(top_srcdir)/m4/reorganization/bigstack.m4 \ + $(top_srcdir)/m4/reorganization/dbdir.m4 \ + $(top_srcdir)/m4/reorganization/cfgdir.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/in_port_t.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/in_addr_t.m4 \ + $(top_srcdir)/m4/reorganization/os_checks.m4 \ + $(top_srcdir)/m4/reorganization/milter/check.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/pthread_02.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/ctime.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/socklen_t.m4 \ + $(top_srcdir)/m4/reorganization/clamav_user.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/compiler_attribs.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/select.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/stat64.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/shift.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/features.m4 \ + $(top_srcdir)/m4/reorganization/clamdtop.m4 \ + $(top_srcdir)/m4/reorganization/distcheck.m4 \ + $(top_srcdir)/m4/reorganization/llvm.m4 \ + $(top_srcdir)/libclamav/c++/m4/llvm-opts.m4 \ + $(top_srcdir)/m4/reorganization/sha_collect.m4 \ + $(top_srcdir)/m4/reorganization/yara.m4 \ + $(top_srcdir)/m4/reorganization/code_checks/fts.m4 \ + $(top_srcdir)/m4/reorganization/prelude.m4 \ + $(top_srcdir)/m4/reorganization/bsd.m4 \ + $(top_srcdir)/m4/reorganization/clamonacc.m4 \ + $(top_srcdir)/m4/reorganization/libs/curl.m4 \ + $(top_srcdir)/m4/reorganization/substitutions.m4 \ + $(top_srcdir)/m4/reorganization/strni.m4 \ + $(top_srcdir)/m4/reorganization/types.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/clamav-config.h \ + $(top_builddir)/libclammspack/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" +LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +@ENABLE_UNRAR_TRUE@am__DEPENDENCIES_2 = libclamunrar_iface.la +@USE_INTERNAL_MSPACK_FALSE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) +@ENABLE_LLVM_FALSE@am__DEPENDENCIES_4 = libclamav_nocxx.la +@ENABLE_LLVM_TRUE@am__DEPENDENCIES_4 = c++/libclamavcxx.la +am__libclamav_la_SOURCES_DIST = matcher-ac.c matcher-ac.h matcher-bm.c \ + matcher-bm.h matcher-hash.c matcher-hash.h matcher.c matcher.h \ + others.c others.h readdb.c readdb.h cvd.c cvd.h dsig.c dsig.h \ + scanners.c scanners.h textdet.c textdet.h filetypes.c \ + filetypes.h filetypes_int.h rtf.c rtf.h blob.c blob.h mbox.c \ + mbox.h message.c message.h table.c table.h text.c text.h \ + ole2_extract.c ole2_extract.h vba_extract.c vba_extract.h \ + xlm_extract.c xlm_extract.h msexpand.c msexpand.h pe.c pe.h \ + pe_icons.c pe_icons.h pe_structs.h disasm.c disasm.h \ + disasm-common.h disasmpriv.h upx.c upx.h htmlnorm.c htmlnorm.h \ + libmspack.c libmspack.h rebuildpe.c rebuildpe.h petite.c \ + petite.h wwunpack.c wwunpack.h unsp.c unsp.h aspack.c aspack.h \ + packlibs.c packlibs.h fsg.c fsg.h mew.c mew.h upack.c upack.h \ + line.c line.h untar.c untar.h unzip.c unzip.h ooxml.c ooxml.h \ + inflate64.c inflate64.h inffixed64.h inflate64_priv.h \ + special.c special.h binhex.c binhex.h is_tar.c is_tar.h tnef.c \ + tnef.h autoit.c autoit.h unarj.c unarj.h nsis/bzlib.c \ + nsis/bzlib_private.h nsis/nsis_bzlib.h nsis/nulsft.c \ + nsis/nulsft.h nsis/infblock.c nsis/nsis_zconf.h \ + nsis/nsis_zlib.h nsis/nsis_zutil.h pdf.c pdf.h pdfng.c \ + pdfdecode.c pdfdecode.h spin.c spin.h yc.c yc.h elf.c elf.h \ + execs.h execs.c sis.c sis.h uuencode.c uuencode.h phishcheck.c \ + phishcheck.h phish_domaincheck_db.c phish_domaincheck_db.h \ + phish_whitelist.c phish_whitelist.h iana_cctld.h iana_tld.h \ + regex_list.c regex_list.h regex_suffix.c regex_suffix.h \ + entconv.c entconv.h entitylist.h encoding_aliases.h hashtab.c \ + hashtab.h dconf.c dconf.h lzma_iface.c lzma_iface.h 7z_iface.c \ + 7z_iface.h 7z/7z.h 7z/7zAlloc.c 7z/7zAlloc.h 7z/7zBuf.c \ + 7z/7zBuf.h 7z/7zBuf2.c 7z/7zCrc.c 7z/7zCrc.h 7z/7zDec.c \ + 7z/7zFile.c 7z/7zFile.h 7z/7zIn.c 7z/7zStream.c 7z/7zVersion.h \ + 7z/Bcj2.c 7z/Bcj2.h 7z/Bra.c 7z/Bra.h 7z/Bra86.c 7z/CpuArch.h \ + 7z/Lzma2Dec.c 7z/Lzma2Dec.h 7z/LzmaDec.c 7z/LzmaDec.h \ + 7z/Ppmd.h 7z/Ppmd7.c 7z/Ppmd7.h 7z/Ppmd7Dec.c 7z/Types.h \ + 7z/Xz.c 7z/Xz.h 7z/XzCrc64.c 7z/XzCrc64.h 7z/XzDec.c 7z/XzIn.c \ + 7z/Delta.c 7z/Delta.h 7z/Alloc.h 7z/BraIA64.c 7z/CpuArch.c \ + 7z/7zCrcOpt.c 7z/RotateDefs.h explode.c explode.h textnorm.c \ + textnorm.h dlp.c dlp.h jsparse/js-norm.c jsparse/js-norm.h \ + jsparse/lexglobal.h jsparse/textbuf.h uniq.c uniq.h version.c \ + version.h mpool.c mpool.h filtering.h filtering.c fmap.c \ + fmap.h perflogging.c perflogging.h default.h bytecode.c \ + bytecode.h bytecode_vm.c bytecode_priv.h clambc.h cpio.c \ + cpio.h macho.c macho.h ishield.c ishield.h type_desc.h \ + bcfeatures.h bytecode_api.c bytecode_api_decl.c bytecode_api.h \ + bytecode_api_impl.h bytecode_hooks.h cache.c cache.h \ + bytecode_detect.c bytecode_detect.h builtin_bytecodes.h \ + events.c events.h adc.c adc.h dmg.c dmg.h xar.c xar.h xdp.c \ + xdp.h mbr.c mbr.h gpt.c gpt.h apm.c apm.h \ + partition_intersection.c partition_intersection.h json_api.c \ + json_api.h xz_iface.c xz_iface.h sf_base64decode.c \ + sf_base64decode.h hfsplus.c hfsplus.h swf.c swf.h gif.c gif.h \ + jpeg.c jpeg.h png.c png.h iso9660.c iso9660.h arc4.c arc4.h \ + rijndael.c rijndael.h crtmgr.c crtmgr.h asn1.c asn1.h fpu.c \ + fpu.h stats.c stats.h www.c www.h stats_json.c stats_json.h \ + hostid_internal.c hostid_internal.h openioc.c openioc.h \ + msdoc.c msdoc.h matcher-pcre.c matcher-pcre.h regex_pcre.c \ + regex_pcre.h msxml.c msxml.h msxml_parser.c msxml_parser.h \ + tiff.c tiff.h hwp.c hwp.h lzw/lzwdec.c lzw/lzwdec.h \ + matcher-byte-comp.c matcher-byte-comp.h egg.c egg.h queue.h \ + yara_arena.c yara_arena.h yara_compiler.c yara_compiler.h \ + yara_exec.c yara_exec.h yara_hash.c yara_hash.h yara_grammar.y \ + yara_lexer.l yara_lexer.h yara_parser.c yara_parser.h \ + yara_clam.h bignum.h bignum_fast.h \ + tomsfastmath/addsub/fp_add.c tomsfastmath/addsub/fp_add_d.c \ + tomsfastmath/addsub/fp_addmod.c tomsfastmath/addsub/fp_cmp.c \ + tomsfastmath/addsub/fp_cmp_d.c \ + tomsfastmath/addsub/fp_cmp_mag.c tomsfastmath/addsub/fp_sub.c \ + tomsfastmath/addsub/fp_sub_d.c tomsfastmath/addsub/fp_submod.c \ + tomsfastmath/addsub/s_fp_add.c tomsfastmath/addsub/s_fp_sub.c \ + tomsfastmath/bin/fp_radix_size.c \ + tomsfastmath/bin/fp_read_radix.c \ + tomsfastmath/bin/fp_read_signed_bin.c \ + tomsfastmath/bin/fp_read_unsigned_bin.c \ + tomsfastmath/bin/fp_reverse.c tomsfastmath/bin/fp_s_rmap.c \ + tomsfastmath/bin/fp_signed_bin_size.c \ + tomsfastmath/bin/fp_to_signed_bin.c \ + tomsfastmath/bin/fp_to_unsigned_bin.c \ + tomsfastmath/bin/fp_toradix.c tomsfastmath/bin/fp_toradix_n.c \ + tomsfastmath/bin/fp_unsigned_bin_size.c \ + tomsfastmath/bit/fp_cnt_lsb.c tomsfastmath/bit/fp_count_bits.c \ + tomsfastmath/bit/fp_div_2.c tomsfastmath/bit/fp_div_2d.c \ + tomsfastmath/bit/fp_lshd.c tomsfastmath/bit/fp_mod_2d.c \ + tomsfastmath/bit/fp_rshd.c tomsfastmath/divide/fp_div.c \ + tomsfastmath/divide/fp_div_d.c tomsfastmath/divide/fp_mod.c \ + tomsfastmath/divide/fp_mod_d.c tomsfastmath/exptmod/fp_2expt.c \ + tomsfastmath/exptmod/fp_exptmod.c tomsfastmath/misc/fp_ident.c \ + tomsfastmath/misc/fp_set.c \ + tomsfastmath/mont/fp_montgomery_calc_normalization.c \ + tomsfastmath/mont/fp_montgomery_reduce.c \ + tomsfastmath/mont/fp_montgomery_setup.c \ + tomsfastmath/mul/fp_mul.c tomsfastmath/mul/fp_mul_comba.c \ + tomsfastmath/mul/fp_mul_2.c tomsfastmath/mul/fp_mul_2d.c \ + tomsfastmath/mul/fp_mul_comba_12.c \ + tomsfastmath/mul/fp_mul_comba_17.c \ + tomsfastmath/mul/fp_mul_comba_20.c \ + tomsfastmath/mul/fp_mul_comba_24.c \ + tomsfastmath/mul/fp_mul_comba_28.c \ + tomsfastmath/mul/fp_mul_comba_3.c \ + tomsfastmath/mul/fp_mul_comba_32.c \ + tomsfastmath/mul/fp_mul_comba_4.c \ + tomsfastmath/mul/fp_mul_comba_48.c \ + tomsfastmath/mul/fp_mul_comba_6.c \ + tomsfastmath/mul/fp_mul_comba_64.c \ + tomsfastmath/mul/fp_mul_comba_7.c \ + tomsfastmath/mul/fp_mul_comba_8.c \ + tomsfastmath/mul/fp_mul_comba_9.c \ + tomsfastmath/mul/fp_mul_comba_small_set.c \ + tomsfastmath/mul/fp_mul_d.c tomsfastmath/mul/fp_mulmod.c \ + tomsfastmath/numtheory/fp_invmod.c tomsfastmath/sqr/fp_sqr.c \ + tomsfastmath/sqr/fp_sqr_comba_12.c \ + tomsfastmath/sqr/fp_sqr_comba_17.c \ + tomsfastmath/sqr/fp_sqr_comba_20.c \ + tomsfastmath/sqr/fp_sqr_comba_24.c \ + tomsfastmath/sqr/fp_sqr_comba_28.c \ + tomsfastmath/sqr/fp_sqr_comba_3.c \ + tomsfastmath/sqr/fp_sqr_comba_32.c \ + tomsfastmath/sqr/fp_sqr_comba_4.c \ + tomsfastmath/sqr/fp_sqr_comba_48.c \ + tomsfastmath/sqr/fp_sqr_comba_6.c \ + tomsfastmath/sqr/fp_sqr_comba_64.c \ + tomsfastmath/sqr/fp_sqr_comba_7.c \ + tomsfastmath/sqr/fp_sqr_comba_8.c \ + tomsfastmath/sqr/fp_sqr_comba_9.c \ + tomsfastmath/sqr/fp_sqr_comba_generic.c \ + tomsfastmath/sqr/fp_sqr_comba_small_set.c \ + tomsfastmath/sqr/fp_sqrmod.c +am__dirstamp = $(am__leading_dot)dirstamp +@ENABLE_YARA_TRUE@am__objects_1 = libclamav_la-yara_arena.lo \ +@ENABLE_YARA_TRUE@ libclamav_la-yara_compiler.lo \ +@ENABLE_YARA_TRUE@ libclamav_la-yara_exec.lo \ +@ENABLE_YARA_TRUE@ libclamav_la-yara_hash.lo \ +@ENABLE_YARA_TRUE@ libclamav_la-yara_grammar.lo \ +@ENABLE_YARA_TRUE@ libclamav_la-yara_lexer.lo \ +@ENABLE_YARA_TRUE@ libclamav_la-yara_parser.lo +am_libclamav_la_OBJECTS = libclamav_la-matcher-ac.lo \ + libclamav_la-matcher-bm.lo libclamav_la-matcher-hash.lo \ + libclamav_la-matcher.lo libclamav_la-others.lo \ + libclamav_la-readdb.lo libclamav_la-cvd.lo \ + libclamav_la-dsig.lo libclamav_la-scanners.lo \ + libclamav_la-textdet.lo libclamav_la-filetypes.lo \ + libclamav_la-rtf.lo libclamav_la-blob.lo libclamav_la-mbox.lo \ + libclamav_la-message.lo libclamav_la-table.lo \ + libclamav_la-text.lo libclamav_la-ole2_extract.lo \ + libclamav_la-vba_extract.lo libclamav_la-xlm_extract.lo \ + libclamav_la-msexpand.lo libclamav_la-pe.lo \ + libclamav_la-pe_icons.lo libclamav_la-disasm.lo \ + libclamav_la-upx.lo libclamav_la-htmlnorm.lo \ + libclamav_la-libmspack.lo libclamav_la-rebuildpe.lo \ + libclamav_la-petite.lo libclamav_la-wwunpack.lo \ + libclamav_la-unsp.lo libclamav_la-aspack.lo \ + libclamav_la-packlibs.lo libclamav_la-fsg.lo \ + libclamav_la-mew.lo libclamav_la-upack.lo libclamav_la-line.lo \ + libclamav_la-untar.lo libclamav_la-unzip.lo \ + libclamav_la-ooxml.lo libclamav_la-inflate64.lo \ + libclamav_la-special.lo libclamav_la-binhex.lo \ + libclamav_la-is_tar.lo libclamav_la-tnef.lo \ + libclamav_la-autoit.lo libclamav_la-unarj.lo \ + nsis/libclamav_la-bzlib.lo nsis/libclamav_la-nulsft.lo \ + nsis/libclamav_la-infblock.lo libclamav_la-pdf.lo \ + libclamav_la-pdfng.lo libclamav_la-pdfdecode.lo \ + libclamav_la-spin.lo libclamav_la-yc.lo libclamav_la-elf.lo \ + libclamav_la-execs.lo libclamav_la-sis.lo \ + libclamav_la-uuencode.lo libclamav_la-phishcheck.lo \ + libclamav_la-phish_domaincheck_db.lo \ + libclamav_la-phish_whitelist.lo libclamav_la-regex_list.lo \ + libclamav_la-regex_suffix.lo libclamav_la-entconv.lo \ + libclamav_la-hashtab.lo libclamav_la-dconf.lo \ + libclamav_la-lzma_iface.lo libclamav_la-7z_iface.lo \ + 7z/libclamav_la-7zAlloc.lo 7z/libclamav_la-7zBuf.lo \ + 7z/libclamav_la-7zBuf2.lo 7z/libclamav_la-7zCrc.lo \ + 7z/libclamav_la-7zDec.lo 7z/libclamav_la-7zFile.lo \ + 7z/libclamav_la-7zIn.lo 7z/libclamav_la-7zStream.lo \ + 7z/libclamav_la-Bcj2.lo 7z/libclamav_la-Bra.lo \ + 7z/libclamav_la-Bra86.lo 7z/libclamav_la-Lzma2Dec.lo \ + 7z/libclamav_la-LzmaDec.lo 7z/libclamav_la-Ppmd7.lo \ + 7z/libclamav_la-Ppmd7Dec.lo 7z/libclamav_la-Xz.lo \ + 7z/libclamav_la-XzCrc64.lo 7z/libclamav_la-XzDec.lo \ + 7z/libclamav_la-XzIn.lo 7z/libclamav_la-Delta.lo \ + 7z/libclamav_la-BraIA64.lo 7z/libclamav_la-CpuArch.lo \ + 7z/libclamav_la-7zCrcOpt.lo libclamav_la-explode.lo \ + libclamav_la-textnorm.lo libclamav_la-dlp.lo \ + jsparse/libclamav_la-js-norm.lo libclamav_la-uniq.lo \ + libclamav_la-version.lo libclamav_la-mpool.lo \ + libclamav_la-filtering.lo libclamav_la-fmap.lo \ + libclamav_la-perflogging.lo libclamav_la-bytecode.lo \ + libclamav_la-bytecode_vm.lo libclamav_la-cpio.lo \ + libclamav_la-macho.lo libclamav_la-ishield.lo \ + libclamav_la-bytecode_api.lo libclamav_la-bytecode_api_decl.lo \ + libclamav_la-cache.lo libclamav_la-bytecode_detect.lo \ + libclamav_la-events.lo libclamav_la-adc.lo libclamav_la-dmg.lo \ + libclamav_la-xar.lo libclamav_la-xdp.lo libclamav_la-mbr.lo \ + libclamav_la-gpt.lo libclamav_la-apm.lo \ + libclamav_la-partition_intersection.lo \ + libclamav_la-json_api.lo libclamav_la-xz_iface.lo \ + libclamav_la-sf_base64decode.lo libclamav_la-hfsplus.lo \ + libclamav_la-swf.lo libclamav_la-gif.lo libclamav_la-jpeg.lo \ + libclamav_la-png.lo libclamav_la-iso9660.lo \ + libclamav_la-arc4.lo libclamav_la-rijndael.lo \ + libclamav_la-crtmgr.lo libclamav_la-asn1.lo \ + libclamav_la-fpu.lo libclamav_la-stats.lo libclamav_la-www.lo \ + libclamav_la-stats_json.lo libclamav_la-hostid_internal.lo \ + libclamav_la-openioc.lo libclamav_la-msdoc.lo \ + libclamav_la-matcher-pcre.lo libclamav_la-regex_pcre.lo \ + libclamav_la-msxml.lo libclamav_la-msxml_parser.lo \ + libclamav_la-tiff.lo libclamav_la-hwp.lo \ + lzw/libclamav_la-lzwdec.lo libclamav_la-matcher-byte-comp.lo \ + libclamav_la-egg.lo $(am__objects_1) \ + tomsfastmath/addsub/libclamav_la-fp_add.lo \ + tomsfastmath/addsub/libclamav_la-fp_add_d.lo \ + tomsfastmath/addsub/libclamav_la-fp_addmod.lo \ + tomsfastmath/addsub/libclamav_la-fp_cmp.lo \ + tomsfastmath/addsub/libclamav_la-fp_cmp_d.lo \ + tomsfastmath/addsub/libclamav_la-fp_cmp_mag.lo \ + tomsfastmath/addsub/libclamav_la-fp_sub.lo \ + tomsfastmath/addsub/libclamav_la-fp_sub_d.lo \ + tomsfastmath/addsub/libclamav_la-fp_submod.lo \ + tomsfastmath/addsub/libclamav_la-s_fp_add.lo \ + tomsfastmath/addsub/libclamav_la-s_fp_sub.lo \ + tomsfastmath/bin/libclamav_la-fp_radix_size.lo \ + tomsfastmath/bin/libclamav_la-fp_read_radix.lo \ + tomsfastmath/bin/libclamav_la-fp_read_signed_bin.lo \ + tomsfastmath/bin/libclamav_la-fp_read_unsigned_bin.lo \ + tomsfastmath/bin/libclamav_la-fp_reverse.lo \ + tomsfastmath/bin/libclamav_la-fp_s_rmap.lo \ + tomsfastmath/bin/libclamav_la-fp_signed_bin_size.lo \ + tomsfastmath/bin/libclamav_la-fp_to_signed_bin.lo \ + tomsfastmath/bin/libclamav_la-fp_to_unsigned_bin.lo \ + tomsfastmath/bin/libclamav_la-fp_toradix.lo \ + tomsfastmath/bin/libclamav_la-fp_toradix_n.lo \ + tomsfastmath/bin/libclamav_la-fp_unsigned_bin_size.lo \ + tomsfastmath/bit/libclamav_la-fp_cnt_lsb.lo \ + tomsfastmath/bit/libclamav_la-fp_count_bits.lo \ + tomsfastmath/bit/libclamav_la-fp_div_2.lo \ + tomsfastmath/bit/libclamav_la-fp_div_2d.lo \ + tomsfastmath/bit/libclamav_la-fp_lshd.lo \ + tomsfastmath/bit/libclamav_la-fp_mod_2d.lo \ + tomsfastmath/bit/libclamav_la-fp_rshd.lo \ + tomsfastmath/divide/libclamav_la-fp_div.lo \ + tomsfastmath/divide/libclamav_la-fp_div_d.lo \ + tomsfastmath/divide/libclamav_la-fp_mod.lo \ + tomsfastmath/divide/libclamav_la-fp_mod_d.lo \ + tomsfastmath/exptmod/libclamav_la-fp_2expt.lo \ + tomsfastmath/exptmod/libclamav_la-fp_exptmod.lo \ + tomsfastmath/misc/libclamav_la-fp_ident.lo \ + tomsfastmath/misc/libclamav_la-fp_set.lo \ + tomsfastmath/mont/libclamav_la-fp_montgomery_calc_normalization.lo \ + tomsfastmath/mont/libclamav_la-fp_montgomery_reduce.lo \ + tomsfastmath/mont/libclamav_la-fp_montgomery_setup.lo \ + tomsfastmath/mul/libclamav_la-fp_mul.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_2.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_2d.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_12.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_17.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_20.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_24.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_28.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_3.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_32.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_4.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_48.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_6.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_64.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_7.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_8.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_9.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_comba_small_set.lo \ + tomsfastmath/mul/libclamav_la-fp_mul_d.lo \ + tomsfastmath/mul/libclamav_la-fp_mulmod.lo \ + tomsfastmath/numtheory/libclamav_la-fp_invmod.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_12.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_17.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_20.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_24.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_28.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_3.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_32.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_4.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_48.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_6.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_64.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_7.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_8.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_9.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_generic.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqr_comba_small_set.lo \ + tomsfastmath/sqr/libclamav_la-fp_sqrmod.lo +libclamav_la_OBJECTS = $(am_libclamav_la_OBJECTS) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +libclamav_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libclamav_la_CFLAGS) \ + $(CFLAGS) $(libclamav_la_LDFLAGS) $(LDFLAGS) -o $@ +libclamav_internal_utils_la_DEPENDENCIES = +am_libclamav_internal_utils_la_OBJECTS = \ + libclamav_internal_utils_la-conv.lo \ + libclamav_internal_utils_la-crypto.lo \ + libclamav_internal_utils_la-iowrap.lo \ + libclamav_internal_utils_la-others_common.lo \ + libclamav_internal_utils_la-qsort.lo \ + regex/libclamav_internal_utils_la-regcomp.lo \ + regex/libclamav_internal_utils_la-regerror.lo \ + regex/libclamav_internal_utils_la-regexec.lo \ + regex/libclamav_internal_utils_la-regfree.lo \ + regex/libclamav_internal_utils_la-strlcpy.lo \ + libclamav_internal_utils_la-str.lo \ + libclamav_internal_utils_la-strlcat.lo +libclamav_internal_utils_la_OBJECTS = \ + $(am_libclamav_internal_utils_la_OBJECTS) +libclamav_internal_utils_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) \ + $(libclamav_internal_utils_la_LDFLAGS) $(LDFLAGS) -o $@ +libclamav_nocxx_la_LIBADD = +am_libclamav_nocxx_la_OBJECTS = libclamav_nocxx_la-bytecode_nojit.lo +libclamav_nocxx_la_OBJECTS = $(am_libclamav_nocxx_la_OBJECTS) +libclamav_nocxx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libclamav_nocxx_la_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +libclammspack_la_LIBADD = +am__libclammspack_la_SOURCES_DIST = ../libclammspack/mspack/cab.h \ + ../libclammspack/mspack/cabc.c ../libclammspack/mspack/cabd.c \ + ../libclammspack/mspack/chm.h ../libclammspack/mspack/chmc.c \ + ../libclammspack/mspack/chmd.c ../libclammspack/mspack/crc32.c \ + ../libclammspack/mspack/crc32.h ../libclammspack/mspack/des.h \ + ../libclammspack/mspack/hlp.h ../libclammspack/mspack/hlpc.c \ + ../libclammspack/mspack/hlpd.c ../libclammspack/mspack/kwaj.h \ + ../libclammspack/mspack/kwajc.c \ + ../libclammspack/mspack/kwajd.c ../libclammspack/mspack/lit.h \ + ../libclammspack/mspack/litc.c ../libclammspack/mspack/litd.c \ + ../libclammspack/mspack/lzss.h ../libclammspack/mspack/lzssd.c \ + ../libclammspack/mspack/lzx.h ../libclammspack/mspack/lzxc.c \ + ../libclammspack/mspack/lzxd.c \ + ../libclammspack/mspack/mspack.h \ + ../libclammspack/mspack/mszip.h \ + ../libclammspack/mspack/mszipc.c \ + ../libclammspack/mspack/mszipd.c ../libclammspack/mspack/oab.h \ + ../libclammspack/mspack/oabc.c ../libclammspack/mspack/oabd.c \ + ../libclammspack/mspack/qtm.h ../libclammspack/mspack/qtmd.c \ + ../libclammspack/mspack/readbits.h \ + ../libclammspack/mspack/readhuff.h \ + ../libclammspack/mspack/sha.h ../libclammspack/mspack/system.c \ + ../libclammspack/mspack/system.h \ + ../libclammspack/mspack/szdd.h ../libclammspack/mspack/szddc.c \ + ../libclammspack/mspack/szddd.c +@USE_INTERNAL_MSPACK_TRUE@am_libclammspack_la_OBJECTS = ../libclammspack/mspack/libclammspack_la-cabc.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-cabd.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-chmc.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-chmd.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-crc32.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-hlpc.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-hlpd.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-kwajc.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-kwajd.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-litc.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-litd.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-lzssd.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-lzxc.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-lzxd.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-mszipc.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-mszipd.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-oabc.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-oabd.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-qtmd.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-system.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-szddc.lo \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/libclammspack_la-szddd.lo +libclammspack_la_OBJECTS = $(am_libclammspack_la_OBJECTS) +libclammspack_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(libclammspack_la_CFLAGS) $(CFLAGS) \ + $(libclammspack_la_LDFLAGS) $(LDFLAGS) -o $@ +@USE_INTERNAL_MSPACK_TRUE@am_libclammspack_la_rpath = -rpath $(libdir) +libclamunrar_la_LIBADD = +am__libclamunrar_la_SOURCES_DIST = ../libclamunrar/archive.cpp \ + ../libclamunrar/arcread.cpp ../libclamunrar/blake2s.cpp \ + ../libclamunrar/cmddata.cpp ../libclamunrar/consio.cpp \ + ../libclamunrar/crc.cpp ../libclamunrar/crypt.cpp \ + ../libclamunrar/dll.cpp ../libclamunrar/encname.cpp \ + ../libclamunrar/errhnd.cpp ../libclamunrar/extinfo.cpp \ + ../libclamunrar/extract.cpp ../libclamunrar/filcreat.cpp \ + ../libclamunrar/file.cpp ../libclamunrar/filefn.cpp \ + ../libclamunrar/filestr.cpp ../libclamunrar/find.cpp \ + ../libclamunrar/getbits.cpp ../libclamunrar/global.cpp \ + ../libclamunrar/hash.cpp ../libclamunrar/headers.cpp \ + ../libclamunrar/list.cpp ../libclamunrar/match.cpp \ + ../libclamunrar/options.cpp ../libclamunrar/pathfn.cpp \ + ../libclamunrar/qopen.cpp ../libclamunrar/rar.cpp \ + ../libclamunrar/rarvm.cpp ../libclamunrar/rawread.cpp \ + ../libclamunrar/rdwrfn.cpp ../libclamunrar/recvol.cpp \ + ../libclamunrar/resource.cpp ../libclamunrar/rijndael.cpp \ + ../libclamunrar/rs.cpp ../libclamunrar/rs16.cpp \ + ../libclamunrar/scantree.cpp ../libclamunrar/secpassword.cpp \ + ../libclamunrar/sha1.cpp ../libclamunrar/sha256.cpp \ + ../libclamunrar/smallfn.cpp ../libclamunrar/strfn.cpp \ + ../libclamunrar/strlist.cpp ../libclamunrar/system.cpp \ + ../libclamunrar/threadpool.cpp ../libclamunrar/timefn.cpp \ + ../libclamunrar/ui.cpp ../libclamunrar/unicode.cpp \ + ../libclamunrar/unpack.cpp ../libclamunrar/volume.cpp +@ENABLE_UNRAR_TRUE@am_libclamunrar_la_OBJECTS = \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-archive.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-arcread.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-blake2s.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-cmddata.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-consio.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-crc.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-crypt.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-dll.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-encname.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-errhnd.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-extinfo.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-extract.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-filcreat.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-file.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-filefn.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-filestr.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-find.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-getbits.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-global.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-hash.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-headers.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-list.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-match.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-options.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-pathfn.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-qopen.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-rar.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-rarvm.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-rawread.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-rdwrfn.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-recvol.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-resource.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-rijndael.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-rs.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-rs16.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-scantree.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-secpassword.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-sha1.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-sha256.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-smallfn.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-strfn.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-strlist.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-system.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-threadpool.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-timefn.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-ui.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-unicode.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-unpack.lo \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/libclamunrar_la-volume.lo +libclamunrar_la_OBJECTS = $(am_libclamunrar_la_OBJECTS) +libclamunrar_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) \ + $(libclamunrar_la_LDFLAGS) $(LDFLAGS) -o $@ +@ENABLE_UNRAR_TRUE@am_libclamunrar_la_rpath = -rpath $(libdir) +@ENABLE_UNRAR_TRUE@libclamunrar_iface_la_DEPENDENCIES = \ +@ENABLE_UNRAR_TRUE@ libclamunrar.la +am__libclamunrar_iface_la_SOURCES_DIST = \ + ../libclamunrar_iface/unrar_iface.cpp \ + ../libclamunrar_iface/unrar_iface.h +@ENABLE_UNRAR_TRUE@am_libclamunrar_iface_la_OBJECTS = ../libclamunrar_iface/libclamunrar_iface_la-unrar_iface.lo +libclamunrar_iface_la_OBJECTS = $(am_libclamunrar_iface_la_OBJECTS) +libclamunrar_iface_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ + $(libclamunrar_iface_la_CXXFLAGS) $(CXXFLAGS) \ + $(libclamunrar_iface_la_LDFLAGS) $(LDFLAGS) -o $@ +@ENABLE_UNRAR_TRUE@am_libclamunrar_iface_la_rpath = -rpath $(libdir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/libclammspack +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CXXFLAGS) $(CXXFLAGS) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) +am__v_CXX_0 = @echo " CXX " $@; +am__v_CXX_1 = +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) +am__v_CXXLD_0 = @echo " CXXLD " $@; +am__v_CXXLD_1 = +@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ || +LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) +LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) +AM_V_LEX = $(am__v_LEX_@AM_V@) +am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) +am__v_LEX_0 = @echo " LEX " $@; +am__v_LEX_1 = +YLWRAP = $(top_srcdir)/config/ylwrap +@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || +am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ + -e s/c++$$/h++/ -e s/c$$/h/ +YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) +LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) +AM_V_YACC = $(am__v_YACC_@AM_V@) +am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) +am__v_YACC_0 = @echo " YACC " $@; +am__v_YACC_1 = +SOURCES = $(libclamav_la_SOURCES) \ + $(libclamav_internal_utils_la_SOURCES) \ + $(libclamav_nocxx_la_SOURCES) $(libclammspack_la_SOURCES) \ + $(libclamunrar_la_SOURCES) $(libclamunrar_iface_la_SOURCES) +DIST_SOURCES = $(am__libclamav_la_SOURCES_DIST) \ + $(libclamav_internal_utils_la_SOURCES) \ + $(libclamav_nocxx_la_SOURCES) \ + $(am__libclammspack_la_SOURCES_DIST) \ + $(am__libclamunrar_la_SOURCES_DIST) \ + $(am__libclamunrar_iface_la_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +HEADERS = $(include_HEADERS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = c++ +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \ + $(top_srcdir)/config/ylwrap yara_grammar.c yara_grammar.h \ + yara_lexer.c +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BUILD_CONFIGURE_FLAGS = @BUILD_CONFIGURE_FLAGS@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFGDIR = @CFGDIR@ +CFLAGS = @CFLAGS@ +CHECK_CFLAGS = @CHECK_CFLAGS@ +CHECK_CPPFLAGS = @CHECK_CPPFLAGS@ +CHECK_LIBS = @CHECK_LIBS@ +CLAMAVGROUP = @CLAMAVGROUP@ +CLAMAVUSER = @CLAMAVUSER@ +CLAMAV_MILTER_CPPFLAGS = @CLAMAV_MILTER_CPPFLAGS@ +CLAMAV_MILTER_LIBS = @CLAMAV_MILTER_LIBS@ +CLAMBC_CPPFLAGS = @CLAMBC_CPPFLAGS@ +CLAMBC_LIBS = @CLAMBC_LIBS@ +CLAMCONF_CPPFLAGS = @CLAMCONF_CPPFLAGS@ +CLAMCONF_LIBS = @CLAMCONF_LIBS@ +CLAMDSCAN_CPPFLAGS = @CLAMDSCAN_CPPFLAGS@ +CLAMDSCAN_LIBS = @CLAMDSCAN_LIBS@ +CLAMDTOP_CPPFLAGS = @CLAMDTOP_CPPFLAGS@ +CLAMDTOP_LIBS = @CLAMDTOP_LIBS@ +CLAMD_CPPFLAGS = @CLAMD_CPPFLAGS@ +CLAMD_LIBS = @CLAMD_LIBS@ +CLAMMEM_CPPFLAGS = @CLAMMEM_CPPFLAGS@ +CLAMMEM_LIBS = @CLAMMEM_LIBS@ +CLAMONACC_CPPFLAGS = @CLAMONACC_CPPFLAGS@ +CLAMONACC_LIBS = @CLAMONACC_LIBS@ +CLAMSCAN_CPPFLAGS = @CLAMSCAN_CPPFLAGS@ +CLAMSCAN_LIBS = @CLAMSCAN_LIBS@ +CLAMSUBMIT_CFLAGS = @CLAMSUBMIT_CFLAGS@ +CLAMSUBMIT_LIBS = @CLAMSUBMIT_LIBS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CPPFLAGS = @CURL_CPPFLAGS@ +CURL_LDFLAGS = @CURL_LDFLAGS@ +CURL_LIBS = @CURL_LIBS@ +CURSES_CPPFLAGS = @CURSES_CPPFLAGS@ +CURSES_LIBS = @CURSES_LIBS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBDIR = @DBDIR@ +DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@ +DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@ +FRESHCLAM_LIBS = @FRESHCLAM_LIBS@ +GCOV = @GCOV@ +GENERATE_WARNING = @GENERATE_WARNING@ +GENHTML = @GENHTML@ +GETENT = @GETENT@ +GPERF = @GPERF@ +GREP = @GREP@ +HAVE_STRNI = @HAVE_STRNI@ +HAVE_YARA = @HAVE_YARA@ +INCLTDL = @INCLTDL@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT16_DEF = @INT16_DEF@ +INT32_DEF = @INT32_DEF@ +INT64_DEF = @INT64_DEF@ +INT8_DEF = @INT8_DEF@ +INT_TYPES_HEADER = @INT_TYPES_HEADER@ +JSON_CPPFLAGS = @JSON_CPPFLAGS@ +JSON_LDFLAGS = @JSON_LDFLAGS@ +JSON_LIBS = @JSON_LIBS@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBADD_DL = @LIBADD_DL@ +LIBADD_DLD_LINK = @LIBADD_DLD_LINK@ +LIBADD_DLOPEN = @LIBADD_DLOPEN@ +LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@ +LIBBZ2 = @LIBBZ2@ +LIBBZ2_PREFIX = @LIBBZ2_PREFIX@ +LIBCLAMAV_CPPFLAGS = @LIBCLAMAV_CPPFLAGS@ +LIBCLAMAV_LIBS = @LIBCLAMAV_LIBS@ +LIBCLAMAV_VERSION = @LIBCLAMAV_VERSION@ +LIBCLAMAV_VERSION_NUM = @LIBCLAMAV_VERSION_NUM@ +LIBCLAMSHARED_CPPFLAGS = @LIBCLAMSHARED_CPPFLAGS@ +LIBFRESHCLAM_VERSION = @LIBFRESHCLAM_VERSION@ +LIBFRESHCLAM_VERSION_NUM = @LIBFRESHCLAM_VERSION_NUM@ +LIBICONV = @LIBICONV@ +LIBLTDL = @LIBLTDL@ +LIBM = @LIBM@ +LIBMSPACK_CFLAGS = @LIBMSPACK_CFLAGS@ +LIBMSPACK_LIBS = @LIBMSPACK_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBPRELUDE_CFLAGS = @LIBPRELUDE_CFLAGS@ +LIBPRELUDE_CONFIG = @LIBPRELUDE_CONFIG@ +LIBPRELUDE_CONFIG_PREFIX = @LIBPRELUDE_CONFIG_PREFIX@ +LIBPRELUDE_LDFLAGS = @LIBPRELUDE_LDFLAGS@ +LIBPRELUDE_LIBS = @LIBPRELUDE_LIBS@ +LIBPRELUDE_PREFIX = @LIBPRELUDE_PREFIX@ +LIBPRELUDE_PTHREAD_CFLAGS = @LIBPRELUDE_PTHREAD_CFLAGS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTDLDEPS = @LTDLDEPS@ +LTDLINCL = @LTDLINCL@ +LTDLOPEN = @LTDLOPEN@ +LTLIBBZ2 = @LTLIBBZ2@ +LTLIBICONV = @LTLIBICONV@ +LTLIBOBJS = @LTLIBOBJS@ +LT_ARGZ_H = @LT_ARGZ_H@ +LT_CONFIG_H = @LT_CONFIG_H@ +LT_DLLOADERS = @LT_DLLOADERS@ +LT_DLPREOPEN = @LT_DLPREOPEN@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NCURSES_CFLAGS = @NCURSES_CFLAGS@ +NCURSES_LIBS = @NCURSES_LIBS@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PACKAGE_VERSION_NUM = @PACKAGE_VERSION_NUM@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCRE_CFLAGS = @PCRE_CFLAGS@ +PCRE_CPPFLAGS = @PCRE_CPPFLAGS@ +PCRE_LIBS = @PCRE_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SIGTOOL_CPPFLAGS = @SIGTOOL_CPPFLAGS@ +SSL_CPPFLAGS = @SSL_CPPFLAGS@ +SSL_LDFLAGS = @SSL_LDFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@ +SYSTEMD_LIBS = @SYSTEMD_LIBS@ +THREAD_LIBS = @THREAD_LIBS@ +TH_SAFE = @TH_SAFE@ +UINT16_DEF = @UINT16_DEF@ +UINT32_DEF = @UINT32_DEF@ +UINT64_DEF = @UINT64_DEF@ +UINT8_DEF = @UINT8_DEF@ +VERSION = @VERSION@ +VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@ +WERR_CFLAGS = @WERR_CFLAGS@ +WERR_CFLAGS_MILTER = @WERR_CFLAGS_MILTER@ +XML_CPPFLAGS = @XML_CPPFLAGS@ +XML_LIBS = @XML_LIBS@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +ZLIB_CFLAGS = @ZLIB_CFLAGS@ +ZLIB_LIBS = @ZLIB_LIBS@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_ct_OBJC = @ac_ct_OBJC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +curl_config = @curl_config@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +llvmconfig = @llvmconfig@ +localedir = @localedir@ +localstatedir = @localstatedir@ +ltdl_LIBOBJS = @ltdl_LIBOBJS@ +ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pcreconfig = @pcreconfig@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +subdirs = @subdirs@ +sys_symbol_underscore = @sys_symbol_underscore@ +sysconfdir = @sysconfdir@ +systemdsystemunitdir = @systemdsystemunitdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +xmlconfig = @xmlconfig@ +AM_YFLAGS = -d +AM_LFLAGS = -d +AM_CPPFLAGS = -I$(top_srcdir) -I@srcdir@/nsis $(LTDLINCL) \ + $(am__append_1) +AM_CFLAGS = @WERR_CFLAGS@ +lib_LTLIBRARIES = $(am__append_3) $(am__append_6) libclamav.la +COMMON_CLEANFILES = version.h version.h.tmp *.gcda *.gcno +EXTRA_DIST = c++/Makefile.nollvm.in $(am__append_4) regex/engine.c \ + tomsfastmath/sqr/fp_sqr_comba.c \ + tomsfastmath/mul/fp_mul_comba.c libclamav.map libclamav_main.c \ + jsparse/generated/operators.h jsparse/generated/keywords.h \ + jsparse/future_reserved_words.list jsparse/keywords.list \ + jsparse/special_keywords.list jsparse/operators.gperf \ + version.h.in +@ENABLE_UNRAR_TRUE@libclamunrar_la_CXXFLAGS = $(AM_CPPFLAGS) -DRARDLL -Wno-logical-op-parentheses -Wno-switch -Wno-dangling-else +@ENABLE_UNRAR_TRUE@libclamunrar_la_LDFLAGS = @TH_SAFE@ -version-info \ +@ENABLE_UNRAR_TRUE@ @LIBCLAMAV_VERSION@ -no-undefined \ +@ENABLE_UNRAR_TRUE@ $(am__append_2) +@ENABLE_UNRAR_TRUE@libclamunrar_la_SOURCES = \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/archive.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/arcread.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/blake2s.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/cmddata.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/consio.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/crc.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/crypt.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/dll.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/encname.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/errhnd.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/extinfo.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/extract.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/filcreat.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/file.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/filefn.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/filestr.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/find.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/getbits.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/global.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/hash.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/headers.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/list.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/match.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/options.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/pathfn.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/qopen.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/rar.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/rarvm.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/rawread.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/rdwrfn.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/recvol.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/resource.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/rijndael.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/rs.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/rs16.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/scantree.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/secpassword.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/sha1.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/sha256.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/smallfn.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/strfn.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/strlist.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/system.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/threadpool.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/timefn.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/ui.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/unicode.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/unpack.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar/volume.cpp + +@ENABLE_UNRAR_TRUE@libclamunrar_iface_la_CXXFLAGS = $(AM_CPPFLAGS) -I@top_srcdir@/libclamunrar +@ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LIBADD = libclamunrar.la +@ENABLE_UNRAR_TRUE@libclamunrar_iface_la_LDFLAGS = -module @TH_SAFE@ \ +@ENABLE_UNRAR_TRUE@ -version-info @LIBCLAMAV_VERSION@ \ +@ENABLE_UNRAR_TRUE@ -no-undefined $(am__append_5) +@ENABLE_UNRAR_TRUE@libclamunrar_iface_la_SOURCES = \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar_iface/unrar_iface.cpp \ +@ENABLE_UNRAR_TRUE@ ../libclamunrar_iface/unrar_iface.h + +@ENABLE_UNRAR_TRUE@IFACELIBADD = -dlopen libclamunrar_iface.la +@ENABLE_UNRAR_TRUE@IFACEDEP = libclamunrar_iface.la + +# We need libclamunrar_iface in the include path even if we don't build it, +# because we #include "unrar_iface.h" +# We still want to support unrar if it is later provided, which is why we don't +# just wrap all the unrar scanners code with #ifdefs. +IFACE_CFLAGS = -I@top_srcdir@/libclamunrar_iface + +# libmspack version: 0.8alpha (1:0:1) +@USE_INTERNAL_MSPACK_TRUE@LIBMSPACK_VERSION = 1:0:1 +@USE_INTERNAL_MSPACK_TRUE@libclammspack_la_CFLAGS = -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wno-unused-parameter -I@top_srcdir@/libclammspack/mspack +@USE_INTERNAL_MSPACK_TRUE@libclammspack_la_LDFLAGS = -version-info $(LIBMSPACK_VERSION) -no-undefined -export-symbols-regex '^mspack_' + +# if VERSIONSCRIPT +# libclammspack_la_LDFLAGS += -Wl,@VERSIONSCRIPTFLAG@,@top_srcdir@/libclammspack/libclammspack.map +# endif +@USE_INTERNAL_MSPACK_TRUE@libclammspack_la_SOURCES = \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/cab.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/cabc.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/cabd.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/chm.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/chmc.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/chmd.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/crc32.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/crc32.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/des.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/hlp.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/hlpc.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/hlpd.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/kwaj.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/kwajc.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/kwajd.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/lit.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/litc.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/litd.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/lzss.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/lzssd.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/lzx.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/lzxc.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/lzxd.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/mspack.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/mszip.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/mszipc.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/mszipd.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/oab.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/oabc.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/oabd.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/qtm.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/qtmd.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/readbits.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/readhuff.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/sha.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/system.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/system.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/szdd.h \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/szddc.c \ +@USE_INTERNAL_MSPACK_TRUE@ ../libclammspack/mspack/szddd.c + +@USE_INTERNAL_MSPACK_FALSE@MSPACK_CFLAGS = $(LIBMSPACK_CFLAGS) +# EXTRA_DIST += @top_srcdir@/libclammspack/libclammspack.map +@USE_INTERNAL_MSPACK_TRUE@MSPACK_CFLAGS = -I@top_srcdir@/libclammspack/mspack -DHAVE_INTERNAL_MSPACK +@USE_INTERNAL_MSPACK_FALSE@MSPACKLIBADD = $(LIBMSPACK_LIBS) +@USE_INTERNAL_MSPACK_TRUE@MSPACKLIBADD = -lclammspack +@USE_INTERNAL_MSPACK_FALSE@MSPACKDEP = +@USE_INTERNAL_MSPACK_TRUE@MSPACKDEP = libclammspack.la +libclamav_internal_utils_la_SOURCES = \ + conv.c \ + conv.h \ + crypto.c \ + iowrap.c \ + iowrap.h \ + others_common.c \ + others.h \ + qsort.c \ + regex/cclass.h \ + regex/cname.h \ + regex/regcomp.c \ + regex/regerror.c \ + regex/regex.h \ + regex/regex2.h \ + regex/regexec.c \ + regex/regfree.c \ + regex/strlcpy.c \ + regex/utils.h \ + str.c \ + str.h \ + strlcat.c + +libclamav_internal_utils_la_LDFLAGS = -static @SSL_LDFLAGS@ @JSON_LDFLAGS@ +libclamav_internal_utils_la_CFLAGS = $(AM_CFLAGS) $(IFACE_CFLAGS) -fPIC -DPIC @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @PCRE_CPPFLAGS@ @XML_CPPFLAGS@ +libclamav_internal_utils_la_LIBADD = @SSL_LIBS@ @PCRE_LIBS@ +SUBDIRS = $(am__append_7) +@ENABLE_LLVM_FALSE@LLVMLIBADD = libclamav_nocxx.la +@ENABLE_LLVM_TRUE@LLVMLIBADD = c++/libclamavcxx.la -lstdc++ -lm +@ENABLE_LLVM_FALSE@LLVMDEP = libclamav_nocxx.la +@ENABLE_LLVM_TRUE@LLVMDEP = c++/libclamavcxx.la +@ENABLE_YARA_TRUE@YARA_CFLAGS = -DHAVE_YARA +libclamav_nocxx_la_SOURCES = bytecode_nojit.c +libclamav_nocxx_la_CFLAGS = $(AM_CFLAGS) $(IFACE_CFLAGS) @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @ZLIB_CFLAGS@ @PCRE_CPPFLAGS@ +libclamav_la_LIBADD = @SSL_LIBS@ @JSON_LIBS@ @PCRE_LIBS@ @LIBCLAMAV_LIBS@ @ZLIB_LIBS@ @LIBLTDL@ $(XML_LIBS) $(IFACELIBADD) $(MSPACKLIBADD) $(LLVMLIBADD) libclamav_internal_utils.la @THREAD_LIBS@ @LIBM@ +libclamav_la_DEPENDENCIES = @LTDLDEPS@ $(IFACEDEP) $(LLVMDEP) $(MSPACKDEP) libclamav_internal_utils.la +libclamav_la_CFLAGS = $(IFACE_CFLAGS) $(MSPACK_CFLAGS) $(AM_CFLAGS) $(YARA_CFLAGS) -DSEARCH_LIBDIR=\"$(libdir)\" @LIBCLAMAV_CPPFLAGS@ @SSL_CPPFLAGS@ @JSON_CPPFLAGS@ @ZLIB_CFLAGS@ @PCRE_CPPFLAGS@ @XML_CPPFLAGS@ +libclamav_la_LDFLAGS = @SSL_LDFLAGS@ @TH_SAFE@ @JSON_LDFLAGS@ \ + @LIBICONV@ $(XML_LIBS) -version-info @LIBCLAMAV_VERSION@ \ + -no-undefined $(am__append_8) +include_HEADERS = clamav.h +libclamav_la_SOURCES = matcher-ac.c matcher-ac.h matcher-bm.c \ + matcher-bm.h matcher-hash.c matcher-hash.h matcher.c matcher.h \ + others.c others.h readdb.c readdb.h cvd.c cvd.h dsig.c dsig.h \ + scanners.c scanners.h textdet.c textdet.h filetypes.c \ + filetypes.h filetypes_int.h rtf.c rtf.h blob.c blob.h mbox.c \ + mbox.h message.c message.h table.c table.h text.c text.h \ + ole2_extract.c ole2_extract.h vba_extract.c vba_extract.h \ + xlm_extract.c xlm_extract.h msexpand.c msexpand.h pe.c pe.h \ + pe_icons.c pe_icons.h pe_structs.h disasm.c disasm.h \ + disasm-common.h disasmpriv.h upx.c upx.h htmlnorm.c htmlnorm.h \ + libmspack.c libmspack.h rebuildpe.c rebuildpe.h petite.c \ + petite.h wwunpack.c wwunpack.h unsp.c unsp.h aspack.c aspack.h \ + packlibs.c packlibs.h fsg.c fsg.h mew.c mew.h upack.c upack.h \ + line.c line.h untar.c untar.h unzip.c unzip.h ooxml.c ooxml.h \ + inflate64.c inflate64.h inffixed64.h inflate64_priv.h \ + special.c special.h binhex.c binhex.h is_tar.c is_tar.h tnef.c \ + tnef.h autoit.c autoit.h unarj.c unarj.h nsis/bzlib.c \ + nsis/bzlib_private.h nsis/nsis_bzlib.h nsis/nulsft.c \ + nsis/nulsft.h nsis/infblock.c nsis/nsis_zconf.h \ + nsis/nsis_zlib.h nsis/nsis_zutil.h pdf.c pdf.h pdfng.c \ + pdfdecode.c pdfdecode.h spin.c spin.h yc.c yc.h elf.c elf.h \ + execs.h execs.c sis.c sis.h uuencode.c uuencode.h phishcheck.c \ + phishcheck.h phish_domaincheck_db.c phish_domaincheck_db.h \ + phish_whitelist.c phish_whitelist.h iana_cctld.h iana_tld.h \ + regex_list.c regex_list.h regex_suffix.c regex_suffix.h \ + entconv.c entconv.h entitylist.h encoding_aliases.h hashtab.c \ + hashtab.h dconf.c dconf.h lzma_iface.c lzma_iface.h 7z_iface.c \ + 7z_iface.h 7z/7z.h 7z/7zAlloc.c 7z/7zAlloc.h 7z/7zBuf.c \ + 7z/7zBuf.h 7z/7zBuf2.c 7z/7zCrc.c 7z/7zCrc.h 7z/7zDec.c \ + 7z/7zFile.c 7z/7zFile.h 7z/7zIn.c 7z/7zStream.c 7z/7zVersion.h \ + 7z/Bcj2.c 7z/Bcj2.h 7z/Bra.c 7z/Bra.h 7z/Bra86.c 7z/CpuArch.h \ + 7z/Lzma2Dec.c 7z/Lzma2Dec.h 7z/LzmaDec.c 7z/LzmaDec.h \ + 7z/Ppmd.h 7z/Ppmd7.c 7z/Ppmd7.h 7z/Ppmd7Dec.c 7z/Types.h \ + 7z/Xz.c 7z/Xz.h 7z/XzCrc64.c 7z/XzCrc64.h 7z/XzDec.c 7z/XzIn.c \ + 7z/Delta.c 7z/Delta.h 7z/Alloc.h 7z/BraIA64.c 7z/CpuArch.c \ + 7z/CpuArch.h 7z/7zCrcOpt.c 7z/RotateDefs.h explode.c explode.h \ + textnorm.c textnorm.h dlp.c dlp.h jsparse/js-norm.c \ + jsparse/js-norm.h jsparse/lexglobal.h jsparse/textbuf.h uniq.c \ + uniq.h version.c version.h mpool.c mpool.h filtering.h \ + filtering.c fmap.c fmap.h perflogging.c perflogging.h \ + default.h bytecode.c bytecode.h bytecode_vm.c bytecode_priv.h \ + clambc.h cpio.c cpio.h macho.c macho.h ishield.c ishield.h \ + type_desc.h bcfeatures.h bytecode_api.c bytecode_api_decl.c \ + bytecode_api.h bytecode_api_impl.h bytecode_hooks.h cache.c \ + cache.h bytecode_detect.c bytecode_detect.h \ + builtin_bytecodes.h events.c events.h adc.c adc.h dmg.c dmg.h \ + xar.c xar.h xdp.c xdp.h mbr.c mbr.h gpt.c gpt.h apm.c apm.h \ + partition_intersection.c partition_intersection.h json_api.c \ + json_api.h xz_iface.c xz_iface.h sf_base64decode.c \ + sf_base64decode.h hfsplus.c hfsplus.h swf.c swf.h gif.c gif.h \ + jpeg.c jpeg.h png.c png.h iso9660.c iso9660.h arc4.c arc4.h \ + rijndael.c rijndael.h crtmgr.c crtmgr.h asn1.c asn1.h fpu.c \ + fpu.h stats.c stats.h www.c www.h stats_json.c stats_json.h \ + hostid_internal.c hostid_internal.h openioc.c openioc.h \ + msdoc.c msdoc.h matcher-pcre.c matcher-pcre.h regex_pcre.c \ + regex_pcre.h msxml.c msxml.h msxml_parser.c msxml_parser.h \ + tiff.c tiff.h hwp.c hwp.h lzw/lzwdec.c lzw/lzwdec.h \ + matcher-byte-comp.c matcher-byte-comp.h egg.c egg.h queue.h \ + $(am__append_9) bignum.h bignum_fast.h \ + tomsfastmath/addsub/fp_add.c tomsfastmath/addsub/fp_add_d.c \ + tomsfastmath/addsub/fp_addmod.c tomsfastmath/addsub/fp_cmp.c \ + tomsfastmath/addsub/fp_cmp_d.c \ + tomsfastmath/addsub/fp_cmp_mag.c tomsfastmath/addsub/fp_sub.c \ + tomsfastmath/addsub/fp_sub_d.c tomsfastmath/addsub/fp_submod.c \ + tomsfastmath/addsub/s_fp_add.c tomsfastmath/addsub/s_fp_sub.c \ + tomsfastmath/bin/fp_radix_size.c \ + tomsfastmath/bin/fp_read_radix.c \ + tomsfastmath/bin/fp_read_signed_bin.c \ + tomsfastmath/bin/fp_read_unsigned_bin.c \ + tomsfastmath/bin/fp_reverse.c tomsfastmath/bin/fp_s_rmap.c \ + tomsfastmath/bin/fp_signed_bin_size.c \ + tomsfastmath/bin/fp_to_signed_bin.c \ + tomsfastmath/bin/fp_to_unsigned_bin.c \ + tomsfastmath/bin/fp_toradix.c tomsfastmath/bin/fp_toradix_n.c \ + tomsfastmath/bin/fp_unsigned_bin_size.c \ + tomsfastmath/bit/fp_cnt_lsb.c tomsfastmath/bit/fp_count_bits.c \ + tomsfastmath/bit/fp_div_2.c tomsfastmath/bit/fp_div_2d.c \ + tomsfastmath/bit/fp_lshd.c tomsfastmath/bit/fp_mod_2d.c \ + tomsfastmath/bit/fp_rshd.c tomsfastmath/divide/fp_div.c \ + tomsfastmath/divide/fp_div_d.c tomsfastmath/divide/fp_mod.c \ + tomsfastmath/divide/fp_mod_d.c tomsfastmath/exptmod/fp_2expt.c \ + tomsfastmath/exptmod/fp_exptmod.c tomsfastmath/misc/fp_ident.c \ + tomsfastmath/misc/fp_set.c \ + tomsfastmath/mont/fp_montgomery_calc_normalization.c \ + tomsfastmath/mont/fp_montgomery_reduce.c \ + tomsfastmath/mont/fp_montgomery_setup.c \ + tomsfastmath/mul/fp_mul.c tomsfastmath/mul/fp_mul_comba.c \ + tomsfastmath/mul/fp_mul_2.c tomsfastmath/mul/fp_mul_2d.c \ + tomsfastmath/mul/fp_mul_comba_12.c \ + tomsfastmath/mul/fp_mul_comba_17.c \ + tomsfastmath/mul/fp_mul_comba_20.c \ + tomsfastmath/mul/fp_mul_comba_24.c \ + tomsfastmath/mul/fp_mul_comba_28.c \ + tomsfastmath/mul/fp_mul_comba_3.c \ + tomsfastmath/mul/fp_mul_comba_32.c \ + tomsfastmath/mul/fp_mul_comba_4.c \ + tomsfastmath/mul/fp_mul_comba_48.c \ + tomsfastmath/mul/fp_mul_comba_6.c \ + tomsfastmath/mul/fp_mul_comba_64.c \ + tomsfastmath/mul/fp_mul_comba_7.c \ + tomsfastmath/mul/fp_mul_comba_8.c \ + tomsfastmath/mul/fp_mul_comba_9.c \ + tomsfastmath/mul/fp_mul_comba_small_set.c \ + tomsfastmath/mul/fp_mul_d.c tomsfastmath/mul/fp_mulmod.c \ + tomsfastmath/numtheory/fp_invmod.c tomsfastmath/sqr/fp_sqr.c \ + tomsfastmath/sqr/fp_sqr_comba_12.c \ + tomsfastmath/sqr/fp_sqr_comba_17.c \ + tomsfastmath/sqr/fp_sqr_comba_20.c \ + tomsfastmath/sqr/fp_sqr_comba_24.c \ + tomsfastmath/sqr/fp_sqr_comba_28.c \ + tomsfastmath/sqr/fp_sqr_comba_3.c \ + tomsfastmath/sqr/fp_sqr_comba_32.c \ + tomsfastmath/sqr/fp_sqr_comba_4.c \ + tomsfastmath/sqr/fp_sqr_comba_48.c \ + tomsfastmath/sqr/fp_sqr_comba_6.c \ + tomsfastmath/sqr/fp_sqr_comba_64.c \ + tomsfastmath/sqr/fp_sqr_comba_7.c \ + tomsfastmath/sqr/fp_sqr_comba_8.c \ + tomsfastmath/sqr/fp_sqr_comba_9.c \ + tomsfastmath/sqr/fp_sqr_comba_generic.c \ + tomsfastmath/sqr/fp_sqr_comba_small_set.c \ + tomsfastmath/sqr/fp_sqrmod.c +noinst_LTLIBRARIES = libclamav_internal_utils.la libclamav_nocxx.la +BUILT_SOURCES = yara_grammar.h $(am__append_10) +@MAINTAINER_MODE_TRUE@GPERF_FLAGS = -E -t -L ANSI-C -C -F ', TOK_ERROR' -c +@MAINTAINER_MODE_FALSE@CLEANFILES = $(COMMON_CLEANFILES) +@MAINTAINER_MODE_TRUE@CLEANFILES = $(COMMON_CLEANFILES) @srcdir@/jsparse/generated/operators.h @srcdir@/jsparse/generated/keywords.h +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +.SUFFIXES: +.SUFFIXES: .c .cpp .l .lo .o .obj .y +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libclamav/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign libclamav/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +install-libLTLIBRARIES: $(lib_LTLIBRARIES) + @$(NORMAL_INSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ + } + +uninstall-libLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ + done + +clean-libLTLIBRARIES: + -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } +nsis/$(am__dirstamp): + @$(MKDIR_P) nsis + @: > nsis/$(am__dirstamp) +nsis/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) nsis/$(DEPDIR) + @: > nsis/$(DEPDIR)/$(am__dirstamp) +nsis/libclamav_la-bzlib.lo: nsis/$(am__dirstamp) \ + nsis/$(DEPDIR)/$(am__dirstamp) +nsis/libclamav_la-nulsft.lo: nsis/$(am__dirstamp) \ + nsis/$(DEPDIR)/$(am__dirstamp) +nsis/libclamav_la-infblock.lo: nsis/$(am__dirstamp) \ + nsis/$(DEPDIR)/$(am__dirstamp) +7z/$(am__dirstamp): + @$(MKDIR_P) 7z + @: > 7z/$(am__dirstamp) +7z/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) 7z/$(DEPDIR) + @: > 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-7zAlloc.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-7zBuf.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-7zBuf2.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-7zCrc.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-7zDec.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-7zFile.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-7zIn.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-7zStream.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-Bcj2.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-Bra.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-Bra86.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-Lzma2Dec.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-LzmaDec.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-Ppmd7.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-Ppmd7Dec.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-Xz.lo: 7z/$(am__dirstamp) 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-XzCrc64.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-XzDec.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-XzIn.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-Delta.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-BraIA64.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-CpuArch.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +7z/libclamav_la-7zCrcOpt.lo: 7z/$(am__dirstamp) \ + 7z/$(DEPDIR)/$(am__dirstamp) +jsparse/$(am__dirstamp): + @$(MKDIR_P) jsparse + @: > jsparse/$(am__dirstamp) +jsparse/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) jsparse/$(DEPDIR) + @: > jsparse/$(DEPDIR)/$(am__dirstamp) +jsparse/libclamav_la-js-norm.lo: jsparse/$(am__dirstamp) \ + jsparse/$(DEPDIR)/$(am__dirstamp) +lzw/$(am__dirstamp): + @$(MKDIR_P) lzw + @: > lzw/$(am__dirstamp) +lzw/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) lzw/$(DEPDIR) + @: > lzw/$(DEPDIR)/$(am__dirstamp) +lzw/libclamav_la-lzwdec.lo: lzw/$(am__dirstamp) \ + lzw/$(DEPDIR)/$(am__dirstamp) +yara_grammar.h: yara_grammar.c + @if test ! -f $@; then rm -f yara_grammar.c; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) yara_grammar.c; else :; fi +tomsfastmath/addsub/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/addsub + @: > tomsfastmath/addsub/$(am__dirstamp) +tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/addsub/$(DEPDIR) + @: > tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/addsub/libclamav_la-fp_add.lo: \ + tomsfastmath/addsub/$(am__dirstamp) \ + tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/addsub/libclamav_la-fp_add_d.lo: \ + tomsfastmath/addsub/$(am__dirstamp) \ + tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/addsub/libclamav_la-fp_addmod.lo: \ + tomsfastmath/addsub/$(am__dirstamp) \ + tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/addsub/libclamav_la-fp_cmp.lo: \ + tomsfastmath/addsub/$(am__dirstamp) \ + tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/addsub/libclamav_la-fp_cmp_d.lo: \ + tomsfastmath/addsub/$(am__dirstamp) \ + tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/addsub/libclamav_la-fp_cmp_mag.lo: \ + tomsfastmath/addsub/$(am__dirstamp) \ + tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/addsub/libclamav_la-fp_sub.lo: \ + tomsfastmath/addsub/$(am__dirstamp) \ + tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/addsub/libclamav_la-fp_sub_d.lo: \ + tomsfastmath/addsub/$(am__dirstamp) \ + tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/addsub/libclamav_la-fp_submod.lo: \ + tomsfastmath/addsub/$(am__dirstamp) \ + tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/addsub/libclamav_la-s_fp_add.lo: \ + tomsfastmath/addsub/$(am__dirstamp) \ + tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/addsub/libclamav_la-s_fp_sub.lo: \ + tomsfastmath/addsub/$(am__dirstamp) \ + tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/bin + @: > tomsfastmath/bin/$(am__dirstamp) +tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/bin/$(DEPDIR) + @: > tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_radix_size.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_read_radix.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_read_signed_bin.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_read_unsigned_bin.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_reverse.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_s_rmap.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_signed_bin_size.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_to_signed_bin.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_to_unsigned_bin.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_toradix.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_toradix_n.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bin/libclamav_la-fp_unsigned_bin_size.lo: \ + tomsfastmath/bin/$(am__dirstamp) \ + tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bit/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/bit + @: > tomsfastmath/bit/$(am__dirstamp) +tomsfastmath/bit/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/bit/$(DEPDIR) + @: > tomsfastmath/bit/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bit/libclamav_la-fp_cnt_lsb.lo: \ + tomsfastmath/bit/$(am__dirstamp) \ + tomsfastmath/bit/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bit/libclamav_la-fp_count_bits.lo: \ + tomsfastmath/bit/$(am__dirstamp) \ + tomsfastmath/bit/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bit/libclamav_la-fp_div_2.lo: \ + tomsfastmath/bit/$(am__dirstamp) \ + tomsfastmath/bit/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bit/libclamav_la-fp_div_2d.lo: \ + tomsfastmath/bit/$(am__dirstamp) \ + tomsfastmath/bit/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bit/libclamav_la-fp_lshd.lo: \ + tomsfastmath/bit/$(am__dirstamp) \ + tomsfastmath/bit/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bit/libclamav_la-fp_mod_2d.lo: \ + tomsfastmath/bit/$(am__dirstamp) \ + tomsfastmath/bit/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/bit/libclamav_la-fp_rshd.lo: \ + tomsfastmath/bit/$(am__dirstamp) \ + tomsfastmath/bit/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/divide/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/divide + @: > tomsfastmath/divide/$(am__dirstamp) +tomsfastmath/divide/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/divide/$(DEPDIR) + @: > tomsfastmath/divide/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/divide/libclamav_la-fp_div.lo: \ + tomsfastmath/divide/$(am__dirstamp) \ + tomsfastmath/divide/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/divide/libclamav_la-fp_div_d.lo: \ + tomsfastmath/divide/$(am__dirstamp) \ + tomsfastmath/divide/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/divide/libclamav_la-fp_mod.lo: \ + tomsfastmath/divide/$(am__dirstamp) \ + tomsfastmath/divide/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/divide/libclamav_la-fp_mod_d.lo: \ + tomsfastmath/divide/$(am__dirstamp) \ + tomsfastmath/divide/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/exptmod/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/exptmod + @: > tomsfastmath/exptmod/$(am__dirstamp) +tomsfastmath/exptmod/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/exptmod/$(DEPDIR) + @: > tomsfastmath/exptmod/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/exptmod/libclamav_la-fp_2expt.lo: \ + tomsfastmath/exptmod/$(am__dirstamp) \ + tomsfastmath/exptmod/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/exptmod/libclamav_la-fp_exptmod.lo: \ + tomsfastmath/exptmod/$(am__dirstamp) \ + tomsfastmath/exptmod/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/misc/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/misc + @: > tomsfastmath/misc/$(am__dirstamp) +tomsfastmath/misc/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/misc/$(DEPDIR) + @: > tomsfastmath/misc/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/misc/libclamav_la-fp_ident.lo: \ + tomsfastmath/misc/$(am__dirstamp) \ + tomsfastmath/misc/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/misc/libclamav_la-fp_set.lo: \ + tomsfastmath/misc/$(am__dirstamp) \ + tomsfastmath/misc/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mont/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/mont + @: > tomsfastmath/mont/$(am__dirstamp) +tomsfastmath/mont/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/mont/$(DEPDIR) + @: > tomsfastmath/mont/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mont/libclamav_la-fp_montgomery_calc_normalization.lo: \ + tomsfastmath/mont/$(am__dirstamp) \ + tomsfastmath/mont/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mont/libclamav_la-fp_montgomery_reduce.lo: \ + tomsfastmath/mont/$(am__dirstamp) \ + tomsfastmath/mont/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mont/libclamav_la-fp_montgomery_setup.lo: \ + tomsfastmath/mont/$(am__dirstamp) \ + tomsfastmath/mont/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/mul + @: > tomsfastmath/mul/$(am__dirstamp) +tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/mul/$(DEPDIR) + @: > tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_2.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_2d.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_12.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_17.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_20.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_24.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_28.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_3.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_32.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_4.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_48.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_6.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_64.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_7.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_8.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_9.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_comba_small_set.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mul_d.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/mul/libclamav_la-fp_mulmod.lo: \ + tomsfastmath/mul/$(am__dirstamp) \ + tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/numtheory/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/numtheory + @: > tomsfastmath/numtheory/$(am__dirstamp) +tomsfastmath/numtheory/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/numtheory/$(DEPDIR) + @: > tomsfastmath/numtheory/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/numtheory/libclamav_la-fp_invmod.lo: \ + tomsfastmath/numtheory/$(am__dirstamp) \ + tomsfastmath/numtheory/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/sqr + @: > tomsfastmath/sqr/$(am__dirstamp) +tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) tomsfastmath/sqr/$(DEPDIR) + @: > tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_12.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_17.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_20.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_24.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_28.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_3.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_32.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_4.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_48.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_6.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_64.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_7.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_8.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_9.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_generic.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_small_set.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) +tomsfastmath/sqr/libclamav_la-fp_sqrmod.lo: \ + tomsfastmath/sqr/$(am__dirstamp) \ + tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) + +libclamav.la: $(libclamav_la_OBJECTS) $(libclamav_la_DEPENDENCIES) $(EXTRA_libclamav_la_DEPENDENCIES) + $(AM_V_CCLD)$(libclamav_la_LINK) -rpath $(libdir) $(libclamav_la_OBJECTS) $(libclamav_la_LIBADD) $(LIBS) +regex/$(am__dirstamp): + @$(MKDIR_P) regex + @: > regex/$(am__dirstamp) +regex/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) regex/$(DEPDIR) + @: > regex/$(DEPDIR)/$(am__dirstamp) +regex/libclamav_internal_utils_la-regcomp.lo: regex/$(am__dirstamp) \ + regex/$(DEPDIR)/$(am__dirstamp) +regex/libclamav_internal_utils_la-regerror.lo: regex/$(am__dirstamp) \ + regex/$(DEPDIR)/$(am__dirstamp) +regex/libclamav_internal_utils_la-regexec.lo: regex/$(am__dirstamp) \ + regex/$(DEPDIR)/$(am__dirstamp) +regex/libclamav_internal_utils_la-regfree.lo: regex/$(am__dirstamp) \ + regex/$(DEPDIR)/$(am__dirstamp) +regex/libclamav_internal_utils_la-strlcpy.lo: regex/$(am__dirstamp) \ + regex/$(DEPDIR)/$(am__dirstamp) + +libclamav_internal_utils.la: $(libclamav_internal_utils_la_OBJECTS) $(libclamav_internal_utils_la_DEPENDENCIES) $(EXTRA_libclamav_internal_utils_la_DEPENDENCIES) + $(AM_V_CCLD)$(libclamav_internal_utils_la_LINK) $(libclamav_internal_utils_la_OBJECTS) $(libclamav_internal_utils_la_LIBADD) $(LIBS) + +libclamav_nocxx.la: $(libclamav_nocxx_la_OBJECTS) $(libclamav_nocxx_la_DEPENDENCIES) $(EXTRA_libclamav_nocxx_la_DEPENDENCIES) + $(AM_V_CCLD)$(libclamav_nocxx_la_LINK) $(libclamav_nocxx_la_OBJECTS) $(libclamav_nocxx_la_LIBADD) $(LIBS) +../libclammspack/mspack/$(am__dirstamp): + @$(MKDIR_P) ../libclammspack/mspack + @: > ../libclammspack/mspack/$(am__dirstamp) +../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../libclammspack/mspack/$(DEPDIR) + @: > ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-cabc.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-cabd.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-chmc.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-chmd.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-crc32.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-hlpc.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-hlpd.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-kwajc.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-kwajd.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-litc.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-litd.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-lzssd.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-lzxc.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-lzxd.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-mszipc.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-mszipd.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-oabc.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-oabd.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-qtmd.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-system.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-szddc.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) +../libclammspack/mspack/libclammspack_la-szddd.lo: \ + ../libclammspack/mspack/$(am__dirstamp) \ + ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) + +libclammspack.la: $(libclammspack_la_OBJECTS) $(libclammspack_la_DEPENDENCIES) $(EXTRA_libclammspack_la_DEPENDENCIES) + $(AM_V_CCLD)$(libclammspack_la_LINK) $(am_libclammspack_la_rpath) $(libclammspack_la_OBJECTS) $(libclammspack_la_LIBADD) $(LIBS) +../libclamunrar/$(am__dirstamp): + @$(MKDIR_P) ../libclamunrar + @: > ../libclamunrar/$(am__dirstamp) +../libclamunrar/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../libclamunrar/$(DEPDIR) + @: > ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-archive.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-arcread.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-blake2s.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-cmddata.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-consio.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-crc.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-crypt.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-dll.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-encname.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-errhnd.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-extinfo.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-extract.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-filcreat.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-file.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-filefn.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-filestr.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-find.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-getbits.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-global.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-hash.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-headers.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-list.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-match.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-options.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-pathfn.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-qopen.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-rar.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-rarvm.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-rawread.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-rdwrfn.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-recvol.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-resource.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-rijndael.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-rs.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-rs16.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-scantree.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-secpassword.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-sha1.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-sha256.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-smallfn.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-strfn.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-strlist.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-system.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-threadpool.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-timefn.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-ui.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-unicode.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-unpack.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) +../libclamunrar/libclamunrar_la-volume.lo: \ + ../libclamunrar/$(am__dirstamp) \ + ../libclamunrar/$(DEPDIR)/$(am__dirstamp) + +libclamunrar.la: $(libclamunrar_la_OBJECTS) $(libclamunrar_la_DEPENDENCIES) $(EXTRA_libclamunrar_la_DEPENDENCIES) + $(AM_V_CXXLD)$(libclamunrar_la_LINK) $(am_libclamunrar_la_rpath) $(libclamunrar_la_OBJECTS) $(libclamunrar_la_LIBADD) $(LIBS) +../libclamunrar_iface/$(am__dirstamp): + @$(MKDIR_P) ../libclamunrar_iface + @: > ../libclamunrar_iface/$(am__dirstamp) +../libclamunrar_iface/$(DEPDIR)/$(am__dirstamp): + @$(MKDIR_P) ../libclamunrar_iface/$(DEPDIR) + @: > ../libclamunrar_iface/$(DEPDIR)/$(am__dirstamp) +../libclamunrar_iface/libclamunrar_iface_la-unrar_iface.lo: \ + ../libclamunrar_iface/$(am__dirstamp) \ + ../libclamunrar_iface/$(DEPDIR)/$(am__dirstamp) + +libclamunrar_iface.la: $(libclamunrar_iface_la_OBJECTS) $(libclamunrar_iface_la_DEPENDENCIES) $(EXTRA_libclamunrar_iface_la_DEPENDENCIES) + $(AM_V_CXXLD)$(libclamunrar_iface_la_LINK) $(am_libclamunrar_iface_la_rpath) $(libclamunrar_iface_la_OBJECTS) $(libclamunrar_iface_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + -rm -f ../libclammspack/mspack/*.$(OBJEXT) + -rm -f ../libclammspack/mspack/*.lo + -rm -f ../libclamunrar/*.$(OBJEXT) + -rm -f ../libclamunrar/*.lo + -rm -f ../libclamunrar_iface/*.$(OBJEXT) + -rm -f ../libclamunrar_iface/*.lo + -rm -f 7z/*.$(OBJEXT) + -rm -f 7z/*.lo + -rm -f jsparse/*.$(OBJEXT) + -rm -f jsparse/*.lo + -rm -f lzw/*.$(OBJEXT) + -rm -f lzw/*.lo + -rm -f nsis/*.$(OBJEXT) + -rm -f nsis/*.lo + -rm -f regex/*.$(OBJEXT) + -rm -f regex/*.lo + -rm -f tomsfastmath/addsub/*.$(OBJEXT) + -rm -f tomsfastmath/addsub/*.lo + -rm -f tomsfastmath/bin/*.$(OBJEXT) + -rm -f tomsfastmath/bin/*.lo + -rm -f tomsfastmath/bit/*.$(OBJEXT) + -rm -f tomsfastmath/bit/*.lo + -rm -f tomsfastmath/divide/*.$(OBJEXT) + -rm -f tomsfastmath/divide/*.lo + -rm -f tomsfastmath/exptmod/*.$(OBJEXT) + -rm -f tomsfastmath/exptmod/*.lo + -rm -f tomsfastmath/misc/*.$(OBJEXT) + -rm -f tomsfastmath/misc/*.lo + -rm -f tomsfastmath/mont/*.$(OBJEXT) + -rm -f tomsfastmath/mont/*.lo + -rm -f tomsfastmath/mul/*.$(OBJEXT) + -rm -f tomsfastmath/mul/*.lo + -rm -f tomsfastmath/numtheory/*.$(OBJEXT) + -rm -f tomsfastmath/numtheory/*.lo + -rm -f tomsfastmath/sqr/*.$(OBJEXT) + -rm -f tomsfastmath/sqr/*.lo + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-cabc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-cabd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-chmc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-chmd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-crc32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-hlpc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-hlpd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-kwajc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-kwajd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-litc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-litd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzssd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzxc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzxd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-mszipc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-mszipd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-oabc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-oabd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-qtmd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-system.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-szddc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclammspack/mspack/$(DEPDIR)/libclammspack_la-szddd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-archive.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-arcread.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-blake2s.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-cmddata.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-consio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-crc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-crypt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-dll.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-encname.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-errhnd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-extinfo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-extract.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-filcreat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-file.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-filefn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-filestr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-find.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-getbits.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-global.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-headers.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-list.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-match.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-options.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-pathfn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-qopen.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-rar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-rarvm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-rawread.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-rdwrfn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-recvol.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-resource.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-rijndael.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-rs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-rs16.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-scantree.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-secpassword.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-sha1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-sha256.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-smallfn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-strfn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-strlist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-system.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-threadpool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-timefn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-ui.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-unicode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-unpack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar/$(DEPDIR)/libclamunrar_la-volume.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@../libclamunrar_iface/$(DEPDIR)/libclamunrar_iface_la-unrar_iface.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-conv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-crypto.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-iowrap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-others_common.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-qsort.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-str.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_internal_utils_la-strlcat.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-7z_iface.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-adc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-apm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-arc4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-asn1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-aspack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-autoit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-binhex.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-blob.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-bytecode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-bytecode_api.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-bytecode_api_decl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-bytecode_detect.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-bytecode_vm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-cache.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-cpio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-crtmgr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-cvd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-dconf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-disasm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-dlp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-dmg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-dsig.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-egg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-elf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-entconv.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-events.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-execs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-explode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-filetypes.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-filtering.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-fmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-fpu.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-fsg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-gif.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-gpt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-hashtab.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-hfsplus.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-hostid_internal.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-htmlnorm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-hwp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-inflate64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-is_tar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-ishield.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-iso9660.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-jpeg.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-json_api.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-libmspack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-line.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-lzma_iface.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-macho.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-matcher-ac.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-matcher-bm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-matcher-byte-comp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-matcher-hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-matcher-pcre.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-matcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-mbox.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-mbr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-message.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-mew.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-mpool.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-msdoc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-msexpand.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-msxml.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-msxml_parser.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-ole2_extract.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-ooxml.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-openioc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-others.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-packlibs.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-partition_intersection.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-pdf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-pdfdecode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-pdfng.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-pe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-pe_icons.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-perflogging.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-petite.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-phish_domaincheck_db.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-phish_whitelist.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-phishcheck.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-png.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-readdb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-rebuildpe.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-regex_list.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-regex_pcre.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-regex_suffix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-rijndael.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-rtf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-scanners.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-sf_base64decode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-sis.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-special.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-spin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-stats.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-stats_json.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-swf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-table.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-text.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-textdet.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-textnorm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-tiff.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-tnef.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-unarj.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-uniq.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-unsp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-untar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-unzip.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-upack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-upx.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-uuencode.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-vba_extract.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-version.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-wwunpack.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-www.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-xar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-xdp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-xlm_extract.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-xz_iface.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-yara_arena.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-yara_compiler.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-yara_exec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-yara_grammar.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-yara_hash.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-yara_lexer.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-yara_parser.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_la-yc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libclamav_nocxx_la-bytecode_nojit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-7zAlloc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-7zBuf.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-7zBuf2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-7zCrc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-7zCrcOpt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-7zDec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-7zFile.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-7zIn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-7zStream.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-Bcj2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-Bra.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-Bra86.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-BraIA64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-CpuArch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-Delta.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-Lzma2Dec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-LzmaDec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-Ppmd7.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-Ppmd7Dec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-Xz.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-XzCrc64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-XzDec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@7z/$(DEPDIR)/libclamav_la-XzIn.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@jsparse/$(DEPDIR)/libclamav_la-js-norm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@lzw/$(DEPDIR)/libclamav_la-lzwdec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@nsis/$(DEPDIR)/libclamav_la-bzlib.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@nsis/$(DEPDIR)/libclamav_la-infblock.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@nsis/$(DEPDIR)/libclamav_la-nulsft.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@regex/$(DEPDIR)/libclamav_internal_utils_la-regcomp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@regex/$(DEPDIR)/libclamav_internal_utils_la-regerror.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@regex/$(DEPDIR)/libclamav_internal_utils_la-regexec.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@regex/$(DEPDIR)/libclamav_internal_utils_la-regfree.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@regex/$(DEPDIR)/libclamav_internal_utils_la-strlcpy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_add.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_add_d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_addmod.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp_d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp_mag.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_sub.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_sub_d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_submod.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/addsub/$(DEPDIR)/libclamav_la-s_fp_add.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/addsub/$(DEPDIR)/libclamav_la-s_fp_sub.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_radix_size.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_radix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_signed_bin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_unsigned_bin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_reverse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_s_rmap.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_signed_bin_size.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_to_signed_bin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_to_unsigned_bin.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_toradix.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_toradix_n.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_unsigned_bin_size.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_cnt_lsb.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_count_bits.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_div_2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_div_2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_lshd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_mod_2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_rshd.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_div.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_div_d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_mod.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_mod_d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/exptmod/$(DEPDIR)/libclamav_la-fp_2expt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/exptmod/$(DEPDIR)/libclamav_la-fp_exptmod.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/misc/$(DEPDIR)/libclamav_la-fp_ident.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/misc/$(DEPDIR)/libclamav_la-fp_set.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_calc_normalization.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_reduce.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_setup.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_2.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_2d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_12.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_17.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_20.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_24.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_28.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_48.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_6.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_7.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_9.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_small_set.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_d.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mulmod.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/numtheory/$(DEPDIR)/libclamav_la-fp_invmod.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_12.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_17.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_20.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_24.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_28.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_3.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_32.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_4.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_48.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_6.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_7.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_8.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_9.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_generic.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_small_set.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqrmod.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +libclamav_la-matcher-ac.lo: matcher-ac.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-matcher-ac.lo -MD -MP -MF $(DEPDIR)/libclamav_la-matcher-ac.Tpo -c -o libclamav_la-matcher-ac.lo `test -f 'matcher-ac.c' || echo '$(srcdir)/'`matcher-ac.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-matcher-ac.Tpo $(DEPDIR)/libclamav_la-matcher-ac.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='matcher-ac.c' object='libclamav_la-matcher-ac.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-matcher-ac.lo `test -f 'matcher-ac.c' || echo '$(srcdir)/'`matcher-ac.c + +libclamav_la-matcher-bm.lo: matcher-bm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-matcher-bm.lo -MD -MP -MF $(DEPDIR)/libclamav_la-matcher-bm.Tpo -c -o libclamav_la-matcher-bm.lo `test -f 'matcher-bm.c' || echo '$(srcdir)/'`matcher-bm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-matcher-bm.Tpo $(DEPDIR)/libclamav_la-matcher-bm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='matcher-bm.c' object='libclamav_la-matcher-bm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-matcher-bm.lo `test -f 'matcher-bm.c' || echo '$(srcdir)/'`matcher-bm.c + +libclamav_la-matcher-hash.lo: matcher-hash.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-matcher-hash.lo -MD -MP -MF $(DEPDIR)/libclamav_la-matcher-hash.Tpo -c -o libclamav_la-matcher-hash.lo `test -f 'matcher-hash.c' || echo '$(srcdir)/'`matcher-hash.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-matcher-hash.Tpo $(DEPDIR)/libclamav_la-matcher-hash.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='matcher-hash.c' object='libclamav_la-matcher-hash.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-matcher-hash.lo `test -f 'matcher-hash.c' || echo '$(srcdir)/'`matcher-hash.c + +libclamav_la-matcher.lo: matcher.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-matcher.lo -MD -MP -MF $(DEPDIR)/libclamav_la-matcher.Tpo -c -o libclamav_la-matcher.lo `test -f 'matcher.c' || echo '$(srcdir)/'`matcher.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-matcher.Tpo $(DEPDIR)/libclamav_la-matcher.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='matcher.c' object='libclamav_la-matcher.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-matcher.lo `test -f 'matcher.c' || echo '$(srcdir)/'`matcher.c + +libclamav_la-others.lo: others.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-others.lo -MD -MP -MF $(DEPDIR)/libclamav_la-others.Tpo -c -o libclamav_la-others.lo `test -f 'others.c' || echo '$(srcdir)/'`others.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-others.Tpo $(DEPDIR)/libclamav_la-others.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='others.c' object='libclamav_la-others.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-others.lo `test -f 'others.c' || echo '$(srcdir)/'`others.c + +libclamav_la-readdb.lo: readdb.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-readdb.lo -MD -MP -MF $(DEPDIR)/libclamav_la-readdb.Tpo -c -o libclamav_la-readdb.lo `test -f 'readdb.c' || echo '$(srcdir)/'`readdb.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-readdb.Tpo $(DEPDIR)/libclamav_la-readdb.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='readdb.c' object='libclamav_la-readdb.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-readdb.lo `test -f 'readdb.c' || echo '$(srcdir)/'`readdb.c + +libclamav_la-cvd.lo: cvd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-cvd.lo -MD -MP -MF $(DEPDIR)/libclamav_la-cvd.Tpo -c -o libclamav_la-cvd.lo `test -f 'cvd.c' || echo '$(srcdir)/'`cvd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-cvd.Tpo $(DEPDIR)/libclamav_la-cvd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cvd.c' object='libclamav_la-cvd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-cvd.lo `test -f 'cvd.c' || echo '$(srcdir)/'`cvd.c + +libclamav_la-dsig.lo: dsig.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-dsig.lo -MD -MP -MF $(DEPDIR)/libclamav_la-dsig.Tpo -c -o libclamav_la-dsig.lo `test -f 'dsig.c' || echo '$(srcdir)/'`dsig.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-dsig.Tpo $(DEPDIR)/libclamav_la-dsig.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dsig.c' object='libclamav_la-dsig.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-dsig.lo `test -f 'dsig.c' || echo '$(srcdir)/'`dsig.c + +libclamav_la-scanners.lo: scanners.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-scanners.lo -MD -MP -MF $(DEPDIR)/libclamav_la-scanners.Tpo -c -o libclamav_la-scanners.lo `test -f 'scanners.c' || echo '$(srcdir)/'`scanners.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-scanners.Tpo $(DEPDIR)/libclamav_la-scanners.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scanners.c' object='libclamav_la-scanners.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-scanners.lo `test -f 'scanners.c' || echo '$(srcdir)/'`scanners.c + +libclamav_la-textdet.lo: textdet.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-textdet.lo -MD -MP -MF $(DEPDIR)/libclamav_la-textdet.Tpo -c -o libclamav_la-textdet.lo `test -f 'textdet.c' || echo '$(srcdir)/'`textdet.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-textdet.Tpo $(DEPDIR)/libclamav_la-textdet.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='textdet.c' object='libclamav_la-textdet.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-textdet.lo `test -f 'textdet.c' || echo '$(srcdir)/'`textdet.c + +libclamav_la-filetypes.lo: filetypes.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-filetypes.lo -MD -MP -MF $(DEPDIR)/libclamav_la-filetypes.Tpo -c -o libclamav_la-filetypes.lo `test -f 'filetypes.c' || echo '$(srcdir)/'`filetypes.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-filetypes.Tpo $(DEPDIR)/libclamav_la-filetypes.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='filetypes.c' object='libclamav_la-filetypes.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-filetypes.lo `test -f 'filetypes.c' || echo '$(srcdir)/'`filetypes.c + +libclamav_la-rtf.lo: rtf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-rtf.lo -MD -MP -MF $(DEPDIR)/libclamav_la-rtf.Tpo -c -o libclamav_la-rtf.lo `test -f 'rtf.c' || echo '$(srcdir)/'`rtf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-rtf.Tpo $(DEPDIR)/libclamav_la-rtf.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rtf.c' object='libclamav_la-rtf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-rtf.lo `test -f 'rtf.c' || echo '$(srcdir)/'`rtf.c + +libclamav_la-blob.lo: blob.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-blob.lo -MD -MP -MF $(DEPDIR)/libclamav_la-blob.Tpo -c -o libclamav_la-blob.lo `test -f 'blob.c' || echo '$(srcdir)/'`blob.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-blob.Tpo $(DEPDIR)/libclamav_la-blob.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='blob.c' object='libclamav_la-blob.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-blob.lo `test -f 'blob.c' || echo '$(srcdir)/'`blob.c + +libclamav_la-mbox.lo: mbox.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-mbox.lo -MD -MP -MF $(DEPDIR)/libclamav_la-mbox.Tpo -c -o libclamav_la-mbox.lo `test -f 'mbox.c' || echo '$(srcdir)/'`mbox.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-mbox.Tpo $(DEPDIR)/libclamav_la-mbox.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mbox.c' object='libclamav_la-mbox.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-mbox.lo `test -f 'mbox.c' || echo '$(srcdir)/'`mbox.c + +libclamav_la-message.lo: message.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-message.lo -MD -MP -MF $(DEPDIR)/libclamav_la-message.Tpo -c -o libclamav_la-message.lo `test -f 'message.c' || echo '$(srcdir)/'`message.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-message.Tpo $(DEPDIR)/libclamav_la-message.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='message.c' object='libclamav_la-message.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-message.lo `test -f 'message.c' || echo '$(srcdir)/'`message.c + +libclamav_la-table.lo: table.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-table.lo -MD -MP -MF $(DEPDIR)/libclamav_la-table.Tpo -c -o libclamav_la-table.lo `test -f 'table.c' || echo '$(srcdir)/'`table.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-table.Tpo $(DEPDIR)/libclamav_la-table.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='table.c' object='libclamav_la-table.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-table.lo `test -f 'table.c' || echo '$(srcdir)/'`table.c + +libclamav_la-text.lo: text.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-text.lo -MD -MP -MF $(DEPDIR)/libclamav_la-text.Tpo -c -o libclamav_la-text.lo `test -f 'text.c' || echo '$(srcdir)/'`text.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-text.Tpo $(DEPDIR)/libclamav_la-text.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='text.c' object='libclamav_la-text.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-text.lo `test -f 'text.c' || echo '$(srcdir)/'`text.c + +libclamav_la-ole2_extract.lo: ole2_extract.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-ole2_extract.lo -MD -MP -MF $(DEPDIR)/libclamav_la-ole2_extract.Tpo -c -o libclamav_la-ole2_extract.lo `test -f 'ole2_extract.c' || echo '$(srcdir)/'`ole2_extract.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-ole2_extract.Tpo $(DEPDIR)/libclamav_la-ole2_extract.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ole2_extract.c' object='libclamav_la-ole2_extract.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-ole2_extract.lo `test -f 'ole2_extract.c' || echo '$(srcdir)/'`ole2_extract.c + +libclamav_la-vba_extract.lo: vba_extract.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-vba_extract.lo -MD -MP -MF $(DEPDIR)/libclamav_la-vba_extract.Tpo -c -o libclamav_la-vba_extract.lo `test -f 'vba_extract.c' || echo '$(srcdir)/'`vba_extract.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-vba_extract.Tpo $(DEPDIR)/libclamav_la-vba_extract.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='vba_extract.c' object='libclamav_la-vba_extract.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-vba_extract.lo `test -f 'vba_extract.c' || echo '$(srcdir)/'`vba_extract.c + +libclamav_la-xlm_extract.lo: xlm_extract.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-xlm_extract.lo -MD -MP -MF $(DEPDIR)/libclamav_la-xlm_extract.Tpo -c -o libclamav_la-xlm_extract.lo `test -f 'xlm_extract.c' || echo '$(srcdir)/'`xlm_extract.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-xlm_extract.Tpo $(DEPDIR)/libclamav_la-xlm_extract.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xlm_extract.c' object='libclamav_la-xlm_extract.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-xlm_extract.lo `test -f 'xlm_extract.c' || echo '$(srcdir)/'`xlm_extract.c + +libclamav_la-msexpand.lo: msexpand.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-msexpand.lo -MD -MP -MF $(DEPDIR)/libclamav_la-msexpand.Tpo -c -o libclamav_la-msexpand.lo `test -f 'msexpand.c' || echo '$(srcdir)/'`msexpand.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-msexpand.Tpo $(DEPDIR)/libclamav_la-msexpand.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='msexpand.c' object='libclamav_la-msexpand.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-msexpand.lo `test -f 'msexpand.c' || echo '$(srcdir)/'`msexpand.c + +libclamav_la-pe.lo: pe.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-pe.lo -MD -MP -MF $(DEPDIR)/libclamav_la-pe.Tpo -c -o libclamav_la-pe.lo `test -f 'pe.c' || echo '$(srcdir)/'`pe.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-pe.Tpo $(DEPDIR)/libclamav_la-pe.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pe.c' object='libclamav_la-pe.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-pe.lo `test -f 'pe.c' || echo '$(srcdir)/'`pe.c + +libclamav_la-pe_icons.lo: pe_icons.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-pe_icons.lo -MD -MP -MF $(DEPDIR)/libclamav_la-pe_icons.Tpo -c -o libclamav_la-pe_icons.lo `test -f 'pe_icons.c' || echo '$(srcdir)/'`pe_icons.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-pe_icons.Tpo $(DEPDIR)/libclamav_la-pe_icons.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pe_icons.c' object='libclamav_la-pe_icons.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-pe_icons.lo `test -f 'pe_icons.c' || echo '$(srcdir)/'`pe_icons.c + +libclamav_la-disasm.lo: disasm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-disasm.lo -MD -MP -MF $(DEPDIR)/libclamav_la-disasm.Tpo -c -o libclamav_la-disasm.lo `test -f 'disasm.c' || echo '$(srcdir)/'`disasm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-disasm.Tpo $(DEPDIR)/libclamav_la-disasm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='disasm.c' object='libclamav_la-disasm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-disasm.lo `test -f 'disasm.c' || echo '$(srcdir)/'`disasm.c + +libclamav_la-upx.lo: upx.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-upx.lo -MD -MP -MF $(DEPDIR)/libclamav_la-upx.Tpo -c -o libclamav_la-upx.lo `test -f 'upx.c' || echo '$(srcdir)/'`upx.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-upx.Tpo $(DEPDIR)/libclamav_la-upx.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='upx.c' object='libclamav_la-upx.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-upx.lo `test -f 'upx.c' || echo '$(srcdir)/'`upx.c + +libclamav_la-htmlnorm.lo: htmlnorm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-htmlnorm.lo -MD -MP -MF $(DEPDIR)/libclamav_la-htmlnorm.Tpo -c -o libclamav_la-htmlnorm.lo `test -f 'htmlnorm.c' || echo '$(srcdir)/'`htmlnorm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-htmlnorm.Tpo $(DEPDIR)/libclamav_la-htmlnorm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='htmlnorm.c' object='libclamav_la-htmlnorm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-htmlnorm.lo `test -f 'htmlnorm.c' || echo '$(srcdir)/'`htmlnorm.c + +libclamav_la-libmspack.lo: libmspack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-libmspack.lo -MD -MP -MF $(DEPDIR)/libclamav_la-libmspack.Tpo -c -o libclamav_la-libmspack.lo `test -f 'libmspack.c' || echo '$(srcdir)/'`libmspack.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-libmspack.Tpo $(DEPDIR)/libclamav_la-libmspack.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libmspack.c' object='libclamav_la-libmspack.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-libmspack.lo `test -f 'libmspack.c' || echo '$(srcdir)/'`libmspack.c + +libclamav_la-rebuildpe.lo: rebuildpe.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-rebuildpe.lo -MD -MP -MF $(DEPDIR)/libclamav_la-rebuildpe.Tpo -c -o libclamav_la-rebuildpe.lo `test -f 'rebuildpe.c' || echo '$(srcdir)/'`rebuildpe.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-rebuildpe.Tpo $(DEPDIR)/libclamav_la-rebuildpe.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rebuildpe.c' object='libclamav_la-rebuildpe.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-rebuildpe.lo `test -f 'rebuildpe.c' || echo '$(srcdir)/'`rebuildpe.c + +libclamav_la-petite.lo: petite.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-petite.lo -MD -MP -MF $(DEPDIR)/libclamav_la-petite.Tpo -c -o libclamav_la-petite.lo `test -f 'petite.c' || echo '$(srcdir)/'`petite.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-petite.Tpo $(DEPDIR)/libclamav_la-petite.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='petite.c' object='libclamav_la-petite.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-petite.lo `test -f 'petite.c' || echo '$(srcdir)/'`petite.c + +libclamav_la-wwunpack.lo: wwunpack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-wwunpack.lo -MD -MP -MF $(DEPDIR)/libclamav_la-wwunpack.Tpo -c -o libclamav_la-wwunpack.lo `test -f 'wwunpack.c' || echo '$(srcdir)/'`wwunpack.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-wwunpack.Tpo $(DEPDIR)/libclamav_la-wwunpack.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wwunpack.c' object='libclamav_la-wwunpack.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-wwunpack.lo `test -f 'wwunpack.c' || echo '$(srcdir)/'`wwunpack.c + +libclamav_la-unsp.lo: unsp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-unsp.lo -MD -MP -MF $(DEPDIR)/libclamav_la-unsp.Tpo -c -o libclamav_la-unsp.lo `test -f 'unsp.c' || echo '$(srcdir)/'`unsp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-unsp.Tpo $(DEPDIR)/libclamav_la-unsp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unsp.c' object='libclamav_la-unsp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-unsp.lo `test -f 'unsp.c' || echo '$(srcdir)/'`unsp.c + +libclamav_la-aspack.lo: aspack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-aspack.lo -MD -MP -MF $(DEPDIR)/libclamav_la-aspack.Tpo -c -o libclamav_la-aspack.lo `test -f 'aspack.c' || echo '$(srcdir)/'`aspack.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-aspack.Tpo $(DEPDIR)/libclamav_la-aspack.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aspack.c' object='libclamav_la-aspack.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-aspack.lo `test -f 'aspack.c' || echo '$(srcdir)/'`aspack.c + +libclamav_la-packlibs.lo: packlibs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-packlibs.lo -MD -MP -MF $(DEPDIR)/libclamav_la-packlibs.Tpo -c -o libclamav_la-packlibs.lo `test -f 'packlibs.c' || echo '$(srcdir)/'`packlibs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-packlibs.Tpo $(DEPDIR)/libclamav_la-packlibs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='packlibs.c' object='libclamav_la-packlibs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-packlibs.lo `test -f 'packlibs.c' || echo '$(srcdir)/'`packlibs.c + +libclamav_la-fsg.lo: fsg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-fsg.lo -MD -MP -MF $(DEPDIR)/libclamav_la-fsg.Tpo -c -o libclamav_la-fsg.lo `test -f 'fsg.c' || echo '$(srcdir)/'`fsg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-fsg.Tpo $(DEPDIR)/libclamav_la-fsg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fsg.c' object='libclamav_la-fsg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-fsg.lo `test -f 'fsg.c' || echo '$(srcdir)/'`fsg.c + +libclamav_la-mew.lo: mew.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-mew.lo -MD -MP -MF $(DEPDIR)/libclamav_la-mew.Tpo -c -o libclamav_la-mew.lo `test -f 'mew.c' || echo '$(srcdir)/'`mew.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-mew.Tpo $(DEPDIR)/libclamav_la-mew.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mew.c' object='libclamav_la-mew.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-mew.lo `test -f 'mew.c' || echo '$(srcdir)/'`mew.c + +libclamav_la-upack.lo: upack.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-upack.lo -MD -MP -MF $(DEPDIR)/libclamav_la-upack.Tpo -c -o libclamav_la-upack.lo `test -f 'upack.c' || echo '$(srcdir)/'`upack.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-upack.Tpo $(DEPDIR)/libclamav_la-upack.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='upack.c' object='libclamav_la-upack.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-upack.lo `test -f 'upack.c' || echo '$(srcdir)/'`upack.c + +libclamav_la-line.lo: line.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-line.lo -MD -MP -MF $(DEPDIR)/libclamav_la-line.Tpo -c -o libclamav_la-line.lo `test -f 'line.c' || echo '$(srcdir)/'`line.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-line.Tpo $(DEPDIR)/libclamav_la-line.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='line.c' object='libclamav_la-line.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-line.lo `test -f 'line.c' || echo '$(srcdir)/'`line.c + +libclamav_la-untar.lo: untar.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-untar.lo -MD -MP -MF $(DEPDIR)/libclamav_la-untar.Tpo -c -o libclamav_la-untar.lo `test -f 'untar.c' || echo '$(srcdir)/'`untar.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-untar.Tpo $(DEPDIR)/libclamav_la-untar.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='untar.c' object='libclamav_la-untar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-untar.lo `test -f 'untar.c' || echo '$(srcdir)/'`untar.c + +libclamav_la-unzip.lo: unzip.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-unzip.lo -MD -MP -MF $(DEPDIR)/libclamav_la-unzip.Tpo -c -o libclamav_la-unzip.lo `test -f 'unzip.c' || echo '$(srcdir)/'`unzip.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-unzip.Tpo $(DEPDIR)/libclamav_la-unzip.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unzip.c' object='libclamav_la-unzip.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-unzip.lo `test -f 'unzip.c' || echo '$(srcdir)/'`unzip.c + +libclamav_la-ooxml.lo: ooxml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-ooxml.lo -MD -MP -MF $(DEPDIR)/libclamav_la-ooxml.Tpo -c -o libclamav_la-ooxml.lo `test -f 'ooxml.c' || echo '$(srcdir)/'`ooxml.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-ooxml.Tpo $(DEPDIR)/libclamav_la-ooxml.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ooxml.c' object='libclamav_la-ooxml.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-ooxml.lo `test -f 'ooxml.c' || echo '$(srcdir)/'`ooxml.c + +libclamav_la-inflate64.lo: inflate64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-inflate64.lo -MD -MP -MF $(DEPDIR)/libclamav_la-inflate64.Tpo -c -o libclamav_la-inflate64.lo `test -f 'inflate64.c' || echo '$(srcdir)/'`inflate64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-inflate64.Tpo $(DEPDIR)/libclamav_la-inflate64.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='inflate64.c' object='libclamav_la-inflate64.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-inflate64.lo `test -f 'inflate64.c' || echo '$(srcdir)/'`inflate64.c + +libclamav_la-special.lo: special.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-special.lo -MD -MP -MF $(DEPDIR)/libclamav_la-special.Tpo -c -o libclamav_la-special.lo `test -f 'special.c' || echo '$(srcdir)/'`special.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-special.Tpo $(DEPDIR)/libclamav_la-special.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='special.c' object='libclamav_la-special.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-special.lo `test -f 'special.c' || echo '$(srcdir)/'`special.c + +libclamav_la-binhex.lo: binhex.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-binhex.lo -MD -MP -MF $(DEPDIR)/libclamav_la-binhex.Tpo -c -o libclamav_la-binhex.lo `test -f 'binhex.c' || echo '$(srcdir)/'`binhex.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-binhex.Tpo $(DEPDIR)/libclamav_la-binhex.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='binhex.c' object='libclamav_la-binhex.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-binhex.lo `test -f 'binhex.c' || echo '$(srcdir)/'`binhex.c + +libclamav_la-is_tar.lo: is_tar.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-is_tar.lo -MD -MP -MF $(DEPDIR)/libclamav_la-is_tar.Tpo -c -o libclamav_la-is_tar.lo `test -f 'is_tar.c' || echo '$(srcdir)/'`is_tar.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-is_tar.Tpo $(DEPDIR)/libclamav_la-is_tar.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='is_tar.c' object='libclamav_la-is_tar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-is_tar.lo `test -f 'is_tar.c' || echo '$(srcdir)/'`is_tar.c + +libclamav_la-tnef.lo: tnef.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-tnef.lo -MD -MP -MF $(DEPDIR)/libclamav_la-tnef.Tpo -c -o libclamav_la-tnef.lo `test -f 'tnef.c' || echo '$(srcdir)/'`tnef.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-tnef.Tpo $(DEPDIR)/libclamav_la-tnef.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tnef.c' object='libclamav_la-tnef.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-tnef.lo `test -f 'tnef.c' || echo '$(srcdir)/'`tnef.c + +libclamav_la-autoit.lo: autoit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-autoit.lo -MD -MP -MF $(DEPDIR)/libclamav_la-autoit.Tpo -c -o libclamav_la-autoit.lo `test -f 'autoit.c' || echo '$(srcdir)/'`autoit.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-autoit.Tpo $(DEPDIR)/libclamav_la-autoit.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='autoit.c' object='libclamav_la-autoit.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-autoit.lo `test -f 'autoit.c' || echo '$(srcdir)/'`autoit.c + +libclamav_la-unarj.lo: unarj.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-unarj.lo -MD -MP -MF $(DEPDIR)/libclamav_la-unarj.Tpo -c -o libclamav_la-unarj.lo `test -f 'unarj.c' || echo '$(srcdir)/'`unarj.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-unarj.Tpo $(DEPDIR)/libclamav_la-unarj.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='unarj.c' object='libclamav_la-unarj.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-unarj.lo `test -f 'unarj.c' || echo '$(srcdir)/'`unarj.c + +nsis/libclamav_la-bzlib.lo: nsis/bzlib.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT nsis/libclamav_la-bzlib.lo -MD -MP -MF nsis/$(DEPDIR)/libclamav_la-bzlib.Tpo -c -o nsis/libclamav_la-bzlib.lo `test -f 'nsis/bzlib.c' || echo '$(srcdir)/'`nsis/bzlib.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) nsis/$(DEPDIR)/libclamav_la-bzlib.Tpo nsis/$(DEPDIR)/libclamav_la-bzlib.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nsis/bzlib.c' object='nsis/libclamav_la-bzlib.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o nsis/libclamav_la-bzlib.lo `test -f 'nsis/bzlib.c' || echo '$(srcdir)/'`nsis/bzlib.c + +nsis/libclamav_la-nulsft.lo: nsis/nulsft.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT nsis/libclamav_la-nulsft.lo -MD -MP -MF nsis/$(DEPDIR)/libclamav_la-nulsft.Tpo -c -o nsis/libclamav_la-nulsft.lo `test -f 'nsis/nulsft.c' || echo '$(srcdir)/'`nsis/nulsft.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) nsis/$(DEPDIR)/libclamav_la-nulsft.Tpo nsis/$(DEPDIR)/libclamav_la-nulsft.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nsis/nulsft.c' object='nsis/libclamav_la-nulsft.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o nsis/libclamav_la-nulsft.lo `test -f 'nsis/nulsft.c' || echo '$(srcdir)/'`nsis/nulsft.c + +nsis/libclamav_la-infblock.lo: nsis/infblock.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT nsis/libclamav_la-infblock.lo -MD -MP -MF nsis/$(DEPDIR)/libclamav_la-infblock.Tpo -c -o nsis/libclamav_la-infblock.lo `test -f 'nsis/infblock.c' || echo '$(srcdir)/'`nsis/infblock.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) nsis/$(DEPDIR)/libclamav_la-infblock.Tpo nsis/$(DEPDIR)/libclamav_la-infblock.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='nsis/infblock.c' object='nsis/libclamav_la-infblock.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o nsis/libclamav_la-infblock.lo `test -f 'nsis/infblock.c' || echo '$(srcdir)/'`nsis/infblock.c + +libclamav_la-pdf.lo: pdf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-pdf.lo -MD -MP -MF $(DEPDIR)/libclamav_la-pdf.Tpo -c -o libclamav_la-pdf.lo `test -f 'pdf.c' || echo '$(srcdir)/'`pdf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-pdf.Tpo $(DEPDIR)/libclamav_la-pdf.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pdf.c' object='libclamav_la-pdf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-pdf.lo `test -f 'pdf.c' || echo '$(srcdir)/'`pdf.c + +libclamav_la-pdfng.lo: pdfng.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-pdfng.lo -MD -MP -MF $(DEPDIR)/libclamav_la-pdfng.Tpo -c -o libclamav_la-pdfng.lo `test -f 'pdfng.c' || echo '$(srcdir)/'`pdfng.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-pdfng.Tpo $(DEPDIR)/libclamav_la-pdfng.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pdfng.c' object='libclamav_la-pdfng.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-pdfng.lo `test -f 'pdfng.c' || echo '$(srcdir)/'`pdfng.c + +libclamav_la-pdfdecode.lo: pdfdecode.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-pdfdecode.lo -MD -MP -MF $(DEPDIR)/libclamav_la-pdfdecode.Tpo -c -o libclamav_la-pdfdecode.lo `test -f 'pdfdecode.c' || echo '$(srcdir)/'`pdfdecode.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-pdfdecode.Tpo $(DEPDIR)/libclamav_la-pdfdecode.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pdfdecode.c' object='libclamav_la-pdfdecode.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-pdfdecode.lo `test -f 'pdfdecode.c' || echo '$(srcdir)/'`pdfdecode.c + +libclamav_la-spin.lo: spin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-spin.lo -MD -MP -MF $(DEPDIR)/libclamav_la-spin.Tpo -c -o libclamav_la-spin.lo `test -f 'spin.c' || echo '$(srcdir)/'`spin.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-spin.Tpo $(DEPDIR)/libclamav_la-spin.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spin.c' object='libclamav_la-spin.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-spin.lo `test -f 'spin.c' || echo '$(srcdir)/'`spin.c + +libclamav_la-yc.lo: yc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-yc.lo -MD -MP -MF $(DEPDIR)/libclamav_la-yc.Tpo -c -o libclamav_la-yc.lo `test -f 'yc.c' || echo '$(srcdir)/'`yc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-yc.Tpo $(DEPDIR)/libclamav_la-yc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='yc.c' object='libclamav_la-yc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-yc.lo `test -f 'yc.c' || echo '$(srcdir)/'`yc.c + +libclamav_la-elf.lo: elf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-elf.lo -MD -MP -MF $(DEPDIR)/libclamav_la-elf.Tpo -c -o libclamav_la-elf.lo `test -f 'elf.c' || echo '$(srcdir)/'`elf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-elf.Tpo $(DEPDIR)/libclamav_la-elf.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='elf.c' object='libclamav_la-elf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-elf.lo `test -f 'elf.c' || echo '$(srcdir)/'`elf.c + +libclamav_la-execs.lo: execs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-execs.lo -MD -MP -MF $(DEPDIR)/libclamav_la-execs.Tpo -c -o libclamav_la-execs.lo `test -f 'execs.c' || echo '$(srcdir)/'`execs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-execs.Tpo $(DEPDIR)/libclamav_la-execs.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='execs.c' object='libclamav_la-execs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-execs.lo `test -f 'execs.c' || echo '$(srcdir)/'`execs.c + +libclamav_la-sis.lo: sis.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-sis.lo -MD -MP -MF $(DEPDIR)/libclamav_la-sis.Tpo -c -o libclamav_la-sis.lo `test -f 'sis.c' || echo '$(srcdir)/'`sis.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-sis.Tpo $(DEPDIR)/libclamav_la-sis.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sis.c' object='libclamav_la-sis.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-sis.lo `test -f 'sis.c' || echo '$(srcdir)/'`sis.c + +libclamav_la-uuencode.lo: uuencode.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-uuencode.lo -MD -MP -MF $(DEPDIR)/libclamav_la-uuencode.Tpo -c -o libclamav_la-uuencode.lo `test -f 'uuencode.c' || echo '$(srcdir)/'`uuencode.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-uuencode.Tpo $(DEPDIR)/libclamav_la-uuencode.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uuencode.c' object='libclamav_la-uuencode.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-uuencode.lo `test -f 'uuencode.c' || echo '$(srcdir)/'`uuencode.c + +libclamav_la-phishcheck.lo: phishcheck.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-phishcheck.lo -MD -MP -MF $(DEPDIR)/libclamav_la-phishcheck.Tpo -c -o libclamav_la-phishcheck.lo `test -f 'phishcheck.c' || echo '$(srcdir)/'`phishcheck.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-phishcheck.Tpo $(DEPDIR)/libclamav_la-phishcheck.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='phishcheck.c' object='libclamav_la-phishcheck.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-phishcheck.lo `test -f 'phishcheck.c' || echo '$(srcdir)/'`phishcheck.c + +libclamav_la-phish_domaincheck_db.lo: phish_domaincheck_db.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-phish_domaincheck_db.lo -MD -MP -MF $(DEPDIR)/libclamav_la-phish_domaincheck_db.Tpo -c -o libclamav_la-phish_domaincheck_db.lo `test -f 'phish_domaincheck_db.c' || echo '$(srcdir)/'`phish_domaincheck_db.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-phish_domaincheck_db.Tpo $(DEPDIR)/libclamav_la-phish_domaincheck_db.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='phish_domaincheck_db.c' object='libclamav_la-phish_domaincheck_db.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-phish_domaincheck_db.lo `test -f 'phish_domaincheck_db.c' || echo '$(srcdir)/'`phish_domaincheck_db.c + +libclamav_la-phish_whitelist.lo: phish_whitelist.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-phish_whitelist.lo -MD -MP -MF $(DEPDIR)/libclamav_la-phish_whitelist.Tpo -c -o libclamav_la-phish_whitelist.lo `test -f 'phish_whitelist.c' || echo '$(srcdir)/'`phish_whitelist.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-phish_whitelist.Tpo $(DEPDIR)/libclamav_la-phish_whitelist.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='phish_whitelist.c' object='libclamav_la-phish_whitelist.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-phish_whitelist.lo `test -f 'phish_whitelist.c' || echo '$(srcdir)/'`phish_whitelist.c + +libclamav_la-regex_list.lo: regex_list.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-regex_list.lo -MD -MP -MF $(DEPDIR)/libclamav_la-regex_list.Tpo -c -o libclamav_la-regex_list.lo `test -f 'regex_list.c' || echo '$(srcdir)/'`regex_list.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-regex_list.Tpo $(DEPDIR)/libclamav_la-regex_list.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='regex_list.c' object='libclamav_la-regex_list.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-regex_list.lo `test -f 'regex_list.c' || echo '$(srcdir)/'`regex_list.c + +libclamav_la-regex_suffix.lo: regex_suffix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-regex_suffix.lo -MD -MP -MF $(DEPDIR)/libclamav_la-regex_suffix.Tpo -c -o libclamav_la-regex_suffix.lo `test -f 'regex_suffix.c' || echo '$(srcdir)/'`regex_suffix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-regex_suffix.Tpo $(DEPDIR)/libclamav_la-regex_suffix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='regex_suffix.c' object='libclamav_la-regex_suffix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-regex_suffix.lo `test -f 'regex_suffix.c' || echo '$(srcdir)/'`regex_suffix.c + +libclamav_la-entconv.lo: entconv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-entconv.lo -MD -MP -MF $(DEPDIR)/libclamav_la-entconv.Tpo -c -o libclamav_la-entconv.lo `test -f 'entconv.c' || echo '$(srcdir)/'`entconv.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-entconv.Tpo $(DEPDIR)/libclamav_la-entconv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='entconv.c' object='libclamav_la-entconv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-entconv.lo `test -f 'entconv.c' || echo '$(srcdir)/'`entconv.c + +libclamav_la-hashtab.lo: hashtab.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-hashtab.lo -MD -MP -MF $(DEPDIR)/libclamav_la-hashtab.Tpo -c -o libclamav_la-hashtab.lo `test -f 'hashtab.c' || echo '$(srcdir)/'`hashtab.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-hashtab.Tpo $(DEPDIR)/libclamav_la-hashtab.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hashtab.c' object='libclamav_la-hashtab.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-hashtab.lo `test -f 'hashtab.c' || echo '$(srcdir)/'`hashtab.c + +libclamav_la-dconf.lo: dconf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-dconf.lo -MD -MP -MF $(DEPDIR)/libclamav_la-dconf.Tpo -c -o libclamav_la-dconf.lo `test -f 'dconf.c' || echo '$(srcdir)/'`dconf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-dconf.Tpo $(DEPDIR)/libclamav_la-dconf.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dconf.c' object='libclamav_la-dconf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-dconf.lo `test -f 'dconf.c' || echo '$(srcdir)/'`dconf.c + +libclamav_la-lzma_iface.lo: lzma_iface.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-lzma_iface.lo -MD -MP -MF $(DEPDIR)/libclamav_la-lzma_iface.Tpo -c -o libclamav_la-lzma_iface.lo `test -f 'lzma_iface.c' || echo '$(srcdir)/'`lzma_iface.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-lzma_iface.Tpo $(DEPDIR)/libclamav_la-lzma_iface.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzma_iface.c' object='libclamav_la-lzma_iface.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-lzma_iface.lo `test -f 'lzma_iface.c' || echo '$(srcdir)/'`lzma_iface.c + +libclamav_la-7z_iface.lo: 7z_iface.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-7z_iface.lo -MD -MP -MF $(DEPDIR)/libclamav_la-7z_iface.Tpo -c -o libclamav_la-7z_iface.lo `test -f '7z_iface.c' || echo '$(srcdir)/'`7z_iface.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-7z_iface.Tpo $(DEPDIR)/libclamav_la-7z_iface.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z_iface.c' object='libclamav_la-7z_iface.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-7z_iface.lo `test -f '7z_iface.c' || echo '$(srcdir)/'`7z_iface.c + +7z/libclamav_la-7zAlloc.lo: 7z/7zAlloc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-7zAlloc.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-7zAlloc.Tpo -c -o 7z/libclamav_la-7zAlloc.lo `test -f '7z/7zAlloc.c' || echo '$(srcdir)/'`7z/7zAlloc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-7zAlloc.Tpo 7z/$(DEPDIR)/libclamav_la-7zAlloc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/7zAlloc.c' object='7z/libclamav_la-7zAlloc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-7zAlloc.lo `test -f '7z/7zAlloc.c' || echo '$(srcdir)/'`7z/7zAlloc.c + +7z/libclamav_la-7zBuf.lo: 7z/7zBuf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-7zBuf.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-7zBuf.Tpo -c -o 7z/libclamav_la-7zBuf.lo `test -f '7z/7zBuf.c' || echo '$(srcdir)/'`7z/7zBuf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-7zBuf.Tpo 7z/$(DEPDIR)/libclamav_la-7zBuf.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/7zBuf.c' object='7z/libclamav_la-7zBuf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-7zBuf.lo `test -f '7z/7zBuf.c' || echo '$(srcdir)/'`7z/7zBuf.c + +7z/libclamav_la-7zBuf2.lo: 7z/7zBuf2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-7zBuf2.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-7zBuf2.Tpo -c -o 7z/libclamav_la-7zBuf2.lo `test -f '7z/7zBuf2.c' || echo '$(srcdir)/'`7z/7zBuf2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-7zBuf2.Tpo 7z/$(DEPDIR)/libclamav_la-7zBuf2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/7zBuf2.c' object='7z/libclamav_la-7zBuf2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-7zBuf2.lo `test -f '7z/7zBuf2.c' || echo '$(srcdir)/'`7z/7zBuf2.c + +7z/libclamav_la-7zCrc.lo: 7z/7zCrc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-7zCrc.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-7zCrc.Tpo -c -o 7z/libclamav_la-7zCrc.lo `test -f '7z/7zCrc.c' || echo '$(srcdir)/'`7z/7zCrc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-7zCrc.Tpo 7z/$(DEPDIR)/libclamav_la-7zCrc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/7zCrc.c' object='7z/libclamav_la-7zCrc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-7zCrc.lo `test -f '7z/7zCrc.c' || echo '$(srcdir)/'`7z/7zCrc.c + +7z/libclamav_la-7zDec.lo: 7z/7zDec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-7zDec.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-7zDec.Tpo -c -o 7z/libclamav_la-7zDec.lo `test -f '7z/7zDec.c' || echo '$(srcdir)/'`7z/7zDec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-7zDec.Tpo 7z/$(DEPDIR)/libclamav_la-7zDec.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/7zDec.c' object='7z/libclamav_la-7zDec.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-7zDec.lo `test -f '7z/7zDec.c' || echo '$(srcdir)/'`7z/7zDec.c + +7z/libclamav_la-7zFile.lo: 7z/7zFile.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-7zFile.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-7zFile.Tpo -c -o 7z/libclamav_la-7zFile.lo `test -f '7z/7zFile.c' || echo '$(srcdir)/'`7z/7zFile.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-7zFile.Tpo 7z/$(DEPDIR)/libclamav_la-7zFile.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/7zFile.c' object='7z/libclamav_la-7zFile.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-7zFile.lo `test -f '7z/7zFile.c' || echo '$(srcdir)/'`7z/7zFile.c + +7z/libclamav_la-7zIn.lo: 7z/7zIn.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-7zIn.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-7zIn.Tpo -c -o 7z/libclamav_la-7zIn.lo `test -f '7z/7zIn.c' || echo '$(srcdir)/'`7z/7zIn.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-7zIn.Tpo 7z/$(DEPDIR)/libclamav_la-7zIn.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/7zIn.c' object='7z/libclamav_la-7zIn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-7zIn.lo `test -f '7z/7zIn.c' || echo '$(srcdir)/'`7z/7zIn.c + +7z/libclamav_la-7zStream.lo: 7z/7zStream.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-7zStream.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-7zStream.Tpo -c -o 7z/libclamav_la-7zStream.lo `test -f '7z/7zStream.c' || echo '$(srcdir)/'`7z/7zStream.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-7zStream.Tpo 7z/$(DEPDIR)/libclamav_la-7zStream.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/7zStream.c' object='7z/libclamav_la-7zStream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-7zStream.lo `test -f '7z/7zStream.c' || echo '$(srcdir)/'`7z/7zStream.c + +7z/libclamav_la-Bcj2.lo: 7z/Bcj2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-Bcj2.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-Bcj2.Tpo -c -o 7z/libclamav_la-Bcj2.lo `test -f '7z/Bcj2.c' || echo '$(srcdir)/'`7z/Bcj2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-Bcj2.Tpo 7z/$(DEPDIR)/libclamav_la-Bcj2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/Bcj2.c' object='7z/libclamav_la-Bcj2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-Bcj2.lo `test -f '7z/Bcj2.c' || echo '$(srcdir)/'`7z/Bcj2.c + +7z/libclamav_la-Bra.lo: 7z/Bra.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-Bra.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-Bra.Tpo -c -o 7z/libclamav_la-Bra.lo `test -f '7z/Bra.c' || echo '$(srcdir)/'`7z/Bra.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-Bra.Tpo 7z/$(DEPDIR)/libclamav_la-Bra.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/Bra.c' object='7z/libclamav_la-Bra.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-Bra.lo `test -f '7z/Bra.c' || echo '$(srcdir)/'`7z/Bra.c + +7z/libclamav_la-Bra86.lo: 7z/Bra86.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-Bra86.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-Bra86.Tpo -c -o 7z/libclamav_la-Bra86.lo `test -f '7z/Bra86.c' || echo '$(srcdir)/'`7z/Bra86.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-Bra86.Tpo 7z/$(DEPDIR)/libclamav_la-Bra86.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/Bra86.c' object='7z/libclamav_la-Bra86.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-Bra86.lo `test -f '7z/Bra86.c' || echo '$(srcdir)/'`7z/Bra86.c + +7z/libclamav_la-Lzma2Dec.lo: 7z/Lzma2Dec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-Lzma2Dec.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-Lzma2Dec.Tpo -c -o 7z/libclamav_la-Lzma2Dec.lo `test -f '7z/Lzma2Dec.c' || echo '$(srcdir)/'`7z/Lzma2Dec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-Lzma2Dec.Tpo 7z/$(DEPDIR)/libclamav_la-Lzma2Dec.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/Lzma2Dec.c' object='7z/libclamav_la-Lzma2Dec.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-Lzma2Dec.lo `test -f '7z/Lzma2Dec.c' || echo '$(srcdir)/'`7z/Lzma2Dec.c + +7z/libclamav_la-LzmaDec.lo: 7z/LzmaDec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-LzmaDec.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-LzmaDec.Tpo -c -o 7z/libclamav_la-LzmaDec.lo `test -f '7z/LzmaDec.c' || echo '$(srcdir)/'`7z/LzmaDec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-LzmaDec.Tpo 7z/$(DEPDIR)/libclamav_la-LzmaDec.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/LzmaDec.c' object='7z/libclamav_la-LzmaDec.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-LzmaDec.lo `test -f '7z/LzmaDec.c' || echo '$(srcdir)/'`7z/LzmaDec.c + +7z/libclamav_la-Ppmd7.lo: 7z/Ppmd7.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-Ppmd7.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-Ppmd7.Tpo -c -o 7z/libclamav_la-Ppmd7.lo `test -f '7z/Ppmd7.c' || echo '$(srcdir)/'`7z/Ppmd7.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-Ppmd7.Tpo 7z/$(DEPDIR)/libclamav_la-Ppmd7.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/Ppmd7.c' object='7z/libclamav_la-Ppmd7.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-Ppmd7.lo `test -f '7z/Ppmd7.c' || echo '$(srcdir)/'`7z/Ppmd7.c + +7z/libclamav_la-Ppmd7Dec.lo: 7z/Ppmd7Dec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-Ppmd7Dec.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-Ppmd7Dec.Tpo -c -o 7z/libclamav_la-Ppmd7Dec.lo `test -f '7z/Ppmd7Dec.c' || echo '$(srcdir)/'`7z/Ppmd7Dec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-Ppmd7Dec.Tpo 7z/$(DEPDIR)/libclamav_la-Ppmd7Dec.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/Ppmd7Dec.c' object='7z/libclamav_la-Ppmd7Dec.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-Ppmd7Dec.lo `test -f '7z/Ppmd7Dec.c' || echo '$(srcdir)/'`7z/Ppmd7Dec.c + +7z/libclamav_la-Xz.lo: 7z/Xz.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-Xz.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-Xz.Tpo -c -o 7z/libclamav_la-Xz.lo `test -f '7z/Xz.c' || echo '$(srcdir)/'`7z/Xz.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-Xz.Tpo 7z/$(DEPDIR)/libclamav_la-Xz.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/Xz.c' object='7z/libclamav_la-Xz.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-Xz.lo `test -f '7z/Xz.c' || echo '$(srcdir)/'`7z/Xz.c + +7z/libclamav_la-XzCrc64.lo: 7z/XzCrc64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-XzCrc64.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-XzCrc64.Tpo -c -o 7z/libclamav_la-XzCrc64.lo `test -f '7z/XzCrc64.c' || echo '$(srcdir)/'`7z/XzCrc64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-XzCrc64.Tpo 7z/$(DEPDIR)/libclamav_la-XzCrc64.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/XzCrc64.c' object='7z/libclamav_la-XzCrc64.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-XzCrc64.lo `test -f '7z/XzCrc64.c' || echo '$(srcdir)/'`7z/XzCrc64.c + +7z/libclamav_la-XzDec.lo: 7z/XzDec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-XzDec.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-XzDec.Tpo -c -o 7z/libclamav_la-XzDec.lo `test -f '7z/XzDec.c' || echo '$(srcdir)/'`7z/XzDec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-XzDec.Tpo 7z/$(DEPDIR)/libclamav_la-XzDec.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/XzDec.c' object='7z/libclamav_la-XzDec.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-XzDec.lo `test -f '7z/XzDec.c' || echo '$(srcdir)/'`7z/XzDec.c + +7z/libclamav_la-XzIn.lo: 7z/XzIn.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-XzIn.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-XzIn.Tpo -c -o 7z/libclamav_la-XzIn.lo `test -f '7z/XzIn.c' || echo '$(srcdir)/'`7z/XzIn.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-XzIn.Tpo 7z/$(DEPDIR)/libclamav_la-XzIn.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/XzIn.c' object='7z/libclamav_la-XzIn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-XzIn.lo `test -f '7z/XzIn.c' || echo '$(srcdir)/'`7z/XzIn.c + +7z/libclamav_la-Delta.lo: 7z/Delta.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-Delta.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-Delta.Tpo -c -o 7z/libclamav_la-Delta.lo `test -f '7z/Delta.c' || echo '$(srcdir)/'`7z/Delta.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-Delta.Tpo 7z/$(DEPDIR)/libclamav_la-Delta.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/Delta.c' object='7z/libclamav_la-Delta.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-Delta.lo `test -f '7z/Delta.c' || echo '$(srcdir)/'`7z/Delta.c + +7z/libclamav_la-BraIA64.lo: 7z/BraIA64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-BraIA64.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-BraIA64.Tpo -c -o 7z/libclamav_la-BraIA64.lo `test -f '7z/BraIA64.c' || echo '$(srcdir)/'`7z/BraIA64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-BraIA64.Tpo 7z/$(DEPDIR)/libclamav_la-BraIA64.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/BraIA64.c' object='7z/libclamav_la-BraIA64.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-BraIA64.lo `test -f '7z/BraIA64.c' || echo '$(srcdir)/'`7z/BraIA64.c + +7z/libclamav_la-CpuArch.lo: 7z/CpuArch.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-CpuArch.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-CpuArch.Tpo -c -o 7z/libclamav_la-CpuArch.lo `test -f '7z/CpuArch.c' || echo '$(srcdir)/'`7z/CpuArch.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-CpuArch.Tpo 7z/$(DEPDIR)/libclamav_la-CpuArch.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/CpuArch.c' object='7z/libclamav_la-CpuArch.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-CpuArch.lo `test -f '7z/CpuArch.c' || echo '$(srcdir)/'`7z/CpuArch.c + +7z/libclamav_la-7zCrcOpt.lo: 7z/7zCrcOpt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT 7z/libclamav_la-7zCrcOpt.lo -MD -MP -MF 7z/$(DEPDIR)/libclamav_la-7zCrcOpt.Tpo -c -o 7z/libclamav_la-7zCrcOpt.lo `test -f '7z/7zCrcOpt.c' || echo '$(srcdir)/'`7z/7zCrcOpt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) 7z/$(DEPDIR)/libclamav_la-7zCrcOpt.Tpo 7z/$(DEPDIR)/libclamav_la-7zCrcOpt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='7z/7zCrcOpt.c' object='7z/libclamav_la-7zCrcOpt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o 7z/libclamav_la-7zCrcOpt.lo `test -f '7z/7zCrcOpt.c' || echo '$(srcdir)/'`7z/7zCrcOpt.c + +libclamav_la-explode.lo: explode.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-explode.lo -MD -MP -MF $(DEPDIR)/libclamav_la-explode.Tpo -c -o libclamav_la-explode.lo `test -f 'explode.c' || echo '$(srcdir)/'`explode.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-explode.Tpo $(DEPDIR)/libclamav_la-explode.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='explode.c' object='libclamav_la-explode.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-explode.lo `test -f 'explode.c' || echo '$(srcdir)/'`explode.c + +libclamav_la-textnorm.lo: textnorm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-textnorm.lo -MD -MP -MF $(DEPDIR)/libclamav_la-textnorm.Tpo -c -o libclamav_la-textnorm.lo `test -f 'textnorm.c' || echo '$(srcdir)/'`textnorm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-textnorm.Tpo $(DEPDIR)/libclamav_la-textnorm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='textnorm.c' object='libclamav_la-textnorm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-textnorm.lo `test -f 'textnorm.c' || echo '$(srcdir)/'`textnorm.c + +libclamav_la-dlp.lo: dlp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-dlp.lo -MD -MP -MF $(DEPDIR)/libclamav_la-dlp.Tpo -c -o libclamav_la-dlp.lo `test -f 'dlp.c' || echo '$(srcdir)/'`dlp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-dlp.Tpo $(DEPDIR)/libclamav_la-dlp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dlp.c' object='libclamav_la-dlp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-dlp.lo `test -f 'dlp.c' || echo '$(srcdir)/'`dlp.c + +jsparse/libclamav_la-js-norm.lo: jsparse/js-norm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT jsparse/libclamav_la-js-norm.lo -MD -MP -MF jsparse/$(DEPDIR)/libclamav_la-js-norm.Tpo -c -o jsparse/libclamav_la-js-norm.lo `test -f 'jsparse/js-norm.c' || echo '$(srcdir)/'`jsparse/js-norm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) jsparse/$(DEPDIR)/libclamav_la-js-norm.Tpo jsparse/$(DEPDIR)/libclamav_la-js-norm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='jsparse/js-norm.c' object='jsparse/libclamav_la-js-norm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o jsparse/libclamav_la-js-norm.lo `test -f 'jsparse/js-norm.c' || echo '$(srcdir)/'`jsparse/js-norm.c + +libclamav_la-uniq.lo: uniq.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-uniq.lo -MD -MP -MF $(DEPDIR)/libclamav_la-uniq.Tpo -c -o libclamav_la-uniq.lo `test -f 'uniq.c' || echo '$(srcdir)/'`uniq.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-uniq.Tpo $(DEPDIR)/libclamav_la-uniq.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uniq.c' object='libclamav_la-uniq.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-uniq.lo `test -f 'uniq.c' || echo '$(srcdir)/'`uniq.c + +libclamav_la-version.lo: version.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-version.lo -MD -MP -MF $(DEPDIR)/libclamav_la-version.Tpo -c -o libclamav_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-version.Tpo $(DEPDIR)/libclamav_la-version.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='version.c' object='libclamav_la-version.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-version.lo `test -f 'version.c' || echo '$(srcdir)/'`version.c + +libclamav_la-mpool.lo: mpool.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-mpool.lo -MD -MP -MF $(DEPDIR)/libclamav_la-mpool.Tpo -c -o libclamav_la-mpool.lo `test -f 'mpool.c' || echo '$(srcdir)/'`mpool.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-mpool.Tpo $(DEPDIR)/libclamav_la-mpool.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mpool.c' object='libclamav_la-mpool.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-mpool.lo `test -f 'mpool.c' || echo '$(srcdir)/'`mpool.c + +libclamav_la-filtering.lo: filtering.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-filtering.lo -MD -MP -MF $(DEPDIR)/libclamav_la-filtering.Tpo -c -o libclamav_la-filtering.lo `test -f 'filtering.c' || echo '$(srcdir)/'`filtering.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-filtering.Tpo $(DEPDIR)/libclamav_la-filtering.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='filtering.c' object='libclamav_la-filtering.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-filtering.lo `test -f 'filtering.c' || echo '$(srcdir)/'`filtering.c + +libclamav_la-fmap.lo: fmap.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-fmap.lo -MD -MP -MF $(DEPDIR)/libclamav_la-fmap.Tpo -c -o libclamav_la-fmap.lo `test -f 'fmap.c' || echo '$(srcdir)/'`fmap.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-fmap.Tpo $(DEPDIR)/libclamav_la-fmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fmap.c' object='libclamav_la-fmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-fmap.lo `test -f 'fmap.c' || echo '$(srcdir)/'`fmap.c + +libclamav_la-perflogging.lo: perflogging.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-perflogging.lo -MD -MP -MF $(DEPDIR)/libclamav_la-perflogging.Tpo -c -o libclamav_la-perflogging.lo `test -f 'perflogging.c' || echo '$(srcdir)/'`perflogging.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-perflogging.Tpo $(DEPDIR)/libclamav_la-perflogging.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='perflogging.c' object='libclamav_la-perflogging.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-perflogging.lo `test -f 'perflogging.c' || echo '$(srcdir)/'`perflogging.c + +libclamav_la-bytecode.lo: bytecode.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-bytecode.lo -MD -MP -MF $(DEPDIR)/libclamav_la-bytecode.Tpo -c -o libclamav_la-bytecode.lo `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-bytecode.Tpo $(DEPDIR)/libclamav_la-bytecode.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bytecode.c' object='libclamav_la-bytecode.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-bytecode.lo `test -f 'bytecode.c' || echo '$(srcdir)/'`bytecode.c + +libclamav_la-bytecode_vm.lo: bytecode_vm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-bytecode_vm.lo -MD -MP -MF $(DEPDIR)/libclamav_la-bytecode_vm.Tpo -c -o libclamav_la-bytecode_vm.lo `test -f 'bytecode_vm.c' || echo '$(srcdir)/'`bytecode_vm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-bytecode_vm.Tpo $(DEPDIR)/libclamav_la-bytecode_vm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bytecode_vm.c' object='libclamav_la-bytecode_vm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-bytecode_vm.lo `test -f 'bytecode_vm.c' || echo '$(srcdir)/'`bytecode_vm.c + +libclamav_la-cpio.lo: cpio.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-cpio.lo -MD -MP -MF $(DEPDIR)/libclamav_la-cpio.Tpo -c -o libclamav_la-cpio.lo `test -f 'cpio.c' || echo '$(srcdir)/'`cpio.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-cpio.Tpo $(DEPDIR)/libclamav_la-cpio.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cpio.c' object='libclamav_la-cpio.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-cpio.lo `test -f 'cpio.c' || echo '$(srcdir)/'`cpio.c + +libclamav_la-macho.lo: macho.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-macho.lo -MD -MP -MF $(DEPDIR)/libclamav_la-macho.Tpo -c -o libclamav_la-macho.lo `test -f 'macho.c' || echo '$(srcdir)/'`macho.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-macho.Tpo $(DEPDIR)/libclamav_la-macho.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='macho.c' object='libclamav_la-macho.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-macho.lo `test -f 'macho.c' || echo '$(srcdir)/'`macho.c + +libclamav_la-ishield.lo: ishield.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-ishield.lo -MD -MP -MF $(DEPDIR)/libclamav_la-ishield.Tpo -c -o libclamav_la-ishield.lo `test -f 'ishield.c' || echo '$(srcdir)/'`ishield.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-ishield.Tpo $(DEPDIR)/libclamav_la-ishield.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ishield.c' object='libclamav_la-ishield.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-ishield.lo `test -f 'ishield.c' || echo '$(srcdir)/'`ishield.c + +libclamav_la-bytecode_api.lo: bytecode_api.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-bytecode_api.lo -MD -MP -MF $(DEPDIR)/libclamav_la-bytecode_api.Tpo -c -o libclamav_la-bytecode_api.lo `test -f 'bytecode_api.c' || echo '$(srcdir)/'`bytecode_api.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-bytecode_api.Tpo $(DEPDIR)/libclamav_la-bytecode_api.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bytecode_api.c' object='libclamav_la-bytecode_api.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-bytecode_api.lo `test -f 'bytecode_api.c' || echo '$(srcdir)/'`bytecode_api.c + +libclamav_la-bytecode_api_decl.lo: bytecode_api_decl.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-bytecode_api_decl.lo -MD -MP -MF $(DEPDIR)/libclamav_la-bytecode_api_decl.Tpo -c -o libclamav_la-bytecode_api_decl.lo `test -f 'bytecode_api_decl.c' || echo '$(srcdir)/'`bytecode_api_decl.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-bytecode_api_decl.Tpo $(DEPDIR)/libclamav_la-bytecode_api_decl.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bytecode_api_decl.c' object='libclamav_la-bytecode_api_decl.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-bytecode_api_decl.lo `test -f 'bytecode_api_decl.c' || echo '$(srcdir)/'`bytecode_api_decl.c + +libclamav_la-cache.lo: cache.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-cache.lo -MD -MP -MF $(DEPDIR)/libclamav_la-cache.Tpo -c -o libclamav_la-cache.lo `test -f 'cache.c' || echo '$(srcdir)/'`cache.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-cache.Tpo $(DEPDIR)/libclamav_la-cache.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cache.c' object='libclamav_la-cache.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-cache.lo `test -f 'cache.c' || echo '$(srcdir)/'`cache.c + +libclamav_la-bytecode_detect.lo: bytecode_detect.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-bytecode_detect.lo -MD -MP -MF $(DEPDIR)/libclamav_la-bytecode_detect.Tpo -c -o libclamav_la-bytecode_detect.lo `test -f 'bytecode_detect.c' || echo '$(srcdir)/'`bytecode_detect.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-bytecode_detect.Tpo $(DEPDIR)/libclamav_la-bytecode_detect.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bytecode_detect.c' object='libclamav_la-bytecode_detect.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-bytecode_detect.lo `test -f 'bytecode_detect.c' || echo '$(srcdir)/'`bytecode_detect.c + +libclamav_la-events.lo: events.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-events.lo -MD -MP -MF $(DEPDIR)/libclamav_la-events.Tpo -c -o libclamav_la-events.lo `test -f 'events.c' || echo '$(srcdir)/'`events.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-events.Tpo $(DEPDIR)/libclamav_la-events.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='events.c' object='libclamav_la-events.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-events.lo `test -f 'events.c' || echo '$(srcdir)/'`events.c + +libclamav_la-adc.lo: adc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-adc.lo -MD -MP -MF $(DEPDIR)/libclamav_la-adc.Tpo -c -o libclamav_la-adc.lo `test -f 'adc.c' || echo '$(srcdir)/'`adc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-adc.Tpo $(DEPDIR)/libclamav_la-adc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='adc.c' object='libclamav_la-adc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-adc.lo `test -f 'adc.c' || echo '$(srcdir)/'`adc.c + +libclamav_la-dmg.lo: dmg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-dmg.lo -MD -MP -MF $(DEPDIR)/libclamav_la-dmg.Tpo -c -o libclamav_la-dmg.lo `test -f 'dmg.c' || echo '$(srcdir)/'`dmg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-dmg.Tpo $(DEPDIR)/libclamav_la-dmg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='dmg.c' object='libclamav_la-dmg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-dmg.lo `test -f 'dmg.c' || echo '$(srcdir)/'`dmg.c + +libclamav_la-xar.lo: xar.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-xar.lo -MD -MP -MF $(DEPDIR)/libclamav_la-xar.Tpo -c -o libclamav_la-xar.lo `test -f 'xar.c' || echo '$(srcdir)/'`xar.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-xar.Tpo $(DEPDIR)/libclamav_la-xar.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xar.c' object='libclamav_la-xar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-xar.lo `test -f 'xar.c' || echo '$(srcdir)/'`xar.c + +libclamav_la-xdp.lo: xdp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-xdp.lo -MD -MP -MF $(DEPDIR)/libclamav_la-xdp.Tpo -c -o libclamav_la-xdp.lo `test -f 'xdp.c' || echo '$(srcdir)/'`xdp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-xdp.Tpo $(DEPDIR)/libclamav_la-xdp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xdp.c' object='libclamav_la-xdp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-xdp.lo `test -f 'xdp.c' || echo '$(srcdir)/'`xdp.c + +libclamav_la-mbr.lo: mbr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-mbr.lo -MD -MP -MF $(DEPDIR)/libclamav_la-mbr.Tpo -c -o libclamav_la-mbr.lo `test -f 'mbr.c' || echo '$(srcdir)/'`mbr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-mbr.Tpo $(DEPDIR)/libclamav_la-mbr.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mbr.c' object='libclamav_la-mbr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-mbr.lo `test -f 'mbr.c' || echo '$(srcdir)/'`mbr.c + +libclamav_la-gpt.lo: gpt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-gpt.lo -MD -MP -MF $(DEPDIR)/libclamav_la-gpt.Tpo -c -o libclamav_la-gpt.lo `test -f 'gpt.c' || echo '$(srcdir)/'`gpt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-gpt.Tpo $(DEPDIR)/libclamav_la-gpt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gpt.c' object='libclamav_la-gpt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-gpt.lo `test -f 'gpt.c' || echo '$(srcdir)/'`gpt.c + +libclamav_la-apm.lo: apm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-apm.lo -MD -MP -MF $(DEPDIR)/libclamav_la-apm.Tpo -c -o libclamav_la-apm.lo `test -f 'apm.c' || echo '$(srcdir)/'`apm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-apm.Tpo $(DEPDIR)/libclamav_la-apm.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='apm.c' object='libclamav_la-apm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-apm.lo `test -f 'apm.c' || echo '$(srcdir)/'`apm.c + +libclamav_la-partition_intersection.lo: partition_intersection.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-partition_intersection.lo -MD -MP -MF $(DEPDIR)/libclamav_la-partition_intersection.Tpo -c -o libclamav_la-partition_intersection.lo `test -f 'partition_intersection.c' || echo '$(srcdir)/'`partition_intersection.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-partition_intersection.Tpo $(DEPDIR)/libclamav_la-partition_intersection.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='partition_intersection.c' object='libclamav_la-partition_intersection.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-partition_intersection.lo `test -f 'partition_intersection.c' || echo '$(srcdir)/'`partition_intersection.c + +libclamav_la-json_api.lo: json_api.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-json_api.lo -MD -MP -MF $(DEPDIR)/libclamav_la-json_api.Tpo -c -o libclamav_la-json_api.lo `test -f 'json_api.c' || echo '$(srcdir)/'`json_api.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-json_api.Tpo $(DEPDIR)/libclamav_la-json_api.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='json_api.c' object='libclamav_la-json_api.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-json_api.lo `test -f 'json_api.c' || echo '$(srcdir)/'`json_api.c + +libclamav_la-xz_iface.lo: xz_iface.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-xz_iface.lo -MD -MP -MF $(DEPDIR)/libclamav_la-xz_iface.Tpo -c -o libclamav_la-xz_iface.lo `test -f 'xz_iface.c' || echo '$(srcdir)/'`xz_iface.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-xz_iface.Tpo $(DEPDIR)/libclamav_la-xz_iface.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xz_iface.c' object='libclamav_la-xz_iface.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-xz_iface.lo `test -f 'xz_iface.c' || echo '$(srcdir)/'`xz_iface.c + +libclamav_la-sf_base64decode.lo: sf_base64decode.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-sf_base64decode.lo -MD -MP -MF $(DEPDIR)/libclamav_la-sf_base64decode.Tpo -c -o libclamav_la-sf_base64decode.lo `test -f 'sf_base64decode.c' || echo '$(srcdir)/'`sf_base64decode.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-sf_base64decode.Tpo $(DEPDIR)/libclamav_la-sf_base64decode.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sf_base64decode.c' object='libclamav_la-sf_base64decode.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-sf_base64decode.lo `test -f 'sf_base64decode.c' || echo '$(srcdir)/'`sf_base64decode.c + +libclamav_la-hfsplus.lo: hfsplus.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-hfsplus.lo -MD -MP -MF $(DEPDIR)/libclamav_la-hfsplus.Tpo -c -o libclamav_la-hfsplus.lo `test -f 'hfsplus.c' || echo '$(srcdir)/'`hfsplus.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-hfsplus.Tpo $(DEPDIR)/libclamav_la-hfsplus.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hfsplus.c' object='libclamav_la-hfsplus.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-hfsplus.lo `test -f 'hfsplus.c' || echo '$(srcdir)/'`hfsplus.c + +libclamav_la-swf.lo: swf.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-swf.lo -MD -MP -MF $(DEPDIR)/libclamav_la-swf.Tpo -c -o libclamav_la-swf.lo `test -f 'swf.c' || echo '$(srcdir)/'`swf.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-swf.Tpo $(DEPDIR)/libclamav_la-swf.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='swf.c' object='libclamav_la-swf.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-swf.lo `test -f 'swf.c' || echo '$(srcdir)/'`swf.c + +libclamav_la-gif.lo: gif.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-gif.lo -MD -MP -MF $(DEPDIR)/libclamav_la-gif.Tpo -c -o libclamav_la-gif.lo `test -f 'gif.c' || echo '$(srcdir)/'`gif.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-gif.Tpo $(DEPDIR)/libclamav_la-gif.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gif.c' object='libclamav_la-gif.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-gif.lo `test -f 'gif.c' || echo '$(srcdir)/'`gif.c + +libclamav_la-jpeg.lo: jpeg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-jpeg.lo -MD -MP -MF $(DEPDIR)/libclamav_la-jpeg.Tpo -c -o libclamav_la-jpeg.lo `test -f 'jpeg.c' || echo '$(srcdir)/'`jpeg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-jpeg.Tpo $(DEPDIR)/libclamav_la-jpeg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='jpeg.c' object='libclamav_la-jpeg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-jpeg.lo `test -f 'jpeg.c' || echo '$(srcdir)/'`jpeg.c + +libclamav_la-png.lo: png.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-png.lo -MD -MP -MF $(DEPDIR)/libclamav_la-png.Tpo -c -o libclamav_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-png.Tpo $(DEPDIR)/libclamav_la-png.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='png.c' object='libclamav_la-png.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-png.lo `test -f 'png.c' || echo '$(srcdir)/'`png.c + +libclamav_la-iso9660.lo: iso9660.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-iso9660.lo -MD -MP -MF $(DEPDIR)/libclamav_la-iso9660.Tpo -c -o libclamav_la-iso9660.lo `test -f 'iso9660.c' || echo '$(srcdir)/'`iso9660.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-iso9660.Tpo $(DEPDIR)/libclamav_la-iso9660.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='iso9660.c' object='libclamav_la-iso9660.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-iso9660.lo `test -f 'iso9660.c' || echo '$(srcdir)/'`iso9660.c + +libclamav_la-arc4.lo: arc4.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-arc4.lo -MD -MP -MF $(DEPDIR)/libclamav_la-arc4.Tpo -c -o libclamav_la-arc4.lo `test -f 'arc4.c' || echo '$(srcdir)/'`arc4.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-arc4.Tpo $(DEPDIR)/libclamav_la-arc4.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='arc4.c' object='libclamav_la-arc4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-arc4.lo `test -f 'arc4.c' || echo '$(srcdir)/'`arc4.c + +libclamav_la-rijndael.lo: rijndael.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-rijndael.lo -MD -MP -MF $(DEPDIR)/libclamav_la-rijndael.Tpo -c -o libclamav_la-rijndael.lo `test -f 'rijndael.c' || echo '$(srcdir)/'`rijndael.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-rijndael.Tpo $(DEPDIR)/libclamav_la-rijndael.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rijndael.c' object='libclamav_la-rijndael.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-rijndael.lo `test -f 'rijndael.c' || echo '$(srcdir)/'`rijndael.c + +libclamav_la-crtmgr.lo: crtmgr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-crtmgr.lo -MD -MP -MF $(DEPDIR)/libclamav_la-crtmgr.Tpo -c -o libclamav_la-crtmgr.lo `test -f 'crtmgr.c' || echo '$(srcdir)/'`crtmgr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-crtmgr.Tpo $(DEPDIR)/libclamav_la-crtmgr.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crtmgr.c' object='libclamav_la-crtmgr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-crtmgr.lo `test -f 'crtmgr.c' || echo '$(srcdir)/'`crtmgr.c + +libclamav_la-asn1.lo: asn1.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-asn1.lo -MD -MP -MF $(DEPDIR)/libclamav_la-asn1.Tpo -c -o libclamav_la-asn1.lo `test -f 'asn1.c' || echo '$(srcdir)/'`asn1.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-asn1.Tpo $(DEPDIR)/libclamav_la-asn1.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='asn1.c' object='libclamav_la-asn1.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-asn1.lo `test -f 'asn1.c' || echo '$(srcdir)/'`asn1.c + +libclamav_la-fpu.lo: fpu.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-fpu.lo -MD -MP -MF $(DEPDIR)/libclamav_la-fpu.Tpo -c -o libclamav_la-fpu.lo `test -f 'fpu.c' || echo '$(srcdir)/'`fpu.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-fpu.Tpo $(DEPDIR)/libclamav_la-fpu.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fpu.c' object='libclamav_la-fpu.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-fpu.lo `test -f 'fpu.c' || echo '$(srcdir)/'`fpu.c + +libclamav_la-stats.lo: stats.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-stats.lo -MD -MP -MF $(DEPDIR)/libclamav_la-stats.Tpo -c -o libclamav_la-stats.lo `test -f 'stats.c' || echo '$(srcdir)/'`stats.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-stats.Tpo $(DEPDIR)/libclamav_la-stats.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stats.c' object='libclamav_la-stats.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-stats.lo `test -f 'stats.c' || echo '$(srcdir)/'`stats.c + +libclamav_la-www.lo: www.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-www.lo -MD -MP -MF $(DEPDIR)/libclamav_la-www.Tpo -c -o libclamav_la-www.lo `test -f 'www.c' || echo '$(srcdir)/'`www.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-www.Tpo $(DEPDIR)/libclamav_la-www.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='www.c' object='libclamav_la-www.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-www.lo `test -f 'www.c' || echo '$(srcdir)/'`www.c + +libclamav_la-stats_json.lo: stats_json.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-stats_json.lo -MD -MP -MF $(DEPDIR)/libclamav_la-stats_json.Tpo -c -o libclamav_la-stats_json.lo `test -f 'stats_json.c' || echo '$(srcdir)/'`stats_json.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-stats_json.Tpo $(DEPDIR)/libclamav_la-stats_json.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stats_json.c' object='libclamav_la-stats_json.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-stats_json.lo `test -f 'stats_json.c' || echo '$(srcdir)/'`stats_json.c + +libclamav_la-hostid_internal.lo: hostid_internal.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-hostid_internal.lo -MD -MP -MF $(DEPDIR)/libclamav_la-hostid_internal.Tpo -c -o libclamav_la-hostid_internal.lo `test -f 'hostid_internal.c' || echo '$(srcdir)/'`hostid_internal.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-hostid_internal.Tpo $(DEPDIR)/libclamav_la-hostid_internal.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hostid_internal.c' object='libclamav_la-hostid_internal.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-hostid_internal.lo `test -f 'hostid_internal.c' || echo '$(srcdir)/'`hostid_internal.c + +libclamav_la-openioc.lo: openioc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-openioc.lo -MD -MP -MF $(DEPDIR)/libclamav_la-openioc.Tpo -c -o libclamav_la-openioc.lo `test -f 'openioc.c' || echo '$(srcdir)/'`openioc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-openioc.Tpo $(DEPDIR)/libclamav_la-openioc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='openioc.c' object='libclamav_la-openioc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-openioc.lo `test -f 'openioc.c' || echo '$(srcdir)/'`openioc.c + +libclamav_la-msdoc.lo: msdoc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-msdoc.lo -MD -MP -MF $(DEPDIR)/libclamav_la-msdoc.Tpo -c -o libclamav_la-msdoc.lo `test -f 'msdoc.c' || echo '$(srcdir)/'`msdoc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-msdoc.Tpo $(DEPDIR)/libclamav_la-msdoc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='msdoc.c' object='libclamav_la-msdoc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-msdoc.lo `test -f 'msdoc.c' || echo '$(srcdir)/'`msdoc.c + +libclamav_la-matcher-pcre.lo: matcher-pcre.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-matcher-pcre.lo -MD -MP -MF $(DEPDIR)/libclamav_la-matcher-pcre.Tpo -c -o libclamav_la-matcher-pcre.lo `test -f 'matcher-pcre.c' || echo '$(srcdir)/'`matcher-pcre.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-matcher-pcre.Tpo $(DEPDIR)/libclamav_la-matcher-pcre.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='matcher-pcre.c' object='libclamav_la-matcher-pcre.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-matcher-pcre.lo `test -f 'matcher-pcre.c' || echo '$(srcdir)/'`matcher-pcre.c + +libclamav_la-regex_pcre.lo: regex_pcre.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-regex_pcre.lo -MD -MP -MF $(DEPDIR)/libclamav_la-regex_pcre.Tpo -c -o libclamav_la-regex_pcre.lo `test -f 'regex_pcre.c' || echo '$(srcdir)/'`regex_pcre.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-regex_pcre.Tpo $(DEPDIR)/libclamav_la-regex_pcre.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='regex_pcre.c' object='libclamav_la-regex_pcre.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-regex_pcre.lo `test -f 'regex_pcre.c' || echo '$(srcdir)/'`regex_pcre.c + +libclamav_la-msxml.lo: msxml.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-msxml.lo -MD -MP -MF $(DEPDIR)/libclamav_la-msxml.Tpo -c -o libclamav_la-msxml.lo `test -f 'msxml.c' || echo '$(srcdir)/'`msxml.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-msxml.Tpo $(DEPDIR)/libclamav_la-msxml.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='msxml.c' object='libclamav_la-msxml.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-msxml.lo `test -f 'msxml.c' || echo '$(srcdir)/'`msxml.c + +libclamav_la-msxml_parser.lo: msxml_parser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-msxml_parser.lo -MD -MP -MF $(DEPDIR)/libclamav_la-msxml_parser.Tpo -c -o libclamav_la-msxml_parser.lo `test -f 'msxml_parser.c' || echo '$(srcdir)/'`msxml_parser.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-msxml_parser.Tpo $(DEPDIR)/libclamav_la-msxml_parser.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='msxml_parser.c' object='libclamav_la-msxml_parser.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-msxml_parser.lo `test -f 'msxml_parser.c' || echo '$(srcdir)/'`msxml_parser.c + +libclamav_la-tiff.lo: tiff.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-tiff.lo -MD -MP -MF $(DEPDIR)/libclamav_la-tiff.Tpo -c -o libclamav_la-tiff.lo `test -f 'tiff.c' || echo '$(srcdir)/'`tiff.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-tiff.Tpo $(DEPDIR)/libclamav_la-tiff.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tiff.c' object='libclamav_la-tiff.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-tiff.lo `test -f 'tiff.c' || echo '$(srcdir)/'`tiff.c + +libclamav_la-hwp.lo: hwp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-hwp.lo -MD -MP -MF $(DEPDIR)/libclamav_la-hwp.Tpo -c -o libclamav_la-hwp.lo `test -f 'hwp.c' || echo '$(srcdir)/'`hwp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-hwp.Tpo $(DEPDIR)/libclamav_la-hwp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hwp.c' object='libclamav_la-hwp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-hwp.lo `test -f 'hwp.c' || echo '$(srcdir)/'`hwp.c + +lzw/libclamav_la-lzwdec.lo: lzw/lzwdec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT lzw/libclamav_la-lzwdec.lo -MD -MP -MF lzw/$(DEPDIR)/libclamav_la-lzwdec.Tpo -c -o lzw/libclamav_la-lzwdec.lo `test -f 'lzw/lzwdec.c' || echo '$(srcdir)/'`lzw/lzwdec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) lzw/$(DEPDIR)/libclamav_la-lzwdec.Tpo lzw/$(DEPDIR)/libclamav_la-lzwdec.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lzw/lzwdec.c' object='lzw/libclamav_la-lzwdec.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o lzw/libclamav_la-lzwdec.lo `test -f 'lzw/lzwdec.c' || echo '$(srcdir)/'`lzw/lzwdec.c + +libclamav_la-matcher-byte-comp.lo: matcher-byte-comp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-matcher-byte-comp.lo -MD -MP -MF $(DEPDIR)/libclamav_la-matcher-byte-comp.Tpo -c -o libclamav_la-matcher-byte-comp.lo `test -f 'matcher-byte-comp.c' || echo '$(srcdir)/'`matcher-byte-comp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-matcher-byte-comp.Tpo $(DEPDIR)/libclamav_la-matcher-byte-comp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='matcher-byte-comp.c' object='libclamav_la-matcher-byte-comp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-matcher-byte-comp.lo `test -f 'matcher-byte-comp.c' || echo '$(srcdir)/'`matcher-byte-comp.c + +libclamav_la-egg.lo: egg.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-egg.lo -MD -MP -MF $(DEPDIR)/libclamav_la-egg.Tpo -c -o libclamav_la-egg.lo `test -f 'egg.c' || echo '$(srcdir)/'`egg.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-egg.Tpo $(DEPDIR)/libclamav_la-egg.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='egg.c' object='libclamav_la-egg.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-egg.lo `test -f 'egg.c' || echo '$(srcdir)/'`egg.c + +libclamav_la-yara_arena.lo: yara_arena.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-yara_arena.lo -MD -MP -MF $(DEPDIR)/libclamav_la-yara_arena.Tpo -c -o libclamav_la-yara_arena.lo `test -f 'yara_arena.c' || echo '$(srcdir)/'`yara_arena.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-yara_arena.Tpo $(DEPDIR)/libclamav_la-yara_arena.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='yara_arena.c' object='libclamav_la-yara_arena.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-yara_arena.lo `test -f 'yara_arena.c' || echo '$(srcdir)/'`yara_arena.c + +libclamav_la-yara_compiler.lo: yara_compiler.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-yara_compiler.lo -MD -MP -MF $(DEPDIR)/libclamav_la-yara_compiler.Tpo -c -o libclamav_la-yara_compiler.lo `test -f 'yara_compiler.c' || echo '$(srcdir)/'`yara_compiler.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-yara_compiler.Tpo $(DEPDIR)/libclamav_la-yara_compiler.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='yara_compiler.c' object='libclamav_la-yara_compiler.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-yara_compiler.lo `test -f 'yara_compiler.c' || echo '$(srcdir)/'`yara_compiler.c + +libclamav_la-yara_exec.lo: yara_exec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-yara_exec.lo -MD -MP -MF $(DEPDIR)/libclamav_la-yara_exec.Tpo -c -o libclamav_la-yara_exec.lo `test -f 'yara_exec.c' || echo '$(srcdir)/'`yara_exec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-yara_exec.Tpo $(DEPDIR)/libclamav_la-yara_exec.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='yara_exec.c' object='libclamav_la-yara_exec.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-yara_exec.lo `test -f 'yara_exec.c' || echo '$(srcdir)/'`yara_exec.c + +libclamav_la-yara_hash.lo: yara_hash.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-yara_hash.lo -MD -MP -MF $(DEPDIR)/libclamav_la-yara_hash.Tpo -c -o libclamav_la-yara_hash.lo `test -f 'yara_hash.c' || echo '$(srcdir)/'`yara_hash.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-yara_hash.Tpo $(DEPDIR)/libclamav_la-yara_hash.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='yara_hash.c' object='libclamav_la-yara_hash.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-yara_hash.lo `test -f 'yara_hash.c' || echo '$(srcdir)/'`yara_hash.c + +libclamav_la-yara_grammar.lo: yara_grammar.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-yara_grammar.lo -MD -MP -MF $(DEPDIR)/libclamav_la-yara_grammar.Tpo -c -o libclamav_la-yara_grammar.lo `test -f 'yara_grammar.c' || echo '$(srcdir)/'`yara_grammar.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-yara_grammar.Tpo $(DEPDIR)/libclamav_la-yara_grammar.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='yara_grammar.c' object='libclamav_la-yara_grammar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-yara_grammar.lo `test -f 'yara_grammar.c' || echo '$(srcdir)/'`yara_grammar.c + +libclamav_la-yara_lexer.lo: yara_lexer.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-yara_lexer.lo -MD -MP -MF $(DEPDIR)/libclamav_la-yara_lexer.Tpo -c -o libclamav_la-yara_lexer.lo `test -f 'yara_lexer.c' || echo '$(srcdir)/'`yara_lexer.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-yara_lexer.Tpo $(DEPDIR)/libclamav_la-yara_lexer.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='yara_lexer.c' object='libclamav_la-yara_lexer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-yara_lexer.lo `test -f 'yara_lexer.c' || echo '$(srcdir)/'`yara_lexer.c + +libclamav_la-yara_parser.lo: yara_parser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT libclamav_la-yara_parser.lo -MD -MP -MF $(DEPDIR)/libclamav_la-yara_parser.Tpo -c -o libclamav_la-yara_parser.lo `test -f 'yara_parser.c' || echo '$(srcdir)/'`yara_parser.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_la-yara_parser.Tpo $(DEPDIR)/libclamav_la-yara_parser.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='yara_parser.c' object='libclamav_la-yara_parser.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o libclamav_la-yara_parser.lo `test -f 'yara_parser.c' || echo '$(srcdir)/'`yara_parser.c + +tomsfastmath/addsub/libclamav_la-fp_add.lo: tomsfastmath/addsub/fp_add.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/addsub/libclamav_la-fp_add.lo -MD -MP -MF tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_add.Tpo -c -o tomsfastmath/addsub/libclamav_la-fp_add.lo `test -f 'tomsfastmath/addsub/fp_add.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_add.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_add.Tpo tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_add.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/addsub/fp_add.c' object='tomsfastmath/addsub/libclamav_la-fp_add.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/addsub/libclamav_la-fp_add.lo `test -f 'tomsfastmath/addsub/fp_add.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_add.c + +tomsfastmath/addsub/libclamav_la-fp_add_d.lo: tomsfastmath/addsub/fp_add_d.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/addsub/libclamav_la-fp_add_d.lo -MD -MP -MF tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_add_d.Tpo -c -o tomsfastmath/addsub/libclamav_la-fp_add_d.lo `test -f 'tomsfastmath/addsub/fp_add_d.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_add_d.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_add_d.Tpo tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_add_d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/addsub/fp_add_d.c' object='tomsfastmath/addsub/libclamav_la-fp_add_d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/addsub/libclamav_la-fp_add_d.lo `test -f 'tomsfastmath/addsub/fp_add_d.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_add_d.c + +tomsfastmath/addsub/libclamav_la-fp_addmod.lo: tomsfastmath/addsub/fp_addmod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/addsub/libclamav_la-fp_addmod.lo -MD -MP -MF tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_addmod.Tpo -c -o tomsfastmath/addsub/libclamav_la-fp_addmod.lo `test -f 'tomsfastmath/addsub/fp_addmod.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_addmod.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_addmod.Tpo tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_addmod.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/addsub/fp_addmod.c' object='tomsfastmath/addsub/libclamav_la-fp_addmod.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/addsub/libclamav_la-fp_addmod.lo `test -f 'tomsfastmath/addsub/fp_addmod.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_addmod.c + +tomsfastmath/addsub/libclamav_la-fp_cmp.lo: tomsfastmath/addsub/fp_cmp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/addsub/libclamav_la-fp_cmp.lo -MD -MP -MF tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp.Tpo -c -o tomsfastmath/addsub/libclamav_la-fp_cmp.lo `test -f 'tomsfastmath/addsub/fp_cmp.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_cmp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp.Tpo tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/addsub/fp_cmp.c' object='tomsfastmath/addsub/libclamav_la-fp_cmp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/addsub/libclamav_la-fp_cmp.lo `test -f 'tomsfastmath/addsub/fp_cmp.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_cmp.c + +tomsfastmath/addsub/libclamav_la-fp_cmp_d.lo: tomsfastmath/addsub/fp_cmp_d.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/addsub/libclamav_la-fp_cmp_d.lo -MD -MP -MF tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp_d.Tpo -c -o tomsfastmath/addsub/libclamav_la-fp_cmp_d.lo `test -f 'tomsfastmath/addsub/fp_cmp_d.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_cmp_d.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp_d.Tpo tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp_d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/addsub/fp_cmp_d.c' object='tomsfastmath/addsub/libclamav_la-fp_cmp_d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/addsub/libclamav_la-fp_cmp_d.lo `test -f 'tomsfastmath/addsub/fp_cmp_d.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_cmp_d.c + +tomsfastmath/addsub/libclamav_la-fp_cmp_mag.lo: tomsfastmath/addsub/fp_cmp_mag.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/addsub/libclamav_la-fp_cmp_mag.lo -MD -MP -MF tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp_mag.Tpo -c -o tomsfastmath/addsub/libclamav_la-fp_cmp_mag.lo `test -f 'tomsfastmath/addsub/fp_cmp_mag.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_cmp_mag.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp_mag.Tpo tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_cmp_mag.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/addsub/fp_cmp_mag.c' object='tomsfastmath/addsub/libclamav_la-fp_cmp_mag.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/addsub/libclamav_la-fp_cmp_mag.lo `test -f 'tomsfastmath/addsub/fp_cmp_mag.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_cmp_mag.c + +tomsfastmath/addsub/libclamav_la-fp_sub.lo: tomsfastmath/addsub/fp_sub.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/addsub/libclamav_la-fp_sub.lo -MD -MP -MF tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_sub.Tpo -c -o tomsfastmath/addsub/libclamav_la-fp_sub.lo `test -f 'tomsfastmath/addsub/fp_sub.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_sub.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_sub.Tpo tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_sub.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/addsub/fp_sub.c' object='tomsfastmath/addsub/libclamav_la-fp_sub.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/addsub/libclamav_la-fp_sub.lo `test -f 'tomsfastmath/addsub/fp_sub.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_sub.c + +tomsfastmath/addsub/libclamav_la-fp_sub_d.lo: tomsfastmath/addsub/fp_sub_d.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/addsub/libclamav_la-fp_sub_d.lo -MD -MP -MF tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_sub_d.Tpo -c -o tomsfastmath/addsub/libclamav_la-fp_sub_d.lo `test -f 'tomsfastmath/addsub/fp_sub_d.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_sub_d.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_sub_d.Tpo tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_sub_d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/addsub/fp_sub_d.c' object='tomsfastmath/addsub/libclamav_la-fp_sub_d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/addsub/libclamav_la-fp_sub_d.lo `test -f 'tomsfastmath/addsub/fp_sub_d.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_sub_d.c + +tomsfastmath/addsub/libclamav_la-fp_submod.lo: tomsfastmath/addsub/fp_submod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/addsub/libclamav_la-fp_submod.lo -MD -MP -MF tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_submod.Tpo -c -o tomsfastmath/addsub/libclamav_la-fp_submod.lo `test -f 'tomsfastmath/addsub/fp_submod.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_submod.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_submod.Tpo tomsfastmath/addsub/$(DEPDIR)/libclamav_la-fp_submod.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/addsub/fp_submod.c' object='tomsfastmath/addsub/libclamav_la-fp_submod.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/addsub/libclamav_la-fp_submod.lo `test -f 'tomsfastmath/addsub/fp_submod.c' || echo '$(srcdir)/'`tomsfastmath/addsub/fp_submod.c + +tomsfastmath/addsub/libclamav_la-s_fp_add.lo: tomsfastmath/addsub/s_fp_add.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/addsub/libclamav_la-s_fp_add.lo -MD -MP -MF tomsfastmath/addsub/$(DEPDIR)/libclamav_la-s_fp_add.Tpo -c -o tomsfastmath/addsub/libclamav_la-s_fp_add.lo `test -f 'tomsfastmath/addsub/s_fp_add.c' || echo '$(srcdir)/'`tomsfastmath/addsub/s_fp_add.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/addsub/$(DEPDIR)/libclamav_la-s_fp_add.Tpo tomsfastmath/addsub/$(DEPDIR)/libclamav_la-s_fp_add.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/addsub/s_fp_add.c' object='tomsfastmath/addsub/libclamav_la-s_fp_add.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/addsub/libclamav_la-s_fp_add.lo `test -f 'tomsfastmath/addsub/s_fp_add.c' || echo '$(srcdir)/'`tomsfastmath/addsub/s_fp_add.c + +tomsfastmath/addsub/libclamav_la-s_fp_sub.lo: tomsfastmath/addsub/s_fp_sub.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/addsub/libclamav_la-s_fp_sub.lo -MD -MP -MF tomsfastmath/addsub/$(DEPDIR)/libclamav_la-s_fp_sub.Tpo -c -o tomsfastmath/addsub/libclamav_la-s_fp_sub.lo `test -f 'tomsfastmath/addsub/s_fp_sub.c' || echo '$(srcdir)/'`tomsfastmath/addsub/s_fp_sub.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/addsub/$(DEPDIR)/libclamav_la-s_fp_sub.Tpo tomsfastmath/addsub/$(DEPDIR)/libclamav_la-s_fp_sub.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/addsub/s_fp_sub.c' object='tomsfastmath/addsub/libclamav_la-s_fp_sub.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/addsub/libclamav_la-s_fp_sub.lo `test -f 'tomsfastmath/addsub/s_fp_sub.c' || echo '$(srcdir)/'`tomsfastmath/addsub/s_fp_sub.c + +tomsfastmath/bin/libclamav_la-fp_radix_size.lo: tomsfastmath/bin/fp_radix_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_radix_size.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_radix_size.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_radix_size.lo `test -f 'tomsfastmath/bin/fp_radix_size.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_radix_size.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_radix_size.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_radix_size.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_radix_size.c' object='tomsfastmath/bin/libclamav_la-fp_radix_size.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_radix_size.lo `test -f 'tomsfastmath/bin/fp_radix_size.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_radix_size.c + +tomsfastmath/bin/libclamav_la-fp_read_radix.lo: tomsfastmath/bin/fp_read_radix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_read_radix.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_radix.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_read_radix.lo `test -f 'tomsfastmath/bin/fp_read_radix.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_read_radix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_radix.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_radix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_read_radix.c' object='tomsfastmath/bin/libclamav_la-fp_read_radix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_read_radix.lo `test -f 'tomsfastmath/bin/fp_read_radix.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_read_radix.c + +tomsfastmath/bin/libclamav_la-fp_read_signed_bin.lo: tomsfastmath/bin/fp_read_signed_bin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_read_signed_bin.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_signed_bin.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_read_signed_bin.lo `test -f 'tomsfastmath/bin/fp_read_signed_bin.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_read_signed_bin.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_signed_bin.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_signed_bin.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_read_signed_bin.c' object='tomsfastmath/bin/libclamav_la-fp_read_signed_bin.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_read_signed_bin.lo `test -f 'tomsfastmath/bin/fp_read_signed_bin.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_read_signed_bin.c + +tomsfastmath/bin/libclamav_la-fp_read_unsigned_bin.lo: tomsfastmath/bin/fp_read_unsigned_bin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_read_unsigned_bin.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_unsigned_bin.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_read_unsigned_bin.lo `test -f 'tomsfastmath/bin/fp_read_unsigned_bin.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_read_unsigned_bin.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_unsigned_bin.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_read_unsigned_bin.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_read_unsigned_bin.c' object='tomsfastmath/bin/libclamav_la-fp_read_unsigned_bin.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_read_unsigned_bin.lo `test -f 'tomsfastmath/bin/fp_read_unsigned_bin.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_read_unsigned_bin.c + +tomsfastmath/bin/libclamav_la-fp_reverse.lo: tomsfastmath/bin/fp_reverse.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_reverse.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_reverse.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_reverse.lo `test -f 'tomsfastmath/bin/fp_reverse.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_reverse.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_reverse.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_reverse.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_reverse.c' object='tomsfastmath/bin/libclamav_la-fp_reverse.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_reverse.lo `test -f 'tomsfastmath/bin/fp_reverse.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_reverse.c + +tomsfastmath/bin/libclamav_la-fp_s_rmap.lo: tomsfastmath/bin/fp_s_rmap.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_s_rmap.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_s_rmap.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_s_rmap.lo `test -f 'tomsfastmath/bin/fp_s_rmap.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_s_rmap.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_s_rmap.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_s_rmap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_s_rmap.c' object='tomsfastmath/bin/libclamav_la-fp_s_rmap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_s_rmap.lo `test -f 'tomsfastmath/bin/fp_s_rmap.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_s_rmap.c + +tomsfastmath/bin/libclamav_la-fp_signed_bin_size.lo: tomsfastmath/bin/fp_signed_bin_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_signed_bin_size.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_signed_bin_size.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_signed_bin_size.lo `test -f 'tomsfastmath/bin/fp_signed_bin_size.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_signed_bin_size.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_signed_bin_size.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_signed_bin_size.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_signed_bin_size.c' object='tomsfastmath/bin/libclamav_la-fp_signed_bin_size.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_signed_bin_size.lo `test -f 'tomsfastmath/bin/fp_signed_bin_size.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_signed_bin_size.c + +tomsfastmath/bin/libclamav_la-fp_to_signed_bin.lo: tomsfastmath/bin/fp_to_signed_bin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_to_signed_bin.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_to_signed_bin.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_to_signed_bin.lo `test -f 'tomsfastmath/bin/fp_to_signed_bin.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_to_signed_bin.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_to_signed_bin.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_to_signed_bin.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_to_signed_bin.c' object='tomsfastmath/bin/libclamav_la-fp_to_signed_bin.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_to_signed_bin.lo `test -f 'tomsfastmath/bin/fp_to_signed_bin.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_to_signed_bin.c + +tomsfastmath/bin/libclamav_la-fp_to_unsigned_bin.lo: tomsfastmath/bin/fp_to_unsigned_bin.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_to_unsigned_bin.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_to_unsigned_bin.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_to_unsigned_bin.lo `test -f 'tomsfastmath/bin/fp_to_unsigned_bin.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_to_unsigned_bin.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_to_unsigned_bin.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_to_unsigned_bin.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_to_unsigned_bin.c' object='tomsfastmath/bin/libclamav_la-fp_to_unsigned_bin.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_to_unsigned_bin.lo `test -f 'tomsfastmath/bin/fp_to_unsigned_bin.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_to_unsigned_bin.c + +tomsfastmath/bin/libclamav_la-fp_toradix.lo: tomsfastmath/bin/fp_toradix.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_toradix.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_toradix.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_toradix.lo `test -f 'tomsfastmath/bin/fp_toradix.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_toradix.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_toradix.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_toradix.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_toradix.c' object='tomsfastmath/bin/libclamav_la-fp_toradix.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_toradix.lo `test -f 'tomsfastmath/bin/fp_toradix.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_toradix.c + +tomsfastmath/bin/libclamav_la-fp_toradix_n.lo: tomsfastmath/bin/fp_toradix_n.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_toradix_n.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_toradix_n.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_toradix_n.lo `test -f 'tomsfastmath/bin/fp_toradix_n.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_toradix_n.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_toradix_n.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_toradix_n.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_toradix_n.c' object='tomsfastmath/bin/libclamav_la-fp_toradix_n.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_toradix_n.lo `test -f 'tomsfastmath/bin/fp_toradix_n.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_toradix_n.c + +tomsfastmath/bin/libclamav_la-fp_unsigned_bin_size.lo: tomsfastmath/bin/fp_unsigned_bin_size.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bin/libclamav_la-fp_unsigned_bin_size.lo -MD -MP -MF tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_unsigned_bin_size.Tpo -c -o tomsfastmath/bin/libclamav_la-fp_unsigned_bin_size.lo `test -f 'tomsfastmath/bin/fp_unsigned_bin_size.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_unsigned_bin_size.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_unsigned_bin_size.Tpo tomsfastmath/bin/$(DEPDIR)/libclamav_la-fp_unsigned_bin_size.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bin/fp_unsigned_bin_size.c' object='tomsfastmath/bin/libclamav_la-fp_unsigned_bin_size.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bin/libclamav_la-fp_unsigned_bin_size.lo `test -f 'tomsfastmath/bin/fp_unsigned_bin_size.c' || echo '$(srcdir)/'`tomsfastmath/bin/fp_unsigned_bin_size.c + +tomsfastmath/bit/libclamav_la-fp_cnt_lsb.lo: tomsfastmath/bit/fp_cnt_lsb.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bit/libclamav_la-fp_cnt_lsb.lo -MD -MP -MF tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_cnt_lsb.Tpo -c -o tomsfastmath/bit/libclamav_la-fp_cnt_lsb.lo `test -f 'tomsfastmath/bit/fp_cnt_lsb.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_cnt_lsb.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_cnt_lsb.Tpo tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_cnt_lsb.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bit/fp_cnt_lsb.c' object='tomsfastmath/bit/libclamav_la-fp_cnt_lsb.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bit/libclamav_la-fp_cnt_lsb.lo `test -f 'tomsfastmath/bit/fp_cnt_lsb.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_cnt_lsb.c + +tomsfastmath/bit/libclamav_la-fp_count_bits.lo: tomsfastmath/bit/fp_count_bits.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bit/libclamav_la-fp_count_bits.lo -MD -MP -MF tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_count_bits.Tpo -c -o tomsfastmath/bit/libclamav_la-fp_count_bits.lo `test -f 'tomsfastmath/bit/fp_count_bits.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_count_bits.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_count_bits.Tpo tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_count_bits.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bit/fp_count_bits.c' object='tomsfastmath/bit/libclamav_la-fp_count_bits.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bit/libclamav_la-fp_count_bits.lo `test -f 'tomsfastmath/bit/fp_count_bits.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_count_bits.c + +tomsfastmath/bit/libclamav_la-fp_div_2.lo: tomsfastmath/bit/fp_div_2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bit/libclamav_la-fp_div_2.lo -MD -MP -MF tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_div_2.Tpo -c -o tomsfastmath/bit/libclamav_la-fp_div_2.lo `test -f 'tomsfastmath/bit/fp_div_2.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_div_2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_div_2.Tpo tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_div_2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bit/fp_div_2.c' object='tomsfastmath/bit/libclamav_la-fp_div_2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bit/libclamav_la-fp_div_2.lo `test -f 'tomsfastmath/bit/fp_div_2.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_div_2.c + +tomsfastmath/bit/libclamav_la-fp_div_2d.lo: tomsfastmath/bit/fp_div_2d.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bit/libclamav_la-fp_div_2d.lo -MD -MP -MF tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_div_2d.Tpo -c -o tomsfastmath/bit/libclamav_la-fp_div_2d.lo `test -f 'tomsfastmath/bit/fp_div_2d.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_div_2d.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_div_2d.Tpo tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_div_2d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bit/fp_div_2d.c' object='tomsfastmath/bit/libclamav_la-fp_div_2d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bit/libclamav_la-fp_div_2d.lo `test -f 'tomsfastmath/bit/fp_div_2d.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_div_2d.c + +tomsfastmath/bit/libclamav_la-fp_lshd.lo: tomsfastmath/bit/fp_lshd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bit/libclamav_la-fp_lshd.lo -MD -MP -MF tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_lshd.Tpo -c -o tomsfastmath/bit/libclamav_la-fp_lshd.lo `test -f 'tomsfastmath/bit/fp_lshd.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_lshd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_lshd.Tpo tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_lshd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bit/fp_lshd.c' object='tomsfastmath/bit/libclamav_la-fp_lshd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bit/libclamav_la-fp_lshd.lo `test -f 'tomsfastmath/bit/fp_lshd.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_lshd.c + +tomsfastmath/bit/libclamav_la-fp_mod_2d.lo: tomsfastmath/bit/fp_mod_2d.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bit/libclamav_la-fp_mod_2d.lo -MD -MP -MF tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_mod_2d.Tpo -c -o tomsfastmath/bit/libclamav_la-fp_mod_2d.lo `test -f 'tomsfastmath/bit/fp_mod_2d.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_mod_2d.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_mod_2d.Tpo tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_mod_2d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bit/fp_mod_2d.c' object='tomsfastmath/bit/libclamav_la-fp_mod_2d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bit/libclamav_la-fp_mod_2d.lo `test -f 'tomsfastmath/bit/fp_mod_2d.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_mod_2d.c + +tomsfastmath/bit/libclamav_la-fp_rshd.lo: tomsfastmath/bit/fp_rshd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/bit/libclamav_la-fp_rshd.lo -MD -MP -MF tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_rshd.Tpo -c -o tomsfastmath/bit/libclamav_la-fp_rshd.lo `test -f 'tomsfastmath/bit/fp_rshd.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_rshd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_rshd.Tpo tomsfastmath/bit/$(DEPDIR)/libclamav_la-fp_rshd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/bit/fp_rshd.c' object='tomsfastmath/bit/libclamav_la-fp_rshd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/bit/libclamav_la-fp_rshd.lo `test -f 'tomsfastmath/bit/fp_rshd.c' || echo '$(srcdir)/'`tomsfastmath/bit/fp_rshd.c + +tomsfastmath/divide/libclamav_la-fp_div.lo: tomsfastmath/divide/fp_div.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/divide/libclamav_la-fp_div.lo -MD -MP -MF tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_div.Tpo -c -o tomsfastmath/divide/libclamav_la-fp_div.lo `test -f 'tomsfastmath/divide/fp_div.c' || echo '$(srcdir)/'`tomsfastmath/divide/fp_div.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_div.Tpo tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_div.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/divide/fp_div.c' object='tomsfastmath/divide/libclamav_la-fp_div.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/divide/libclamav_la-fp_div.lo `test -f 'tomsfastmath/divide/fp_div.c' || echo '$(srcdir)/'`tomsfastmath/divide/fp_div.c + +tomsfastmath/divide/libclamav_la-fp_div_d.lo: tomsfastmath/divide/fp_div_d.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/divide/libclamav_la-fp_div_d.lo -MD -MP -MF tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_div_d.Tpo -c -o tomsfastmath/divide/libclamav_la-fp_div_d.lo `test -f 'tomsfastmath/divide/fp_div_d.c' || echo '$(srcdir)/'`tomsfastmath/divide/fp_div_d.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_div_d.Tpo tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_div_d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/divide/fp_div_d.c' object='tomsfastmath/divide/libclamav_la-fp_div_d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/divide/libclamav_la-fp_div_d.lo `test -f 'tomsfastmath/divide/fp_div_d.c' || echo '$(srcdir)/'`tomsfastmath/divide/fp_div_d.c + +tomsfastmath/divide/libclamav_la-fp_mod.lo: tomsfastmath/divide/fp_mod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/divide/libclamav_la-fp_mod.lo -MD -MP -MF tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_mod.Tpo -c -o tomsfastmath/divide/libclamav_la-fp_mod.lo `test -f 'tomsfastmath/divide/fp_mod.c' || echo '$(srcdir)/'`tomsfastmath/divide/fp_mod.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_mod.Tpo tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_mod.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/divide/fp_mod.c' object='tomsfastmath/divide/libclamav_la-fp_mod.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/divide/libclamav_la-fp_mod.lo `test -f 'tomsfastmath/divide/fp_mod.c' || echo '$(srcdir)/'`tomsfastmath/divide/fp_mod.c + +tomsfastmath/divide/libclamav_la-fp_mod_d.lo: tomsfastmath/divide/fp_mod_d.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/divide/libclamav_la-fp_mod_d.lo -MD -MP -MF tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_mod_d.Tpo -c -o tomsfastmath/divide/libclamav_la-fp_mod_d.lo `test -f 'tomsfastmath/divide/fp_mod_d.c' || echo '$(srcdir)/'`tomsfastmath/divide/fp_mod_d.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_mod_d.Tpo tomsfastmath/divide/$(DEPDIR)/libclamav_la-fp_mod_d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/divide/fp_mod_d.c' object='tomsfastmath/divide/libclamav_la-fp_mod_d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/divide/libclamav_la-fp_mod_d.lo `test -f 'tomsfastmath/divide/fp_mod_d.c' || echo '$(srcdir)/'`tomsfastmath/divide/fp_mod_d.c + +tomsfastmath/exptmod/libclamav_la-fp_2expt.lo: tomsfastmath/exptmod/fp_2expt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/exptmod/libclamav_la-fp_2expt.lo -MD -MP -MF tomsfastmath/exptmod/$(DEPDIR)/libclamav_la-fp_2expt.Tpo -c -o tomsfastmath/exptmod/libclamav_la-fp_2expt.lo `test -f 'tomsfastmath/exptmod/fp_2expt.c' || echo '$(srcdir)/'`tomsfastmath/exptmod/fp_2expt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/exptmod/$(DEPDIR)/libclamav_la-fp_2expt.Tpo tomsfastmath/exptmod/$(DEPDIR)/libclamav_la-fp_2expt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/exptmod/fp_2expt.c' object='tomsfastmath/exptmod/libclamav_la-fp_2expt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/exptmod/libclamav_la-fp_2expt.lo `test -f 'tomsfastmath/exptmod/fp_2expt.c' || echo '$(srcdir)/'`tomsfastmath/exptmod/fp_2expt.c + +tomsfastmath/exptmod/libclamav_la-fp_exptmod.lo: tomsfastmath/exptmod/fp_exptmod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/exptmod/libclamav_la-fp_exptmod.lo -MD -MP -MF tomsfastmath/exptmod/$(DEPDIR)/libclamav_la-fp_exptmod.Tpo -c -o tomsfastmath/exptmod/libclamav_la-fp_exptmod.lo `test -f 'tomsfastmath/exptmod/fp_exptmod.c' || echo '$(srcdir)/'`tomsfastmath/exptmod/fp_exptmod.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/exptmod/$(DEPDIR)/libclamav_la-fp_exptmod.Tpo tomsfastmath/exptmod/$(DEPDIR)/libclamav_la-fp_exptmod.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/exptmod/fp_exptmod.c' object='tomsfastmath/exptmod/libclamav_la-fp_exptmod.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/exptmod/libclamav_la-fp_exptmod.lo `test -f 'tomsfastmath/exptmod/fp_exptmod.c' || echo '$(srcdir)/'`tomsfastmath/exptmod/fp_exptmod.c + +tomsfastmath/misc/libclamav_la-fp_ident.lo: tomsfastmath/misc/fp_ident.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/misc/libclamav_la-fp_ident.lo -MD -MP -MF tomsfastmath/misc/$(DEPDIR)/libclamav_la-fp_ident.Tpo -c -o tomsfastmath/misc/libclamav_la-fp_ident.lo `test -f 'tomsfastmath/misc/fp_ident.c' || echo '$(srcdir)/'`tomsfastmath/misc/fp_ident.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/misc/$(DEPDIR)/libclamav_la-fp_ident.Tpo tomsfastmath/misc/$(DEPDIR)/libclamav_la-fp_ident.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/misc/fp_ident.c' object='tomsfastmath/misc/libclamav_la-fp_ident.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/misc/libclamav_la-fp_ident.lo `test -f 'tomsfastmath/misc/fp_ident.c' || echo '$(srcdir)/'`tomsfastmath/misc/fp_ident.c + +tomsfastmath/misc/libclamav_la-fp_set.lo: tomsfastmath/misc/fp_set.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/misc/libclamav_la-fp_set.lo -MD -MP -MF tomsfastmath/misc/$(DEPDIR)/libclamav_la-fp_set.Tpo -c -o tomsfastmath/misc/libclamav_la-fp_set.lo `test -f 'tomsfastmath/misc/fp_set.c' || echo '$(srcdir)/'`tomsfastmath/misc/fp_set.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/misc/$(DEPDIR)/libclamav_la-fp_set.Tpo tomsfastmath/misc/$(DEPDIR)/libclamav_la-fp_set.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/misc/fp_set.c' object='tomsfastmath/misc/libclamav_la-fp_set.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/misc/libclamav_la-fp_set.lo `test -f 'tomsfastmath/misc/fp_set.c' || echo '$(srcdir)/'`tomsfastmath/misc/fp_set.c + +tomsfastmath/mont/libclamav_la-fp_montgomery_calc_normalization.lo: tomsfastmath/mont/fp_montgomery_calc_normalization.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mont/libclamav_la-fp_montgomery_calc_normalization.lo -MD -MP -MF tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_calc_normalization.Tpo -c -o tomsfastmath/mont/libclamav_la-fp_montgomery_calc_normalization.lo `test -f 'tomsfastmath/mont/fp_montgomery_calc_normalization.c' || echo '$(srcdir)/'`tomsfastmath/mont/fp_montgomery_calc_normalization.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_calc_normalization.Tpo tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_calc_normalization.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mont/fp_montgomery_calc_normalization.c' object='tomsfastmath/mont/libclamav_la-fp_montgomery_calc_normalization.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mont/libclamav_la-fp_montgomery_calc_normalization.lo `test -f 'tomsfastmath/mont/fp_montgomery_calc_normalization.c' || echo '$(srcdir)/'`tomsfastmath/mont/fp_montgomery_calc_normalization.c + +tomsfastmath/mont/libclamav_la-fp_montgomery_reduce.lo: tomsfastmath/mont/fp_montgomery_reduce.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mont/libclamav_la-fp_montgomery_reduce.lo -MD -MP -MF tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_reduce.Tpo -c -o tomsfastmath/mont/libclamav_la-fp_montgomery_reduce.lo `test -f 'tomsfastmath/mont/fp_montgomery_reduce.c' || echo '$(srcdir)/'`tomsfastmath/mont/fp_montgomery_reduce.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_reduce.Tpo tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_reduce.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mont/fp_montgomery_reduce.c' object='tomsfastmath/mont/libclamav_la-fp_montgomery_reduce.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mont/libclamav_la-fp_montgomery_reduce.lo `test -f 'tomsfastmath/mont/fp_montgomery_reduce.c' || echo '$(srcdir)/'`tomsfastmath/mont/fp_montgomery_reduce.c + +tomsfastmath/mont/libclamav_la-fp_montgomery_setup.lo: tomsfastmath/mont/fp_montgomery_setup.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mont/libclamav_la-fp_montgomery_setup.lo -MD -MP -MF tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_setup.Tpo -c -o tomsfastmath/mont/libclamav_la-fp_montgomery_setup.lo `test -f 'tomsfastmath/mont/fp_montgomery_setup.c' || echo '$(srcdir)/'`tomsfastmath/mont/fp_montgomery_setup.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_setup.Tpo tomsfastmath/mont/$(DEPDIR)/libclamav_la-fp_montgomery_setup.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mont/fp_montgomery_setup.c' object='tomsfastmath/mont/libclamav_la-fp_montgomery_setup.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mont/libclamav_la-fp_montgomery_setup.lo `test -f 'tomsfastmath/mont/fp_montgomery_setup.c' || echo '$(srcdir)/'`tomsfastmath/mont/fp_montgomery_setup.c + +tomsfastmath/mul/libclamav_la-fp_mul.lo: tomsfastmath/mul/fp_mul.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul.lo `test -f 'tomsfastmath/mul/fp_mul.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul.c' object='tomsfastmath/mul/libclamav_la-fp_mul.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul.lo `test -f 'tomsfastmath/mul/fp_mul.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba.lo: tomsfastmath/mul/fp_mul_comba.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba.lo `test -f 'tomsfastmath/mul/fp_mul_comba.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba.lo `test -f 'tomsfastmath/mul/fp_mul_comba.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba.c + +tomsfastmath/mul/libclamav_la-fp_mul_2.lo: tomsfastmath/mul/fp_mul_2.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_2.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_2.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_2.lo `test -f 'tomsfastmath/mul/fp_mul_2.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_2.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_2.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_2.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_2.c' object='tomsfastmath/mul/libclamav_la-fp_mul_2.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_2.lo `test -f 'tomsfastmath/mul/fp_mul_2.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_2.c + +tomsfastmath/mul/libclamav_la-fp_mul_2d.lo: tomsfastmath/mul/fp_mul_2d.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_2d.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_2d.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_2d.lo `test -f 'tomsfastmath/mul/fp_mul_2d.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_2d.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_2d.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_2d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_2d.c' object='tomsfastmath/mul/libclamav_la-fp_mul_2d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_2d.lo `test -f 'tomsfastmath/mul/fp_mul_2d.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_2d.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_12.lo: tomsfastmath/mul/fp_mul_comba_12.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_12.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_12.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_12.lo `test -f 'tomsfastmath/mul/fp_mul_comba_12.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_12.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_12.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_12.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_12.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_12.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_12.lo `test -f 'tomsfastmath/mul/fp_mul_comba_12.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_12.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_17.lo: tomsfastmath/mul/fp_mul_comba_17.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_17.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_17.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_17.lo `test -f 'tomsfastmath/mul/fp_mul_comba_17.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_17.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_17.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_17.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_17.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_17.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_17.lo `test -f 'tomsfastmath/mul/fp_mul_comba_17.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_17.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_20.lo: tomsfastmath/mul/fp_mul_comba_20.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_20.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_20.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_20.lo `test -f 'tomsfastmath/mul/fp_mul_comba_20.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_20.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_20.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_20.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_20.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_20.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_20.lo `test -f 'tomsfastmath/mul/fp_mul_comba_20.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_20.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_24.lo: tomsfastmath/mul/fp_mul_comba_24.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_24.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_24.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_24.lo `test -f 'tomsfastmath/mul/fp_mul_comba_24.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_24.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_24.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_24.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_24.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_24.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_24.lo `test -f 'tomsfastmath/mul/fp_mul_comba_24.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_24.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_28.lo: tomsfastmath/mul/fp_mul_comba_28.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_28.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_28.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_28.lo `test -f 'tomsfastmath/mul/fp_mul_comba_28.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_28.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_28.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_28.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_28.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_28.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_28.lo `test -f 'tomsfastmath/mul/fp_mul_comba_28.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_28.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_3.lo: tomsfastmath/mul/fp_mul_comba_3.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_3.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_3.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_3.lo `test -f 'tomsfastmath/mul/fp_mul_comba_3.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_3.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_3.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_3.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_3.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_3.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_3.lo `test -f 'tomsfastmath/mul/fp_mul_comba_3.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_3.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_32.lo: tomsfastmath/mul/fp_mul_comba_32.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_32.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_32.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_32.lo `test -f 'tomsfastmath/mul/fp_mul_comba_32.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_32.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_32.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_32.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_32.lo `test -f 'tomsfastmath/mul/fp_mul_comba_32.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_32.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_4.lo: tomsfastmath/mul/fp_mul_comba_4.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_4.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_4.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_4.lo `test -f 'tomsfastmath/mul/fp_mul_comba_4.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_4.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_4.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_4.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_4.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_4.lo `test -f 'tomsfastmath/mul/fp_mul_comba_4.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_4.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_48.lo: tomsfastmath/mul/fp_mul_comba_48.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_48.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_48.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_48.lo `test -f 'tomsfastmath/mul/fp_mul_comba_48.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_48.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_48.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_48.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_48.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_48.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_48.lo `test -f 'tomsfastmath/mul/fp_mul_comba_48.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_48.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_6.lo: tomsfastmath/mul/fp_mul_comba_6.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_6.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_6.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_6.lo `test -f 'tomsfastmath/mul/fp_mul_comba_6.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_6.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_6.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_6.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_6.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_6.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_6.lo `test -f 'tomsfastmath/mul/fp_mul_comba_6.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_6.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_64.lo: tomsfastmath/mul/fp_mul_comba_64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_64.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_64.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_64.lo `test -f 'tomsfastmath/mul/fp_mul_comba_64.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_64.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_64.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_64.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_64.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_64.lo `test -f 'tomsfastmath/mul/fp_mul_comba_64.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_64.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_7.lo: tomsfastmath/mul/fp_mul_comba_7.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_7.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_7.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_7.lo `test -f 'tomsfastmath/mul/fp_mul_comba_7.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_7.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_7.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_7.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_7.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_7.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_7.lo `test -f 'tomsfastmath/mul/fp_mul_comba_7.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_7.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_8.lo: tomsfastmath/mul/fp_mul_comba_8.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_8.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_8.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_8.lo `test -f 'tomsfastmath/mul/fp_mul_comba_8.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_8.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_8.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_8.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_8.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_8.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_8.lo `test -f 'tomsfastmath/mul/fp_mul_comba_8.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_8.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_9.lo: tomsfastmath/mul/fp_mul_comba_9.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_9.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_9.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_9.lo `test -f 'tomsfastmath/mul/fp_mul_comba_9.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_9.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_9.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_9.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_9.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_9.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_9.lo `test -f 'tomsfastmath/mul/fp_mul_comba_9.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_9.c + +tomsfastmath/mul/libclamav_la-fp_mul_comba_small_set.lo: tomsfastmath/mul/fp_mul_comba_small_set.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_comba_small_set.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_small_set.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_small_set.lo `test -f 'tomsfastmath/mul/fp_mul_comba_small_set.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_small_set.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_small_set.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_comba_small_set.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_comba_small_set.c' object='tomsfastmath/mul/libclamav_la-fp_mul_comba_small_set.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_comba_small_set.lo `test -f 'tomsfastmath/mul/fp_mul_comba_small_set.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_comba_small_set.c + +tomsfastmath/mul/libclamav_la-fp_mul_d.lo: tomsfastmath/mul/fp_mul_d.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mul_d.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_d.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mul_d.lo `test -f 'tomsfastmath/mul/fp_mul_d.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_d.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_d.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mul_d.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mul_d.c' object='tomsfastmath/mul/libclamav_la-fp_mul_d.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mul_d.lo `test -f 'tomsfastmath/mul/fp_mul_d.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mul_d.c + +tomsfastmath/mul/libclamav_la-fp_mulmod.lo: tomsfastmath/mul/fp_mulmod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/mul/libclamav_la-fp_mulmod.lo -MD -MP -MF tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mulmod.Tpo -c -o tomsfastmath/mul/libclamav_la-fp_mulmod.lo `test -f 'tomsfastmath/mul/fp_mulmod.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mulmod.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mulmod.Tpo tomsfastmath/mul/$(DEPDIR)/libclamav_la-fp_mulmod.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/mul/fp_mulmod.c' object='tomsfastmath/mul/libclamav_la-fp_mulmod.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/mul/libclamav_la-fp_mulmod.lo `test -f 'tomsfastmath/mul/fp_mulmod.c' || echo '$(srcdir)/'`tomsfastmath/mul/fp_mulmod.c + +tomsfastmath/numtheory/libclamav_la-fp_invmod.lo: tomsfastmath/numtheory/fp_invmod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/numtheory/libclamav_la-fp_invmod.lo -MD -MP -MF tomsfastmath/numtheory/$(DEPDIR)/libclamav_la-fp_invmod.Tpo -c -o tomsfastmath/numtheory/libclamav_la-fp_invmod.lo `test -f 'tomsfastmath/numtheory/fp_invmod.c' || echo '$(srcdir)/'`tomsfastmath/numtheory/fp_invmod.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/numtheory/$(DEPDIR)/libclamav_la-fp_invmod.Tpo tomsfastmath/numtheory/$(DEPDIR)/libclamav_la-fp_invmod.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/numtheory/fp_invmod.c' object='tomsfastmath/numtheory/libclamav_la-fp_invmod.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/numtheory/libclamav_la-fp_invmod.lo `test -f 'tomsfastmath/numtheory/fp_invmod.c' || echo '$(srcdir)/'`tomsfastmath/numtheory/fp_invmod.c + +tomsfastmath/sqr/libclamav_la-fp_sqr.lo: tomsfastmath/sqr/fp_sqr.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr.lo `test -f 'tomsfastmath/sqr/fp_sqr.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr.lo `test -f 'tomsfastmath/sqr/fp_sqr.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_12.lo: tomsfastmath/sqr/fp_sqr_comba_12.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_12.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_12.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_12.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_12.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_12.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_12.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_12.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_12.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_12.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_12.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_12.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_12.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_17.lo: tomsfastmath/sqr/fp_sqr_comba_17.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_17.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_17.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_17.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_17.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_17.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_17.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_17.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_17.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_17.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_17.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_17.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_17.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_20.lo: tomsfastmath/sqr/fp_sqr_comba_20.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_20.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_20.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_20.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_20.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_20.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_20.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_20.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_20.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_20.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_20.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_20.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_20.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_24.lo: tomsfastmath/sqr/fp_sqr_comba_24.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_24.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_24.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_24.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_24.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_24.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_24.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_24.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_24.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_24.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_24.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_24.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_24.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_28.lo: tomsfastmath/sqr/fp_sqr_comba_28.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_28.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_28.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_28.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_28.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_28.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_28.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_28.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_28.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_28.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_28.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_28.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_28.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_3.lo: tomsfastmath/sqr/fp_sqr_comba_3.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_3.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_3.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_3.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_3.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_3.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_3.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_3.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_3.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_3.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_3.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_3.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_3.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_32.lo: tomsfastmath/sqr/fp_sqr_comba_32.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_32.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_32.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_32.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_32.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_32.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_32.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_32.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_32.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_32.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_32.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_4.lo: tomsfastmath/sqr/fp_sqr_comba_4.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_4.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_4.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_4.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_4.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_4.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_4.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_4.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_4.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_4.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_4.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_4.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_4.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_48.lo: tomsfastmath/sqr/fp_sqr_comba_48.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_48.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_48.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_48.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_48.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_48.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_48.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_48.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_48.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_48.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_48.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_48.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_48.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_6.lo: tomsfastmath/sqr/fp_sqr_comba_6.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_6.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_6.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_6.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_6.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_6.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_6.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_6.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_6.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_6.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_6.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_6.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_6.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_64.lo: tomsfastmath/sqr/fp_sqr_comba_64.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_64.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_64.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_64.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_64.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_64.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_64.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_64.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_64.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_64.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_64.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_64.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_64.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_7.lo: tomsfastmath/sqr/fp_sqr_comba_7.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_7.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_7.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_7.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_7.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_7.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_7.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_7.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_7.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_7.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_7.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_7.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_7.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_8.lo: tomsfastmath/sqr/fp_sqr_comba_8.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_8.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_8.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_8.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_8.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_8.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_8.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_8.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_8.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_8.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_8.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_8.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_8.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_9.lo: tomsfastmath/sqr/fp_sqr_comba_9.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_9.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_9.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_9.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_9.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_9.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_9.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_9.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_9.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_9.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_9.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_9.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_9.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_generic.lo: tomsfastmath/sqr/fp_sqr_comba_generic.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_generic.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_generic.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_generic.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_generic.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_generic.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_generic.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_generic.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_generic.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_generic.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_generic.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_generic.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_generic.c + +tomsfastmath/sqr/libclamav_la-fp_sqr_comba_small_set.lo: tomsfastmath/sqr/fp_sqr_comba_small_set.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqr_comba_small_set.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_small_set.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_small_set.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_small_set.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_small_set.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_small_set.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqr_comba_small_set.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqr_comba_small_set.c' object='tomsfastmath/sqr/libclamav_la-fp_sqr_comba_small_set.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqr_comba_small_set.lo `test -f 'tomsfastmath/sqr/fp_sqr_comba_small_set.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqr_comba_small_set.c + +tomsfastmath/sqr/libclamav_la-fp_sqrmod.lo: tomsfastmath/sqr/fp_sqrmod.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -MT tomsfastmath/sqr/libclamav_la-fp_sqrmod.lo -MD -MP -MF tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqrmod.Tpo -c -o tomsfastmath/sqr/libclamav_la-fp_sqrmod.lo `test -f 'tomsfastmath/sqr/fp_sqrmod.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqrmod.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqrmod.Tpo tomsfastmath/sqr/$(DEPDIR)/libclamav_la-fp_sqrmod.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tomsfastmath/sqr/fp_sqrmod.c' object='tomsfastmath/sqr/libclamav_la-fp_sqrmod.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_la_CFLAGS) $(CFLAGS) -c -o tomsfastmath/sqr/libclamav_la-fp_sqrmod.lo `test -f 'tomsfastmath/sqr/fp_sqrmod.c' || echo '$(srcdir)/'`tomsfastmath/sqr/fp_sqrmod.c + +libclamav_internal_utils_la-conv.lo: conv.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-conv.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-conv.Tpo -c -o libclamav_internal_utils_la-conv.lo `test -f 'conv.c' || echo '$(srcdir)/'`conv.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-conv.Tpo $(DEPDIR)/libclamav_internal_utils_la-conv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conv.c' object='libclamav_internal_utils_la-conv.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-conv.lo `test -f 'conv.c' || echo '$(srcdir)/'`conv.c + +libclamav_internal_utils_la-crypto.lo: crypto.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-crypto.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-crypto.Tpo -c -o libclamav_internal_utils_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-crypto.Tpo $(DEPDIR)/libclamav_internal_utils_la-crypto.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='crypto.c' object='libclamav_internal_utils_la-crypto.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-crypto.lo `test -f 'crypto.c' || echo '$(srcdir)/'`crypto.c + +libclamav_internal_utils_la-iowrap.lo: iowrap.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-iowrap.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-iowrap.Tpo -c -o libclamav_internal_utils_la-iowrap.lo `test -f 'iowrap.c' || echo '$(srcdir)/'`iowrap.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-iowrap.Tpo $(DEPDIR)/libclamav_internal_utils_la-iowrap.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='iowrap.c' object='libclamav_internal_utils_la-iowrap.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-iowrap.lo `test -f 'iowrap.c' || echo '$(srcdir)/'`iowrap.c + +libclamav_internal_utils_la-others_common.lo: others_common.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-others_common.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-others_common.Tpo -c -o libclamav_internal_utils_la-others_common.lo `test -f 'others_common.c' || echo '$(srcdir)/'`others_common.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-others_common.Tpo $(DEPDIR)/libclamav_internal_utils_la-others_common.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='others_common.c' object='libclamav_internal_utils_la-others_common.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-others_common.lo `test -f 'others_common.c' || echo '$(srcdir)/'`others_common.c + +libclamav_internal_utils_la-qsort.lo: qsort.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-qsort.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-qsort.Tpo -c -o libclamav_internal_utils_la-qsort.lo `test -f 'qsort.c' || echo '$(srcdir)/'`qsort.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-qsort.Tpo $(DEPDIR)/libclamav_internal_utils_la-qsort.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='qsort.c' object='libclamav_internal_utils_la-qsort.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-qsort.lo `test -f 'qsort.c' || echo '$(srcdir)/'`qsort.c + +regex/libclamav_internal_utils_la-regcomp.lo: regex/regcomp.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT regex/libclamav_internal_utils_la-regcomp.lo -MD -MP -MF regex/$(DEPDIR)/libclamav_internal_utils_la-regcomp.Tpo -c -o regex/libclamav_internal_utils_la-regcomp.lo `test -f 'regex/regcomp.c' || echo '$(srcdir)/'`regex/regcomp.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) regex/$(DEPDIR)/libclamav_internal_utils_la-regcomp.Tpo regex/$(DEPDIR)/libclamav_internal_utils_la-regcomp.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='regex/regcomp.c' object='regex/libclamav_internal_utils_la-regcomp.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o regex/libclamav_internal_utils_la-regcomp.lo `test -f 'regex/regcomp.c' || echo '$(srcdir)/'`regex/regcomp.c + +regex/libclamav_internal_utils_la-regerror.lo: regex/regerror.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT regex/libclamav_internal_utils_la-regerror.lo -MD -MP -MF regex/$(DEPDIR)/libclamav_internal_utils_la-regerror.Tpo -c -o regex/libclamav_internal_utils_la-regerror.lo `test -f 'regex/regerror.c' || echo '$(srcdir)/'`regex/regerror.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) regex/$(DEPDIR)/libclamav_internal_utils_la-regerror.Tpo regex/$(DEPDIR)/libclamav_internal_utils_la-regerror.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='regex/regerror.c' object='regex/libclamav_internal_utils_la-regerror.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o regex/libclamav_internal_utils_la-regerror.lo `test -f 'regex/regerror.c' || echo '$(srcdir)/'`regex/regerror.c + +regex/libclamav_internal_utils_la-regexec.lo: regex/regexec.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT regex/libclamav_internal_utils_la-regexec.lo -MD -MP -MF regex/$(DEPDIR)/libclamav_internal_utils_la-regexec.Tpo -c -o regex/libclamav_internal_utils_la-regexec.lo `test -f 'regex/regexec.c' || echo '$(srcdir)/'`regex/regexec.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) regex/$(DEPDIR)/libclamav_internal_utils_la-regexec.Tpo regex/$(DEPDIR)/libclamav_internal_utils_la-regexec.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='regex/regexec.c' object='regex/libclamav_internal_utils_la-regexec.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o regex/libclamav_internal_utils_la-regexec.lo `test -f 'regex/regexec.c' || echo '$(srcdir)/'`regex/regexec.c + +regex/libclamav_internal_utils_la-regfree.lo: regex/regfree.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT regex/libclamav_internal_utils_la-regfree.lo -MD -MP -MF regex/$(DEPDIR)/libclamav_internal_utils_la-regfree.Tpo -c -o regex/libclamav_internal_utils_la-regfree.lo `test -f 'regex/regfree.c' || echo '$(srcdir)/'`regex/regfree.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) regex/$(DEPDIR)/libclamav_internal_utils_la-regfree.Tpo regex/$(DEPDIR)/libclamav_internal_utils_la-regfree.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='regex/regfree.c' object='regex/libclamav_internal_utils_la-regfree.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o regex/libclamav_internal_utils_la-regfree.lo `test -f 'regex/regfree.c' || echo '$(srcdir)/'`regex/regfree.c + +regex/libclamav_internal_utils_la-strlcpy.lo: regex/strlcpy.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT regex/libclamav_internal_utils_la-strlcpy.lo -MD -MP -MF regex/$(DEPDIR)/libclamav_internal_utils_la-strlcpy.Tpo -c -o regex/libclamav_internal_utils_la-strlcpy.lo `test -f 'regex/strlcpy.c' || echo '$(srcdir)/'`regex/strlcpy.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) regex/$(DEPDIR)/libclamav_internal_utils_la-strlcpy.Tpo regex/$(DEPDIR)/libclamav_internal_utils_la-strlcpy.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='regex/strlcpy.c' object='regex/libclamav_internal_utils_la-strlcpy.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o regex/libclamav_internal_utils_la-strlcpy.lo `test -f 'regex/strlcpy.c' || echo '$(srcdir)/'`regex/strlcpy.c + +libclamav_internal_utils_la-str.lo: str.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-str.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-str.Tpo -c -o libclamav_internal_utils_la-str.lo `test -f 'str.c' || echo '$(srcdir)/'`str.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-str.Tpo $(DEPDIR)/libclamav_internal_utils_la-str.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='str.c' object='libclamav_internal_utils_la-str.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-str.lo `test -f 'str.c' || echo '$(srcdir)/'`str.c + +libclamav_internal_utils_la-strlcat.lo: strlcat.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -MT libclamav_internal_utils_la-strlcat.lo -MD -MP -MF $(DEPDIR)/libclamav_internal_utils_la-strlcat.Tpo -c -o libclamav_internal_utils_la-strlcat.lo `test -f 'strlcat.c' || echo '$(srcdir)/'`strlcat.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_internal_utils_la-strlcat.Tpo $(DEPDIR)/libclamav_internal_utils_la-strlcat.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='strlcat.c' object='libclamav_internal_utils_la-strlcat.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_internal_utils_la_CFLAGS) $(CFLAGS) -c -o libclamav_internal_utils_la-strlcat.lo `test -f 'strlcat.c' || echo '$(srcdir)/'`strlcat.c + +libclamav_nocxx_la-bytecode_nojit.lo: bytecode_nojit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_nocxx_la_CFLAGS) $(CFLAGS) -MT libclamav_nocxx_la-bytecode_nojit.lo -MD -MP -MF $(DEPDIR)/libclamav_nocxx_la-bytecode_nojit.Tpo -c -o libclamav_nocxx_la-bytecode_nojit.lo `test -f 'bytecode_nojit.c' || echo '$(srcdir)/'`bytecode_nojit.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libclamav_nocxx_la-bytecode_nojit.Tpo $(DEPDIR)/libclamav_nocxx_la-bytecode_nojit.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bytecode_nojit.c' object='libclamav_nocxx_la-bytecode_nojit.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamav_nocxx_la_CFLAGS) $(CFLAGS) -c -o libclamav_nocxx_la-bytecode_nojit.lo `test -f 'bytecode_nojit.c' || echo '$(srcdir)/'`bytecode_nojit.c + +../libclammspack/mspack/libclammspack_la-cabc.lo: ../libclammspack/mspack/cabc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-cabc.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-cabc.Tpo -c -o ../libclammspack/mspack/libclammspack_la-cabc.lo `test -f '../libclammspack/mspack/cabc.c' || echo '$(srcdir)/'`../libclammspack/mspack/cabc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-cabc.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-cabc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/cabc.c' object='../libclammspack/mspack/libclammspack_la-cabc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-cabc.lo `test -f '../libclammspack/mspack/cabc.c' || echo '$(srcdir)/'`../libclammspack/mspack/cabc.c + +../libclammspack/mspack/libclammspack_la-cabd.lo: ../libclammspack/mspack/cabd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-cabd.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-cabd.Tpo -c -o ../libclammspack/mspack/libclammspack_la-cabd.lo `test -f '../libclammspack/mspack/cabd.c' || echo '$(srcdir)/'`../libclammspack/mspack/cabd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-cabd.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-cabd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/cabd.c' object='../libclammspack/mspack/libclammspack_la-cabd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-cabd.lo `test -f '../libclammspack/mspack/cabd.c' || echo '$(srcdir)/'`../libclammspack/mspack/cabd.c + +../libclammspack/mspack/libclammspack_la-chmc.lo: ../libclammspack/mspack/chmc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-chmc.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-chmc.Tpo -c -o ../libclammspack/mspack/libclammspack_la-chmc.lo `test -f '../libclammspack/mspack/chmc.c' || echo '$(srcdir)/'`../libclammspack/mspack/chmc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-chmc.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-chmc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/chmc.c' object='../libclammspack/mspack/libclammspack_la-chmc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-chmc.lo `test -f '../libclammspack/mspack/chmc.c' || echo '$(srcdir)/'`../libclammspack/mspack/chmc.c + +../libclammspack/mspack/libclammspack_la-chmd.lo: ../libclammspack/mspack/chmd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-chmd.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-chmd.Tpo -c -o ../libclammspack/mspack/libclammspack_la-chmd.lo `test -f '../libclammspack/mspack/chmd.c' || echo '$(srcdir)/'`../libclammspack/mspack/chmd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-chmd.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-chmd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/chmd.c' object='../libclammspack/mspack/libclammspack_la-chmd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-chmd.lo `test -f '../libclammspack/mspack/chmd.c' || echo '$(srcdir)/'`../libclammspack/mspack/chmd.c + +../libclammspack/mspack/libclammspack_la-crc32.lo: ../libclammspack/mspack/crc32.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-crc32.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-crc32.Tpo -c -o ../libclammspack/mspack/libclammspack_la-crc32.lo `test -f '../libclammspack/mspack/crc32.c' || echo '$(srcdir)/'`../libclammspack/mspack/crc32.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-crc32.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-crc32.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/crc32.c' object='../libclammspack/mspack/libclammspack_la-crc32.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-crc32.lo `test -f '../libclammspack/mspack/crc32.c' || echo '$(srcdir)/'`../libclammspack/mspack/crc32.c + +../libclammspack/mspack/libclammspack_la-hlpc.lo: ../libclammspack/mspack/hlpc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-hlpc.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-hlpc.Tpo -c -o ../libclammspack/mspack/libclammspack_la-hlpc.lo `test -f '../libclammspack/mspack/hlpc.c' || echo '$(srcdir)/'`../libclammspack/mspack/hlpc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-hlpc.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-hlpc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/hlpc.c' object='../libclammspack/mspack/libclammspack_la-hlpc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-hlpc.lo `test -f '../libclammspack/mspack/hlpc.c' || echo '$(srcdir)/'`../libclammspack/mspack/hlpc.c + +../libclammspack/mspack/libclammspack_la-hlpd.lo: ../libclammspack/mspack/hlpd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-hlpd.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-hlpd.Tpo -c -o ../libclammspack/mspack/libclammspack_la-hlpd.lo `test -f '../libclammspack/mspack/hlpd.c' || echo '$(srcdir)/'`../libclammspack/mspack/hlpd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-hlpd.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-hlpd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/hlpd.c' object='../libclammspack/mspack/libclammspack_la-hlpd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-hlpd.lo `test -f '../libclammspack/mspack/hlpd.c' || echo '$(srcdir)/'`../libclammspack/mspack/hlpd.c + +../libclammspack/mspack/libclammspack_la-kwajc.lo: ../libclammspack/mspack/kwajc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-kwajc.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-kwajc.Tpo -c -o ../libclammspack/mspack/libclammspack_la-kwajc.lo `test -f '../libclammspack/mspack/kwajc.c' || echo '$(srcdir)/'`../libclammspack/mspack/kwajc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-kwajc.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-kwajc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/kwajc.c' object='../libclammspack/mspack/libclammspack_la-kwajc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-kwajc.lo `test -f '../libclammspack/mspack/kwajc.c' || echo '$(srcdir)/'`../libclammspack/mspack/kwajc.c + +../libclammspack/mspack/libclammspack_la-kwajd.lo: ../libclammspack/mspack/kwajd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-kwajd.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-kwajd.Tpo -c -o ../libclammspack/mspack/libclammspack_la-kwajd.lo `test -f '../libclammspack/mspack/kwajd.c' || echo '$(srcdir)/'`../libclammspack/mspack/kwajd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-kwajd.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-kwajd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/kwajd.c' object='../libclammspack/mspack/libclammspack_la-kwajd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-kwajd.lo `test -f '../libclammspack/mspack/kwajd.c' || echo '$(srcdir)/'`../libclammspack/mspack/kwajd.c + +../libclammspack/mspack/libclammspack_la-litc.lo: ../libclammspack/mspack/litc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-litc.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-litc.Tpo -c -o ../libclammspack/mspack/libclammspack_la-litc.lo `test -f '../libclammspack/mspack/litc.c' || echo '$(srcdir)/'`../libclammspack/mspack/litc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-litc.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-litc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/litc.c' object='../libclammspack/mspack/libclammspack_la-litc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-litc.lo `test -f '../libclammspack/mspack/litc.c' || echo '$(srcdir)/'`../libclammspack/mspack/litc.c + +../libclammspack/mspack/libclammspack_la-litd.lo: ../libclammspack/mspack/litd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-litd.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-litd.Tpo -c -o ../libclammspack/mspack/libclammspack_la-litd.lo `test -f '../libclammspack/mspack/litd.c' || echo '$(srcdir)/'`../libclammspack/mspack/litd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-litd.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-litd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/litd.c' object='../libclammspack/mspack/libclammspack_la-litd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-litd.lo `test -f '../libclammspack/mspack/litd.c' || echo '$(srcdir)/'`../libclammspack/mspack/litd.c + +../libclammspack/mspack/libclammspack_la-lzssd.lo: ../libclammspack/mspack/lzssd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-lzssd.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzssd.Tpo -c -o ../libclammspack/mspack/libclammspack_la-lzssd.lo `test -f '../libclammspack/mspack/lzssd.c' || echo '$(srcdir)/'`../libclammspack/mspack/lzssd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzssd.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzssd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/lzssd.c' object='../libclammspack/mspack/libclammspack_la-lzssd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-lzssd.lo `test -f '../libclammspack/mspack/lzssd.c' || echo '$(srcdir)/'`../libclammspack/mspack/lzssd.c + +../libclammspack/mspack/libclammspack_la-lzxc.lo: ../libclammspack/mspack/lzxc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-lzxc.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzxc.Tpo -c -o ../libclammspack/mspack/libclammspack_la-lzxc.lo `test -f '../libclammspack/mspack/lzxc.c' || echo '$(srcdir)/'`../libclammspack/mspack/lzxc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzxc.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzxc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/lzxc.c' object='../libclammspack/mspack/libclammspack_la-lzxc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-lzxc.lo `test -f '../libclammspack/mspack/lzxc.c' || echo '$(srcdir)/'`../libclammspack/mspack/lzxc.c + +../libclammspack/mspack/libclammspack_la-lzxd.lo: ../libclammspack/mspack/lzxd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-lzxd.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzxd.Tpo -c -o ../libclammspack/mspack/libclammspack_la-lzxd.lo `test -f '../libclammspack/mspack/lzxd.c' || echo '$(srcdir)/'`../libclammspack/mspack/lzxd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzxd.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-lzxd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/lzxd.c' object='../libclammspack/mspack/libclammspack_la-lzxd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-lzxd.lo `test -f '../libclammspack/mspack/lzxd.c' || echo '$(srcdir)/'`../libclammspack/mspack/lzxd.c + +../libclammspack/mspack/libclammspack_la-mszipc.lo: ../libclammspack/mspack/mszipc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-mszipc.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-mszipc.Tpo -c -o ../libclammspack/mspack/libclammspack_la-mszipc.lo `test -f '../libclammspack/mspack/mszipc.c' || echo '$(srcdir)/'`../libclammspack/mspack/mszipc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-mszipc.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-mszipc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/mszipc.c' object='../libclammspack/mspack/libclammspack_la-mszipc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-mszipc.lo `test -f '../libclammspack/mspack/mszipc.c' || echo '$(srcdir)/'`../libclammspack/mspack/mszipc.c + +../libclammspack/mspack/libclammspack_la-mszipd.lo: ../libclammspack/mspack/mszipd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-mszipd.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-mszipd.Tpo -c -o ../libclammspack/mspack/libclammspack_la-mszipd.lo `test -f '../libclammspack/mspack/mszipd.c' || echo '$(srcdir)/'`../libclammspack/mspack/mszipd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-mszipd.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-mszipd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/mszipd.c' object='../libclammspack/mspack/libclammspack_la-mszipd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-mszipd.lo `test -f '../libclammspack/mspack/mszipd.c' || echo '$(srcdir)/'`../libclammspack/mspack/mszipd.c + +../libclammspack/mspack/libclammspack_la-oabc.lo: ../libclammspack/mspack/oabc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-oabc.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-oabc.Tpo -c -o ../libclammspack/mspack/libclammspack_la-oabc.lo `test -f '../libclammspack/mspack/oabc.c' || echo '$(srcdir)/'`../libclammspack/mspack/oabc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-oabc.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-oabc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/oabc.c' object='../libclammspack/mspack/libclammspack_la-oabc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-oabc.lo `test -f '../libclammspack/mspack/oabc.c' || echo '$(srcdir)/'`../libclammspack/mspack/oabc.c + +../libclammspack/mspack/libclammspack_la-oabd.lo: ../libclammspack/mspack/oabd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-oabd.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-oabd.Tpo -c -o ../libclammspack/mspack/libclammspack_la-oabd.lo `test -f '../libclammspack/mspack/oabd.c' || echo '$(srcdir)/'`../libclammspack/mspack/oabd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-oabd.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-oabd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/oabd.c' object='../libclammspack/mspack/libclammspack_la-oabd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-oabd.lo `test -f '../libclammspack/mspack/oabd.c' || echo '$(srcdir)/'`../libclammspack/mspack/oabd.c + +../libclammspack/mspack/libclammspack_la-qtmd.lo: ../libclammspack/mspack/qtmd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-qtmd.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-qtmd.Tpo -c -o ../libclammspack/mspack/libclammspack_la-qtmd.lo `test -f '../libclammspack/mspack/qtmd.c' || echo '$(srcdir)/'`../libclammspack/mspack/qtmd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-qtmd.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-qtmd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/qtmd.c' object='../libclammspack/mspack/libclammspack_la-qtmd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-qtmd.lo `test -f '../libclammspack/mspack/qtmd.c' || echo '$(srcdir)/'`../libclammspack/mspack/qtmd.c + +../libclammspack/mspack/libclammspack_la-system.lo: ../libclammspack/mspack/system.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-system.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-system.Tpo -c -o ../libclammspack/mspack/libclammspack_la-system.lo `test -f '../libclammspack/mspack/system.c' || echo '$(srcdir)/'`../libclammspack/mspack/system.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-system.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-system.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/system.c' object='../libclammspack/mspack/libclammspack_la-system.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-system.lo `test -f '../libclammspack/mspack/system.c' || echo '$(srcdir)/'`../libclammspack/mspack/system.c + +../libclammspack/mspack/libclammspack_la-szddc.lo: ../libclammspack/mspack/szddc.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-szddc.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-szddc.Tpo -c -o ../libclammspack/mspack/libclammspack_la-szddc.lo `test -f '../libclammspack/mspack/szddc.c' || echo '$(srcdir)/'`../libclammspack/mspack/szddc.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-szddc.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-szddc.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/szddc.c' object='../libclammspack/mspack/libclammspack_la-szddc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-szddc.lo `test -f '../libclammspack/mspack/szddc.c' || echo '$(srcdir)/'`../libclammspack/mspack/szddc.c + +../libclammspack/mspack/libclammspack_la-szddd.lo: ../libclammspack/mspack/szddd.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -MT ../libclammspack/mspack/libclammspack_la-szddd.lo -MD -MP -MF ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-szddd.Tpo -c -o ../libclammspack/mspack/libclammspack_la-szddd.lo `test -f '../libclammspack/mspack/szddd.c' || echo '$(srcdir)/'`../libclammspack/mspack/szddd.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-szddd.Tpo ../libclammspack/mspack/$(DEPDIR)/libclammspack_la-szddd.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../libclammspack/mspack/szddd.c' object='../libclammspack/mspack/libclammspack_la-szddd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclammspack_la_CFLAGS) $(CFLAGS) -c -o ../libclammspack/mspack/libclammspack_la-szddd.lo `test -f '../libclammspack/mspack/szddd.c' || echo '$(srcdir)/'`../libclammspack/mspack/szddd.c + +.cpp.o: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< + +.cpp.obj: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cpp.lo: +@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +../libclamunrar/libclamunrar_la-archive.lo: ../libclamunrar/archive.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-archive.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-archive.Tpo -c -o ../libclamunrar/libclamunrar_la-archive.lo `test -f '../libclamunrar/archive.cpp' || echo '$(srcdir)/'`../libclamunrar/archive.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-archive.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-archive.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/archive.cpp' object='../libclamunrar/libclamunrar_la-archive.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-archive.lo `test -f '../libclamunrar/archive.cpp' || echo '$(srcdir)/'`../libclamunrar/archive.cpp + +../libclamunrar/libclamunrar_la-arcread.lo: ../libclamunrar/arcread.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-arcread.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-arcread.Tpo -c -o ../libclamunrar/libclamunrar_la-arcread.lo `test -f '../libclamunrar/arcread.cpp' || echo '$(srcdir)/'`../libclamunrar/arcread.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-arcread.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-arcread.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/arcread.cpp' object='../libclamunrar/libclamunrar_la-arcread.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-arcread.lo `test -f '../libclamunrar/arcread.cpp' || echo '$(srcdir)/'`../libclamunrar/arcread.cpp + +../libclamunrar/libclamunrar_la-blake2s.lo: ../libclamunrar/blake2s.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-blake2s.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-blake2s.Tpo -c -o ../libclamunrar/libclamunrar_la-blake2s.lo `test -f '../libclamunrar/blake2s.cpp' || echo '$(srcdir)/'`../libclamunrar/blake2s.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-blake2s.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-blake2s.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/blake2s.cpp' object='../libclamunrar/libclamunrar_la-blake2s.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-blake2s.lo `test -f '../libclamunrar/blake2s.cpp' || echo '$(srcdir)/'`../libclamunrar/blake2s.cpp + +../libclamunrar/libclamunrar_la-cmddata.lo: ../libclamunrar/cmddata.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-cmddata.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-cmddata.Tpo -c -o ../libclamunrar/libclamunrar_la-cmddata.lo `test -f '../libclamunrar/cmddata.cpp' || echo '$(srcdir)/'`../libclamunrar/cmddata.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-cmddata.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-cmddata.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/cmddata.cpp' object='../libclamunrar/libclamunrar_la-cmddata.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-cmddata.lo `test -f '../libclamunrar/cmddata.cpp' || echo '$(srcdir)/'`../libclamunrar/cmddata.cpp + +../libclamunrar/libclamunrar_la-consio.lo: ../libclamunrar/consio.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-consio.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-consio.Tpo -c -o ../libclamunrar/libclamunrar_la-consio.lo `test -f '../libclamunrar/consio.cpp' || echo '$(srcdir)/'`../libclamunrar/consio.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-consio.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-consio.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/consio.cpp' object='../libclamunrar/libclamunrar_la-consio.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-consio.lo `test -f '../libclamunrar/consio.cpp' || echo '$(srcdir)/'`../libclamunrar/consio.cpp + +../libclamunrar/libclamunrar_la-crc.lo: ../libclamunrar/crc.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-crc.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-crc.Tpo -c -o ../libclamunrar/libclamunrar_la-crc.lo `test -f '../libclamunrar/crc.cpp' || echo '$(srcdir)/'`../libclamunrar/crc.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-crc.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-crc.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/crc.cpp' object='../libclamunrar/libclamunrar_la-crc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-crc.lo `test -f '../libclamunrar/crc.cpp' || echo '$(srcdir)/'`../libclamunrar/crc.cpp + +../libclamunrar/libclamunrar_la-crypt.lo: ../libclamunrar/crypt.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-crypt.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-crypt.Tpo -c -o ../libclamunrar/libclamunrar_la-crypt.lo `test -f '../libclamunrar/crypt.cpp' || echo '$(srcdir)/'`../libclamunrar/crypt.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-crypt.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-crypt.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/crypt.cpp' object='../libclamunrar/libclamunrar_la-crypt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-crypt.lo `test -f '../libclamunrar/crypt.cpp' || echo '$(srcdir)/'`../libclamunrar/crypt.cpp + +../libclamunrar/libclamunrar_la-dll.lo: ../libclamunrar/dll.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-dll.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-dll.Tpo -c -o ../libclamunrar/libclamunrar_la-dll.lo `test -f '../libclamunrar/dll.cpp' || echo '$(srcdir)/'`../libclamunrar/dll.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-dll.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-dll.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/dll.cpp' object='../libclamunrar/libclamunrar_la-dll.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-dll.lo `test -f '../libclamunrar/dll.cpp' || echo '$(srcdir)/'`../libclamunrar/dll.cpp + +../libclamunrar/libclamunrar_la-encname.lo: ../libclamunrar/encname.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-encname.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-encname.Tpo -c -o ../libclamunrar/libclamunrar_la-encname.lo `test -f '../libclamunrar/encname.cpp' || echo '$(srcdir)/'`../libclamunrar/encname.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-encname.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-encname.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/encname.cpp' object='../libclamunrar/libclamunrar_la-encname.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-encname.lo `test -f '../libclamunrar/encname.cpp' || echo '$(srcdir)/'`../libclamunrar/encname.cpp + +../libclamunrar/libclamunrar_la-errhnd.lo: ../libclamunrar/errhnd.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-errhnd.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-errhnd.Tpo -c -o ../libclamunrar/libclamunrar_la-errhnd.lo `test -f '../libclamunrar/errhnd.cpp' || echo '$(srcdir)/'`../libclamunrar/errhnd.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-errhnd.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-errhnd.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/errhnd.cpp' object='../libclamunrar/libclamunrar_la-errhnd.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-errhnd.lo `test -f '../libclamunrar/errhnd.cpp' || echo '$(srcdir)/'`../libclamunrar/errhnd.cpp + +../libclamunrar/libclamunrar_la-extinfo.lo: ../libclamunrar/extinfo.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-extinfo.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-extinfo.Tpo -c -o ../libclamunrar/libclamunrar_la-extinfo.lo `test -f '../libclamunrar/extinfo.cpp' || echo '$(srcdir)/'`../libclamunrar/extinfo.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-extinfo.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-extinfo.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/extinfo.cpp' object='../libclamunrar/libclamunrar_la-extinfo.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-extinfo.lo `test -f '../libclamunrar/extinfo.cpp' || echo '$(srcdir)/'`../libclamunrar/extinfo.cpp + +../libclamunrar/libclamunrar_la-extract.lo: ../libclamunrar/extract.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-extract.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-extract.Tpo -c -o ../libclamunrar/libclamunrar_la-extract.lo `test -f '../libclamunrar/extract.cpp' || echo '$(srcdir)/'`../libclamunrar/extract.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-extract.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-extract.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/extract.cpp' object='../libclamunrar/libclamunrar_la-extract.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-extract.lo `test -f '../libclamunrar/extract.cpp' || echo '$(srcdir)/'`../libclamunrar/extract.cpp + +../libclamunrar/libclamunrar_la-filcreat.lo: ../libclamunrar/filcreat.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-filcreat.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-filcreat.Tpo -c -o ../libclamunrar/libclamunrar_la-filcreat.lo `test -f '../libclamunrar/filcreat.cpp' || echo '$(srcdir)/'`../libclamunrar/filcreat.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-filcreat.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-filcreat.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/filcreat.cpp' object='../libclamunrar/libclamunrar_la-filcreat.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-filcreat.lo `test -f '../libclamunrar/filcreat.cpp' || echo '$(srcdir)/'`../libclamunrar/filcreat.cpp + +../libclamunrar/libclamunrar_la-file.lo: ../libclamunrar/file.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-file.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-file.Tpo -c -o ../libclamunrar/libclamunrar_la-file.lo `test -f '../libclamunrar/file.cpp' || echo '$(srcdir)/'`../libclamunrar/file.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-file.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-file.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/file.cpp' object='../libclamunrar/libclamunrar_la-file.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-file.lo `test -f '../libclamunrar/file.cpp' || echo '$(srcdir)/'`../libclamunrar/file.cpp + +../libclamunrar/libclamunrar_la-filefn.lo: ../libclamunrar/filefn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-filefn.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-filefn.Tpo -c -o ../libclamunrar/libclamunrar_la-filefn.lo `test -f '../libclamunrar/filefn.cpp' || echo '$(srcdir)/'`../libclamunrar/filefn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-filefn.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-filefn.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/filefn.cpp' object='../libclamunrar/libclamunrar_la-filefn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-filefn.lo `test -f '../libclamunrar/filefn.cpp' || echo '$(srcdir)/'`../libclamunrar/filefn.cpp + +../libclamunrar/libclamunrar_la-filestr.lo: ../libclamunrar/filestr.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-filestr.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-filestr.Tpo -c -o ../libclamunrar/libclamunrar_la-filestr.lo `test -f '../libclamunrar/filestr.cpp' || echo '$(srcdir)/'`../libclamunrar/filestr.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-filestr.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-filestr.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/filestr.cpp' object='../libclamunrar/libclamunrar_la-filestr.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-filestr.lo `test -f '../libclamunrar/filestr.cpp' || echo '$(srcdir)/'`../libclamunrar/filestr.cpp + +../libclamunrar/libclamunrar_la-find.lo: ../libclamunrar/find.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-find.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-find.Tpo -c -o ../libclamunrar/libclamunrar_la-find.lo `test -f '../libclamunrar/find.cpp' || echo '$(srcdir)/'`../libclamunrar/find.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-find.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-find.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/find.cpp' object='../libclamunrar/libclamunrar_la-find.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-find.lo `test -f '../libclamunrar/find.cpp' || echo '$(srcdir)/'`../libclamunrar/find.cpp + +../libclamunrar/libclamunrar_la-getbits.lo: ../libclamunrar/getbits.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-getbits.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-getbits.Tpo -c -o ../libclamunrar/libclamunrar_la-getbits.lo `test -f '../libclamunrar/getbits.cpp' || echo '$(srcdir)/'`../libclamunrar/getbits.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-getbits.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-getbits.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/getbits.cpp' object='../libclamunrar/libclamunrar_la-getbits.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-getbits.lo `test -f '../libclamunrar/getbits.cpp' || echo '$(srcdir)/'`../libclamunrar/getbits.cpp + +../libclamunrar/libclamunrar_la-global.lo: ../libclamunrar/global.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-global.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-global.Tpo -c -o ../libclamunrar/libclamunrar_la-global.lo `test -f '../libclamunrar/global.cpp' || echo '$(srcdir)/'`../libclamunrar/global.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-global.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-global.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/global.cpp' object='../libclamunrar/libclamunrar_la-global.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-global.lo `test -f '../libclamunrar/global.cpp' || echo '$(srcdir)/'`../libclamunrar/global.cpp + +../libclamunrar/libclamunrar_la-hash.lo: ../libclamunrar/hash.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-hash.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-hash.Tpo -c -o ../libclamunrar/libclamunrar_la-hash.lo `test -f '../libclamunrar/hash.cpp' || echo '$(srcdir)/'`../libclamunrar/hash.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-hash.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-hash.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/hash.cpp' object='../libclamunrar/libclamunrar_la-hash.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-hash.lo `test -f '../libclamunrar/hash.cpp' || echo '$(srcdir)/'`../libclamunrar/hash.cpp + +../libclamunrar/libclamunrar_la-headers.lo: ../libclamunrar/headers.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-headers.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-headers.Tpo -c -o ../libclamunrar/libclamunrar_la-headers.lo `test -f '../libclamunrar/headers.cpp' || echo '$(srcdir)/'`../libclamunrar/headers.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-headers.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-headers.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/headers.cpp' object='../libclamunrar/libclamunrar_la-headers.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-headers.lo `test -f '../libclamunrar/headers.cpp' || echo '$(srcdir)/'`../libclamunrar/headers.cpp + +../libclamunrar/libclamunrar_la-list.lo: ../libclamunrar/list.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-list.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-list.Tpo -c -o ../libclamunrar/libclamunrar_la-list.lo `test -f '../libclamunrar/list.cpp' || echo '$(srcdir)/'`../libclamunrar/list.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-list.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-list.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/list.cpp' object='../libclamunrar/libclamunrar_la-list.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-list.lo `test -f '../libclamunrar/list.cpp' || echo '$(srcdir)/'`../libclamunrar/list.cpp + +../libclamunrar/libclamunrar_la-match.lo: ../libclamunrar/match.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-match.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-match.Tpo -c -o ../libclamunrar/libclamunrar_la-match.lo `test -f '../libclamunrar/match.cpp' || echo '$(srcdir)/'`../libclamunrar/match.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-match.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-match.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/match.cpp' object='../libclamunrar/libclamunrar_la-match.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-match.lo `test -f '../libclamunrar/match.cpp' || echo '$(srcdir)/'`../libclamunrar/match.cpp + +../libclamunrar/libclamunrar_la-options.lo: ../libclamunrar/options.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-options.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-options.Tpo -c -o ../libclamunrar/libclamunrar_la-options.lo `test -f '../libclamunrar/options.cpp' || echo '$(srcdir)/'`../libclamunrar/options.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-options.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-options.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/options.cpp' object='../libclamunrar/libclamunrar_la-options.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-options.lo `test -f '../libclamunrar/options.cpp' || echo '$(srcdir)/'`../libclamunrar/options.cpp + +../libclamunrar/libclamunrar_la-pathfn.lo: ../libclamunrar/pathfn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-pathfn.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-pathfn.Tpo -c -o ../libclamunrar/libclamunrar_la-pathfn.lo `test -f '../libclamunrar/pathfn.cpp' || echo '$(srcdir)/'`../libclamunrar/pathfn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-pathfn.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-pathfn.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/pathfn.cpp' object='../libclamunrar/libclamunrar_la-pathfn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-pathfn.lo `test -f '../libclamunrar/pathfn.cpp' || echo '$(srcdir)/'`../libclamunrar/pathfn.cpp + +../libclamunrar/libclamunrar_la-qopen.lo: ../libclamunrar/qopen.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-qopen.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-qopen.Tpo -c -o ../libclamunrar/libclamunrar_la-qopen.lo `test -f '../libclamunrar/qopen.cpp' || echo '$(srcdir)/'`../libclamunrar/qopen.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-qopen.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-qopen.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/qopen.cpp' object='../libclamunrar/libclamunrar_la-qopen.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-qopen.lo `test -f '../libclamunrar/qopen.cpp' || echo '$(srcdir)/'`../libclamunrar/qopen.cpp + +../libclamunrar/libclamunrar_la-rar.lo: ../libclamunrar/rar.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-rar.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-rar.Tpo -c -o ../libclamunrar/libclamunrar_la-rar.lo `test -f '../libclamunrar/rar.cpp' || echo '$(srcdir)/'`../libclamunrar/rar.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-rar.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-rar.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/rar.cpp' object='../libclamunrar/libclamunrar_la-rar.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-rar.lo `test -f '../libclamunrar/rar.cpp' || echo '$(srcdir)/'`../libclamunrar/rar.cpp + +../libclamunrar/libclamunrar_la-rarvm.lo: ../libclamunrar/rarvm.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-rarvm.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-rarvm.Tpo -c -o ../libclamunrar/libclamunrar_la-rarvm.lo `test -f '../libclamunrar/rarvm.cpp' || echo '$(srcdir)/'`../libclamunrar/rarvm.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-rarvm.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-rarvm.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/rarvm.cpp' object='../libclamunrar/libclamunrar_la-rarvm.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-rarvm.lo `test -f '../libclamunrar/rarvm.cpp' || echo '$(srcdir)/'`../libclamunrar/rarvm.cpp + +../libclamunrar/libclamunrar_la-rawread.lo: ../libclamunrar/rawread.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-rawread.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-rawread.Tpo -c -o ../libclamunrar/libclamunrar_la-rawread.lo `test -f '../libclamunrar/rawread.cpp' || echo '$(srcdir)/'`../libclamunrar/rawread.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-rawread.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-rawread.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/rawread.cpp' object='../libclamunrar/libclamunrar_la-rawread.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-rawread.lo `test -f '../libclamunrar/rawread.cpp' || echo '$(srcdir)/'`../libclamunrar/rawread.cpp + +../libclamunrar/libclamunrar_la-rdwrfn.lo: ../libclamunrar/rdwrfn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-rdwrfn.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-rdwrfn.Tpo -c -o ../libclamunrar/libclamunrar_la-rdwrfn.lo `test -f '../libclamunrar/rdwrfn.cpp' || echo '$(srcdir)/'`../libclamunrar/rdwrfn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-rdwrfn.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-rdwrfn.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/rdwrfn.cpp' object='../libclamunrar/libclamunrar_la-rdwrfn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-rdwrfn.lo `test -f '../libclamunrar/rdwrfn.cpp' || echo '$(srcdir)/'`../libclamunrar/rdwrfn.cpp + +../libclamunrar/libclamunrar_la-recvol.lo: ../libclamunrar/recvol.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-recvol.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-recvol.Tpo -c -o ../libclamunrar/libclamunrar_la-recvol.lo `test -f '../libclamunrar/recvol.cpp' || echo '$(srcdir)/'`../libclamunrar/recvol.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-recvol.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-recvol.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/recvol.cpp' object='../libclamunrar/libclamunrar_la-recvol.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-recvol.lo `test -f '../libclamunrar/recvol.cpp' || echo '$(srcdir)/'`../libclamunrar/recvol.cpp + +../libclamunrar/libclamunrar_la-resource.lo: ../libclamunrar/resource.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-resource.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-resource.Tpo -c -o ../libclamunrar/libclamunrar_la-resource.lo `test -f '../libclamunrar/resource.cpp' || echo '$(srcdir)/'`../libclamunrar/resource.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-resource.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-resource.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/resource.cpp' object='../libclamunrar/libclamunrar_la-resource.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-resource.lo `test -f '../libclamunrar/resource.cpp' || echo '$(srcdir)/'`../libclamunrar/resource.cpp + +../libclamunrar/libclamunrar_la-rijndael.lo: ../libclamunrar/rijndael.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-rijndael.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-rijndael.Tpo -c -o ../libclamunrar/libclamunrar_la-rijndael.lo `test -f '../libclamunrar/rijndael.cpp' || echo '$(srcdir)/'`../libclamunrar/rijndael.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-rijndael.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-rijndael.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/rijndael.cpp' object='../libclamunrar/libclamunrar_la-rijndael.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-rijndael.lo `test -f '../libclamunrar/rijndael.cpp' || echo '$(srcdir)/'`../libclamunrar/rijndael.cpp + +../libclamunrar/libclamunrar_la-rs.lo: ../libclamunrar/rs.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-rs.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-rs.Tpo -c -o ../libclamunrar/libclamunrar_la-rs.lo `test -f '../libclamunrar/rs.cpp' || echo '$(srcdir)/'`../libclamunrar/rs.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-rs.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-rs.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/rs.cpp' object='../libclamunrar/libclamunrar_la-rs.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-rs.lo `test -f '../libclamunrar/rs.cpp' || echo '$(srcdir)/'`../libclamunrar/rs.cpp + +../libclamunrar/libclamunrar_la-rs16.lo: ../libclamunrar/rs16.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-rs16.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-rs16.Tpo -c -o ../libclamunrar/libclamunrar_la-rs16.lo `test -f '../libclamunrar/rs16.cpp' || echo '$(srcdir)/'`../libclamunrar/rs16.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-rs16.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-rs16.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/rs16.cpp' object='../libclamunrar/libclamunrar_la-rs16.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-rs16.lo `test -f '../libclamunrar/rs16.cpp' || echo '$(srcdir)/'`../libclamunrar/rs16.cpp + +../libclamunrar/libclamunrar_la-scantree.lo: ../libclamunrar/scantree.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-scantree.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-scantree.Tpo -c -o ../libclamunrar/libclamunrar_la-scantree.lo `test -f '../libclamunrar/scantree.cpp' || echo '$(srcdir)/'`../libclamunrar/scantree.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-scantree.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-scantree.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/scantree.cpp' object='../libclamunrar/libclamunrar_la-scantree.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-scantree.lo `test -f '../libclamunrar/scantree.cpp' || echo '$(srcdir)/'`../libclamunrar/scantree.cpp + +../libclamunrar/libclamunrar_la-secpassword.lo: ../libclamunrar/secpassword.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-secpassword.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-secpassword.Tpo -c -o ../libclamunrar/libclamunrar_la-secpassword.lo `test -f '../libclamunrar/secpassword.cpp' || echo '$(srcdir)/'`../libclamunrar/secpassword.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-secpassword.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-secpassword.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/secpassword.cpp' object='../libclamunrar/libclamunrar_la-secpassword.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-secpassword.lo `test -f '../libclamunrar/secpassword.cpp' || echo '$(srcdir)/'`../libclamunrar/secpassword.cpp + +../libclamunrar/libclamunrar_la-sha1.lo: ../libclamunrar/sha1.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-sha1.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-sha1.Tpo -c -o ../libclamunrar/libclamunrar_la-sha1.lo `test -f '../libclamunrar/sha1.cpp' || echo '$(srcdir)/'`../libclamunrar/sha1.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-sha1.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-sha1.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/sha1.cpp' object='../libclamunrar/libclamunrar_la-sha1.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-sha1.lo `test -f '../libclamunrar/sha1.cpp' || echo '$(srcdir)/'`../libclamunrar/sha1.cpp + +../libclamunrar/libclamunrar_la-sha256.lo: ../libclamunrar/sha256.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-sha256.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-sha256.Tpo -c -o ../libclamunrar/libclamunrar_la-sha256.lo `test -f '../libclamunrar/sha256.cpp' || echo '$(srcdir)/'`../libclamunrar/sha256.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-sha256.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-sha256.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/sha256.cpp' object='../libclamunrar/libclamunrar_la-sha256.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-sha256.lo `test -f '../libclamunrar/sha256.cpp' || echo '$(srcdir)/'`../libclamunrar/sha256.cpp + +../libclamunrar/libclamunrar_la-smallfn.lo: ../libclamunrar/smallfn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-smallfn.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-smallfn.Tpo -c -o ../libclamunrar/libclamunrar_la-smallfn.lo `test -f '../libclamunrar/smallfn.cpp' || echo '$(srcdir)/'`../libclamunrar/smallfn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-smallfn.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-smallfn.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/smallfn.cpp' object='../libclamunrar/libclamunrar_la-smallfn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-smallfn.lo `test -f '../libclamunrar/smallfn.cpp' || echo '$(srcdir)/'`../libclamunrar/smallfn.cpp + +../libclamunrar/libclamunrar_la-strfn.lo: ../libclamunrar/strfn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-strfn.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-strfn.Tpo -c -o ../libclamunrar/libclamunrar_la-strfn.lo `test -f '../libclamunrar/strfn.cpp' || echo '$(srcdir)/'`../libclamunrar/strfn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-strfn.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-strfn.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/strfn.cpp' object='../libclamunrar/libclamunrar_la-strfn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-strfn.lo `test -f '../libclamunrar/strfn.cpp' || echo '$(srcdir)/'`../libclamunrar/strfn.cpp + +../libclamunrar/libclamunrar_la-strlist.lo: ../libclamunrar/strlist.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-strlist.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-strlist.Tpo -c -o ../libclamunrar/libclamunrar_la-strlist.lo `test -f '../libclamunrar/strlist.cpp' || echo '$(srcdir)/'`../libclamunrar/strlist.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-strlist.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-strlist.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/strlist.cpp' object='../libclamunrar/libclamunrar_la-strlist.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-strlist.lo `test -f '../libclamunrar/strlist.cpp' || echo '$(srcdir)/'`../libclamunrar/strlist.cpp + +../libclamunrar/libclamunrar_la-system.lo: ../libclamunrar/system.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-system.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-system.Tpo -c -o ../libclamunrar/libclamunrar_la-system.lo `test -f '../libclamunrar/system.cpp' || echo '$(srcdir)/'`../libclamunrar/system.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-system.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-system.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/system.cpp' object='../libclamunrar/libclamunrar_la-system.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-system.lo `test -f '../libclamunrar/system.cpp' || echo '$(srcdir)/'`../libclamunrar/system.cpp + +../libclamunrar/libclamunrar_la-threadpool.lo: ../libclamunrar/threadpool.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-threadpool.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-threadpool.Tpo -c -o ../libclamunrar/libclamunrar_la-threadpool.lo `test -f '../libclamunrar/threadpool.cpp' || echo '$(srcdir)/'`../libclamunrar/threadpool.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-threadpool.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-threadpool.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/threadpool.cpp' object='../libclamunrar/libclamunrar_la-threadpool.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-threadpool.lo `test -f '../libclamunrar/threadpool.cpp' || echo '$(srcdir)/'`../libclamunrar/threadpool.cpp + +../libclamunrar/libclamunrar_la-timefn.lo: ../libclamunrar/timefn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-timefn.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-timefn.Tpo -c -o ../libclamunrar/libclamunrar_la-timefn.lo `test -f '../libclamunrar/timefn.cpp' || echo '$(srcdir)/'`../libclamunrar/timefn.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-timefn.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-timefn.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/timefn.cpp' object='../libclamunrar/libclamunrar_la-timefn.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-timefn.lo `test -f '../libclamunrar/timefn.cpp' || echo '$(srcdir)/'`../libclamunrar/timefn.cpp + +../libclamunrar/libclamunrar_la-ui.lo: ../libclamunrar/ui.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-ui.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-ui.Tpo -c -o ../libclamunrar/libclamunrar_la-ui.lo `test -f '../libclamunrar/ui.cpp' || echo '$(srcdir)/'`../libclamunrar/ui.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-ui.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-ui.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/ui.cpp' object='../libclamunrar/libclamunrar_la-ui.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-ui.lo `test -f '../libclamunrar/ui.cpp' || echo '$(srcdir)/'`../libclamunrar/ui.cpp + +../libclamunrar/libclamunrar_la-unicode.lo: ../libclamunrar/unicode.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-unicode.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-unicode.Tpo -c -o ../libclamunrar/libclamunrar_la-unicode.lo `test -f '../libclamunrar/unicode.cpp' || echo '$(srcdir)/'`../libclamunrar/unicode.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-unicode.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-unicode.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/unicode.cpp' object='../libclamunrar/libclamunrar_la-unicode.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-unicode.lo `test -f '../libclamunrar/unicode.cpp' || echo '$(srcdir)/'`../libclamunrar/unicode.cpp + +../libclamunrar/libclamunrar_la-unpack.lo: ../libclamunrar/unpack.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-unpack.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-unpack.Tpo -c -o ../libclamunrar/libclamunrar_la-unpack.lo `test -f '../libclamunrar/unpack.cpp' || echo '$(srcdir)/'`../libclamunrar/unpack.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-unpack.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-unpack.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/unpack.cpp' object='../libclamunrar/libclamunrar_la-unpack.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-unpack.lo `test -f '../libclamunrar/unpack.cpp' || echo '$(srcdir)/'`../libclamunrar/unpack.cpp + +../libclamunrar/libclamunrar_la-volume.lo: ../libclamunrar/volume.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar/libclamunrar_la-volume.lo -MD -MP -MF ../libclamunrar/$(DEPDIR)/libclamunrar_la-volume.Tpo -c -o ../libclamunrar/libclamunrar_la-volume.lo `test -f '../libclamunrar/volume.cpp' || echo '$(srcdir)/'`../libclamunrar/volume.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar/$(DEPDIR)/libclamunrar_la-volume.Tpo ../libclamunrar/$(DEPDIR)/libclamunrar_la-volume.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar/volume.cpp' object='../libclamunrar/libclamunrar_la-volume.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar/libclamunrar_la-volume.lo `test -f '../libclamunrar/volume.cpp' || echo '$(srcdir)/'`../libclamunrar/volume.cpp + +../libclamunrar_iface/libclamunrar_iface_la-unrar_iface.lo: ../libclamunrar_iface/unrar_iface.cpp +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_iface_la_CXXFLAGS) $(CXXFLAGS) -MT ../libclamunrar_iface/libclamunrar_iface_la-unrar_iface.lo -MD -MP -MF ../libclamunrar_iface/$(DEPDIR)/libclamunrar_iface_la-unrar_iface.Tpo -c -o ../libclamunrar_iface/libclamunrar_iface_la-unrar_iface.lo `test -f '../libclamunrar_iface/unrar_iface.cpp' || echo '$(srcdir)/'`../libclamunrar_iface/unrar_iface.cpp +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ../libclamunrar_iface/$(DEPDIR)/libclamunrar_iface_la-unrar_iface.Tpo ../libclamunrar_iface/$(DEPDIR)/libclamunrar_iface_la-unrar_iface.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='../libclamunrar_iface/unrar_iface.cpp' object='../libclamunrar_iface/libclamunrar_iface_la-unrar_iface.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libclamunrar_iface_la_CXXFLAGS) $(CXXFLAGS) -c -o ../libclamunrar_iface/libclamunrar_iface_la-unrar_iface.lo `test -f '../libclamunrar_iface/unrar_iface.cpp' || echo '$(srcdir)/'`../libclamunrar_iface/unrar_iface.cpp + +.l.c: + $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) + +.y.c: + $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + -rm -rf ../libclammspack/mspack/.libs ../libclammspack/mspack/_libs + -rm -rf ../libclamunrar/.libs ../libclamunrar/_libs + -rm -rf ../libclamunrar_iface/.libs ../libclamunrar_iface/_libs + -rm -rf 7z/.libs 7z/_libs + -rm -rf jsparse/.libs jsparse/_libs + -rm -rf lzw/.libs lzw/_libs + -rm -rf nsis/.libs nsis/_libs + -rm -rf regex/.libs regex/_libs + -rm -rf tomsfastmath/addsub/.libs tomsfastmath/addsub/_libs + -rm -rf tomsfastmath/bin/.libs tomsfastmath/bin/_libs + -rm -rf tomsfastmath/bit/.libs tomsfastmath/bit/_libs + -rm -rf tomsfastmath/divide/.libs tomsfastmath/divide/_libs + -rm -rf tomsfastmath/exptmod/.libs tomsfastmath/exptmod/_libs + -rm -rf tomsfastmath/misc/.libs tomsfastmath/misc/_libs + -rm -rf tomsfastmath/mont/.libs tomsfastmath/mont/_libs + -rm -rf tomsfastmath/mul/.libs tomsfastmath/mul/_libs + -rm -rf tomsfastmath/numtheory/.libs tomsfastmath/numtheory/_libs + -rm -rf tomsfastmath/sqr/.libs tomsfastmath/sqr/_libs +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ + $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +@USE_INTERNAL_MSPACK_TRUE@distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-recursive +all-am: Makefile $(LTLIBRARIES) $(HEADERS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + -rm -f ../libclammspack/mspack/$(DEPDIR)/$(am__dirstamp) + -rm -f ../libclammspack/mspack/$(am__dirstamp) + -rm -f ../libclamunrar/$(DEPDIR)/$(am__dirstamp) + -rm -f ../libclamunrar/$(am__dirstamp) + -rm -f ../libclamunrar_iface/$(DEPDIR)/$(am__dirstamp) + -rm -f ../libclamunrar_iface/$(am__dirstamp) + -rm -f 7z/$(DEPDIR)/$(am__dirstamp) + -rm -f 7z/$(am__dirstamp) + -rm -f jsparse/$(DEPDIR)/$(am__dirstamp) + -rm -f jsparse/$(am__dirstamp) + -rm -f lzw/$(DEPDIR)/$(am__dirstamp) + -rm -f lzw/$(am__dirstamp) + -rm -f nsis/$(DEPDIR)/$(am__dirstamp) + -rm -f nsis/$(am__dirstamp) + -rm -f regex/$(DEPDIR)/$(am__dirstamp) + -rm -f regex/$(am__dirstamp) + -rm -f tomsfastmath/addsub/$(DEPDIR)/$(am__dirstamp) + -rm -f tomsfastmath/addsub/$(am__dirstamp) + -rm -f tomsfastmath/bin/$(DEPDIR)/$(am__dirstamp) + -rm -f tomsfastmath/bin/$(am__dirstamp) + -rm -f tomsfastmath/bit/$(DEPDIR)/$(am__dirstamp) + -rm -f tomsfastmath/bit/$(am__dirstamp) + -rm -f tomsfastmath/divide/$(DEPDIR)/$(am__dirstamp) + -rm -f tomsfastmath/divide/$(am__dirstamp) + -rm -f tomsfastmath/exptmod/$(DEPDIR)/$(am__dirstamp) + -rm -f tomsfastmath/exptmod/$(am__dirstamp) + -rm -f tomsfastmath/misc/$(DEPDIR)/$(am__dirstamp) + -rm -f tomsfastmath/misc/$(am__dirstamp) + -rm -f tomsfastmath/mont/$(DEPDIR)/$(am__dirstamp) + -rm -f tomsfastmath/mont/$(am__dirstamp) + -rm -f tomsfastmath/mul/$(DEPDIR)/$(am__dirstamp) + -rm -f tomsfastmath/mul/$(am__dirstamp) + -rm -f tomsfastmath/numtheory/$(DEPDIR)/$(am__dirstamp) + -rm -f tomsfastmath/numtheory/$(am__dirstamp) + -rm -f tomsfastmath/sqr/$(DEPDIR)/$(am__dirstamp) + -rm -f tomsfastmath/sqr/$(am__dirstamp) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -rm -f yara_grammar.c + -rm -f yara_grammar.h + -rm -f yara_lexer.c + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-recursive + +clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am + +@USE_INTERNAL_MSPACK_TRUE@distclean: distclean-recursive + -rm -rf ../libclammspack/mspack/$(DEPDIR) ../libclamunrar/$(DEPDIR) ../libclamunrar_iface/$(DEPDIR) ./$(DEPDIR) 7z/$(DEPDIR) jsparse/$(DEPDIR) lzw/$(DEPDIR) nsis/$(DEPDIR) regex/$(DEPDIR) tomsfastmath/addsub/$(DEPDIR) tomsfastmath/bin/$(DEPDIR) tomsfastmath/bit/$(DEPDIR) tomsfastmath/divide/$(DEPDIR) tomsfastmath/exptmod/$(DEPDIR) tomsfastmath/misc/$(DEPDIR) tomsfastmath/mont/$(DEPDIR) tomsfastmath/mul/$(DEPDIR) tomsfastmath/numtheory/$(DEPDIR) tomsfastmath/sqr/$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: install-includeHEADERS + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: install-libLTLIBRARIES + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +@USE_INTERNAL_MSPACK_TRUE@maintainer-clean: \ +@USE_INTERNAL_MSPACK_TRUE@ maintainer-clean-recursive + -rm -rf ../libclammspack/mspack/$(DEPDIR) ../libclamunrar/$(DEPDIR) ../libclamunrar_iface/$(DEPDIR) ./$(DEPDIR) 7z/$(DEPDIR) jsparse/$(DEPDIR) lzw/$(DEPDIR) nsis/$(DEPDIR) regex/$(DEPDIR) tomsfastmath/addsub/$(DEPDIR) tomsfastmath/bin/$(DEPDIR) tomsfastmath/bit/$(DEPDIR) tomsfastmath/divide/$(DEPDIR) tomsfastmath/exptmod/$(DEPDIR) tomsfastmath/misc/$(DEPDIR) tomsfastmath/mont/$(DEPDIR) tomsfastmath/mul/$(DEPDIR) tomsfastmath/numtheory/$(DEPDIR) tomsfastmath/sqr/$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES + +.MAKE: $(am__recursive_targets) all check install install-am \ + install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libLTLIBRARIES \ + clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-libLTLIBRARIES install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ + uninstall-libLTLIBRARIES + +.PRECIOUS: Makefile + + +@USE_INTERNAL_MSPACK_FALSE@libmspack/Makefile: +@USE_INTERNAL_MSPACK_FALSE@.PHONY: distdir distclean maintainer-clean +@USE_INTERNAL_MSPACK_FALSE@distdir: +@USE_INTERNAL_MSPACK_FALSE@ echo "make distdir requires --with-system-libmspack=no" +@USE_INTERNAL_MSPACK_FALSE@ exit 1 + +# nothing to do here, rules must exist for distclean to succeed +@USE_INTERNAL_MSPACK_FALSE@distclean: +@USE_INTERNAL_MSPACK_FALSE@ -rm -f Makefile +@USE_INTERNAL_MSPACK_FALSE@maintainer-clean: + +@USE_INTERNAL_MSPACK_FALSE@distclean-recursive distdir maintainer-clean-recursive: libmspack/Makefile +@ENABLE_LLVM_FALSE@c++/Makefile: c++/Makefile.nollvm.in +@ENABLE_LLVM_FALSE@ $(AM_V_at) cp $< $@ +@ENABLE_LLVM_FALSE@distclean-recursive distdir maintainer-clean-recursive: c++/Makefile + +.PHONY2: version.h.tmp +version.c: version.h +version.h: version.h.tmp + $(AM_V_GEN) if test -f version.h.static; then\ + cp version.h.static version.h;\ + elif ! diff $@ version.h.tmp >/dev/null 2>/dev/null; then\ + cp version.h.tmp $@;\ + fi + +version.h.tmp: + $(AM_V_GEN) test -f version.h || touch version.h;\ + rm -f $@;\ + REVISION="$$(LANG=C git --git-dir "$(top_srcdir)"/.git describe --always 2>/dev/null || echo "exported")";\ + if test "$$REVISION" = "exported"; then\ + REVISION="";\ + fi;\ + if test -n "$$REVISION"; then\ + echo "#define REPO_VERSION \"devel-$$REVISION\"" >> $@;\ + else\ + touch version.h.tmp;\ + fi + +@MAINTAINER_MODE_TRUE@jsparse-keywords.gperf: jsparse/keywords.list jsparse/future_reserved_words.list jsparse/special_keywords.list +@MAINTAINER_MODE_TRUE@ echo -e "struct keyword { const char *name; int val; };\n%%" >keywords-g-tmp +@MAINTAINER_MODE_TRUE@ for i in `cat @srcdir@/jsparse/keywords.list`; do j=`echo $$i |tr \[a-z\] \[A-Z\]`; echo "$$i, TOK_$$j" >>keywords-g-tmp; done +@MAINTAINER_MODE_TRUE@ for i in `cat @srcdir@/jsparse/future_reserved_words.list`; do echo "$$i, TOK_FUTURE_RESERVED_WORD" >>keywords-g-tmp; done +@MAINTAINER_MODE_TRUE@ cat @srcdir@/jsparse/special_keywords.list >>keywords-g-tmp +@MAINTAINER_MODE_TRUE@ mv keywords-g-tmp $@ + +@MAINTAINER_MODE_TRUE@jsparse/generated/operators.h: jsparse/operators.gperf +@MAINTAINER_MODE_TRUE@ $(GPERF) $(GPERF_FLAGS) -H op_hash -N in_op_set -W oplist $< >operators-tmp-g +@MAINTAINER_MODE_TRUE@ grep -v '^#line' operators-tmp +@MAINTAINER_MODE_TRUE@ rm operators-tmp-g +@MAINTAINER_MODE_TRUE@ mv operators-tmp @srcdir@/jsparse/generated/operators.h + +@MAINTAINER_MODE_TRUE@jsparse/generated/keywords.h: jsparse-keywords.gperf +@MAINTAINER_MODE_TRUE@ $(GPERF) $(GPERF_FLAGS) $< >keywords-tmp-g +@MAINTAINER_MODE_TRUE@ grep -v '^#line' keywords-tmp +@MAINTAINER_MODE_TRUE@ rm keywords-tmp-g +@MAINTAINER_MODE_TRUE@ mv keywords-tmp @srcdir@/jsparse/generated/keywords.h + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/clamscan/libclamav/adc.c b/clamscan/libclamav/adc.c new file mode 100644 index 0000000..e776293 --- /dev/null +++ b/clamscan/libclamav/adc.c @@ -0,0 +1,286 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2013 Sourcefire, Inc. + * + * Authors: David Raynor + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#include +#include +#if HAVE_STRING_H +#include +#endif + +#include "clamav.h" +#include "others.h" +#include "adc.h" + +/* #define DEBUG_ADC */ + +#ifdef DEBUG_ADC +#define adc_dbgmsg(...) cli_dbgmsg(__VA_ARGS__) +#else +#define adc_dbgmsg(...) ; +#endif + +/* Initialize values and collect buffer + * NOTE: buffer size must be larger than largest lookback offset */ +int adc_decompressInit(adc_stream *strm) +{ + if (strm == NULL) { + return ADC_IO_ERROR; + } + if (strm->state != ADC_STATE_UNINIT) { + return ADC_DATA_ERROR; + } + + /* Have to buffer maximum backward lookup */ + strm->buffer = (uint8_t *)calloc(ADC_BUFF_SIZE, 1); + if (strm->buffer == NULL) { + return ADC_MEM_ERROR; + } + strm->buffered = 0; + strm->state = ADC_STATE_GETTYPE; + strm->length = 0; + strm->offset = 0; + strm->curr = strm->buffer; + + return ADC_OK; +} + +/* Decompress routine + * NOTE: Reaching end of input buffer does not mean end of output. + * It may fill the output buffer but have more to output. + * It will only return ADC_STREAM_END if output buffer is not full. + * It will return ADC_DATA_ERROR if it ends in the middle of a phrase + * (i.e. in the middle of a lookback code or data run) + */ +int adc_decompress(adc_stream *strm) +{ + uint8_t bData; + uint8_t didNothing = 1; + + /* first, the error returns based on strm */ + if ((strm == NULL) || (strm->next_in == NULL) || (strm->next_out == NULL)) { + return ADC_IO_ERROR; + } + if (strm->state == ADC_STATE_UNINIT) { + return ADC_DATA_ERROR; + } + + cli_dbgmsg("adc_decompress: avail_in %llu avail_out %llu state %u\n", + (long long unsigned)strm->avail_in, (long long unsigned)strm->avail_out, strm->state); + + while (strm->avail_out) { + /* Exit if needs more in bytes and none available */ + int needsInput; + switch (strm->state) { + case ADC_STATE_SHORTLOOK: + case ADC_STATE_LONGLOOK: + needsInput = 0; + break; + default: + needsInput = 1; + break; + } + if (needsInput && (strm->avail_in == 0)) { + break; + } else { + didNothing = 0; + } + + /* Find or execute statecode */ + switch (strm->state) { + case ADC_STATE_GETTYPE: { + /* Grab action code */ + bData = *(strm->next_in); + strm->next_in++; + strm->avail_in--; + if (bData & 0x80) { + strm->state = ADC_STATE_RAWDATA; + strm->offset = 0; + strm->length = (bData & 0x7F) + 1; + } else if (bData & 0x40) { + strm->state = ADC_STATE_LONGOP2; + strm->offset = 0; + strm->length = (bData & 0x3F) + 4; + } else { + strm->state = ADC_STATE_SHORTOP; + strm->offset = (bData & 0x3) * 0x100; + strm->length = ((bData & 0x3C) >> 2) + 3; + } + adc_dbgmsg("adc_decompress: GETTYPE bData %x state %u offset %u length %u\n", + bData, strm->state, strm->offset, strm->length); + break; + } + case ADC_STATE_LONGOP2: { + /* Grab first offset byte */ + bData = *(strm->next_in); + strm->next_in++; + strm->avail_in--; + strm->offset = bData * 0x100; + strm->state = ADC_STATE_LONGOP1; + adc_dbgmsg("adc_decompress: LONGOP2 bData %x state %u offset %u length %u\n", + bData, strm->state, strm->offset, strm->length); + break; + } + case ADC_STATE_LONGOP1: { + /* Grab second offset byte */ + bData = *(strm->next_in); + strm->next_in++; + strm->avail_in--; + strm->offset += bData + 1; + strm->state = ADC_STATE_LONGLOOK; + adc_dbgmsg("adc_decompress: LONGOP1 bData %x state %u offset %u length %u\n", + bData, strm->state, strm->offset, strm->length); + break; + } + case ADC_STATE_SHORTOP: { + /* Grab offset byte */ + bData = *(strm->next_in); + strm->next_in++; + strm->avail_in--; + strm->offset += bData + 1; + strm->state = ADC_STATE_SHORTLOOK; + adc_dbgmsg("adc_decompress: SHORTOP bData %x state %u offset %u length %u\n", + bData, strm->state, strm->offset, strm->length); + break; + } + + case ADC_STATE_RAWDATA: { + /* Grab data */ + adc_dbgmsg("adc_decompress: RAWDATA offset %u length %u\n", strm->offset, strm->length); + while ((strm->avail_in > 0) && (strm->avail_out > 0) && (strm->length > 0)) { + bData = *(strm->next_in); + strm->next_in++; + strm->avail_in--; + /* store to output */ + *(strm->next_out) = bData; + strm->next_out++; + strm->avail_out--; + /* store to buffer */ + if (strm->curr >= (strm->buffer + ADC_BUFF_SIZE)) { + strm->curr = strm->buffer; + } + *(strm->curr) = bData; + strm->curr++; + if (strm->buffered < ADC_BUFF_SIZE) { + strm->buffered++; + } + strm->length--; + } + if (strm->length == 0) { + /* adc_dbgmsg("adc_decompress: RAWDATADONE buffered %u avail_in %u avail_out %u \n", + strm->buffered, strm->avail_in, strm->avail_out); */ + strm->state = ADC_STATE_GETTYPE; + } + break; + } + + case ADC_STATE_SHORTLOOK: + case ADC_STATE_LONGLOOK: { + /* Copy data */ + adc_dbgmsg("adc_decompress: LOOKBACK offset %u length %u avail_in %u avail_out %u\n", + strm->offset, strm->length, strm->avail_in, strm->avail_out); + while ((strm->avail_out > 0) && (strm->length > 0)) { + /* state validation first */ + if (strm->offset > 0x10000) { + cli_dbgmsg("adc_decompress: bad LOOKBACK offset %u\n", strm->offset); + return ADC_DATA_ERROR; + } else if ((strm->state == ADC_STATE_SHORTLOOK) && (strm->offset > 0x400)) { + cli_dbgmsg("adc_decompress: bad LOOKBACK offset %u\n", strm->offset); + return ADC_DATA_ERROR; + } + if (strm->offset > strm->buffered) { + cli_dbgmsg("adc_decompress: too large LOOKBACK offset %u\n", strm->offset); + return ADC_DATA_ERROR; + } + /* retrieve byte */ + if (strm->curr >= (strm->buffer + ADC_BUFF_SIZE)) { + strm->curr = strm->buffer; + } + if (strm->curr >= (strm->buffer + strm->offset)) { + bData = *(uint8_t *)(strm->curr - strm->offset); + } else { + bData = *(uint8_t *)(strm->curr + ADC_BUFF_SIZE - strm->offset); + } + /* store to output */ + *(strm->next_out) = bData; + strm->next_out++; + strm->avail_out--; + /* store to buffer */ + *(strm->curr) = bData; + strm->curr++; + if (strm->buffered < ADC_BUFF_SIZE) { + strm->buffered++; + } + strm->length--; + } + if (strm->length == 0) { + strm->state = ADC_STATE_GETTYPE; + /* adc_dbgmsg("adc_decompress: LOOKBACKDONE buffered %u avail_in %u avail_out %u \n", + strm->buffered, strm->avail_in, strm->avail_out); */ + } + break; + } + + default: { + /* bad state */ + cli_errmsg("adc_decompress: invalid state %u\n", strm->state); + return ADC_DATA_ERROR; + } + } /* end switch */ + } /* end while */ + + /* There really isn't a terminator, just end of data */ + if (didNothing && strm->avail_out) { + if (strm->state == ADC_STATE_GETTYPE) { + /* Nothing left to do */ + return ADC_STREAM_END; + } else { + /* Ended mid phrase */ + cli_dbgmsg("adc_decompress: stream ended mid-phrase, state %u\n", strm->state); + return ADC_DATA_ERROR; + } + } + return ADC_OK; +} + +/* Cleanup routine, frees buffer */ +int adc_decompressEnd(adc_stream *strm) +{ + if (strm == NULL) { + return ADC_IO_ERROR; + } + if (strm->state == ADC_STATE_UNINIT) { + return ADC_DATA_ERROR; + } + + if (strm->buffer != NULL) { + free(strm->buffer); + } + strm->buffered = 0; + strm->state = ADC_STATE_UNINIT; + strm->length = 0; + strm->offset = 0; + + return ADC_OK; +} diff --git a/clamscan/libclamav/adc.h b/clamscan/libclamav/adc.h new file mode 100644 index 0000000..84b84a1 --- /dev/null +++ b/clamscan/libclamav/adc.h @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2013 Sourcefire, Inc. + * + * Authors: David Raynor + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef CLAM_ADC_H +#define CLAM_ADC_H + +struct adc_stream { + uint8_t *next_in; + size_t avail_in; + size_t total_in; + + uint8_t *next_out; + size_t avail_out; + size_t total_out; + + /* internals */ + uint8_t *buffer; + uint8_t *curr; + + uint32_t buffered; + uint16_t state; + uint16_t length; + uint32_t offset; +}; +typedef struct adc_stream adc_stream; + +#define ADC_BUFF_SIZE 65536 + +#define ADC_MEM_ERROR -1 +#define ADC_DATA_ERROR -2 +#define ADC_IO_ERROR -3 +#define ADC_OK 0 +#define ADC_STREAM_END 1 + +enum adc_state { + ADC_STATE_UNINIT = 0, + ADC_STATE_GETTYPE = 1, + ADC_STATE_RAWDATA = 2, + ADC_STATE_SHORTOP = 3, + ADC_STATE_LONGOP2 = 4, + ADC_STATE_LONGOP1 = 5, + ADC_STATE_SHORTLOOK = 6, + ADC_STATE_LONGLOOK = 7 +}; + +/* Compression phrases + * store phrase - 1 byte header + data, first byte 0x80-0xFF, max length 0x80 (7 bits + 1), no offset + * short phrase - 2 byte header + data, first byte 0x00-0x3F, max length 0x12 (4 bits + 3), max offset 0x3FF (10 bits) + * long phrase - 3 byte header + data, first byte 0x40-0x7F, max length 0x43 (6 bits + 4), max offset 0xFFFF (16 bits) + */ + +int adc_decompressInit(adc_stream *strm); +int adc_decompress(adc_stream *strm); +int adc_decompressEnd(adc_stream *strm); + +#endif diff --git a/clamscan/libclamav/apm.c b/clamscan/libclamav/apm.c new file mode 100644 index 0000000..c4f738d --- /dev/null +++ b/clamscan/libclamav/apm.c @@ -0,0 +1,315 @@ +/* + * Copyright (C) 2014-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * + * Authors: Kevin Lin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#include +#include +#if HAVE_STRING_H +#include +#endif +#include +#include + +#include "clamav-types.h" +#include "others.h" +#include "apm.h" +#include "partition_intersection.h" +#include "scanners.h" +#include "dconf.h" + +//#define DEBUG_APM_PARSE + +#ifdef DEBUG_APM_PARSE +#define apm_parsemsg(...) cli_dbgmsg(__VA_ARGS__) +#else +#define apm_parsemsg(...) ; +#endif + +static int apm_partition_intersection(cli_ctx *ctx, struct apm_partition_info *aptable, size_t sectorsize, int old_school); + +int cli_scanapm(cli_ctx *ctx) +{ + struct apm_driver_desc_map ddm; + struct apm_partition_info aptable, apentry; + int ret = CL_CLEAN, detection = CL_CLEAN, old_school = 0; + size_t sectorsize, maplen, partsize; + size_t pos = 0, partoff = 0; + unsigned i; + uint32_t max_prtns = 0; + + if (!ctx || !ctx->fmap) { + cli_errmsg("cli_scanapm: Invalid context\n"); + return CL_ENULLARG; + } + + /* read driver description map at sector 0 */ + if (fmap_readn(ctx->fmap, &ddm, pos, sizeof(ddm)) != sizeof(ddm)) { + cli_dbgmsg("cli_scanapm: Invalid Apple driver description map\n"); + return CL_EFORMAT; + } + + /* convert driver description map big-endian to host */ + ddm.signature = be16_to_host(ddm.signature); + ddm.blockSize = be16_to_host(ddm.blockSize); + ddm.blockCount = be32_to_host(ddm.blockCount); + + /* check DDM signature */ + if (ddm.signature != DDM_SIGNATURE) { + cli_dbgmsg("cli_scanapm: Apple driver description map signature mismatch\n"); + return CL_EFORMAT; + } + + /* sector size is determined by the ddm */ + sectorsize = ddm.blockSize; + + /* size of total file must be described by the ddm */ + maplen = ctx->fmap->len; + if ((ddm.blockSize * ddm.blockCount) != maplen) { + cli_dbgmsg("cli_scanapm: File described %u size does not match %lu actual size\n", + (ddm.blockSize * ddm.blockCount), (unsigned long)maplen); + return CL_EFORMAT; + } + + /* check for old-school partition map */ + if (sectorsize == 2048) { + if (fmap_readn(ctx->fmap, &aptable, APM_FALLBACK_SECTOR_SIZE, sizeof(aptable)) != sizeof(aptable)) { + cli_dbgmsg("cli_scanapm: Invalid Apple partition entry\n"); + return CL_EFORMAT; + } + + aptable.signature = be16_to_host(aptable.signature); + if (aptable.signature == APM_SIGNATURE) { + sectorsize = APM_FALLBACK_SECTOR_SIZE; + old_school = 1; + } + } + + /* read partition table at sector 1 (or after the ddm if old-school) */ + pos = APM_PTABLE_BLOCK * sectorsize; + + if (fmap_readn(ctx->fmap, &aptable, pos, sizeof(aptable)) != sizeof(aptable)) { + cli_dbgmsg("cli_scanapm: Invalid Apple partition table\n"); + return CL_EFORMAT; + } + + /* convert partition table big endian to host */ + aptable.signature = be16_to_host(aptable.signature); + aptable.numPartitions = be32_to_host(aptable.numPartitions); + aptable.pBlockStart = be32_to_host(aptable.pBlockStart); + aptable.pBlockCount = be32_to_host(aptable.pBlockCount); + + /* check the partition entry signature */ + if (aptable.signature != APM_SIGNATURE) { + cli_dbgmsg("cli_scanapm: Apple partition table signature mismatch\n"); + return CL_EFORMAT; + } + + /* check if partition table partition */ + if (strncmp((char *)aptable.type, "Apple_Partition_Map", 32) && + strncmp((char *)aptable.type, "Apple_partition_map", 32) && + strncmp((char *)aptable.type, "Apple_patition_map", 32)) { + cli_dbgmsg("cli_scanapm: Initial Apple Partition Map partition is not detected\n"); + return CL_EFORMAT; + } + + /* check that the partition table fits in the space specified - HEURISTICS */ + if (SCAN_HEURISTIC_PARTITION_INTXN && (ctx->dconf->other & OTHER_CONF_PRTNINTXN)) { + ret = apm_partition_intersection(ctx, &aptable, sectorsize, old_school); + if (ret != CL_CLEAN) { + if (SCAN_ALLMATCHES && (ret == CL_VIRUS)) + detection = CL_VIRUS; + else + return ret; + } + } + + /* print debugging info on partition tables */ + cli_dbgmsg("APM Partition Table:\n"); + cli_dbgmsg("Name: %s\n", (char *)aptable.name); + cli_dbgmsg("Type: %s\n", (char *)aptable.type); + cli_dbgmsg("Signature: %x\n", aptable.signature); + cli_dbgmsg("Partition Count: %u\n", aptable.numPartitions); + cli_dbgmsg("Blocks: [%u, +%u), ([%lu, +%lu))\n", + aptable.pBlockStart, aptable.pBlockCount, + (unsigned long)(aptable.pBlockStart * sectorsize), + (unsigned long)(aptable.pBlockCount * sectorsize)); + + /* check engine maxpartitions limit */ + if (aptable.numPartitions < ctx->engine->maxpartitions) { + max_prtns = aptable.numPartitions; + } else { + max_prtns = ctx->engine->maxpartitions; + } + + /* partition table is a partition [at index 1], so skip it */ + for (i = 2; i <= max_prtns; ++i) { + /* read partition table entry */ + pos = i * sectorsize; + if (fmap_readn(ctx->fmap, &apentry, pos, sizeof(apentry)) != sizeof(apentry)) { + cli_dbgmsg("cli_scanapm: Invalid Apple partition entry\n"); + return CL_EFORMAT; + } + + /* convert partition entry big endian to host */ + apentry.signature = be16_to_host(apentry.signature); + apentry.reserved = be16_to_host(apentry.reserved); + apentry.numPartitions = be32_to_host(apentry.numPartitions); + apentry.pBlockStart = be32_to_host(apentry.pBlockStart); + apentry.pBlockCount = be32_to_host(apentry.pBlockCount); + + /* check the partition entry signature */ + if (aptable.signature != APM_SIGNATURE) { + cli_dbgmsg("cli_scanapm: Apple partition entry signature mismatch\n"); + return CL_EFORMAT; + } + + /* check if a out-of-order partition map */ + if (!strncmp((char *)apentry.type, "Apple_Partition_Map", 32) || + !strncmp((char *)apentry.type, "Apple_partition_map", 32) || + !strncmp((char *)apentry.type, "Apple_patition_map", 32)) { + + cli_dbgmsg("cli_scanapm: Out of order Apple Partition Map partition\n"); + continue; + } + + partoff = apentry.pBlockStart * sectorsize; + partsize = apentry.pBlockCount * sectorsize; + /* re-calculate if old_school and aligned [512 * 4 => 2048] */ + if (old_school && ((i % 4) == 0)) { + if (!strncmp((char *)apentry.type, "Apple_Driver", 32) || + !strncmp((char *)apentry.type, "Apple_Driver43", 32) || + !strncmp((char *)apentry.type, "Apple_Driver43_CD", 32) || + !strncmp((char *)apentry.type, "Apple_Driver_ATA", 32) || + !strncmp((char *)apentry.type, "Apple_Driver_ATAPI", 32) || + !strncmp((char *)apentry.type, "Apple_Patches", 32)) { + + partsize = apentry.pBlockCount * 2048; + } + } + + /* check if invalid partition */ + if ((partoff == 0) || (partoff + partsize > maplen)) { + cli_dbgmsg("cli_scanapm: Detected invalid Apple partition entry\n"); + continue; + } + + /* print debugging info on partition */ + cli_dbgmsg("APM Partition Entry %u:\n", i); + cli_dbgmsg("Name: %s\n", (char *)apentry.name); + cli_dbgmsg("Type: %s\n", (char *)apentry.type); + cli_dbgmsg("Signature: %x\n", apentry.signature); + cli_dbgmsg("Partition Count: %u\n", apentry.numPartitions); + cli_dbgmsg("Blocks: [%u, +%u), ([%zu, +%zu))\n", + apentry.pBlockStart, apentry.pBlockCount, partoff, partsize); + + /* send the partition to cli_magic_scan_nested_fmap_type */ + ret = cli_magic_scan_nested_fmap_type(ctx->fmap, partoff, partsize, ctx, CL_TYPE_PART_ANY, (const char *)apentry.name); + if (ret != CL_CLEAN) { + if (SCAN_ALLMATCHES && (ret == CL_VIRUS)) + detection = CL_VIRUS; + else + return ret; + } + } + + if (i >= ctx->engine->maxpartitions) { + cli_dbgmsg("cli_scanapm: max partitions reached\n"); + } + + return detection; +} + +static int apm_partition_intersection(cli_ctx *ctx, struct apm_partition_info *aptable, size_t sectorsize, int old_school) +{ + partition_intersection_list_t prtncheck; + struct apm_partition_info apentry; + unsigned i, pitxn; + int ret = CL_CLEAN, tmp = CL_CLEAN; + size_t pos; + uint32_t max_prtns = 0; + int virus_found = 0; + + partition_intersection_list_init(&prtncheck); + + /* check engine maxpartitions limit */ + if (aptable->numPartitions < ctx->engine->maxpartitions) { + max_prtns = aptable->numPartitions; + } else { + max_prtns = ctx->engine->maxpartitions; + } + + for (i = 1; i <= max_prtns; ++i) { + /* read partition table entry */ + pos = i * sectorsize; + if (fmap_readn(ctx->fmap, &apentry, pos, sizeof(apentry)) != sizeof(apentry)) { + cli_dbgmsg("cli_scanapm: Invalid Apple partition entry\n"); + partition_intersection_list_free(&prtncheck); + return CL_EFORMAT; + } + + /* convert necessary info big endian to host */ + apentry.pBlockStart = be32_to_host(apentry.pBlockStart); + apentry.pBlockCount = be32_to_host(apentry.pBlockCount); + /* re-calculate if old_school and aligned [512 * 4 => 2048] */ + if (old_school && ((i % 4) == 0)) { + if (!strncmp((char *)apentry.type, "Apple_Driver", 32) || + !strncmp((char *)apentry.type, "Apple_Driver43", 32) || + !strncmp((char *)apentry.type, "Apple_Driver43_CD", 32) || + !strncmp((char *)apentry.type, "Apple_Driver_ATA", 32) || + !strncmp((char *)apentry.type, "Apple_Driver_ATAPI", 32) || + !strncmp((char *)apentry.type, "Apple_Patches", 32)) { + + apentry.pBlockCount = apentry.pBlockCount * 4; + } + } + + tmp = partition_intersection_list_check(&prtncheck, &pitxn, apentry.pBlockStart, apentry.pBlockCount); + if (tmp != CL_CLEAN) { + if (tmp == CL_VIRUS) { + apm_parsemsg("Name: %s\n", (char *)aptable.name); + apm_parsemsg("Type: %s\n", (char *)aptable.type); + + cli_dbgmsg("cli_scanapm: detected intersection with partitions " + "[%u, %u]\n", + pitxn, i); + ret = cli_append_virus(ctx, PRTN_INTXN_DETECTION); + if (ret == CL_VIRUS) + virus_found = 1; + if (SCAN_ALLMATCHES || ret == CL_CLEAN) + tmp = 0; + else + goto leave; + } else { + ret = tmp; + goto leave; + } + } + pos += sectorsize; + } + +leave: + partition_intersection_list_free(&prtncheck); + if (virus_found) + return CL_VIRUS; + return ret; +} diff --git a/clamscan/libclamav/apm.h b/clamscan/libclamav/apm.h new file mode 100644 index 0000000..cf78640 --- /dev/null +++ b/clamscan/libclamav/apm.h @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2014-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * + * Authors: Kevin Lin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef __APM_H +#define __APM_H + +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#include "clamav-types.h" +#include "others.h" + +#define APM_FALLBACK_SECTOR_SIZE 512 + +#define APM_PTABLE_BLOCK 1 +#define APM_STRUCT_SIZE 512 + +#define DDM_SIGNATURE 0x4552 /* driver description signature ('ER') */ +#define APM_SIGNATURE 0x504D /* partition map signature ('PM') */ + +/* partition flags */ +#define VALID 0x00000001 +#define ALLOCATED 0x00000002 +#define IN_USE 0x00000004 +#define BOOTABLE 0x00000008 +#define READABLE 0x00000010 +#define WRITEABLE 0x00000020 +#define POSINDEPENDENT 0x00000040 +/* end of partition flags */ + +#ifndef HAVE_ATTRIB_PACKED +#define __attribute__(x) +#endif + +#ifdef HAVE_PRAGMA_PACK +#pragma pack(1) +#endif + +#ifdef HAVE_PRAGMA_PACK_HPPA +#pragma pack 1 +#endif + +/* 8-byte driver description entry for ddmap, big endian */ +struct apm_driver_desc_entry { + uint32_t block __attribute__((packed)); + uint16_t size __attribute__((packed)); + uint16_t type __attribute__((packed)); +}; //NOTE may need to be renamed + +/* 512(82)-byte driver descriptor map (Block0), big endian */ +struct apm_driver_desc_map { + uint16_t signature __attribute__((packed)); + uint16_t blockSize __attribute__((packed)); + uint32_t blockCount __attribute__((packed)); + uint16_t deviceType __attribute__((packed)); + uint16_t deviceID __attribute__((packed)); + uint32_t driverData __attribute__((packed)); + uint16_t driverCount __attribute__((packed)); + struct apm_driver_desc_entry driverTable[8]; + /* zeroes fill remainder of sector (430 bytes in 512 sector size) */ +}; + +/* 512(136)-byte partition info, big endian; + * both the partition table and the individual partitions use this + * struct to describe their details + */ +struct apm_partition_info { + uint16_t signature __attribute__((packed)); + uint16_t reserved __attribute__((packed)); + uint32_t numPartitions __attribute__((packed)); + uint32_t pBlockStart __attribute__((packed)); + uint32_t pBlockCount __attribute__((packed)); + uint8_t name[32]; + uint8_t type[32]; + uint32_t lBlockStart __attribute__((packed)); + uint32_t lBlockCount __attribute__((packed)); + uint32_t flags __attribute__((packed)); + uint32_t bootBlockStart __attribute__((packed)); + uint32_t bootSize __attribute__((packed)); + uint32_t bootAddr __attribute__((packed)); + uint32_t bootAddr2 __attribute__((packed)); + uint32_t bootEntry __attribute__((packed)); + uint32_t bootEntry2 __attribute__((packed)); + uint32_t bootChecksum __attribute__((packed)); + uint8_t processor[16]; + /* zeroes fill remainder of sector (376 bytes in 512 sector size) */ +}; + +#ifdef HAVE_PRAGMA_PACK +#pragma pack() +#endif + +#ifdef HAVE_PRAGMA_PACK_HPPA +#pragma pack +#endif + +int cli_scanapm(cli_ctx *ctx); + +#endif diff --git a/clamscan/libclamav/arc4.c b/clamscan/libclamav/arc4.c new file mode 100644 index 0000000..5144b72 --- /dev/null +++ b/clamscan/libclamav/arc4.c @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2011-2013 Sourcefire, Inc. + * + * Author: Török Edvin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#include "clamav-types.h" +#include "arc4.h" +#include + +bool arc4_init(struct arc4_state *a, const uint8_t *key, unsigned keylength) +{ + unsigned i; + uint8_t j; + uint32_t *S; + + if (NULL == a || NULL == key || 0 == keylength) + return false; + + S = &a->S[0]; + + for (i = 0; i < 256; i++) + S[i] = i; + for (i = 0, j = 0; i < 256; i++) { + uint8_t tmp = S[i]; + j = j + S[i] + key[i % keylength]; + S[i] = S[j]; + S[j] = tmp; + } + a->i = a->j = 0; + return true; +} + +void arc4_apply(struct arc4_state *s, uint8_t *data, unsigned len) +{ + uint8_t i = s->i, j = s->j; + uint32_t *S = &s->S[0]; + + while (len-- > 0) { + uint32_t a, b; + i++; + a = S[i]; + j += a; + b = S[i] = S[j]; + b += a; + S[j] = a; + *data++ ^= S[b & 0xff]; + } + + s->i = i; + s->j = j; +} + +#if 0 +#include +static struct { + const char *key; + const char *plaintext; + const char *result; +} testdata[] = { + {"Key", "Plaintext", "\xBB\xF3\x16\xE8\xD9\x40\xAF\x0A\xD3"}, + {"Wiki", "pedia", "\x10\x21\xBF\x04\x20"}, + {"Secret", "Attack at dawn", "\x45\xA0\x1F\x64\x5F\xC3\x5B\x38\x35\x52\x54\x4B\x9B\xF5"} +}; + +static int data[10*1024*1024]; +int main(void) +{ + struct arc4_state a; + uint8_t data[32]; + size_t i; + struct timeval tv0, tv1; + + for (i=0;i + +#include "clamav-types.h" +struct arc4_state { + /* really just 8 bit, but it is faster if reads are aligned */ + uint32_t S[256]; + uint8_t i, j; +}; + +bool arc4_init(struct arc4_state *a, const uint8_t *key, unsigned keylength); +void arc4_apply(struct arc4_state *s, uint8_t *data, unsigned len); diff --git a/clamscan/libclamav/asn1.c b/clamscan/libclamav/asn1.c new file mode 100644 index 0000000..a099f03 --- /dev/null +++ b/clamscan/libclamav/asn1.c @@ -0,0 +1,2409 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2011-2013 Sourcefire, Inc. + * + * Authors: aCaB + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#include + +#include "clamav.h" +#include "asn1.h" +#include "bignum.h" +#include "matcher-hash.h" + +/* --------------------------------------------------------------------------- OIDS */ +#define OID_1_3_14_3_2_26 "\x2b\x0e\x03\x02\x1a" +#define OID_sha1 OID_1_3_14_3_2_26 + +#define OID_1_3_14_3_2_29 "\x2b\x0e\x03\x02\x1d" +#define OID_sha1WithRSA OID_1_3_14_3_2_29 + +#define OID_1_2_840_113549_1_1_1 "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x01" +#define OID_rsaEncryption OID_1_2_840_113549_1_1_1 + +#define OID_1_2_840_113549_1_1_2 "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x02" +#define OID_md2WithRSAEncryption OID_1_2_840_113549_1_1_2 + +#define OID_1_2_840_113549_1_1_4 "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x04" +#define OID_md5WithRSAEncryption OID_1_2_840_113549_1_1_4 + +#define OID_1_2_840_113549_1_1_5 "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x05" +#define OID_sha1WithRSAEncryption OID_1_2_840_113549_1_1_5 + +#define OID_1_2_840_113549_1_1_11 "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0b" +#define OID_sha256WithRSAEncryption OID_1_2_840_113549_1_1_11 + +#define OID_1_2_840_113549_1_1_12 "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0c" +#define OID_sha384WithRSAEncryption OID_1_2_840_113549_1_1_12 + +#define OID_1_2_840_113549_1_1_13 "\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0d" +#define OID_sha512WithRSAEncryption OID_1_2_840_113549_1_1_13 + +#define OID_1_2_840_113549_1_7_1 "\x2a\x86\x48\x86\xf7\x0d\x01\x07\x01" +#define OID_pkcs7_data OID_1_2_840_113549_1_7_1 + +#define OID_1_2_840_113549_1_7_2 "\x2a\x86\x48\x86\xf7\x0d\x01\x07\x02" +#define OID_signedData OID_1_2_840_113549_1_7_2 + +#define OID_1_2_840_113549_1_9_3 "\x2a\x86\x48\x86\xf7\x0d\x01\x09\x03" +#define OID_contentType OID_1_2_840_113549_1_9_3 + +#define OID_1_2_840_113549_1_9_4 "\x2a\x86\x48\x86\xf7\x0d\x01\x09\x04" +#define OID_messageDigest OID_1_2_840_113549_1_9_4 + +#define OID_1_2_840_113549_1_9_5 "\x2a\x86\x48\x86\xf7\x0d\x01\x09\x05" +#define OID_signingTime OID_1_2_840_113549_1_9_5 + +#define OID_1_2_840_113549_2_5 "\x2a\x86\x48\x86\xf7\x0d\x02\x05" +#define OID_md5 OID_1_2_840_113549_2_5 + +#define OID_1_2_840_113549_1_9_6 "\x2a\x86\x48\x86\xf7\x0d\x01\x09\x06" +#define OID_countersignature OID_1_2_840_113549_1_9_6 + +#define OID_1_2_840_113549_1_9_16_1_4 "\x2a\x86\x48\x86\xf7\x0d\x01\x09\x10\x01\x04" +#define OID_timestampToken OID_1_2_840_113549_1_9_16_1_4 + +#define OID_1_3_6_1_4_1_311_2_1_4 "\x2b\x06\x01\x04\x01\x82\x37\x02\x01\x04" +#define OID_SPC_INDIRECT_DATA_OBJID OID_1_3_6_1_4_1_311_2_1_4 + +#define OID_1_3_6_1_4_1_311_2_1_15 "\x2b\x06\x01\x04\x01\x82\x37\x02\x01\x0f" +#define OID_SPC_PE_IMAGE_DATA_OBJID OID_1_3_6_1_4_1_311_2_1_15 + +#define OID_1_3_6_1_4_1_311_2_1_25 "\x2b\x06\x01\x04\x01\x82\x37\x02\x01\x19" +#define OID_SPC_CAB_DATA_OBJID OID_1_3_6_1_4_1_311_2_1_25 + +#define OID_1_3_6_1_4_1_311_2_4_1 "\x2b\x06\x01\x04\x01\x82\x37\x02\x04\x01" +#define OID_nestedSignatures OID_1_3_6_1_4_1_311_2_4_1 + +#define OID_1_3_6_1_4_1_311_10_1 "\x2b\x06\x01\x04\x01\x82\x37\x0a\x01" +#define OID_szOID_CTL OID_1_3_6_1_4_1_311_10_1 + +#define OID_1_3_6_1_4_1_311_12_1_1 "\x2b\x06\x01\x04\x01\x82\x37\x0c\x01\x01" +#define OID_szOID_CATALOG_LIST OID_1_3_6_1_4_1_311_12_1_1 + +#define OID_1_3_6_1_4_1_311_12_1_2 "\x2b\x06\x01\x04\x01\x82\x37\x0c\x01\x02" +#define OID_szOID_CATALOG_LIST_MEMBER OID_1_3_6_1_4_1_311_12_1_2 + +#define OID_2_16_840_1_101_3_4_2_1 "\x60\x86\x48\x01\x65\x03\x04\x02\x01" +#define OID_sha256 OID_2_16_840_1_101_3_4_2_1 + +#define OID_2_16_840_1_101_3_4_2_2 "\x60\x86\x48\x01\x65\x03\x04\x02\x02" +#define OID_sha384 OID_2_16_840_1_101_3_4_2_2 + +#define OID_2_16_840_1_101_3_4_2_3 "\x60\x86\x48\x01\x65\x03\x04\x02\x03" +#define OID_sha512 OID_2_16_840_1_101_3_4_2_3 + +/* --------------------------------------------------------------------------- OIDS */ +#define lenof(x) (sizeof((x)) - 1) + +#define ASN1_TYPE_BOOLEAN 0x01 +#define ASN1_TYPE_INTEGER 0x02 +#define ASN1_TYPE_BIT_STRING 0x03 +#define ASN1_TYPE_OCTET_STRING 0x04 +#define ASN1_TYPE_NULL 0x05 +#define ASN1_TYPE_OBJECT_ID 0x06 +#define ASN1_TYPE_SEQUENCE 0x30 +#define ASN1_TYPE_SET 0x31 + +#define MAX_HASH_SIZE SHA512_HASH_SIZE + +struct cli_asn1 { + uint8_t type; + unsigned int size; + const void *content; + const void *next; +}; + +static int map_raw(fmap_t *map, const void *data, unsigned int len, uint8_t raw[CRT_RAWMAXLEN]) +{ + unsigned int elen = MIN(len, CRT_RAWMAXLEN - 1); + + if (!fmap_need_ptr_once(map, data, elen)) { + cli_dbgmsg("map_raw: failed to read map data\n"); + return 1; + } + memset(raw, 0, CRT_RAWMAXLEN); + raw[0] = (uint8_t)elen; + memcpy(&raw[1], data, elen); + return 0; +} + +static int map_sha512(fmap_t *map, const void *data, unsigned int len, uint8_t sha512[SHA512_HASH_SIZE]) +{ + if (!fmap_need_ptr_once(map, data, len)) { + cli_dbgmsg("map_sha512: failed to read hash data\n"); + return 1; + } + return (cl_sha512(data, len, sha512, NULL) == NULL); +} + +static int map_sha384(fmap_t *map, const void *data, unsigned int len, uint8_t sha384[SHA384_HASH_SIZE]) +{ + if (!fmap_need_ptr_once(map, data, len)) { + cli_dbgmsg("map_sha384: failed to read hash data\n"); + return 1; + } + return (cl_sha384(data, len, sha384, NULL) == NULL); +} + +static int map_sha256(fmap_t *map, const void *data, unsigned int len, uint8_t sha256[SHA256_HASH_SIZE]) +{ + if (!fmap_need_ptr_once(map, data, len)) { + cli_dbgmsg("map_sha256: failed to read hash data\n"); + return 1; + } + return (cl_sha256(data, len, sha256, NULL) == NULL); +} + +static int map_sha1(fmap_t *map, const void *data, unsigned int len, uint8_t sha1[SHA1_HASH_SIZE]) +{ + if (!fmap_need_ptr_once(map, data, len)) { + cli_dbgmsg("map_sha1: failed to read hash data\n"); + return 1; + } + return (cl_sha1(data, len, sha1, NULL) == NULL); +} + +static int map_md5(fmap_t *map, const void *data, unsigned int len, uint8_t *md5) +{ + if (!fmap_need_ptr_once(map, data, len)) { + cli_dbgmsg("map_md5: failed to read hash data\n"); + return 1; + } + return (cl_hash_data("md5", data, len, md5, NULL) == NULL); +} + +static int map_hash(fmap_t *map, const void *data, unsigned int len, uint8_t *out_hash, cli_crt_hashtype hashtype) +{ + + if (hashtype == CLI_SHA1RSA) { + if (map_sha1(map, data, len, out_hash)) { + return 1; + } + } else if (hashtype == CLI_MD5RSA) { + if (map_md5(map, data, len, out_hash)) { + return 1; + } + } else if (hashtype == CLI_SHA256RSA) { + if (map_sha256(map, data, len, out_hash)) { + return 1; + } + } else if (hashtype == CLI_SHA384RSA) { + if (map_sha384(map, data, len, out_hash)) { + return 1; + } + } else if (hashtype == CLI_SHA512RSA) { + if (map_sha512(map, data, len, out_hash)) { + return 1; + } + } else { + cli_dbgmsg("asn1_map_hash: unsupported hashtype\n"); + return 1; + } + return 0; +} + +static void *get_hash_ctx(cli_crt_hashtype hashtype) +{ + void *ctx = NULL; + if (hashtype == CLI_SHA1RSA) { + ctx = cl_hash_init("sha1"); + } else if (hashtype == CLI_MD5RSA) { + ctx = cl_hash_init("md5"); + } else if (hashtype == CLI_SHA256RSA) { + ctx = cl_hash_init("sha256"); + } else if (hashtype == CLI_SHA384RSA) { + ctx = cl_hash_init("sha384"); + } else if (hashtype == CLI_SHA512RSA) { + ctx = cl_hash_init("sha512"); + } else { + cli_dbgmsg("asn1_get_hash_ctx: unsupported hashtype\n"); + } + return ctx; +} + +static int asn1_get_obj(fmap_t *map, const void *asn1data, unsigned int *asn1len, struct cli_asn1 *obj) +{ + unsigned int asn1_sz = *asn1len; + unsigned int readbytes = MIN(6, asn1_sz), i; + const uint8_t *data; + + if (asn1_sz < 2) { + cli_dbgmsg("asn1_get_obj: insufficient data length\n"); + return 1; + } + data = fmap_need_ptr_once(map, asn1data, readbytes); + if (!data) { + cli_dbgmsg("asn1_get_obj: obj out of file\n"); + return 1; + } + + obj->type = data[0]; + i = data[1]; + data += 2; + if (i & 0x80) { + if (i == 0x80) { + /* Not allowed in DER */ + cli_dbgmsg("asn1_get_obj: unsupported indefinite length object\n"); + return 1; + } + i &= ~0x80; + if (i > readbytes - 2) { + cli_dbgmsg("asn1_get_obj: len octets overflow (or just too many)\n"); + return 1; + } + obj->size = 0; + while (i--) { + obj->size <<= 8; + obj->size |= *data; + data++; + } + } else + obj->size = i; + + asn1_sz -= data - (uint8_t *)asn1data; + if (obj->size > asn1_sz) { + cli_dbgmsg("asn1_get_obj: content overflow\n"); + return 1; + } + + obj->content = data; + if (obj->size == asn1_sz) + obj->next = NULL; + else + obj->next = data + obj->size; + *asn1len = asn1_sz - obj->size; + return 0; +} + +static int asn1_expect_objtype(fmap_t *map, const void *asn1data, unsigned int *asn1len, struct cli_asn1 *obj, uint8_t type) +{ + int ret = asn1_get_obj(map, asn1data, asn1len, obj); + if (ret) + return ret; + if (obj->type != type) { + cli_dbgmsg("asn1_expect_objtype: expected type %02x, got %02x\n", type, obj->type); + return 1; + } + return 0; +} + +static int asn1_expect_obj(fmap_t *map, const void **asn1data, unsigned int *asn1len, uint8_t type, unsigned int size, const void *content) +{ + struct cli_asn1 obj; + int ret = asn1_expect_objtype(map, *asn1data, asn1len, &obj, type); + if (ret) + return ret; + if (obj.size != size) { + cli_dbgmsg("asn1_expect_obj: expected size %u, got %u\n", size, obj.size); + return 1; + } + if (size) { + if (!fmap_need_ptr_once(map, obj.content, size)) { + cli_dbgmsg("asn1_expect_obj: failed to read content\n"); + return 1; + } + if (memcmp(obj.content, content, size)) { + cli_dbgmsg("asn1_expect_obj: content mismatch\n"); + return 1; + } + } + *asn1data = obj.next; + return 0; +} + +static int asn1_expect_algo(fmap_t *map, const void **asn1data, unsigned int *asn1len, unsigned int algo_size, const void *algo) +{ + struct cli_asn1 obj; + unsigned int avail; + int ret; + if ((ret = asn1_expect_objtype(map, *asn1data, asn1len, &obj, ASN1_TYPE_SEQUENCE))) /* SEQUENCE */ + return ret; + avail = obj.size; + *asn1data = obj.next; + + if ((ret = asn1_expect_obj(map, &obj.content, &avail, ASN1_TYPE_OBJECT_ID, algo_size, algo))) /* ALGO */ + return ret; + + // The specification says that the NULL is a required parameter for this + // data type, but in practice it doesn't always exist in the ASN1. If + // there is something after the ALGO OID, assume it's the NULL + if (avail && (ret = asn1_expect_obj(map, &obj.content, &avail, ASN1_TYPE_NULL, 0, NULL))) { /* NULL */ + cli_dbgmsg("asn1_expect_algo: expected NULL after AlgorithmIdentifier OID\n"); + return ret; + } + if (avail) { + cli_dbgmsg("asn1_expect_algo: extra data found in SEQUENCE\n"); + return 1; + } + return 0; +} + +static int asn1_expect_hash_algo(fmap_t *map, const void **asn1data, unsigned int *asn1len, cli_crt_hashtype *hashtype, unsigned int *hashsize) +{ + struct cli_asn1 obj; + unsigned int avail; + int ret; + + if (0 != (ret = asn1_expect_objtype(map, *asn1data, asn1len, &obj, ASN1_TYPE_SEQUENCE))) { + cli_dbgmsg("asn1_expect_hash_algo: expected SEQUENCE to start AlgorithmIdentifier\n"); + return ret; + } + avail = obj.size; + *asn1data = obj.next; + if (0 != (ret = asn1_expect_objtype(map, obj.content, &avail, &obj, ASN1_TYPE_OBJECT_ID))) { + cli_dbgmsg("asn1_expect_hash_algo: unexpected object type inside AlgorithmIdentifier SET\n"); + return ret; + } + /* Cases to consider for the length check: + * - obj.size == 5: + * - OID_sha1 + * - obj.size == 8: + * - OID_md5 + * - obj.size == 9: + * - OID_sha256 + * - OID_sha1WithRSAEncryption + * - OID_md5WithRSAEncryption + * - OID_sha256WithRSAEncryption + * - OID_sha384 + * - OID_sha384WithRSAEncryption + * - OID_sha512 + * - OID_sha512WithRSAEncryption + */ + if (obj.size != lenof(OID_sha1) && obj.size != lenof(OID_md5) && obj.size != lenof(OID_sha256)) { + cli_dbgmsg("asn1_expect_hash_algo: unsupported algorithm OID size for AlgorithmIdentifier\n"); + return 1; + } + if (!fmap_need_ptr_once(map, obj.content, obj.size)) { + cli_dbgmsg("asn1_expect_hash_algo: failed to get AlgorithmIdentifier OID\n"); + return 1; + } + if ((obj.size == lenof(OID_sha1) && !memcmp(obj.content, OID_sha1, lenof(OID_sha1))) || + (obj.size == lenof(OID_sha1WithRSAEncryption) && !memcmp(obj.content, OID_sha1WithRSAEncryption, lenof(OID_sha1WithRSAEncryption)))) { + *hashtype = CLI_SHA1RSA; + *hashsize = SHA1_HASH_SIZE; + } else if ((obj.size == lenof(OID_md5) && !memcmp(obj.content, OID_md5, lenof(OID_md5))) || + (obj.size == lenof(OID_md5WithRSAEncryption) && !memcmp(obj.content, OID_md5WithRSAEncryption, lenof(OID_md5WithRSAEncryption)))) { + *hashtype = CLI_MD5RSA; + *hashsize = MD5_HASH_SIZE; + } else if ((obj.size == lenof(OID_sha256) && !memcmp(obj.content, OID_sha256, lenof(OID_sha256))) || + (obj.size == lenof(OID_sha256WithRSAEncryption) && !memcmp(obj.content, OID_sha256WithRSAEncryption, lenof(OID_sha256WithRSAEncryption)))) { + *hashtype = CLI_SHA256RSA; + *hashsize = SHA256_HASH_SIZE; + } else if ((obj.size == lenof(OID_sha384) && !memcmp(obj.content, OID_sha384, lenof(OID_sha384))) || + (obj.size == lenof(OID_sha384WithRSAEncryption) && !memcmp(obj.content, OID_sha384WithRSAEncryption, lenof(OID_sha384WithRSAEncryption)))) { + *hashtype = CLI_SHA384RSA; + *hashsize = SHA384_HASH_SIZE; + } else if ((obj.size == lenof(OID_sha512) && !memcmp(obj.content, OID_sha512, lenof(OID_sha512))) || + (obj.size == lenof(OID_sha512WithRSAEncryption) && !memcmp(obj.content, OID_sha512WithRSAEncryption, lenof(OID_sha512WithRSAEncryption)))) { + *hashtype = CLI_SHA512RSA; + *hashsize = SHA512_HASH_SIZE; + } else { + cli_dbgmsg("asn1_expect_hash_algo: unknown digest OID in AlgorithmIdentifier\n"); + return 1; + } + // The specification says that the NULL is a required parameter for this + // data type, but in practice it doesn't always exist in the ASN1. If + // there is something after the ALGO OID, assume it's the NULL + if (avail && (ret = asn1_expect_obj(map, &obj.next, &avail, ASN1_TYPE_NULL, 0, NULL))) { + cli_dbgmsg("asn1_expect_hash_algo: expected NULL after AlgorithmIdentifier OID\n"); + return ret; + } + if (avail) { + cli_dbgmsg("asn1_expect_hash_algo: extra data in AlgorithmIdentifier\n"); + return 1; + } + return 0; +} + +static int asn1_expect_rsa(fmap_t *map, const void **asn1data, unsigned int *asn1len, cli_crt_hashtype *hashtype) +{ + struct cli_asn1 obj; + unsigned int avail; + int ret; + if ((ret = asn1_expect_objtype(map, *asn1data, asn1len, &obj, ASN1_TYPE_SEQUENCE))) { /* SEQUENCE */ + cli_dbgmsg("asn1_expect_rsa: expecting SEQUENCE at the start of the RSA algo\n"); + return ret; + } + avail = obj.size; + *asn1data = obj.next; + + if (asn1_expect_objtype(map, obj.content, &avail, &obj, ASN1_TYPE_OBJECT_ID)) { + cli_dbgmsg("asn1_expect_rsa: expected OID in RSA algo\n"); + return 1; + } + + // Two cases to check for: + // obj.size == 5: + // - OID_sha1WithRSA + // + // obj.size == 9: + // - OID_rsaEncryption + // - OID_md2WithRSAEncryption + // - OID_md5WithRSAEncryption + // - OID_sha1WithRSAEncryption + // - OID_sha256WithRSAEncryption + // - OID_sha384WithRSAEncryption + // - OID_sha512WithRSAEncryption + if (obj.size != lenof(OID_sha1WithRSA) && obj.size != lenof(OID_sha1WithRSAEncryption)) { + cli_dbgmsg("asn1_expect_rsa: expecting OID with size 5 or 9, got %02x with size %u\n", obj.type, obj.size); + return 1; + } + if (!fmap_need_ptr_once(map, obj.content, obj.size)) { + cli_dbgmsg("asn1_expect_rsa: failed to read OID\n"); + return 1; + } + if (obj.size == lenof(OID_sha1WithRSA)) { + + if (!memcmp(obj.content, OID_sha1WithRSA, lenof(OID_sha1WithRSA))) { + *hashtype = CLI_SHA1RSA; /* Obsolete sha1rsa 1.3.14.3.2.29 */ + } else { + cli_dbgmsg("asn1_expect_rsa: unknown OID (length 5)\n"); + return 1; + } + + } else if (obj.size == lenof(OID_sha1WithRSAEncryption)) { + + if (!memcmp(obj.content, OID_sha1WithRSAEncryption, lenof(OID_sha1WithRSAEncryption))) + *hashtype = CLI_SHA1RSA; /* sha1withRSAEncryption 1.2.840.113549.1.1.5 */ + + else if (!memcmp(obj.content, OID_md5WithRSAEncryption, lenof(OID_md5WithRSAEncryption))) + *hashtype = CLI_MD5RSA; /* md5withRSAEncryption 1.2.840.113549.1.1.4 */ + + else if (!memcmp(obj.content, OID_rsaEncryption, lenof(OID_rsaEncryption))) + *hashtype = CLI_RSA; /* rsaEncryption 1.2.840.113549.1.1.1 */ + + else if (!memcmp(obj.content, OID_md2WithRSAEncryption, lenof(OID_md2WithRSAEncryption))) { + *hashtype = CLI_MD2RSA; /* md2withRSAEncryption 1.2.840.113549.1.1.2 */ + } else if (!memcmp(obj.content, OID_sha256WithRSAEncryption, lenof(OID_sha256WithRSAEncryption))) { + *hashtype = CLI_SHA256RSA; /* sha256WithRSAEncryption 1.2.840.113549.1.1.11 */ + } else if (!memcmp(obj.content, OID_sha384WithRSAEncryption, lenof(OID_sha384WithRSAEncryption))) { + *hashtype = CLI_SHA384RSA; /* sha384WithRSAEncryption 1.2.840.113549.1.1.12 */ + } else if (!memcmp(obj.content, OID_sha512WithRSAEncryption, lenof(OID_sha512WithRSAEncryption))) { + *hashtype = CLI_SHA512RSA; /* sha512WithRSAEncryption 1.2.840.113549.1.1.13 */ + } else { + cli_dbgmsg("asn1_expect_rsa: unknown OID (length 9)\n"); + return 1; + } + } else { + cli_dbgmsg("asn1_expect_rsa: OID mismatch (size %u)\n", obj.size); + return 1; + } + // The specification says that the NULL is a required parameter for this + // data type, but in practice it doesn't always exist in the ASN1. If + // there is something after the ALGO OID, assume it's the NULL + if (avail && (ret = asn1_expect_obj(map, &obj.next, &avail, ASN1_TYPE_NULL, 0, NULL))) { /* NULL */ + cli_dbgmsg("asn1_expect_rsa: expected NULL following RSA OID\n"); + return ret; + } + if (avail) { + cli_dbgmsg("asn1_expect_rsa: extra data found in SEQUENCE\n"); + return 1; + } + return 0; +} + +static int asn1_getnum(const char *s) +{ + if (s[0] < '0' || s[0] > '9' || s[1] < '0' || s[1] > '9') { + cli_dbgmsg("asn1_getnum: expecting digits, found '%c%c'\n", s[0], s[1]); + return -1; + } + return (s[0] - '0') * 10 + (s[1] - '0'); +} + +static int asn1_get_time(fmap_t *map, const void **asn1data, unsigned int *size, time_t *tm) +{ + struct cli_asn1 obj; + int ret = asn1_get_obj(map, *asn1data, size, &obj); + unsigned int len; + char *ptr; + struct tm t; + int n; + + if (ret) + return ret; + + if (obj.type == 0x17) /* UTCTime - YYMMDDHHMMSSZ */ + len = 13; + else if (obj.type == 0x18) /* GeneralizedTime - YYYYMMDDHHMMSSZ */ + len = 15; + else { + cli_dbgmsg("asn1_get_time: expected UTCTime or GeneralizedTime, got %02x\n", obj.type); + return 1; + } + + if (!fmap_need_ptr_once(map, obj.content, len)) { + cli_dbgmsg("asn1_get_time: failed to read content\n"); + return 1; + } + + memset(&t, 0, sizeof(t)); + ptr = (char *)obj.content; + if (obj.type == 0x18) { + t.tm_year = asn1_getnum(ptr) * 100; + if (t.tm_year < 0) + return 1; + n = asn1_getnum(ptr); + if (n < 0) + return 1; + t.tm_year += n; + ptr += 4; + } else { + n = asn1_getnum(ptr); + if (n < 0) + return 1; + if (n >= 50) + t.tm_year = 1900 + n; + else + t.tm_year = 2000 + n; + ptr += 2; + } + t.tm_year -= 1900; + n = asn1_getnum(ptr); + if (n < 1 || n > 12) { + cli_dbgmsg("asn1_get_time: invalid month %u\n", n); + return 1; + } + t.tm_mon = n - 1; + ptr += 2; + + n = asn1_getnum(ptr); + if (n < 1 || n > 31) { + cli_dbgmsg("asn1_get_time: invalid day %u\n", n); + return 1; + } + t.tm_mday = n; + ptr += 2; + + n = asn1_getnum(ptr); + if (n < 0 || n > 23) { + cli_dbgmsg("asn1_get_time: invalid hour %u\n", n); + return 1; + } + t.tm_hour = n; + ptr += 2; + + n = asn1_getnum(ptr); + if (n < 0 || n > 59) { + cli_dbgmsg("asn1_get_time: invalid minute %u\n", n); + return 1; + } + t.tm_min = n; + ptr += 2; + + if (*ptr == 'Z') { + /* NOTE: RFC5280 requires that the UTCDate fields in X509 certs + * include the seconds (it's optional in the UTCDate definition), + * but one CA time-stamping cert used by ~1,700 samples on VirusTotal + * omits the seconds. These samples still validate successfully, + * though, so allow it here. + * + * In this case we will have fmap'd in two extra bytes unrelated to + * the UTCDate (and failed if there weren't two bytes afterward), + * but that shouldn't have an affect in practice since there will + * always be more signature data following the UTCDate data that we + * parse. */ + t.tm_sec = 0; + + } else { + n = asn1_getnum(ptr); + if (n < 0 || n > 59) { + cli_dbgmsg("asn1_get_time: invalid second %u\n", n); + return 1; + } + t.tm_sec = n; + ptr += 2; + + if (*ptr != 'Z') { + cli_dbgmsg("asn1_get_time: expected UTC time 'Z', got '%c'\n", *ptr); + return 1; + } + } + + *tm = mktime(&t); + *asn1data = obj.next; + return 0; +} + +static int asn1_get_rsa_pubkey(fmap_t *map, const void **asn1data, unsigned int *size, cli_crt *x509) +{ + struct cli_asn1 obj; + unsigned int avail, avail2; + + if (asn1_expect_objtype(map, *asn1data, size, &obj, ASN1_TYPE_SEQUENCE)) /* subjectPublicKeyInfo */ + return 1; + *asn1data = obj.next; + + avail = obj.size; + if (asn1_expect_algo(map, &obj.content, &avail, lenof(OID_rsaEncryption), OID_rsaEncryption)) { /* rsaEncryption */ + cli_dbgmsg("asn1_get_rsa_pubkey: AlgorithmIdentifier other than RSA not yet supported\n"); + return 1; + } + + if (asn1_expect_objtype(map, obj.content, &avail, &obj, ASN1_TYPE_BIT_STRING)) /* BIT STRING - subjectPublicKey */ + return 1; + if (avail) { + cli_dbgmsg("asn1_get_rsa_pubkey: found unexpected extra data in subjectPublicKeyInfo\n"); + return 1; + } + /* if(obj.size != 141 && obj.size != 271) /\* encoded len of 1024 and 2048 bit public keys *\/ */ + /* return 1; */ + + if (!fmap_need_ptr_once(map, obj.content, 1)) { + cli_dbgmsg("asn1_get_rsa_pubkey: cannot read public key content\n"); + return 1; + } + if (((uint8_t *)obj.content)[0] != 0) { /* no byte fragments */ + cli_dbgmsg("asn1_get_rsa_pubkey: unexpected byte frags in public key\n"); + return 1; + } + + avail = obj.size - 1; + obj.content = ((uint8_t *)obj.content) + 1; + if (asn1_expect_objtype(map, obj.content, &avail, &obj, ASN1_TYPE_SEQUENCE)) /* SEQUENCE */ + return 1; + if (avail) { + cli_dbgmsg("asn1_get_rsa_pubkey: found unexpected extra data in public key content\n"); + return 1; + } + + avail = obj.size; + if (asn1_expect_objtype(map, obj.content, &avail, &obj, ASN1_TYPE_INTEGER)) /* INTEGER - mod */ + return 1; + if (obj.size < 1024 / 8 || obj.size > 4096 / 8 + 1) { + cli_dbgmsg("asn1_get_rsa_pubkey: modulus has got an unsupported length (%u)\n", obj.size * 8); + return 1; + } + avail2 = obj.size; + if (!fmap_need_ptr_once(map, obj.content, avail2)) { + cli_dbgmsg("asn1_get_rsa_pubkey: cannot read n\n"); + return 1; + } + if (mp_read_unsigned_bin(&x509->n, obj.content, avail2)) { + cli_dbgmsg("asn1_get_rsa_pubkey: cannot convert n to big number\n"); + return 1; + } + + if (asn1_expect_objtype(map, obj.next, &avail, &obj, ASN1_TYPE_INTEGER)) /* INTEGER - exp */ + return 1; + if (avail) { + cli_dbgmsg("asn1_get_rsa_pubkey: found unexpected extra data after exp\n"); + return 1; + } + if (obj.size < 1 || obj.size > avail2) { + cli_dbgmsg("asn1_get_rsa_pubkey: exponent has got an unsupported length (%u)\n", obj.size * 8); + return 1; + } + if (!fmap_need_ptr_once(map, obj.content, obj.size)) { + cli_dbgmsg("asn1_get_rsa_pubkey: cannot read e\n"); + return 1; + } + if (mp_read_unsigned_bin(&x509->e, obj.content, obj.size)) { + cli_dbgmsg("asn1_get_rsa_pubkey: cannot convert e to big number\n"); + return 1; + } + return 0; +} + +#define ASN1_GET_X509_SUCCESS 0 +#define ASN1_GET_X509_CERT_ERROR 1 +#define ASN1_GET_X509_UNRECOVERABLE_ERROR 2 + +/* Parse the asn1data associated with an x509 certificate and add the cert + * to the crtmgr certs if it doesn't already exist there. + * ASN1_GET_X509_CERT_ERROR will be returned in the case that an invalid x509 + * certificate is encountered but asn1data and size are suitable for continued + * signature parsing. ASN1_GET_X509_UNRECOVERABLE_ERROR will be returned in + * the case where asn1data and size are not suitable for continued use. */ +static int asn1_get_x509(fmap_t *map, const void **asn1data, unsigned int *size, crtmgr *crts) +{ + struct cli_asn1 crt, tbs, obj; + unsigned int avail, tbssize, issuersize; + cli_crt_hashtype hashtype1, hashtype2; + cli_crt x509; + const uint8_t *tbsdata; + const void *next, *issuer; + int ret = ASN1_GET_X509_UNRECOVERABLE_ERROR; + unsigned int version; + + if (cli_crt_init(&x509)) + return ret; + + do { + if (asn1_expect_objtype(map, *asn1data, size, &crt, ASN1_TYPE_SEQUENCE)) { /* SEQUENCE */ + cli_dbgmsg("asn1_get_x509: expected SEQUENCE at the x509 start\n"); + break; + } + *asn1data = crt.next; + + /* After this point, an error is recoverable because asn1data and size + * will be suitable for continued use by the caller, so change ret */ + ret = ASN1_GET_X509_CERT_ERROR; + + tbsdata = crt.content; + if (asn1_expect_objtype(map, crt.content, &crt.size, &tbs, ASN1_TYPE_SEQUENCE)) { /* SEQUENCE - TBSCertificate */ + cli_dbgmsg("asn1_get_x509: expected SEQUENCE at the TBSCertificate start\n"); + break; + } + tbssize = (uint8_t *)tbs.next - tbsdata; + + /* The version field of the x509 certificate is optional, defaulting + * to 1 if the field is not present. Version 3 is backward compatible, + * adding the optional issuerUniqueID, sujectUniqueID, and extensions + * fields. We'll try to handle both cases, since the Windows API + * appears to allow for both (despite the fact that the 2008 spec doc + * says that v3 certificates are used for everything) */ + + if (asn1_get_obj(map, tbs.content, &tbs.size, &obj)) { + cli_dbgmsg("asn1_get_x509: failed to get first item in the TBSCertificate\n"); + break; + } + if (0xa0 == obj.type) { /* [0] */ + avail = obj.size; + next = obj.next; + // TODO Should we support v2 certs? Supposedly they are not widely used... + if (asn1_expect_obj(map, &obj.content, &avail, ASN1_TYPE_INTEGER, 1, "\x02")) { /* version 3 only (indicated by '\x02')*/ + cli_dbgmsg("asn1_get_x509: unexpected type or value for TBSCertificate version\n"); + break; + } + if (avail) { + cli_dbgmsg("asn1_get_x509: found unexpected extra data in version\n"); + break; + } + version = 3; + + if (asn1_expect_objtype(map, next, &tbs.size, &obj, ASN1_TYPE_INTEGER)) { /* serialNumber */ + cli_dbgmsg("asn1_get_x509: expected x509 serial INTEGER\n"); + break; + } + } else if (ASN1_TYPE_INTEGER == obj.type) { + /* The version field is missing, so we'll assume that this is a + * version 1 certificate. obj points to the serialNumber + * INTEGER, then, so just continue on to map it. */ + version = 1; + + /* v1 certificates don't have enough information to convey the + * purpose of the certificate. I've only ever seen these used + * in the timestamp signing chain, so set the flags to indicate + * that. */ + x509.certSign = 1; + x509.codeSign = 0; + x509.timeSign = 1; + + } else { + cli_dbgmsg("asn1_get_x509: expected version or serialNumber as the first item in TBSCertificate\n"); + break; + } + + if (map_raw(map, obj.content, obj.size, x509.raw_serial)) + break; + if (map_sha1(map, obj.content, obj.size, x509.serial)) + break; + + if (asn1_expect_rsa(map, &obj.next, &tbs.size, &hashtype1)) { /* algo - Ex: sha1WithRSAEncryption */ + cli_dbgmsg("asn1_get_x509: unable to parse AlgorithmIdentifier\n"); + break; + } + + if (asn1_expect_objtype(map, obj.next, &tbs.size, &obj, ASN1_TYPE_SEQUENCE)) { /* issuer */ + cli_dbgmsg("asn1_get_x509: expected SEQUENCE when parsing cert issuer\n"); + break; + } + issuer = obj.content; + issuersize = obj.size; + + if (asn1_expect_objtype(map, obj.next, &tbs.size, &obj, ASN1_TYPE_SEQUENCE)) { /* validity */ + cli_dbgmsg("asn1_get_x509: expected SEQUENCE when parsing cert validity\n"); + break; + } + avail = obj.size; + next = obj.content; + + if (asn1_get_time(map, &next, &avail, &x509.not_before)) { /* notBefore */ + cli_dbgmsg("asn1_get_x509: unable to extract the notBefore time\n"); + break; + } + if (asn1_get_time(map, &next, &avail, &x509.not_after)) { /* notAfter */ + cli_dbgmsg("asn1_get_x509: unable to extract the notAfter time\n"); + break; + } + if (x509.not_before >= x509.not_after) { + cli_dbgmsg("asn1_get_x509: bad validity\n"); + break; + } + if (avail) { + cli_dbgmsg("asn1_get_x509: found unexpected extra data in validity\n"); + break; + } + + if (asn1_expect_objtype(map, obj.next, &tbs.size, &obj, ASN1_TYPE_SEQUENCE)) { /* subject */ + cli_dbgmsg("asn1_get_x509: expected SEQUENCE when parsing cert subject\n"); + break; + } + if (map_raw(map, obj.content, obj.size, x509.raw_subject)) + break; + if (map_sha1(map, obj.content, obj.size, x509.subject)) + break; + if (asn1_get_rsa_pubkey(map, &obj.next, &tbs.size, &x509)) { /* subjectPublicKeyInfo */ + cli_dbgmsg("asn1_get_x509: failed to get RSA public key\n"); + break; + } + + if (1 == version && tbs.size) { + cli_dbgmsg("asn1_get_x509: TBSCertificate should not contain fields beyond subjectPublicKeyInfo if version == 1\n"); + break; + } + + avail = 0; + while (tbs.size) { + if (asn1_get_obj(map, obj.next, &tbs.size, &obj)) { + tbs.size = 1; + break; + } + if (obj.type <= 0xa0 + avail || obj.type > 0xa3) { + cli_dbgmsg("asn1_get_x509: found type %02x in extensions, expecting a1, a2 or a3\n", obj.type); + tbs.size = 1; + break; + } + avail = obj.type - 0xa0; + if (obj.type == 0xa3) { + struct cli_asn1 exts; + int have_key_usage = 0; + int have_ext_key = 0; + if (asn1_expect_objtype(map, obj.content, &obj.size, &exts, ASN1_TYPE_SEQUENCE)) { + tbs.size = 1; + break; + } + if (obj.size) { + cli_dbgmsg("asn1_get_x509: found unexpected extra data in extensions\n"); + break; + } + while (exts.size) { + struct cli_asn1 ext, id, value; + if (asn1_expect_objtype(map, exts.content, &exts.size, &ext, ASN1_TYPE_SEQUENCE)) { + exts.size = 1; + break; + } + exts.content = ext.next; + if (asn1_expect_objtype(map, ext.content, &ext.size, &id, ASN1_TYPE_OBJECT_ID)) { + exts.size = 1; + break; + } + if (asn1_get_obj(map, id.next, &ext.size, &value)) { + exts.size = 1; + break; + } + if (value.type == ASN1_TYPE_BOOLEAN) { + /* critical flag */ + if (value.size != 1) { + cli_dbgmsg("asn1_get_x509: found boolean with wrong length\n"); + exts.size = 1; + break; + } + if (asn1_get_obj(map, value.next, &ext.size, &value)) { + exts.size = 1; + break; + } + } + if (value.type != ASN1_TYPE_OCTET_STRING) { + cli_dbgmsg("asn1_get_x509: bad extension value type %u\n", value.type); + exts.size = 1; + break; + } + if (ext.size) { + cli_dbgmsg("asn1_get_x509: extra data in extension\n"); + exts.size = 1; + break; + } + if (id.size != 3) + continue; + + if (!fmap_need_ptr_once(map, id.content, 3)) { + exts.size = 1; + break; + } + if (!memcmp("\x55\x1d\x0f", id.content, 3)) { + /* KeyUsage 2.5.29.15 */ + const uint8_t *keyusage = value.content; + uint8_t usage; + have_key_usage = 1; + if (value.size < 4 || value.size > 5) { + cli_dbgmsg("asn1_get_x509: bad KeyUsage\n"); + exts.size = 1; + break; + } + if (!fmap_need_ptr_once(map, value.content, value.size)) { + exts.size = 1; + break; + } + if (keyusage[0] != 0x03 || keyusage[1] != value.size - 2 || keyusage[2] > 7) { + cli_dbgmsg("asn1_get_x509: bad KeyUsage\n"); + exts.size = 1; + break; + } + usage = keyusage[3]; + if (value.size == 4) + usage &= ~((1 << keyusage[2]) - 1); + x509.certSign = ((usage & 4) != 0); + continue; + } + if (!memcmp("\x55\x1d\x25", id.content, 3)) { + /* ExtKeyUsage 2.5.29.37 */ + struct cli_asn1 keypurp; + have_ext_key = 1; + if (asn1_expect_objtype(map, value.content, &value.size, &keypurp, ASN1_TYPE_SEQUENCE)) { + exts.size = 1; + break; + } + if (value.size) { + cli_dbgmsg("asn1_get_x509: extra data in ExtKeyUsage\n"); + exts.size = 1; + break; + } + ext.next = keypurp.content; + while (keypurp.size) { + if (asn1_expect_objtype(map, ext.next, &keypurp.size, &ext, ASN1_TYPE_OBJECT_ID)) { + exts.size = 1; + break; + } + if (ext.size != 8 && ext.size != 10) + continue; + if (!fmap_need_ptr_once(map, ext.content, ext.size)) { + exts.size = 1; + break; + } + if (!memcmp("\x2b\x06\x01\x05\x05\x07\x03\x03", ext.content, 8)) /* id_kp_codeSigning */ + x509.codeSign = 1; + else if (!memcmp("\x2b\x06\x01\x05\x05\x07\x03\x08", ext.content, 8)) /* id_kp_timeStamping */ + x509.timeSign = 1; + else if (!memcmp("\x2b\x06\x01\x04\x01\x82\x37\x0a\x03\x0d", ext.content, 10)) /* id_kp_lifetimeSigning */ + cli_dbgmsg("asn1_get_x509: lifetime signing specified but enforcing this is not currently supported\n"); + } + continue; + } + if (!memcmp("\x55\x1d\x13", id.content, 3)) { + /* Basic Constraints 2.5.29.19 + * + * BasicConstraints ::= SEQUENCE { + * cA BOOLEAN DEFAULT FALSE, + * pathLenConstraint INTEGER (0..MAX) OPTIONAL } */ + struct cli_asn1 constr; + if (asn1_expect_objtype(map, value.content, &value.size, &constr, ASN1_TYPE_SEQUENCE)) { + exts.size = 1; + break; + } + if (!constr.size) + x509.certSign = 0; + else { + if (asn1_get_obj(map, constr.content, &constr.size, &ext)) { + exts.size = 1; + break; + } + if (ext.type == ASN1_TYPE_BOOLEAN) { + + if (ext.size != 1) { + cli_dbgmsg("asn1_get_x509: wrong bool size in basic constraint %u\n", ext.size); + exts.size = 1; + break; + } + + if (!fmap_need_ptr_once(map, ext.content, 1)) { + exts.size = 1; + break; + } + x509.certSign = (((uint8_t *)(ext.content))[0] != 0); + + } else if (ext.type == ASN1_TYPE_INTEGER) { + /* In this case, assume cA is missing and + * pathLenConstraint is present. Default cA + * to False. */ + x509.certSign = 0; + } else { + exts.size = 1; + break; + } + } + } + } + if (exts.size) { + tbs.size = 1; + break; + } + + /* The 2008 spec doc says that for a certificate to be used for + * code signing, it must either have an EKU indicating code + * signing or the entire certificate chain must not have any + * EKUs. + * TODO We should actually enforce that last check. + * For time stamping, the doc says the EKU must be present, and + * makes no exception for EKUs being missing. + * TODO Should we not set timeSign = 1 in this case, then? */ + if (!have_ext_key) + x509.codeSign = x509.timeSign = 1; + + /* RFC 3280 section 4.2.1.3 says that if a certificate is + * used to validate digital signatures on other public key + * certificates, it MUST have a key usage extension with the + * appropriate bits set. However, the MS MD5 root authority + * certificate (A43489159A520F0D93D032CCAF37E7FE20A8B419) + * doesn't have a KU or any EKUs, and PEs with it in the + * chain validate successfully. + * TODO Flip the certSign bit for now, but revisit if + * a clarification on this becomes available */ + if (!have_key_usage) + x509.certSign = 1; + } + } + if (tbs.size) { + cli_dbgmsg("asn1_get_x509: An error occurred when parsing x509 extensions\n"); + break; + } + + if (!x509.certSign && !x509.codeSign && !x509.timeSign) { + cli_dbgmsg("asn1_get_x509: encountered a certificate with no cert, code, or time signing capabilities\n"); + } + + if (map_raw(map, issuer, issuersize, x509.raw_issuer)) + break; + if (map_sha1(map, issuer, issuersize, x509.issuer)) + break; + + if (asn1_expect_rsa(map, &tbs.next, &crt.size, &hashtype2)) /* signature algo - Ex: sha1WithRSAEncryption */ + break; + + if (hashtype1 != hashtype2) { + cli_dbgmsg("asn1_get_x509: found conflicting RSA hash types\n"); + break; + } + x509.hashtype = hashtype1; + + if (crtmgr_lookup(crts, &x509)) { + cli_dbgmsg("asn1_get_x509: duplicate embedded certificates detected\n"); + cli_crt_clear(&x509); + return ASN1_GET_X509_SUCCESS; + } + + if (asn1_expect_objtype(map, tbs.next, &crt.size, &obj, ASN1_TYPE_BIT_STRING)) { /* signature */ + cli_dbgmsg("asn1_get_x509: Failed to parse x509 signature BIT STRING\n"); + break; + } + if (obj.size > 513) { + cli_dbgmsg("asn1_get_x509: signature too long\n"); + break; + } + if (!fmap_need_ptr_once(map, obj.content, obj.size)) { + cli_dbgmsg("asn1_get_x509: cannot read signature\n"); + break; + } + if (mp_read_unsigned_bin(&x509.sig, obj.content, obj.size)) { + cli_dbgmsg("asn1_get_x509: cannot convert signature to big number\n"); + break; + } + if (crt.size) { + cli_dbgmsg("asn1_get_x509: found unexpected extra data in signature\n"); + break; + } + + if (map_hash(map, tbsdata, tbssize, x509.tbshash, x509.hashtype)) { + cli_dbgmsg("asn1_get_x509: Unsupported hashtype or hash computation failed\n"); + break; + } + + if (crtmgr_add(crts, &x509)) + break; + cli_crt_clear(&x509); + return ASN1_GET_X509_SUCCESS; + } while (0); + cli_crt_clear(&x509); + return ret; +} + +static int asn1_parse_countersignature(fmap_t *map, const void **asn1data, unsigned int *size, crtmgr *cmgr, const uint8_t *message, const unsigned int message_size, time_t not_before, time_t not_after) +{ + + struct cli_asn1 asn1, deep, deeper; + uint8_t issuer[SHA1_HASH_SIZE], serial[SHA1_HASH_SIZE]; + const uint8_t *attrs; + unsigned int dsize, attrs_size; + unsigned int avail; + uint8_t hash[MAX_HASH_SIZE]; + cli_crt_hashtype hashtype; + cli_crt_hashtype hashtype2; + unsigned int hashsize; + uint8_t md[MAX_HASH_SIZE]; + int result; + void *ctx; + + do { + if (asn1_expect_objtype(map, *asn1data, size, &asn1, ASN1_TYPE_SEQUENCE)) { + cli_dbgmsg("asn1_parse_countersignature: expected SEQUENCE inside counterSignature SET\n"); + break; + } + + avail = asn1.size; + + if (asn1_expect_objtype(map, asn1.content, &avail, &deep, ASN1_TYPE_INTEGER)) { + cli_dbgmsg("asn1_parse_countersignature: expected INTEGER for counterSignature version"); + break; + } + + if (deep.size != 1) { + cli_dbgmsg("asn1_parse_countersignature: expected INTEGER of size 1, got size %u\n", deep.size); + break; + } + + if (!fmap_need_ptr_once(map, deep.content, 1)) { + cli_dbgmsg("asn1_parse_countersignature: failed to read version\n"); + break; + } + /* Allow either '0' or '1' for the version. The specification says + * that this field must be 1, but some binaries have 0 here and + * they appear to validate just fine via the Windows API */ + if (memcmp(deep.content, "\x01", 1) && memcmp(deep.content, "\x00", 1)) { + cli_dbgmsg("asn1_parse_countersignature: counterSignature version is not 1 or 0\n"); + break; + } + asn1.content = deep.next; + + if (asn1_expect_objtype(map, asn1.content, &avail, &asn1, ASN1_TYPE_SEQUENCE)) { /* issuerAndSerialNumber */ + cli_dbgmsg("asn1_parse_countersignature: unable to parse issuerAndSerialNumber SEQUENCE in counterSignature\n"); + break; + } + + if (asn1_expect_objtype(map, asn1.content, &asn1.size, &deep, ASN1_TYPE_SEQUENCE)) { /* issuer */ + cli_dbgmsg("asn1_parse_countersignature: unable to parse issuer SEQUENCE in counterSignature\n"); + break; + } + // Compute the hash of the issuer section + if (map_sha1(map, deep.content, deep.size, issuer)) { + cli_dbgmsg("asn1_parse_countersignature: error in call to map_sha1 for counterSignature issuer\n"); + break; + } + + if (asn1_expect_objtype(map, deep.next, &asn1.size, &deep, ASN1_TYPE_INTEGER)) { /* serial */ + cli_dbgmsg("asn1_parse_countersignature: expected ASN1_TYPE_INTEGER serial for counterSignature\n"); + break; + } + + // Compute the hash of the serial INTEGER + if (map_sha1(map, deep.content, deep.size, serial)) { + cli_dbgmsg("asn1_parse_countersignature: error in call to map_sha1 for counterSignature serial\n"); + break; + } + + if (asn1.size) { + cli_dbgmsg("asn1_parse_countersignature: extra data inside counterSignature issuer\n"); + break; + } + + if (asn1_expect_hash_algo(map, &asn1.next, &avail, &hashtype, &hashsize)) { + cli_dbgmsg("asn1_parse_countersignature: error parsing counterSignature digestAlgorithm\n"); + break; + } + + if (map_hash(map, message, message_size, md, hashtype)) { + cli_dbgmsg("asn1_parse_countersignature: failed to map in message/compute countersignature hash\n"); + break; + } + + attrs = asn1.next; + if (asn1_expect_objtype(map, asn1.next, &avail, &asn1, 0xa0)) { /* authenticatedAttributes */ + cli_dbgmsg("asn1_parse_countersignature: unable to parse counterSignature authenticatedAttributes section\n"); + break; + } + attrs_size = (uint8_t *)(asn1.next) - attrs; + if (asn1.next == NULL && attrs_size < 2) { + cli_dbgmsg("asn1_parse_countersignature: counterSignature authenticatedAttributes are too small\n"); + break; + } + result = 0; + dsize = asn1.size; + deep.next = asn1.content; + while (dsize) { + int content; + if (asn1_expect_objtype(map, deep.next, &dsize, &deep, ASN1_TYPE_SEQUENCE)) { /* attribute */ + cli_dbgmsg("asn1_parse_countersignature: expected counterSignature attribute SEQUENCE\n"); + dsize = 1; + break; + } + if (asn1_expect_objtype(map, deep.content, &deep.size, &deeper, ASN1_TYPE_OBJECT_ID)) { /* attribute type */ + cli_dbgmsg("asn1_parse_countersignature: expected attribute type inside counterSignature attribute SEQUENCE\n"); + dsize = 1; + break; + } + if (deeper.size != lenof(OID_contentType)) /* lenof(contentType) = lenof(messageDigest) = lenof(signingTime) = 9 */ + continue; + + if (!fmap_need_ptr_once(map, deeper.content, lenof(OID_contentType))) { + cli_dbgmsg("asn1_parse_countersignature: failed to read counterSignature authenticated attribute\n"); + dsize = 1; + break; + } + if (!memcmp(deeper.content, OID_contentType, lenof(OID_contentType))) + content = 0; /* contentType */ + else if (!memcmp(deeper.content, OID_messageDigest, lenof(OID_messageDigest))) + content = 1; /* messageDigest */ + else if (!memcmp(deeper.content, OID_signingTime, lenof(OID_signingTime))) + content = 2; /* signingTime */ + else + continue; + if (result & (1 << content)) { + cli_dbgmsg("asn1_parse_countersignature: duplicate field in countersignature\n"); + dsize = 1; + break; + } + result |= (1 << content); + if (asn1_expect_objtype(map, deeper.next, &deep.size, &deeper, ASN1_TYPE_SET)) { /* set - contents */ + cli_dbgmsg("asn1_parse_countersignature: failed to read counterSignature authenticated attribute\n"); + dsize = 1; + break; + } + if (deep.size) { + cli_dbgmsg("asn1_parse_countersignature: extra data in countersignature value\n"); + dsize = 1; + break; + } + deep.size = deeper.size; + switch (content) { + case 0: { /* contentType = pkcs7-data */ + const void *backupPtr = deeper.content; + unsigned int backupSize = deep.size; + if (asn1_expect_obj(map, &deeper.content, &deep.size, ASN1_TYPE_OBJECT_ID, lenof(OID_pkcs7_data), OID_pkcs7_data)) { + cli_dbgmsg("asn1_parse_countersignature: contentType != pkcs7-data, checking for timestampToken instead\n"); + /* Some signatures use OID_timestampToken instead, so allow + * that also (despite the 2008 spec saying that this value + * must be pkcs7-data) */ + deeper.content = backupPtr; + deep.size = backupSize; + if (asn1_expect_obj(map, &deeper.content, &deep.size, ASN1_TYPE_OBJECT_ID, lenof(OID_timestampToken), OID_timestampToken)) { + cli_dbgmsg("asn1_parse_countersignature: contentType != timestampToken\n"); + deep.size = 1; + break; + } + } + + if (deep.size) + cli_dbgmsg("asn1_parse_countersignature: extra data in countersignature content-type\n"); + break; + } + case 1: /* messageDigest */ + if (asn1_expect_obj(map, &deeper.content, &deep.size, ASN1_TYPE_OCTET_STRING, hashsize, md)) { + deep.size = 1; + cli_dbgmsg("asn1_parse_countersignature: countersignature hash mismatch\n"); + } else if (deep.size) + cli_dbgmsg("asn1_parse_countersignature: extra data in countersignature message-digest\n"); + break; + case 2: /* signingTime */ + { + time_t sigdate; /* FIXME shall i use it?! */ + if (asn1_get_time(map, &deeper.content, &deep.size, &sigdate)) { + cli_dbgmsg("asn1_parse_countersignature: an error occurred when getting the time\n"); + deep.size = 1; + } else if (deep.size) + cli_dbgmsg("asn1_parse_countersignature: extra data in countersignature signing-time\n"); + else if (sigdate < not_before || sigdate > not_after) { + cli_dbgmsg("asn1_parse_countersignature: countersignature timestamp outside cert validity\n"); + deep.size = 1; + } + break; + } + } + if (deep.size) { + dsize = 1; + break; + } + } + if (dsize) + break; + if (result != 7) { + cli_dbgmsg("asn1_parse_countersignature: some important attributes are missing in countersignature\n"); + break; + } + + // TODO For some reason there tends to be more variability here than + // when parsing the regular signature - we have to support at least + // szOID_RSA_RSA and szOID_RSA_SHA1RSA based on samples seen in the + // wild. The spec says this should only be the RSA and DSA OIDs, + // though. + if (asn1_expect_rsa(map, &asn1.next, &avail, &hashtype2)) { + cli_dbgmsg("asn1_parse_countersignature: unable to parse the digestEncryptionAlgorithm\n"); + break; + } + + if (hashtype2 != CLI_RSA && hashtype2 != hashtype) { + cli_dbgmsg("asn1_parse_countersignature: digestEncryptionAlgorithm conflicts with digestAlgorithm\n"); + break; + } + + if (asn1_expect_objtype(map, asn1.next, &avail, &asn1, ASN1_TYPE_OCTET_STRING)) { /* encryptedDigest */ + cli_dbgmsg("asn1_parse_countersignature: unexpected encryptedDigest value in counterSignature\n"); + break; + } + if (asn1.size > 513) { + cli_dbgmsg("asn1_parse_countersignature: countersignature encryptedDigest too long\n"); + break; + } + if (avail) { + cli_dbgmsg("asn1_parse_countersignature: extra data inside countersignature\n"); + break; + } + if (!fmap_need_ptr_once(map, attrs, attrs_size)) { + cli_dbgmsg("asn1_parse_countersignature: failed to read authenticatedAttributes\n"); + break; + } + + if (NULL == (ctx = get_hash_ctx(hashtype))) { + break; + } + + cl_update_hash(ctx, "\x31", 1); + cl_update_hash(ctx, (void *)(attrs + 1), attrs_size - 1); + cl_finish_hash(ctx, hash); + + if (!fmap_need_ptr_once(map, asn1.content, asn1.size)) { + cli_dbgmsg("asn1_parse_countersignature: failed to read countersignature encryptedDigest\n"); + break; + } + if (!crtmgr_verify_pkcs7(cmgr, issuer, serial, asn1.content, asn1.size, hashtype, hash, VRFY_TIME)) { + cli_dbgmsg("asn1_parse_countersignature: pkcs7 countersignature verification failed\n"); + break; + } + + cli_dbgmsg("asn1_parse_countersignature: countersignature verification completed successfully\n"); + + return 0; + + } while (0); + + return 1; +} + +static cl_error_t asn1_parse_mscat(struct cl_engine *engine, fmap_t *map, size_t offset, unsigned int size, crtmgr *cmgr, int embedded, const void **hashes, unsigned int *hashes_size, cli_ctx *ctx) +{ + struct cli_asn1 asn1, deep, deeper; + uint8_t issuer[SHA1_HASH_SIZE], serial[SHA1_HASH_SIZE]; + const uint8_t *message, *attrs; + unsigned int dsize, message_size, attrs_size; + // hash is used to hold the hashes we compute as part of sig verification + uint8_t hash[MAX_HASH_SIZE]; + cli_crt_hashtype hashtype, hashtype2; + unsigned int hashsize; + // md is used to hold the message digest we extract from the signature + uint8_t md[MAX_HASH_SIZE]; + cli_crt *x509; + void *hash_ctx; + int result; + cl_error_t ret = CL_EPARSE; + + cli_dbgmsg("in asn1_parse_mscat\n"); + + do { + if (!(message = fmap_need_off_once(map, offset, 1))) { + cli_dbgmsg("asn1_parse_mscat: failed to read pkcs#7 entry\n"); + break; + } + + if (asn1_expect_objtype(map, message, &size, &asn1, ASN1_TYPE_SEQUENCE)) { /* SEQUENCE */ + cli_dbgmsg("asn1_parse_mscat: expected SEQUENCE at top level\n"); + break; + } + + // Many signatures have zero bytes at the end (padding?) + /* if(size) { */ + /* cli_dbgmsg("asn1_parse_mscat: found extra data after pkcs#7 %u\n", size); */ + /* break; */ + /* } */ + size = asn1.size; + if (asn1_expect_obj(map, &asn1.content, &size, ASN1_TYPE_OBJECT_ID, lenof(OID_signedData), OID_signedData)) { /* OBJECT 1.2.840.113549.1.7.2 - contentType = signedData */ + cli_dbgmsg("asn1_parse_mscat: expected contentType == signedData\n"); + break; + } + if (asn1_expect_objtype(map, asn1.content, &size, &asn1, 0xa0)) { /* [0] - content */ + cli_dbgmsg("asn1_parse_mscat: expected '[0] - content' following signedData contentType\n"); + break; + } + if (size) { + cli_dbgmsg("asn1_parse_mscat: found extra data in pkcs#7\n"); + break; + } + size = asn1.size; + if (asn1_expect_objtype(map, asn1.content, &size, &asn1, ASN1_TYPE_SEQUENCE)) { /* SEQUENCE */ + cli_dbgmsg("asn1_parse_mscat: expected SEQUENCE inside signedData '[0] - content'\n"); + break; + } + if (size) { + cli_dbgmsg("asn1_parse_mscat: found extra data in signedData\n"); + break; + } + + size = asn1.size; + if (asn1_expect_obj(map, &asn1.content, &size, ASN1_TYPE_INTEGER, 1, "\x01")) { /* INTEGER - VERSION 1 */ + cli_dbgmsg("asn1_parse_mscat: expected 'INTEGER - VERSION 1' for signedData version\n"); + break; + } + + if (asn1_expect_objtype(map, asn1.content, &size, &asn1, ASN1_TYPE_SET)) { /* SET OF DigestAlgorithmIdentifier */ + cli_dbgmsg("asn1_parse_mscat: expected SET OF DigestAlgorithmIdentifier inside signedData\n"); + break; + } + + // At this point asn1.next points to the SEQUENCE following the + // DigestAlgorithmIdentifier SET, so we'll want to preserve it so + // we can continue parsing laterally. We also want to preserve + // size, since it tracks how much is left in the SignedData section. + if (asn1_expect_hash_algo(map, &asn1.content, &asn1.size, &hashtype, &hashsize)) { + cli_dbgmsg("asn1_parse_mscat: error parsing SignedData digestAlgorithm\n"); + break; + } + if (asn1.size) { + cli_dbgmsg("asn1_parse_mscat: found extra data in the SignerData digestAlgorithm SET\n"); + break; + } + + // We've finished parsing the DigestAlgorithmIdentifiers SET, so start + // back parsing the SignedData + if (asn1_expect_objtype(map, asn1.next, &size, &asn1, ASN1_TYPE_SEQUENCE)) { /* SEQUENCE - contentInfo */ + cli_dbgmsg("asn1_parse_mscat: expected 'SEQUENCE - contentInfo' inside SignedData following DigestAlgorithmIdentifiers\n"); + break; + } + // Parse the contentInfo SEQUENCE. asn1.next and size point to the + // certificates, so these need to be preserved + + /* Here there is either a PKCS #7 ContentType Object Identifier for Certificate Trust List (szOID_CTL) + * or a single SPC_INDIRECT_DATA_OBJID */ + if ( + (!embedded && asn1_expect_obj(map, &asn1.content, &asn1.size, ASN1_TYPE_OBJECT_ID, lenof(OID_szOID_CTL), OID_szOID_CTL)) || + (embedded && asn1_expect_obj(map, &asn1.content, &asn1.size, ASN1_TYPE_OBJECT_ID, lenof(OID_SPC_INDIRECT_DATA_OBJID), OID_SPC_INDIRECT_DATA_OBJID))) { + cli_dbgmsg("asn1_parse_mscat: unexpected ContentType for embedded mode %d\n", embedded); + break; + } + + if (asn1_expect_objtype(map, asn1.content, &asn1.size, &deep, 0xa0)) { + cli_dbgmsg("asn1_parse_mscat: expected '[0] - content' following DigestAlgorithmIdentifier contentType\n"); + break; + } + if (asn1.size) { + cli_dbgmsg("asn1_parse_mscat: found extra data in contentInfo\n"); + break; + } + dsize = deep.size; + if (asn1_expect_objtype(map, deep.content, &dsize, &deep, ASN1_TYPE_SEQUENCE)) { + cli_dbgmsg("asn1_parse_mscat: expected SEQUENCE in DigestAlgorithmIdentifier '[0] - contentInfo'\n"); + break; + } + if (dsize) { + cli_dbgmsg("asn1_parse_mscat: found extra data in content\n"); + break; + } + + /* + * Hashes should look like: + * SEQUENCE(2 elem) + * OBJECT IDENTIFIER 1.3.6.1.4.1.311.2.1.15 spcPEImageData + * SEQUENCE(2 elem) + * BIT STRING(0 elem) + * [0](1 elem) + * [2](1 elem) + * [0] + * SEQUENCE(2 elem) + * SEQUENCE(2 elem) + * OBJECT IDENTIFIER 1.3.14.3.2.26 sha1 (OIW) + * NULL + * OCTET STRING(20 byte) + */ + + *hashes = deep.content; + *hashes_size = deep.size; + + // Now resume parsing SignedData - certificates + + if (asn1_expect_objtype(map, asn1.next, &size, &asn1, 0xa0)) { /* certificates */ + cli_dbgmsg("asn1_parse_mscat: expected 0xa0 certificates entry\n"); + break; + } + + dsize = asn1.size; + if (dsize) { + crtmgr newcerts; + crtmgr_init(&newcerts); + while (dsize) { + result = asn1_get_x509(map, &asn1.content, &dsize, &newcerts); + if (ASN1_GET_X509_UNRECOVERABLE_ERROR == result) { + dsize = 1; + break; + } else if (ASN1_GET_X509_CERT_ERROR == result) { + cli_dbgmsg("asn1_parse_mscat: skipping x509 certificate with errors\n"); + } + } + if (dsize) { + crtmgr_free(&newcerts); + cli_dbgmsg("asn1_parse_mscat: an unrecoverable error occurred while extracting x509 certificates\n"); + break; + } + if (newcerts.crts) { + x509 = newcerts.crts; + cli_dbgmsg("asn1_parse_mscat: %u embedded certificates collected\n", newcerts.items); + if (engine->engine_options & ENGINE_OPTIONS_PE_DUMPCERTS) { + /* Dump the certs if requested before anything happens to them */ + while (x509) { + char raw_issuer[CRT_RAWMAXLEN * 2 + 1], raw_subject[CRT_RAWMAXLEN * 2 + 1], raw_serial[CRT_RAWMAXLEN * 3 + 1]; + char issuer[SHA1_HASH_SIZE * 2 + 1], subject[SHA1_HASH_SIZE * 2 + 1], serial[SHA1_HASH_SIZE * 2 + 1]; + char mod[1024 + 1], exp[1024 + 1]; + int j = 1024; + + fp_toradix_n(&x509->n, mod, 16, j + 1); + fp_toradix_n(&x509->e, exp, 16, j + 1); + memset(raw_issuer, 0, CRT_RAWMAXLEN * 2 + 1); + memset(raw_subject, 0, CRT_RAWMAXLEN * 2 + 1); + memset(raw_serial, 0, CRT_RAWMAXLEN * 2 + 1); + for (j = 0; j < x509->raw_issuer[0]; j++) + sprintf(&raw_issuer[j * 2], "%02x", x509->raw_issuer[j + 1]); + for (j = 0; j < x509->raw_subject[0]; j++) + sprintf(&raw_subject[j * 2], "%02x", x509->raw_subject[j + 1]); + for (j = 0; j < x509->raw_serial[0]; j++) + sprintf(&raw_serial[j * 3], "%02x%c", x509->raw_serial[j + 1], (j != x509->raw_serial[0] - 1) ? ':' : '\0'); + for (j = 0; j < SHA1_HASH_SIZE; j++) { + sprintf(&issuer[j * 2], "%02x", x509->issuer[j]); + sprintf(&subject[j * 2], "%02x", x509->subject[j]); + sprintf(&serial[j * 2], "%02x", x509->serial[j]); + } + + // TODO The raw information we print out here isn't + // very helpful, since it's only the first 64-bytes... + // Change this so that raw is only populated when the + // debug flag is set, and then copy/display the full + // contents. + cli_dbgmsg("cert:\n"); + cli_dbgmsg(" subject: %s\n", subject); + cli_dbgmsg(" serial: %s\n", serial); + cli_dbgmsg(" pubkey: %s\n", mod); + cli_dbgmsg(" i: %s %lu->%lu %s%s%s\n", issuer, (unsigned long)x509->not_before, (unsigned long)x509->not_after, x509->codeSign ? "code " : "", x509->timeSign ? "time " : "", x509->certSign ? "cert " : ""); + cli_dbgmsg(" ==============RAW==============\n"); + cli_dbgmsg(" raw_subject: %s\n", raw_subject); + cli_dbgmsg(" raw_serial: %s\n", raw_serial); + cli_dbgmsg(" raw_issuer: %s\n", raw_issuer); + + x509 = x509->next; + } + x509 = newcerts.crts; + } + + /* Determine whether the embedded certificate is blacklisted or + * whitelisted. If an embedded cert matches a blacklist rule, + * we can return immediately indicating that a sig matched. + * This isn't true for whitelist matches, since otherwise an + * attacker could just include a known-good certificate in the + * signature and not use it. Instead, for those we will add the + * embedded cert to the trust store and continue on to ensure + * that a trusted cert is used for signing. */ + while (x509) { + cli_crt *crt; + + /* Use &(engine->cmgr) for this check, since we don't copy + * blacklist certs into cmgr and so that if there's a + * match, we have a long-lived pointer that we can pass + * back (via cli_append_virus) indicating the name of the + * sigs that matched (we can't just malloc new space for + * one, since nothing above here knows to free it.) */ + if (NULL != (crt = crtmgr_blacklist_lookup(&(engine->cmgr), x509))) { + ret = CL_VIRUS; + cli_dbgmsg("asn1_parse_mscat: Found Authenticode certificate blacklisted by %s\n", crt->name ? crt->name : "(unnamed CRB rule)"); + if (NULL != ctx) { + ret = cli_append_virus(ctx, crt->name ? crt->name : "(unnamed CRB rule)"); + if ((ret == CL_VIRUS) && !SCAN_ALLMATCHES) { + crtmgr_free(&newcerts); + goto finish; + } + } + /* In the case where ctx is NULL, we don't care about + * blacklist matches - we are either using this + * function to parse .cat rules that were loaded in, + * or it's sigtool doing cert printing. */ + } + + /* NOTE: Since the 'issuer' cli_crt field is required for + * Authenticode validation, we rely on adding embedded + * certs with the 'issuer' actually set into our trust + * store for doing the time/code digital signature checks. + * This isn't required for cert-signing certs that + * we discover this way, since the CRB cli_crts have enough + * info to be able to whitelist other certs, but executing + * the following code for those has the benefit of removing + * them from newcerts so they aren't processed again while + * looking for chained trust. */ + if (NULL != (crt = crtmgr_whitelist_lookup(cmgr, x509, 1))) { + cli_crt *tmp = x509->next; + cli_dbgmsg("asn1_parse_mscat: Directly whitelisting embedded cert based on %s\n", (crt->name ? crt->name : "(no name)")); + if (cli_debug_flag && crt->name) { + // Copy the name from the CRB entry for printing below + x509->name = strdup(crt->name); + } + if (crtmgr_add(cmgr, x509)) { + cli_dbgmsg("asn1_parse_mscat: adding x509 cert to crtmgr failed\n"); + break; + } + crtmgr_del(&newcerts, x509); + x509 = tmp; + continue; + } + + x509 = x509->next; + } + if (x509) { + crtmgr_free(&newcerts); + break; + } + + /* In the SCAN_ALLMATCHES case, we'd get here with + * ret == CL_VIRUS if a match occurred but we wanted + * to keep looping to look for other matches. In that + * case, bail here. */ + if (CL_VIRUS == ret) { + crtmgr_free(&newcerts); + break; + } + + x509 = newcerts.crts; + + /* Now look for cases where embedded certs can be trusted + * indirectly because they are signed by trusted certs */ + while (x509) { + cli_crt *parent; + + /* If the certificate is in the trust store already, remove + * it from the newcerts list. This is legacy code that I'm + * assuming tries to prevent us from doing the expensive + * RSA verification in the case where the same cert is + * embedded multiple times? Sure, why not */ + if (crtmgr_whitelist_lookup(cmgr, x509, 0)) { + cli_crt *tmp = x509->next; + cli_dbgmsg("asn1_parse_mscat: found embedded certificate matching one in the trust store\n"); + crtmgr_del(&newcerts, x509); + x509 = tmp; + continue; + } + + /* Determine whether the cert is signed by one in our trust + * store */ + parent = crtmgr_verify_crt(cmgr, x509); + + if (parent) { + + cli_dbgmsg("asn1_parse_mscat: Indirectly whitelisting embedded cert based on %s\n", (parent->name ? parent->name : "(no name)")); + + // TODO Why is this done? It seems like you should be + // able to have a parent cert can only do cert signing + // and have that be able to sign a cert used for + // code-signing... + x509->codeSign &= parent->codeSign; + x509->timeSign &= parent->timeSign; + + if (crtmgr_add(cmgr, x509)) { + cli_dbgmsg("asn1_parse_mscat: adding x509 cert to crtmgr failed\n"); + break; + } + crtmgr_del(&newcerts, x509); + + /* Start at the beginning of newcerts so that we can see + * whether adding this new trusted cert causes more + * certs to be trusted (via chaining). Otherwise we + * might miss valid certs if the ordering in the binary + * doesn't align with the chain ordering. */ + x509 = newcerts.crts; + continue; + } + + x509 = x509->next; + } + if (x509) { + crtmgr_free(&newcerts); + break; + } + if (newcerts.items) + cli_dbgmsg("asn1_parse_mscat: %u certificates did not verify\n", newcerts.items); + crtmgr_free(&newcerts); + } + } + + // Parse the final section in SignedData - SignerInfos + if (asn1_get_obj(map, asn1.next, &size, &asn1)) { + cli_dbgmsg("asn1_parse_mscat: failed to get next ASN1 section\n"); + break; + } + if (asn1.type == 0xa1 && asn1_get_obj(map, asn1.next, &size, &asn1)) { /* crls - unused shouldn't be present */ + cli_dbgmsg("asn1_parse_mscat: unexpected CRL entries were found\n"); + break; + } + if (asn1.type != ASN1_TYPE_SET) { /* signerInfos */ + cli_dbgmsg("asn1_parse_mscat: unexpected type %02x for signerInfo\n", asn1.type); + break; + } + if (size) { + cli_dbgmsg("asn1_parse_mscat: unexpected extra data after signerInfos\n"); + break; + } + size = asn1.size; + if (asn1_expect_objtype(map, asn1.content, &size, &asn1, ASN1_TYPE_SEQUENCE)) { + cli_dbgmsg("asn1_parse_mscat: expected SEQUENCE in signerInfos"); + break; + } + if (size) { + cli_dbgmsg("asn1_parse_mscat: only one signerInfo shall be present\n"); + break; + } + size = asn1.size; + if (asn1_expect_obj(map, &asn1.content, &size, ASN1_TYPE_INTEGER, 1, "\x01")) { /* Version = 1 */ + cli_dbgmsg("asn1_parse_mscat: expected Version == 1 for signerInfo\n"); + break; + } + if (asn1_expect_objtype(map, asn1.content, &size, &asn1, ASN1_TYPE_SEQUENCE)) { /* issuerAndSerialNumber */ + cli_dbgmsg("asn1_parse_mscat: expected issuerAndSerialNumber SEQUENCE\n"); + break; + } + // asn1.next and size must be preserved so we can continue parsing + // SignerInfos, so switch to deep + dsize = asn1.size; + if (asn1_expect_objtype(map, asn1.content, &dsize, &deep, ASN1_TYPE_SEQUENCE)) { /* issuer */ + cli_dbgmsg("asn1_parse_mscat: expected issuer SEQUENCE\n"); + break; + } + + /* Make sure the issuer ID is mapped into memory and then compute the + * SHA1 of it so we can use this value in verification later on. This + * will be a hash over all the values in the issuer SEQUENCE, which + * looks something like: + * SET(1 elem) + * SEQUENCE(2 elem) + * OBJECT IDENTIFIER 2.5.4.6 countryName (X.520 DN component) + * PrintableString + * SET(1 elem) + * SEQUENCE(2 elem) + * OBJECT IDENTIFIER2.5.4.8 stateOrProvinceName (X.520 DN component) + * PrintableString + * SET(1 elem) + * SEQUENCE(2 elem) + * OBJECT IDENTIFIER2.5.4.7 localityName (X.520 DN component) + * PrintableString + * SET(1 elem) + * SEQUENCE(2 elem) + * OBJECT IDENTIFIER2.5.4.10 organizationName (X.520 DN component) + * PrintableString + * SET(1 elem) + * SEQUENCE(2 elem) + * OBJECT IDENTIFIER2.5.4.3commonName(X.520 DN component) + * PrintableString + */ + if (map_sha1(map, deep.content, deep.size, issuer)) { + cli_dbgmsg("asn1_parse_mscat: error in call to map_sha1 for issuer\n"); + break; + } + + if (asn1_expect_objtype(map, deep.next, &dsize, &deep, ASN1_TYPE_INTEGER)) { /* serial */ + cli_dbgmsg("asn1_parse_mscat: expected ASN1_TYPE_INTEGER serial\n"); + break; + } + + /* Make sure the serial INTEGER is mapped into memory and compute the + * SHA1 of it so we can use this value in verification later on. */ + if (map_sha1(map, deep.content, deep.size, serial)) { + cli_dbgmsg("asn1_parse_mscat: error in call to map_sha1 for serial\n"); + break; + } + if (dsize) { + cli_dbgmsg("asn1_parse_mscat: extra data inside issuerAndSerialNumber\n"); + break; + } + + // Resume parsing the SignerInfos using asn1.next and size + if (asn1_expect_hash_algo(map, &asn1.next, &size, &hashtype2, &hashsize)) { + cli_dbgmsg("asn1_parse_mscat: error parsing SignerInfo digestAlgorithm\n"); + break; + } + + // Verify that the SignerInfo digestAlgorithm matches the one from the SignedData section + if (hashtype != hashtype2) { + cli_dbgmsg("asn1_parse_mscat: SignerInfo digestAlgorithm is not the same as the algorithm in SignedData\n"); + break; + } + + // Continue on to the authenticatedAttributes section within SignerInfo + attrs = asn1.next; + if (asn1_expect_objtype(map, asn1.next, &size, &asn1, 0xa0)) { /* authenticatedAttributes */ + cli_dbgmsg("asn1_parse_mscat: unable to parse authenticatedAttributes section\n"); + break; + } + attrs_size = (uint8_t *)(asn1.next) - attrs; + if (asn1.next == NULL || attrs_size < 2) { + cli_dbgmsg("asn1_parse_mscat: authenticatedAttributes size is too small\n"); + break; + } + + dsize = asn1.size; + deep.next = asn1.content; + result = 0; + while (dsize) { + struct cli_asn1 cobj; + int content; + if (asn1_expect_objtype(map, deep.next, &dsize, &deep, ASN1_TYPE_SEQUENCE)) { /* attribute */ + cli_dbgmsg("asn1_parse_mscat: expected attribute SEQUENCE\n"); + dsize = 1; + break; + } + if (asn1_expect_objtype(map, deep.content, &deep.size, &deeper, ASN1_TYPE_OBJECT_ID)) { /* attribute type */ + cli_dbgmsg("asn1_parse_mscat: expected attribute type inside attribute SEQUENCE\n"); + dsize = 1; + break; + } + if (deeper.size != lenof(OID_contentType)) + continue; + if (!fmap_need_ptr_once(map, deeper.content, lenof(OID_contentType))) { + cli_dbgmsg("asn1_parse_mscat: failed to read authenticated attribute\n"); + dsize = 1; + break; + } + if (!memcmp(deeper.content, OID_contentType, lenof(OID_contentType))) + content = 0; /* contentType */ + else if (!memcmp(deeper.content, OID_messageDigest, lenof(OID_messageDigest))) + content = 1; /* messageDigest */ + else + continue; + if (asn1_expect_objtype(map, deeper.next, &deep.size, &deeper, ASN1_TYPE_SET)) { /* set - contents */ + cli_dbgmsg("asn1_parse_mscat: expected 'set - contents' for authenticated attribute\n"); + dsize = 1; + break; + } + if (deep.size) { + cli_dbgmsg("asn1_parse_mscat: extra data in authenticated attributes\n"); + dsize = 1; + break; + } + + if (result & (1 << content)) { + cli_dbgmsg("asn1_parse_mscat: contentType or messageDigest appear twice\n"); + dsize = 1; + break; + } + + if (content == 0) { /* contentType */ + if ( + (!embedded && asn1_expect_obj(map, &deeper.content, &deeper.size, ASN1_TYPE_OBJECT_ID, lenof(OID_szOID_CTL), OID_szOID_CTL)) || /* cat file */ + (embedded && asn1_expect_obj(map, &deeper.content, &deeper.size, ASN1_TYPE_OBJECT_ID, lenof(OID_SPC_INDIRECT_DATA_OBJID), OID_SPC_INDIRECT_DATA_OBJID)) /* embedded cat */ + ) { + cli_dbgmsg("asn1_parse_mscat: unexpected ContentType for embedded mode %d (for authenticated attribute)\n", embedded); + dsize = 1; + break; + } + result |= 1; + } else { /* messageDigest */ + if (asn1_expect_objtype(map, deeper.content, &deeper.size, &cobj, ASN1_TYPE_OCTET_STRING)) { + cli_dbgmsg("asn1_parse_mscat: unexpected messageDigest value\n"); + dsize = 1; + break; + } + if (cobj.size != hashsize) { + cli_dbgmsg("asn1_parse_mscat: messageDigest attribute has the wrong size (%u)\n", cobj.size); + dsize = 1; + break; + } + if (!fmap_need_ptr_once(map, cobj.content, hashsize)) { + cli_dbgmsg("asn1_parse_mscat: failed to read authenticated attribute\n"); + dsize = 1; + break; + } + memcpy(md, cobj.content, hashsize); + result |= 2; + } + if (deeper.size) { + cli_dbgmsg("asn1_parse_mscat: extra data in authenticated attribute\n"); + dsize = 1; + break; + } + } + if (dsize) + break; + if (result != 3) { + cli_dbgmsg("asn1_parse_mscat: contentType or messageDigest are missing\n"); + break; + } + + if (asn1_expect_algo(map, &asn1.next, &size, lenof(OID_rsaEncryption), OID_rsaEncryption)) { /* digestEncryptionAlgorithm == rsa */ + cli_dbgmsg("asn1_parse_mscat: digestEncryptionAlgorithms other than RSA are not yet supported\n"); + break; + } + + if (asn1_expect_objtype(map, asn1.next, &size, &asn1, ASN1_TYPE_OCTET_STRING)) { /* encryptedDigest */ + cli_dbgmsg("asn1_parse_mscat: unexpected encryptedDigest value\n"); + break; + } + + // TODO Make this a #define with the greatest possible length (SHA512) + if (asn1.size > 513) { + cli_dbgmsg("asn1_parse_mscat: encryptedDigest too long\n"); + break; + } + + if (map_hash(map, *hashes, *hashes_size, hash, hashtype)) { + cli_dbgmsg("asn1_parse_mscat: failed to map in message/compute message digest\n"); + break; + } + + if (memcmp(hash, md, hashsize)) { + cli_dbgmsg("asn1_parse_mscat: messageDigest mismatch\n"); + break; + } + + if (!fmap_need_ptr_once(map, attrs, attrs_size)) { + cli_dbgmsg("asn1_parse_mscat: failed to read authenticatedAttributes\n"); + break; + } + + if (NULL == (hash_ctx = get_hash_ctx(hashtype))) { + break; + } + + cl_update_hash(hash_ctx, "\x31", 1); + cl_update_hash(hash_ctx, (void *)(attrs + 1), attrs_size - 1); + cl_finish_hash(hash_ctx, hash); + + if (!fmap_need_ptr_once(map, asn1.content, asn1.size)) { + cli_dbgmsg("asn1_parse_mscat: failed to read encryptedDigest\n"); + break; + } + + // Verify the authenticatedAttributes + if (!(x509 = crtmgr_verify_pkcs7(cmgr, issuer, serial, asn1.content, asn1.size, hashtype, hash, VRFY_CODE))) { + cli_dbgmsg("asn1_parse_mscat: pkcs7 signature verification failed\n"); + ret = CL_EVERIFY; + break; + } + message = asn1.content; + message_size = asn1.size; + + cli_dbgmsg("asn1_parse_mscat: authenticatedAttributes successfully parsed and verified\n"); + + /* We need to verify the time validity of the certificate. If a + * signature has a time-stamping countersignature, then we just need to + * verify that countersignature. Otherwise, we should determine + * whether the signing certificate is still valid (time-based, since at + * this point in the code no matching blacklist rules fired). */ + + if (!size) { + time_t now; + + // No countersignature, so judge validity based on time + now = time(NULL); + + if (now < x509->not_before || now > x509->not_after) { + cli_dbgmsg("asn1_parse_mscat: no countersignature (unauthAttrs missing) and signing certificate has expired\n"); + ret = CL_EVERIFY; + break; + } + + cli_dbgmsg("asn1_parse_mscat: no countersignature (unauthAttrs missing) but the signing certificate is still valid\n"); + ret = CL_CLEAN; + goto finish; + } + + if (size && asn1_expect_objtype(map, asn1.next, &size, &asn1, 0xa1)) { /* unauthenticatedAttributes */ + cli_dbgmsg("asn1_parse_mscat: unable to find unauthenticatedAttributes section\n"); + break; + } + + if (size) { + cli_dbgmsg("asn1_parse_mscat: extra data inside signerInfo\n"); + break; + } + + // Parse the unauthenticated attributes + + dsize = asn1.size; + deep.next = asn1.content; + result = 0; + while (dsize) { + int content; + if (asn1_expect_objtype(map, deep.next, &dsize, &deep, ASN1_TYPE_SEQUENCE)) { + cli_dbgmsg("asn1_parse_mscat: expected SEQUENCE starting an unauthenticatedAttribute\n"); + dsize = 1; + break; + } + if (asn1_expect_objtype(map, deep.content, &deep.size, &deeper, ASN1_TYPE_OBJECT_ID)) { + cli_dbgmsg("asn1_parse_mscat: expected OID inside unauthenticatedAttribute SEQUENCE\n"); + dsize = 1; + break; + } + // Supported OIDs include: + // - 1.2.840.113549.1.9.6 - counterSignature + // - 1.3.6.1.4.1.311.2.4.1 - nested signatures + + // I've seen some other ones like 1.3.6.1.4.1.3845.3.9876.1.1.1, + // and the presence of those doesn't seem to mess up verification + // through the Windows API, so just skip those + + if (deeper.size != lenof(OID_countersignature) && deeper.size != lenof(OID_nestedSignatures)) { + continue; + } + + if (!fmap_need_ptr_once(map, deeper.content, deeper.size)) { + cli_dbgmsg("asn1_parse_mscat: failed to read unauthenticated attribute OID\n"); + dsize = 1; + break; + } + + if (!memcmp(deeper.content, OID_countersignature, deeper.size)) + content = 0; /* counterSignature */ + else if (!memcmp(deeper.content, OID_nestedSignatures, deeper.size)) + content = 1; /* nested */ + else { + continue; + } + + if (asn1_expect_objtype(map, deeper.next, &deep.size, &deeper, ASN1_TYPE_SET)) { /* set - contents */ + cli_dbgmsg("asn1_parse_mscat: expected 'set - contents' inside unauthenticated attribute\n"); + dsize = 1; + break; + } + if (deep.size) { + cli_dbgmsg("asn1_parse_mscat: extra data in unauthenticated attribute\n"); + dsize = 1; + break; + } + + if (result & (1 << content)) { + cli_dbgmsg("asn1_parse_mscat: counterSignature or nestedSignature appear twice\n"); + dsize = 1; + break; + } + + if (content == 0) { /* counterSignature */ + + if (asn1_parse_countersignature(map, &deeper.content, &deeper.size, cmgr, message, message_size, x509->not_before, x509->not_after)) { + dsize = 1; + break; + } + + result |= 1; + + } else { /* nestedSignature */ + + // TODO Support parsing these out in the future + cli_dbgmsg("asn1_parse_mscat: nested signatures detected but parsing them is not currently supported\n"); + + deeper.size = 0; + result |= 2; + } + if (deeper.size) { + cli_dbgmsg("asn1_parse_mscat: extra data in unauthenticated attribute\n"); + dsize = 1; + break; + } + } + if (dsize) + break; + + cli_dbgmsg("asn1_parse_mscat: unauthenticatedAttributes successfully parsed\n"); + + if (1 != (result & 1)) { + time_t now; + + // No countersignature, so judge validity based on time + now = time(NULL); + + if (now < x509->not_before || now > x509->not_after) { + cli_dbgmsg("asn1_parse_mscat: no countersignature and signing certificate has expired\n"); + ret = CL_EVERIFY; + break; + } + + cli_dbgmsg("asn1_parse_mscat: no countersignature but the signing certificate is still valid\n"); + } + + ret = CL_CLEAN; + + } while (0); + +finish: + if (CL_EPARSE == ret) { + cli_dbgmsg("asn1_parse_mscat: failed to parse authenticode section\n"); + } + return ret; +} + +int asn1_load_mscat(fmap_t *map, struct cl_engine *engine) +{ + struct cli_asn1 c; + unsigned int size; + int i; + + // TODO As currently implemented, loading in a .cat file with -d requires + // an accompanying .crb with whitelist entries that will cause the .cat + // file signatures to verify successfully. If a user is specifying a .cat + // file to use, though, we should assume they trust it and at least add the + // covered hashes from it to hm_fp + // TODO Since we pass engine->cmgr directly here, the whole chain of trust + // for this .cat file will get added to the global trust store assuming it + // verifies successfully. Is this a bug for a feature? + if (CL_CLEAN != asn1_parse_mscat(engine, map, 0, map->len, &engine->cmgr, 0, &c.next, &size, NULL)) + return 1; + + if (asn1_expect_objtype(map, c.next, &size, &c, ASN1_TYPE_SEQUENCE)) + return 1; + if (asn1_expect_obj(map, &c.content, &c.size, ASN1_TYPE_OBJECT_ID, lenof(OID_szOID_CATALOG_LIST), OID_szOID_CATALOG_LIST)) + return 1; + if (c.size) { + cli_dbgmsg("asn1_load_mscat: found extra data in szOID_CATALOG_LIST content\n"); + return 1; + } + if (asn1_expect_objtype(map, c.next, &size, &c, 0x4)) /* List ID */ + return 1; + if (asn1_expect_objtype(map, c.next, &size, &c, 0x17)) /* Effective date - WTF?! */ + return 1; + if (asn1_expect_algo(map, &c.next, &size, lenof(OID_szOID_CATALOG_LIST_MEMBER), OID_szOID_CATALOG_LIST_MEMBER)) /* szOID_CATALOG_LIST_MEMBER */ + return 1; + if (asn1_expect_objtype(map, c.next, &size, &c, ASN1_TYPE_SEQUENCE)) /* hashes here */ + return 1; + /* [0] is next but we don't care as it's really descriptives stuff */ + + size = c.size; + c.next = c.content; + while (size) { + struct cli_asn1 tag; + if (asn1_expect_objtype(map, c.next, &size, &c, ASN1_TYPE_SEQUENCE)) + return 1; + if (asn1_expect_objtype(map, c.content, &c.size, &tag, ASN1_TYPE_OCTET_STRING)) /* TAG NAME */ + return 1; + if (asn1_expect_objtype(map, tag.next, &c.size, &tag, ASN1_TYPE_SET)) /* set */ + return 1; + if (c.size) { + cli_dbgmsg("asn1_load_mscat: found extra data in tag\n"); + return 1; + } + while (tag.size) { + struct cli_asn1 tagval1, tagval2, tagval3; + int hashtype; + + if (asn1_expect_objtype(map, tag.content, &tag.size, &tagval1, ASN1_TYPE_SEQUENCE)) + return 1; + tag.content = tagval1.next; + + if (asn1_expect_objtype(map, tagval1.content, &tagval1.size, &tagval2, ASN1_TYPE_OBJECT_ID)) + return 1; + if (tagval2.size != lenof(OID_SPC_INDIRECT_DATA_OBJID)) + continue; + + if (!fmap_need_ptr_once(map, tagval2.content, lenof(OID_SPC_INDIRECT_DATA_OBJID))) { + cli_dbgmsg("asn1_load_mscat: cannot read SPC_INDIRECT_DATA\n"); + return 1; + } + if (memcmp(tagval2.content, OID_SPC_INDIRECT_DATA_OBJID, lenof(OID_SPC_INDIRECT_DATA_OBJID))) + continue; /* stuff like CAT_NAMEVALUE_OBJID(1.3.6.1.4.1.311.12.2.1) and CAT_MEMBERINFO_OBJID(.2).. */ + + if (asn1_expect_objtype(map, tagval2.next, &tagval1.size, &tagval2, ASN1_TYPE_SET)) + return 1; + if (tagval1.size) { + cli_dbgmsg("asn1_load_mscat: found extra data in tag value\n"); + return 1; + } + + if (asn1_expect_objtype(map, tagval2.content, &tagval2.size, &tagval1, ASN1_TYPE_SEQUENCE)) + return 1; + if (tagval2.size) { + cli_dbgmsg("asn1_load_mscat: found extra data in SPC_INDIRECT_DATA_OBJID tag\n"); + return 1; + } + + if (asn1_expect_objtype(map, tagval1.content, &tagval1.size, &tagval2, ASN1_TYPE_SEQUENCE)) + return 1; + + if (asn1_expect_objtype(map, tagval2.content, &tagval2.size, &tagval3, ASN1_TYPE_OBJECT_ID)) /* shall have an obj 1.3.6.1.4.1.311.2.1.15 or 1.3.6.1.4.1.311.2.1.25 inside */ + return 1; + if (tagval3.size != lenof(OID_SPC_PE_IMAGE_DATA_OBJID)) { /* lenof(OID_SPC_PE_IMAGE_DATA_OBJID) = lenof(OID_SPC_CAB_DATA_OBJID) = 10*/ + cli_dbgmsg("asn1_load_mscat: bad hash type size\n"); + return 1; + } + if (!fmap_need_ptr_once(map, tagval3.content, lenof(OID_SPC_PE_IMAGE_DATA_OBJID))) { + cli_dbgmsg("asn1_load_mscat: cannot read hash type\n"); + return 1; + } + if (!memcmp(tagval3.content, OID_SPC_PE_IMAGE_DATA_OBJID, lenof(OID_SPC_PE_IMAGE_DATA_OBJID))) + hashtype = 2; + else if (!memcmp(tagval3.content, OID_SPC_CAB_DATA_OBJID, lenof(OID_SPC_CAB_DATA_OBJID))) + hashtype = 1; + else { + cli_dbgmsg("asn1_load_mscat: unexpected hash type\n"); + return 1; + } + + if (asn1_expect_objtype(map, tagval2.next, &tagval1.size, &tagval2, ASN1_TYPE_SEQUENCE)) + return 1; + if (tagval1.size) { + cli_dbgmsg("asn1_load_mscat: found extra data after hash\n"); + return 1; + } + + if (asn1_expect_algo(map, &tagval2.content, &tagval2.size, lenof(OID_sha1), OID_sha1)) { /* objid 1.3.14.3.2.26 - sha1 */ + cli_dbgmsg("asn1_load_mscat: currently only SHA1 hashes are supported for .cat file signatures\n"); + return 1; + } + + if (asn1_expect_objtype(map, tagval2.content, &tagval2.size, &tagval3, ASN1_TYPE_OCTET_STRING)) + return 1; + if (tagval2.size) { + cli_dbgmsg("asn1_load_mscat: found extra data in hash\n"); + return 1; + } + if (tagval3.size != SHA1_HASH_SIZE) { + cli_dbgmsg("asn1_load_mscat: bad hash size %u\n", tagval3.size); + return 1; + } + if (!fmap_need_ptr_once(map, tagval3.content, SHA1_HASH_SIZE)) { + cli_dbgmsg("asn1_load_mscat: cannot read hash\n"); + return 1; + } + + if (cli_debug_flag) { + char sha1[SHA1_HASH_SIZE * 2 + 1]; + for (i = 0; i < SHA1_HASH_SIZE; i++) + sprintf(&sha1[i * 2], "%02x", ((uint8_t *)(tagval3.content))[i]); + cli_dbgmsg("asn1_load_mscat: got hash %s (%s)\n", sha1, (hashtype == 2) ? "PE" : "CAB"); + } + if (!engine->hm_fp) { + if (!(engine->hm_fp = MPOOL_CALLOC(engine->mempool, 1, sizeof(*(engine->hm_fp))))) { + tag.size = 1; + return 1; + } +#ifdef USE_MPOOL + engine->hm_fp->mempool = engine->mempool; +#endif + } + /* Load the trusted hashes into hm_fp, using the size values + * 1 and 2 as sentinel values corresponding to CAB and PE hashes + * from .cat files respectively. */ + if (hm_addhash_bin(engine->hm_fp, tagval3.content, CLI_HASH_SHA1, hashtype, NULL)) { + cli_warnmsg("asn1_load_mscat: failed to add hash\n"); + return 1; + } + } + } + + return 0; +} + +/* Check an embedded PE Authenticode section to determine whether it's trusted. + * This will return CL_VERIFIED if the file should be trusted, CL_EPARSE if an + * error occurred while parsing the signature, CL_EVERIFY if parsing was + * successful but there were no whitelist rules for the signature, and + * CL_VIRUS if a blacklist rule was found for an embedded certificate. + * + * If CL_VIRUS is returned, certname will be set to the certname of blacklist + * rule that matched (unless certname is NULL). */ +cl_error_t asn1_check_mscat(struct cl_engine *engine, fmap_t *map, size_t offset, unsigned int size, struct cli_mapped_region *regions, uint32_t nregions, cli_ctx *ctx) +{ + unsigned int content_size; + struct cli_asn1 c; + cli_crt_hashtype hashtype; + uint8_t hash[MAX_HASH_SIZE]; + unsigned int hashsize; + const void *content; + crtmgr certs; + int ret; + void *hash_ctx; + unsigned int i; + + cli_dbgmsg("in asn1_check_mscat (offset: %llu)\n", (long long unsigned)offset); + crtmgr_init(&certs); + /* Get a copy of all certs in the trust store, excluding blacklist certs */ + if (crtmgr_add_roots(engine, &certs, 1)) { + crtmgr_free(&certs); + return CL_EVERIFY; + } + ret = asn1_parse_mscat(engine, map, offset, size, &certs, 1, &content, &content_size, ctx); + crtmgr_free(&certs); + if (CL_CLEAN != ret) + return ret; + + if (asn1_expect_objtype(map, content, &content_size, &c, ASN1_TYPE_SEQUENCE)) { + cli_dbgmsg("asn1_check_mscat: expected SEQUENCE at top level of hash container\n"); + return CL_EPARSE; + } + if (asn1_expect_obj(map, &c.content, &c.size, ASN1_TYPE_OBJECT_ID, lenof(OID_SPC_PE_IMAGE_DATA_OBJID), OID_SPC_PE_IMAGE_DATA_OBJID)) { + cli_dbgmsg("asn1_check_mscat: expected spcPEImageData OID in the first hash SEQUENCE\n"); + return CL_EPARSE; + } + + // TODO Should we do anything with the underlying SEQUENCE and data? From + // the 2008 spec doc it doesn't sound like many of the fields are used, so + // ignoring is probably fine for now + + if (asn1_expect_objtype(map, c.next, &content_size, &c, ASN1_TYPE_SEQUENCE)) { + cli_dbgmsg("asn1_check_mscat: expected second hash container object to be a SEQUENCE\n"); + return CL_EPARSE; + } + if (content_size) { + cli_dbgmsg("asn1_check_mscat: extra data in hash SEQUENCE\n"); + return CL_EPARSE; + } + + if (asn1_expect_hash_algo(map, &c.content, &c.size, &hashtype, &hashsize)) { + cli_dbgmsg("asn1_check_mscat: unexpected file hash algo\n"); + return CL_EPARSE; + } + + if (NULL == (hash_ctx = get_hash_ctx(hashtype))) { + return CL_EPARSE; + } + + // Now that we know the hash algorithm, compute the authenticode hash + // across the required regions of memory. + for (i = 0; i < nregions; i++) { + const uint8_t *hptr; + if (0 == regions[i].size) { + continue; + } + if (!(hptr = fmap_need_off_once(map, regions[i].offset, regions[i].size))) { + return CL_EVERIFY; + } + + cl_update_hash(hash_ctx, hptr, regions[i].size); + } + + cl_finish_hash(hash_ctx, hash); + + if (cli_debug_flag) { + char hashtxt[MAX_HASH_SIZE * 2 + 1]; + for (i = 0; i < hashsize; i++) + sprintf(&hashtxt[i * 2], "%02x", hash[i]); + cli_dbgmsg("Authenticode: %s\n", hashtxt); + } + + if (asn1_expect_obj(map, &c.content, &c.size, ASN1_TYPE_OCTET_STRING, hashsize, hash)) { + cli_dbgmsg("asn1_check_mscat: computed authenticode hash did not match stored value\n"); + return CL_EVERIFY; + } + if (c.size) { + cli_dbgmsg("asn1_check_mscat: extra data after the stored authenticode hash\n"); + return CL_EPARSE; + } + + cli_dbgmsg("asn1_check_mscat: file with valid authenticode signature, whitelisted\n"); + return CL_VERIFIED; +} diff --git a/clamscan/libclamav/asn1.h b/clamscan/libclamav/asn1.h new file mode 100644 index 0000000..9edb0e4 --- /dev/null +++ b/clamscan/libclamav/asn1.h @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2011-2013 Sourcefire, Inc. + * + * Authors: aCaB + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef __ASN1_H +#define __ASN1_H + +#include "others.h" +#include "fmap.h" + +struct cli_mapped_region { + unsigned int offset; + unsigned int size; +}; + +int asn1_load_mscat(fmap_t *map, struct cl_engine *engine); +cl_error_t asn1_check_mscat(struct cl_engine *engine, fmap_t *map, size_t offset, unsigned int size, struct cli_mapped_region *regions, uint32_t nregions, cli_ctx *ctx); + +#endif diff --git a/clamscan/libclamav/aspack.c b/clamscan/libclamav/aspack.c new file mode 100644 index 0000000..e150a31 --- /dev/null +++ b/clamscan/libclamav/aspack.c @@ -0,0 +1,503 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2007-2013 Sourcefire, Inc. + * + * Authors: Luciano Giuseppe 'Pnluck', Alberto Wu + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#include + +#include "clamav.h" +#include "execs.h" +#include "others.h" +#include "rebuildpe.h" +#include "aspack.h" + +#define ASPACK_BLOCKS_OFFSET_212 0x57c +#define ASPACK_BLOCKS_OFFSET_OTHER 0x5d8 +#define ASPACK_BLOCKS_OFFSET_242 0x5e4 + +#define ASPACK_STR_INIT_MLT_OFFSET_212 0x70e +#define ASPACK_STR_INIT_MLT_OFFSET_OTHER 0x76a +#define ASPACK_STR_INIT_MLT_OFFSET_242 0x776 + +#define ASPACK_COMP_BLOCK_OFFSET_212 0x6d6 +#define ASPACK_COMP_BLOCK_OFFSET_OTHER 0x732 +#define ASPACK_COMP_BLOCK_OFFSET_242 0x73e + +#define ASPACK_WRKBUF_OFFSET_212 0x148 +#define ASPACK_WRKBUF_OFFSET_OTHER 0x13a +#define ASPACK_WRKBUF_OFFSET_242 0x148 + +#define ASPACK_OEP_OFFSET_212 0x39b +#define ASPACK_OEP_OFFSET_OTHER 0x401 +#define ASPACK_OEP_OFFSET_242 0x40d + +struct DICT_HELPER { + uint32_t *starts; + uint8_t *ends; + uint32_t size; +}; + +struct ASPK { + uint32_t bitpos; + uint32_t hash; + uint32_t init_array[58]; + struct DICT_HELPER dict_helper[4]; + uint8_t *input; + uint8_t *iend; + uint8_t *decrypt_dict; + uint32_t decarray3[4][24]; + uint32_t decarray4[4][24]; + int dict_ok; + uint8_t array2[758]; + uint8_t array1[19]; +}; + +static inline int readstream(struct ASPK *stream) +{ + while (stream->bitpos >= 8) { + if (stream->input >= stream->iend) return 0; + stream->hash = (stream->hash << 8) | *stream->input; + stream->input++; + stream->bitpos -= 8; + } + return 1; +} + +static uint32_t getdec(struct ASPK *stream, uint8_t which, int *err) +{ + uint32_t ret; + uint8_t pos; + uint32_t *d3 = stream->decarray3[which]; + uint32_t *d4 = stream->decarray4[which]; + + *err = 1; + + if (!readstream(stream)) return 0; + + ret = (stream->hash >> (8 - stream->bitpos)) & 0xfffe00; + + if (ret < d3[8]) { + if ((ret >> 16) >= 0x100) return 0; + if (!(pos = stream->dict_helper[which].ends[ret >> 16]) || pos >= 24) return 0; /* 0bitpos += pos; + ret = ((ret - d3[pos - 1]) >> (24 - pos)) + d4[pos]; + + if (ret >= stream->dict_helper[which].size) return 0; + ret = stream->dict_helper[which].starts[ret]; + + *err = 0; + return ret; +} + +static uint8_t build_decrypt_array(struct ASPK *stream, uint8_t *array, uint8_t which) +{ + uint32_t sum = 0, counter = 23, i, endoff = 0, bus[18], dict[18]; + + uint32_t *d3 = stream->decarray3[which]; + uint32_t *d4 = stream->decarray4[which]; + + memset(bus, 0, sizeof(bus)); + memset(dict, 0, sizeof(dict)); + + for (i = 0; i < stream->dict_helper[which].size; i++) { + /* within bounds - see comments in build_decrypt_dictionaries */ + if (array[i] > 17) return 0; + bus[array[i]]++; + } + + d3[0] = 0; + d4[0] = 0; + + i = 0; + while (counter >= 9) { /* 0<=i<=14 */ + sum += (bus[i + 1] << counter); + if (sum > 0x1000000) return 0; + + d3[i + 1] = sum; + d4[i + 1] = dict[i + 1] = bus[i] + d4[i]; + + if (counter >= 0x10) { + uint32_t old = endoff; + endoff = d3[i + 1] >> 0x10; + if (endoff - old) { + if (!CLI_ISCONTAINED(stream->dict_helper[which].ends, 0x100, stream->dict_helper[which].ends + old, endoff - old)) return 0; + memset((stream->dict_helper[which].ends + old), i + 1, endoff - old); + } + } + + i++; + counter--; + } + + if (sum != 0x1000000) return 0; + + i = 0; + for (i = 0; i < stream->dict_helper[which].size; i++) { + if (array[i]) { /* within bounds - see above */ + if (array[i] > 17) return 0; + if (dict[array[i]] >= stream->dict_helper[which].size) return 0; + stream->dict_helper[which].starts[dict[array[i]]] = i; + dict[array[i]]++; + } + } + + return 1; +} + +static uint8_t getbits(struct ASPK *stream, uint32_t num, int *err) +{ + uint8_t retvalue; + + if (!readstream(stream)) { + *err = 1; + return 0; + } + + *err = 0; + retvalue = ((stream->hash >> (8 - stream->bitpos)) & 0xffffff) >> (24 - num); + stream->bitpos += num; + + return retvalue; +} + +static int build_decrypt_dictionaries(struct ASPK *stream) +{ + unsigned int counter; + uint32_t ret; + int oob; + + if (!getbits(stream, 1, &oob)) memset(stream->decrypt_dict, 0, 0x2f5); + if (oob) return 0; + + for (counter = 0; counter < 19; counter++) { + stream->array1[counter] = getbits(stream, 4, &oob); + if (oob) return 0; + } + + if (!build_decrypt_array(stream, stream->array1, 3)) return 0; /* array1[19] - [3].size=19 */ + + counter = 0; + while (counter < 757) { + ret = getdec(stream, 3, &oob); + if (oob) return 0; + if (ret >= 16) { + if (ret != 16) { + if (ret == 17) + ret = 3 + getbits(stream, 3, &oob); + else + ret = 11 + getbits(stream, 7, &oob); + if (oob) return 0; + while (ret) { + if (counter >= 757) break; + stream->array2[1 + counter] = 0; + counter++; + ret--; + } + } else { + ret = 3 + getbits(stream, 2, &oob); + if (oob) return 0; + while (ret) { + if (counter >= 757) break; + stream->array2[1 + counter] = stream->array2[counter]; + counter++; + ret--; + } + } + } else { + stream->array2[1 + counter] = (stream->decrypt_dict[counter] + ret) & 0xF; + counter++; + } + } + + if (!build_decrypt_array(stream, &stream->array2[1], 0) /* array2[758-1=757] - [0].size=721 */ || !build_decrypt_array(stream, &stream->array2[722], 1) /* array2[758-722=36] - [1].size=28 */ || !build_decrypt_array(stream, &stream->array2[750], 2) /* array2[758-750=8] - [2].size=8 */) return 0; + + stream->dict_ok = 0; + for (counter = 0; counter < 8; counter++) { + if (stream->array2[750 + counter] != 3) { + stream->dict_ok = 1; + break; + } + } + + memcpy(stream->decrypt_dict, &stream->array2[1], 757); + + return 1; +} + +static int decrypt(struct ASPK *stream, uint8_t *stuff, uint32_t size, uint8_t *output) +{ + /* ep+6d6 -> ep+748 = 0x72*/ + uint32_t gen, backsize, backbytes, useold, counter = 0; + uint32_t hist[4] = {0, 0, 0, 0}; + int oob; + + cli_dbgmsg("Aspack: decrypt size:%x\n", size); + while (counter < size) { + gen = getdec(stream, 0, &oob); + if (oob) return 0; + if (gen < 256) { /* implied within bounds */ + output[counter] = (uint8_t)gen; + counter++; + continue; + } + if (gen >= 720) { + if (!build_decrypt_dictionaries(stream)) return 0; + continue; + } + if ((backbytes = (gen - 256) >> 3) >= 58) return 0; /* checks init_array + stuff */ + backsize = ((gen - 256) & 7) + 2; + if ((backsize - 2) == 7) { + uint8_t hlp; + gen = getdec(stream, 1, &oob); + if (oob || gen >= 0x56) return 0; + hlp = stuff[gen + 0x1c]; + if (!readstream(stream)) return 0; + backsize += stuff[gen] + (((stream->hash >> (8 - stream->bitpos)) & 0xffffff) >> (0x18 - hlp)); + stream->bitpos += hlp; + } + + useold = stream->init_array[backbytes]; + gen = stuff[backbytes + 0x38]; + + if (!stream->dict_ok || gen < 3) { + if (!readstream(stream)) return 0; + useold += ((stream->hash >> (8 - stream->bitpos)) & 0xffffff) >> (24 - gen); + stream->bitpos += gen; + } else { + gen -= 3; + if (!readstream(stream)) return 0; + useold += ((((stream->hash >> (8 - stream->bitpos)) & 0xffffff) >> (24 - gen)) * 8); + stream->bitpos += gen; + useold += getdec(stream, 2, &oob); + if (oob) return 0; + } + + if (useold < 3) { + backbytes = hist[useold]; + if (useold != 0) { + hist[useold] = hist[0]; + hist[0] = backbytes; + } + } else { + hist[2] = hist[1]; + hist[1] = hist[0]; + hist[0] = backbytes = useold - 3; + } + + backbytes++; + + if (!backbytes || backbytes > counter || backsize > size - counter) return 0; + while (backsize--) { + output[counter] = output[counter - backbytes]; + counter++; + } + } + + return 1; +} + +static int decomp_block(struct ASPK *stream, uint32_t size, uint8_t *stuff, uint8_t *output) +{ + memset(stream->decarray3, 0, sizeof(stream->decarray3)); + memset(stream->decarray4, 0, sizeof(stream->decarray4)); + memset(stream->decrypt_dict, 0, 757); + stream->bitpos = 0x20; + if (!build_decrypt_dictionaries(stream)) return 0; + return decrypt(stream, stuff, size, output); +} + +#define INIT_DICT_HELPER(n, sz) \ + stream.dict_helper[n].starts = (uint32_t *)wrkbuf; \ + stream.dict_helper[n].ends = &wrkbuf[sz * sizeof(uint32_t)]; \ + stream.dict_helper[n].size = sz; \ + wrkbuf = &wrkbuf[sz * sizeof(uint32_t) + 0x100]; + +int unaspack(uint8_t *image, unsigned int size, struct cli_exe_section *sections, uint16_t sectcount, uint32_t ep, uint32_t base, int f, aspack_version_t version) +{ + struct ASPK stream; + uint32_t i = 0, j = 0; + uint8_t *blocks = NULL, *wrkbuf; + uint32_t block_rva = 1, block_size; + struct cli_exe_section *outsects; + + uint32_t blocks_offset, stream_init_multiplier_offset, comp_block_offset, wrkbuf_offset, oep_offset; + + switch (version) { + case ASPACK_VER_212: + cli_dbgmsg("Aspack: Attempting to unpack Aspack 2.12.\n"); + blocks_offset = ASPACK_BLOCKS_OFFSET_212; + stream_init_multiplier_offset = ASPACK_STR_INIT_MLT_OFFSET_212; + comp_block_offset = ASPACK_COMP_BLOCK_OFFSET_212; + wrkbuf_offset = ASPACK_WRKBUF_OFFSET_212; + oep_offset = ASPACK_OEP_OFFSET_212; + break; + case ASPACK_VER_OTHER: + cli_dbgmsg("Aspack: Attempting to unpack Aspack >2.12, <2.42.\n"); + blocks_offset = ASPACK_BLOCKS_OFFSET_OTHER; + stream_init_multiplier_offset = ASPACK_STR_INIT_MLT_OFFSET_OTHER; + comp_block_offset = ASPACK_COMP_BLOCK_OFFSET_OTHER; + wrkbuf_offset = ASPACK_WRKBUF_OFFSET_OTHER; + oep_offset = ASPACK_OEP_OFFSET_OTHER; + break; + case ASPACK_VER_242: + cli_dbgmsg("Aspack: Attempting to unpack Aspack 2.42.\n"); + blocks_offset = ASPACK_BLOCKS_OFFSET_242; + stream_init_multiplier_offset = ASPACK_STR_INIT_MLT_OFFSET_242; + comp_block_offset = ASPACK_COMP_BLOCK_OFFSET_242; + wrkbuf_offset = ASPACK_WRKBUF_OFFSET_242; + oep_offset = ASPACK_OEP_OFFSET_242; + break; + default: + cli_dbgmsg("Aspack: Unexpected/Unknown version number.\n"); + return 0; + } + + blocks = image + ep + blocks_offset; + + if (!(wrkbuf = cli_calloc(0x1800, sizeof(uint8_t)))) { + cli_dbgmsg("Aspack: Unable to allocate dictionary\n"); + return 0; + } + + INIT_DICT_HELPER(0, 721); /* dictionary -> dictionary + b44 */ + INIT_DICT_HELPER(1, 28); /* dictionary + c44 -> dictionary + cb4 */ + INIT_DICT_HELPER(2, 8); /* dictionary + db4 -> dictionary + dd4 */ + INIT_DICT_HELPER(3, 19); /* dictionary + ed4 -> dictionary + f20 */ + stream.decrypt_dict = wrkbuf; + + stream.hash = 0x10000; + + for (i = 0; i < 58; i++) { + stream.init_array[i] = j; + if (ep + i + stream_init_multiplier_offset < size) { + j += (1 << image[ep + i + stream_init_multiplier_offset]); + } + } + + memset(stream.array1, 0, sizeof(stream.array1)); + memset(stream.array2, 0, sizeof(stream.array2)); + + i = 0; + while (CLI_ISCONTAINED(image, size, blocks, 8) && (block_rva = cli_readint32(blocks)) && (block_size = cli_readint32(blocks + 4)) && CLI_ISCONTAINED(image, size, image + block_rva, block_size)) { + + cli_dbgmsg("Aspack: unpacking block rva:%x - sz:%x\n", block_rva, block_size); + wrkbuf = (uint8_t *)cli_calloc(block_size + 0x10e, sizeof(uint8_t)); + + if (!wrkbuf) { + cli_dbgmsg("Aspack: Null work buff\n"); + break; + } + stream.input = wrkbuf; + stream.iend = &wrkbuf[block_size + 0x10e]; + + memcpy(wrkbuf, image + block_rva, block_size); + + if (!decomp_block(&stream, block_size, &image[ep + comp_block_offset], image + block_rva)) { + cli_dbgmsg("Aspack: decomp_block failed\n"); + free(wrkbuf); + break; + } else + cli_dbgmsg("Aspack: decomp block succeed\n"); + + free(wrkbuf); + + if (i == 0 && block_size > 7) { /* first sect j/c unrolling */ + while (i < block_size - 6) { + uint8_t curbyte = image[block_rva + i]; + if (curbyte == 0xe8 || curbyte == 0xe9) { + wrkbuf = &image[block_rva + i + 1]; + if (*wrkbuf == image[ep + wrkbuf_offset]) { + uint32_t target = cli_readint32(wrkbuf) & 0xffffff00; + CLI_ROL(target, 0x18); + cli_writeint32(wrkbuf, target - i); + i += 4; + } + } + i++; + } + } + if (version == ASPACK_VER_212) { + blocks += 8; + } else { + blocks += 12; + block_size = cli_readint32(blocks + 4); + while (!((block_size + 0x10e) & 0xffffffff)) { + blocks += 12; + block_size = cli_readint32(blocks + 4); + } + } + } + + cli_dbgmsg("Aspack: leaving loop all uncompressed\n"); + + free(stream.dict_helper[0].starts); + if (block_rva) { + cli_dbgmsg("Aspack: unpacking failure\n"); + return 0; + } + + if (sectcount > 2 && ep == sections[sectcount - 2].rva && !sections[sectcount - 1].rsz) { + sectcount -= 2; + } + if (!(outsects = cli_malloc(sizeof(struct cli_exe_section) * sectcount))) { + cli_dbgmsg("Aspack: OOM - rebuild failed\n"); + cli_writen(f, image, size); + return 1; /* No whatsoheader - won't infloop in pe.c */ + } + memcpy(outsects, sections, sizeof(struct cli_exe_section) * sectcount); + for (i = 0; i < sectcount; i++) { + outsects[i].raw = outsects[i].rva; + outsects[i].rsz = outsects[i].vsz; + } + + if (!cli_rebuildpe((char *)image, outsects, sectcount, base, cli_readint32(image + ep + oep_offset), 0, 0, f)) { + cli_dbgmsg("Aspack: rebuild failed\n"); + cli_writen(f, image, size); + } else { + cli_dbgmsg("Aspack: successfully rebuilt\n"); + } + free(outsects); + return 1; +} diff --git a/clamscan/libclamav/aspack.h b/clamscan/libclamav/aspack.h new file mode 100644 index 0000000..535634f --- /dev/null +++ b/clamscan/libclamav/aspack.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2007-2013 Sourcefire, Inc. + * + * Authors: Luciano Giuseppe 'Pnluck', Alberto Wu + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef __ASPACK_H +#define __ASPACK_H + +#include "clamav-types.h" +#include "execs.h" + +#define ASPACK_EP_OFFSET_212 (58 + 0x70e) +#define ASPACK_EP_OFFSET_OTHER (58 + 0x76a) +#define ASPACK_EP_OFFSET_242 (58 + 0x776) + +#define ASPACK_EPBUFF_OFFSET_212 (0x3b9) +#define ASPACK_EPBUFF_OFFSET_OTHER (0x41f) +#define ASPACK_EPBUFF_OFFSET_242 (0x42B) + +typedef enum aspack_version_tag { + ASPACK_VER_NONE = 0, + ASPACK_VER_212, + ASPACK_VER_OTHER, + ASPACK_VER_242 +} aspack_version_t; + +int unaspack(uint8_t *image, unsigned int size, struct cli_exe_section *sections, uint16_t sectcount, uint32_t ep, uint32_t base, int f, aspack_version_t version); + +#endif diff --git a/clamscan/libclamav/autoit.c b/clamscan/libclamav/autoit.c new file mode 100644 index 0000000..fac6685 --- /dev/null +++ b/clamscan/libclamav/autoit.c @@ -0,0 +1,1536 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2007-2013 Sourcefire, Inc. + * + * Authors: Alberto Wu + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#include +#include +#include +#include + +#if HAVE_STRING_H +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + +#include "clamav.h" +#include "others.h" +#include "scanners.h" +#include "autoit.h" +#include "fmap.h" +#include "fpu.h" + +static int fpu_words = FPU_ENDIAN_INITME; + +const char *autoit_functions[] = { + "ABS", + "ACOS", + "ADLIBREGISTER", + "ADLIBUNREGISTER", + "ASC", + "ASCW", + "ASIN", + "ASSIGN", + "ATAN", + "AUTOITSETOPTION", + "AUTOITWINGETTITLE", + "AUTOITWINSETTITLE", + "BEEP", + "BINARY", + "BINARYLEN", + "BINARYMID", + "BINARYTOSTRING", + "BITAND", + "BITNOT", + "BITOR", + "BITROTATE", + "BITSHIFT", + "BITXOR", + "BLOCKINPUT", + "BREAK", + "CALL", + "CDTRAY", + "CEILING", + "CHR", + "CHRW", + "CLIPGET", + "CLIPPUT", + "CONSOLEREAD", + "CONSOLEWRITE", + "CONSOLEWRITEERROR", + "CONTROLCLICK", + "CONTROLCOMMAND", + "CONTROLDISABLE", + "CONTROLENABLE", + "CONTROLFOCUS", + "CONTROLGETFOCUS", + "CONTROLGETHANDLE", + "CONTROLGETPOS", + "CONTROLGETTEXT", + "CONTROLHIDE", + "CONTROLLISTVIEW", + "CONTROLMOVE", + "CONTROLSEND", + "CONTROLSETTEXT", + "CONTROLSHOW", + "CONTROLTREEVIEW", + "COS", + "DEC", + "DIRCOPY", + "DIRCREATE", + "DIRGETSIZE", + "DIRMOVE", + "DIRREMOVE", + "DLLCALL", + "DLLCALLADDRESS", + "DLLCALLBACKFREE", + "DLLCALLBACKGETPTR", + "DLLCALLBACKREGISTER", + "DLLCLOSE", + "DLLOPEN", + "DLLSTRUCTCREATE", + "DLLSTRUCTGETDATA", + "DLLSTRUCTGETPTR", + "DLLSTRUCTGETSIZE", + "DLLSTRUCTSETDATA", + "DRIVEGETDRIVE", + "DRIVEGETFILESYSTEM", + "DRIVEGETLABEL", + "DRIVEGETSERIAL", + "DRIVEGETTYPE", + "DRIVEMAPADD", + "DRIVEMAPDEL", + "DRIVEMAPGET", + "DRIVESETLABEL", + "DRIVESPACEFREE", + "DRIVESPACETOTAL", + "DRIVESTATUS", + "ENVGET", + "ENVSET", + "ENVUPDATE", + "EVAL", + "EXECUTE", + "EXP", + "FILECHANGEDIR", + "UNKNOWN_89", + "FILECLOSE", + "FILECOPY", + "FILECREATENTFSLINK", + "FILECREATESHORTCUT", + "FILEDELETE", + "FILEEXISTS", + "FILEFINDFIRSTFILE", + "FILEFINDNEXTFILE", + "FILEFLUSH", + "FILEGETATTRIB", + "FILEGETENCODING", + "FILEGETLONGNAME", + "FILEGETPOS", + "FILEGETSHORTCUT", + "FILEGETSHORTNAME", + "FILEGETSIZE", + "FILEGETTIME", + "FILEGETVERSION", + "FILEINSTALL", + "FILEMOVE", + "FILEOPEN", + "FILEOPENDIALOG", + "FILEREAD", + "FILEREADLINE", + "FILEREADTOARRAY", + "FILERECYCLE", + "FILERECYCLEEMPTY", + "FILESAVEDIALOG", + "FILESELECTFOLDER", + "FILESETATTRIB", + "FILESETEND", + "FILESETPOS", + "FILESETTIME", + "FILEWRITE", + "FILEWRITELINE", + "FLOOR", + "FTPSETPROXY", + "FUNCNAME", + "GUICREATE", + "GUICTRLCREATEAVI", + "GUICTRLCREATEBUTTON", + "GUICTRLCREATECHECKBOX", + "GUICTRLCREATECOMBO", + "GUICTRLCREATECONTEXTMENU", + "GUICTRLCREATEDATE", + "GUICTRLCREATEDUMMY", + "GUICTRLCREATEEDIT", + "GUICTRLCREATEGRAPHIC", + "GUICTRLCREATEGROUP", + "GUICTRLCREATEICON", + "GUICTRLCREATEINPUT", + "GUICTRLCREATELABEL", + "GUICTRLCREATELIST", + "GUICTRLCREATELISTVIEW", + "GUICTRLCREATELISTVIEWITEM", + "GUICTRLCREATEMENU", + "GUICTRLCREATEMENUITEM", + "GUICTRLCREATEMONTHCAL", + "GUICTRLCREATEOBJ", + "GUICTRLCREATEPIC", + "GUICTRLCREATEPROGRESS", + "GUICTRLCREATERADIO", + "GUICTRLCREATESLIDER", + "GUICTRLCREATETAB", + "GUICTRLCREATETABITEM", + "GUICTRLCREATETREEVIEW", + "GUICTRLCREATETREEVIEWITEM", + "GUICTRLCREATEUPDOWN", + "GUICTRLDELETE", + "GUICTRLGETHANDLE", + "GUICTRLGETSTATE", + "GUICTRLREAD", + "GUICTRLRECVMSG", + "GUICTRLREGISTERLISTVIEWSORT", + "GUICTRLSENDMSG", + "GUICTRLSENDTODUMMY", + "GUICTRLSETBKCOLOR", + "GUICTRLSETCOLOR", + "GUICTRLSETCURSOR", + "GUICTRLSETDATA", + "GUICTRLSETDEFBKCOLOR", + "GUICTRLSETDEFCOLOR", + "GUICTRLSETFONT", + "GUICTRLSETGRAPHIC", + "GUICTRLSETIMAGE", + "GUICTRLSETLIMIT", + "GUICTRLSETONEVENT", + "GUICTRLSETPOS", + "GUICTRLSETRESIZING", + "GUICTRLSETSTATE", + "GUICTRLSETSTYLE", + "GUICTRLSETTIP", + "GUIDELETE", + "GUIGETCURSORINFO", + "GUIGETMSG", + "GUIGETSTYLE", + "GUIREGISTERMSG", + "GUISETACCELERATORS", + "GUISETBKCOLOR", + "GUISETCOORD", + "GUISETCURSOR", + "GUISETFONT", + "GUISETHELP", + "GUISETICON", + "GUISETONEVENT", + "GUISETSTATE", + "GUISETSTYLE", + "GUISTARTGROUP", + "GUISWITCH", + "HEX", + "HOTKEYSET", + "HTTPSETPROXY", + "HTTPSETUSERAGENT", + "HWND", + "INETCLOSE", + "INETGET", + "INETGETINFO", + "INETGETSIZE", + "INETREAD", + "INIDELETE", + "INIREAD", + "INIREADSECTION", + "INIREADSECTIONNAMES", + "INIRENAMESECTION", + "INIWRITE", + "INIWRITESECTION", + "INPUTBOX", + "INT", + "ISADMIN", + "ISARRAY", + "ISBINARY", + "ISBOOL", + "ISDECLARED", + "ISDLLSTRUCT", + "ISFLOAT", + "ISFUNC", + "ISHWND", + "ISINT", + "ISKEYWORD", + "UNKNOWN_229", + "ISNUMBER", + "ISOBJ", + "ISPTR", + "ISSTRING", + "LOG", + "MEMGETSTATS", + "UNKNOWN_235", + "UNKNOWN_236", + "UNKNOWN_237", + "UNKNOWN_238", + "MOD", + "MOUSECLICK", + "MOUSECLICKDRAG", + "MOUSEDOWN", + "MOUSEGETCURSOR", + "MOUSEGETPOS", + "MOUSEMOVE", + "MOUSEUP", + "MOUSEWHEEL", + "MSGBOX", + "NUMBER", + "OBJCREATE", + "OBJCREATEINTERFACE", + "OBJEVENT", + "OBJGET", + "OBJNAME", + "ONAUTOITEXITREGISTER", + "ONAUTOITEXITUNREGISTER", + "OPT", + "PING", + "PIXELCHECKSUM", + "PIXELGETCOLOR", + "PIXELSEARCH", + "PROCESSCLOSE", + "PROCESSEXISTS", + "PROCESSGETSTATS", + "PROCESSLIST", + "PROCESSSETPRIORITY", + "PROCESSWAIT", + "PROCESSWAITCLOSE", + "PROGRESSOFF", + "PROGRESSON", + "PROGRESSSET", + "PTR", + "RANDOM", + "REGDELETE", + "REGENUMKEY", + "REGENUMVAL", + "REGREAD", + "REGWRITE", + "ROUND", + "RUN", + "RUNAS", + "RUNASWAIT", + "RUNWAIT", + "SEND", + "SENDKEEPACTIVE", + "SETERROR", + "SETEXTENDED", + "SHELLEXECUTE", + "SHELLEXECUTEWAIT", + "SHUTDOWN", + "SIN", + "SLEEP", + "SOUNDPLAY", + "SOUNDSETWAVEVOLUME", + "SPLASHIMAGEON", + "SPLASHOFF", + "SPLASHTEXTON", + "SQRT", + "SRANDOM", + "STATUSBARGETTEXT", + "STDERRREAD", + "STDINWRITE", + "STDIOCLOSE", + "STDOUTREAD", + "STRING", + "STRINGADDCR", + "STRINGCOMPARE", + "STRINGFORMAT", + "STRINGFROMASCIIARRAY", + "STRINGINSTR", + "STRINGISALNUM", + "STRINGISALPHA", + "STRINGISASCII", + "STRINGISDIGIT", + "STRINGISFLOAT", + "STRINGISINT", + "STRINGISLOWER", + "STRINGISSPACE", + "STRINGISUPPER", + "STRINGISXDIGIT", + "STRINGLEFT", + "STRINGLEN", + "STRINGLOWER", + "STRINGMID", + "STRINGREGEXP", + "STRINGREGEXPREPLACE", + "STRINGREPLACE", + "STRINGREVERSE", + "STRINGRIGHT", + "STRINGSPLIT", + "STRINGSTRIPCR", + "STRINGSTRIPWS", + "STRINGTOASCIIARRAY", + "STRINGTOBINARY", + "STRINGTRIMLEFT", + "STRINGTRIMRIGHT", + "STRINGUPPER", + "TAN", + "TCPACCEPT", + "TCPCLOSESOCKET", + "TCPCONNECT", + "TCPLISTEN", + "TCPNAMETOIP", + "TCPRECV", + "TCPSEND", + "TCPSHUTDOWN,", + "TCPSTARTUP,", + "TIMERDIFF", + "TIMERINIT", + "TOOLTIP", + "TRAYCREATEITEM", + "TRAYCREATEMENU", + "TRAYGETMSG", + "TRAYITEMDELETE", + "TRAYITEMGETHANDLE", + "TRAYITEMGETSTATE", + "TRAYITEMGETTEXT", + "TRAYITEMSETONEVENT", + "TRAYITEMSETSTATE", + "TRAYITEMSETTEXT", + "TRAYSETCLICK", + "TRAYSETICON", + "TRAYSETONEVENT", + "TRAYSETPAUSEICON", + "TRAYSETSTATE", + "TRAYSETTOOLTIP", + "TRAYTIP", + "UBOUND", + "UDPBIND", + "UDPCLOSESOCKET", + "UDPOPEN", + "UDPRECV", + "UDPSEND", + "UNKNOWN_375", + "UNKNOWN_376", + "VARGETTYPE", + "WINACTIVATE", + "WINACTIVE", + "WINCLOSE", + "WINEXISTS", + "WINFLASH", + "WINGETCARETPOS", + "WINGETCLASSLIST", + "WINGETCLIENTSIZE", + "WINGETHANDLE", + "WINGETPOS", + "WINGETPROCESS", + "WINGETSTATE", + "WINGETTEXT", + "WINGETTITLE", + "WINKILL", + "WINLIST", + "WINMENUSELECTITEM", + "WINMINIMIZEALL", + "WINMINIMIZEALLUNDO", + "WINMOVE", + "WINSETONTOP", + "WINSETSTATE", + "WINSETTITLE", + "WINSETTRANS", + "WINWAIT", + "WINWAITACTIVE", + "WINWAITCLOSE", + "WINWAITNOTACTIVE"}; + +const char *autoit_keywords[] = { + "UNKNOWN_0", + "AND", + "OR", + "NOT", + "IF", + "THEN", + "ELSE", + "ELSEIF", + "ENDIF", + "WHILE", + "WEND", + "DO", + "UNTIL", + "FOR", + "NEXT", + "TO", + "STEP", + "IN", + "EXITLOOP", + "CONTINUELOOP", + "SELECT", + "CASE", + "ENDSELECT", + "SWITCH", + "ENDSWITCH", + "CONTINUECASE", + "DIM", + "REDIM", + "LOCAL", + "GLOBAL", + "CONST", + "STATIC", + "FUNC", + "ENDFUNC", + "RETURN", + "EXIT", + "BYREF", + "WITH", + "ENDWITH", + "TRUE", + "FALSE", + "DEFAULT", + "NULL", + "UNKNOWN_43", + "ENUM", +}; + +/* FIXME: use unicode detection and normalization from edwin */ +static unsigned int u2a(uint8_t *dest, unsigned int len) +{ + uint8_t *src = dest; + unsigned int i, j; + + if (len < 2) + return len; + + if (len > 4 && src[0] == 0xff && src[1] == 0xfe && src[2]) { + len -= 2; + src += 2; + } else { + unsigned int cnt = 0; + j = (len > 20) ? 20 : (len & ~1); + + for (i = 0; i < j; i += 2) + cnt += (src[i] != 0 && src[i + 1] == 0); + + if (cnt * 4 < j) + return len; + } + + j = len; + len >>= 1; + for (i = 0; i < j; i += 2) + *dest++ = src[i]; + + return len; +} + +/********************* + MT realted stuff +*********************/ + +struct MT { + uint32_t *next; + uint32_t items; + uint32_t mt[624]; +}; + +static uint8_t MT_getnext(struct MT *MT) +{ + uint32_t r; + + if (!--MT->items) { + uint32_t *mt = MT->mt; + unsigned int i; + + MT->items = 624; + MT->next = mt; + + for (i = 0; i < 227; i++) + mt[i] = ((((mt[i] ^ mt[i + 1]) & 0x7ffffffe) ^ mt[i]) >> 1) ^ ((0 - (mt[i + 1] & 1)) & 0x9908b0df) ^ mt[i + 397]; + for (; i < 623; i++) + mt[i] = ((((mt[i] ^ mt[i + 1]) & 0x7ffffffe) ^ mt[i]) >> 1) ^ ((0 - (mt[i + 1] & 1)) & 0x9908b0df) ^ mt[i - 227]; + mt[623] = ((((mt[623] ^ mt[0]) & 0x7ffffffe) ^ mt[623]) >> 1) ^ ((0 - (mt[0] & 1)) & 0x9908b0df) ^ mt[i - 227]; + } + + r = *(MT->next++); + r ^= (r >> 11); + r ^= ((r & 0xff3a58ad) << 7); + r ^= ((r & 0xffffdf8c) << 15); + r ^= (r >> 18); + return (uint8_t)(r >> 1); +} + +static void MT_decrypt(uint8_t *buf, unsigned int size, uint32_t seed) +{ + struct MT MT; + unsigned int i; + uint32_t *mt = MT.mt; + + *mt = seed; + for (i = 1; i < 624; i++) + mt[i] = i + 0x6c078965 * ((mt[i - 1] >> 30) ^ mt[i - 1]); + MT.items = 1; + MT.next = MT.mt; + + while (size--) + *buf++ ^= MT_getnext(&MT); +} + +/********************* + inflate stuff +*********************/ + +struct UNP { + uint8_t *outputbuf; + uint8_t *inputbuf; + uint32_t cur_output; + uint32_t cur_input; + uint32_t usize; + uint32_t csize; + uint32_t bits_avail; + union { + uint32_t full; + struct { +#if WORDS_BIGENDIAN != 0 + uint16_t h; /* BE */ + uint16_t l; +#else + uint16_t l; /* LE */ + uint16_t h; +#endif + } half; + } bitmap; + uint32_t error; +}; + +static uint32_t getbits(struct UNP *UNP, uint32_t size) +{ + //cli_dbgmsg("In getbits, (size: %u, bits_avail: %u, UNP->cur_input: %u)\n", size, UNP->bits_avail, UNP->cur_input); + UNP->bitmap.half.h = 0; + if (size > UNP->bits_avail && ((size - UNP->bits_avail - 1) / 16 + 1) * 2 > UNP->csize - UNP->cur_input) { + cli_dbgmsg("autoit: getbits() - not enough bits available\n"); + UNP->error = 1; + return 0; /* won't infloop nor spam */ + } + while (size) { + if (!UNP->bits_avail) { + //cli_dbgmsg("cur_input: %u (size: %u)\n", UNP->cur_input, size); + UNP->bitmap.half.l |= UNP->inputbuf[UNP->cur_input++] << 8; + UNP->bitmap.half.l |= UNP->inputbuf[UNP->cur_input++]; + UNP->bits_avail = 16; + } + UNP->bitmap.full <<= 1; + UNP->bits_avail--; + size--; + } + return (uint32_t)UNP->bitmap.half.h; +} + +/********************* + autoit3 EA05 handler +*********************/ + +static int ea05(cli_ctx *ctx, const uint8_t *base, char *tmpd) +{ + uint8_t b[300], comp; + uint32_t s, m4sum = 0; + int i, ret, det = 0; + unsigned int files = 0; + char tempfile[1024]; + struct UNP UNP; + fmap_t *map = ctx->fmap; + + if (!fmap_need_ptr_once(map, base, 16)) + return CL_CLEAN; + + for (i = 0; i < 16; i++) + m4sum += *base++; + + while ((ret = cli_checklimits("autoit", ctx, 0, 0, 0)) == CL_CLEAN) { + if (!fmap_need_ptr_once(map, base, 8)) + return (det ? CL_VIRUS : CL_CLEAN); + + /* MT_decrypt(buf,4,0x16fa); waste of time */ + if ((uint32_t)cli_readint32(base) != 0xceb06dff) { + cli_dbgmsg("autoit: no FILE magic found, extraction complete\n"); + return (det ? CL_VIRUS : CL_CLEAN); + } + + s = cli_readint32(base + 4) ^ 0x29bc; + if ((int32_t)s < 0) + return (det ? CL_VIRUS : CL_CLEAN); /* the original code wouldn't seek back here */ + base += 8; + if (cli_debug_flag && s < sizeof(b)) { + if (!fmap_need_ptr_once(map, base, s)) + return (det ? CL_VIRUS : CL_CLEAN); + memcpy(b, base, s); + MT_decrypt(b, s, s + 0xa25e); + b[s] = '\0'; + cli_dbgmsg("autoit: magic string '%s'\n", b); + } + base += s; + + if (!fmap_need_ptr_once(map, base, 4)) + return (det ? CL_VIRUS : CL_CLEAN); + s = cli_readint32(base) ^ 0x29ac; + if ((int32_t)s < 0) + return (det ? CL_VIRUS : CL_CLEAN); /* the original code wouldn't seek back here */ + base += 4; + if (cli_debug_flag && s < sizeof(b)) { + if (!fmap_need_ptr_once(map, base, s)) + return (det ? CL_VIRUS : CL_CLEAN); + memcpy(b, base, s); + MT_decrypt(b, s, s + 0xf25e); + b[s] = '\0'; + cli_dbgmsg("autoit: original filename '%s'\n", b); + } + base += s; + + if (!fmap_need_ptr_once(map, base, 13)) + return (det ? CL_VIRUS : CL_CLEAN); + comp = *base; + UNP.csize = cli_readint32(base + 1) ^ 0x45aa; + if ((int32_t)UNP.csize < 0) { + cli_dbgmsg("autoit: bad file size - giving up\n"); + return (det ? CL_VIRUS : CL_CLEAN); + } + + if (!UNP.csize) { + cli_dbgmsg("autoit: skipping empty file\n"); + base += 13 + 16; + continue; + } + cli_dbgmsg("autoit: compressed size: %x\n", UNP.csize); + cli_dbgmsg("autoit: advertised uncompressed size %x\n", cli_readint32(base + 5) ^ 0x45aa); + cli_dbgmsg("autoit: ref chksum: %x\n", cli_readint32(base + 9) ^ 0xc3d2); + + base += 13 + 16; + + if (cli_checklimits("autoit", ctx, UNP.csize, 0, 0) != CL_CLEAN) { + base += UNP.csize; + continue; + } + + if (comp == 1 && UNP.csize < sizeof(union unaligned_32)) { + cli_dbgmsg("autoit: compressed size too small, skipping\n"); + continue; + } + + if (!(UNP.inputbuf = cli_malloc(UNP.csize))) + return CL_EMEM; + if (!fmap_need_ptr_once(map, base, UNP.csize)) { + cli_dbgmsg("autoit: failed to read compressed stream. broken/truncated file?\n"); + free(UNP.inputbuf); + return (det ? CL_VIRUS : CL_CLEAN); + } + memcpy(UNP.inputbuf, base, UNP.csize); + base += UNP.csize; + MT_decrypt(UNP.inputbuf, UNP.csize, 0x22af + m4sum); + + if (comp == 1) { + cli_dbgmsg("autoit: file is compressed\n"); + if (cli_readint32(UNP.inputbuf) != 0x35304145) { + cli_dbgmsg("autoit: bad magic or unsupported version\n"); + free(UNP.inputbuf); + continue; + } + + if (!(UNP.usize = be32_to_host(*(uint32_t *)(UNP.inputbuf + 4)))) + UNP.usize = UNP.csize; /* only a specifically crafted or badly corrupted sample should land here */ + if (cli_checklimits("autoit", ctx, UNP.usize, 0, 0) != CL_CLEAN) { + free(UNP.inputbuf); + continue; + } + + if (!(UNP.outputbuf = cli_malloc(UNP.usize))) { + free(UNP.inputbuf); + return CL_EMEM; + } + cli_dbgmsg("autoit: uncompressed size again: %x\n", UNP.usize); + + UNP.cur_output = 0; + UNP.cur_input = 8; + UNP.bitmap.full = 0; + UNP.bits_avail = 0; + UNP.error = 0; + + while (!UNP.error && UNP.cur_output < UNP.usize) { + if (getbits(&UNP, 1)) { + uint32_t bb, bs, addme = 0; + bb = getbits(&UNP, 15); + + if ((bs = getbits(&UNP, 2)) == 3) { + addme = 3; + if ((bs = getbits(&UNP, 3)) == 7) { + addme = 10; + if ((bs = getbits(&UNP, 5)) == 31) { + addme = 41; + if ((bs = getbits(&UNP, 8)) == 255) { + addme = 296; + while ((bs = getbits(&UNP, 8)) == 255) { + addme += 255; + } + } + } + } + } + bs += 3 + addme; + + /* If getbits set UNP.error, bail out here, since otherwise + * the data we'd write out would be garbage */ + if (UNP.error) { + break; + } + + if (!CLI_ISCONTAINED(UNP.outputbuf, UNP.usize, &UNP.outputbuf[UNP.cur_output], bs) || + !CLI_ISCONTAINED(UNP.outputbuf, UNP.usize, &UNP.outputbuf[UNP.cur_output - bb], bs)) { + UNP.error = 1; + break; + } + while (bs--) { + UNP.outputbuf[UNP.cur_output] = UNP.outputbuf[UNP.cur_output - bb]; + UNP.cur_output++; + } + } else { + UNP.outputbuf[UNP.cur_output] = (uint8_t)getbits(&UNP, 8); + UNP.cur_output++; + } + } + + free(UNP.inputbuf); + /* Sometimes the autoit exe is in turn packed/lamed with a runtime compressor and similar shit. + * However, since the autoit script doesn't compress a second time very well, chances are we're + * still able to match the headers and unpack something (see sample 0811129) + * I'd rather unpack something (although possibly highly corrupted) than nothing at all + * + * - Fortuna audaces iuvat - + */ + if (UNP.error) { + cli_dbgmsg("autoit: decompression error after %u bytes - partial file may exist\n", UNP.cur_output); + UNP.usize = UNP.cur_output; + } + } else { + cli_dbgmsg("autoit: file is not compressed\n"); + UNP.outputbuf = UNP.inputbuf; + UNP.usize = UNP.csize; + } + + if (UNP.usize < 4) { + cli_dbgmsg("autoit: file is too short\n"); + free(UNP.outputbuf); + continue; + } + + files++; + + /* FIXME: REGRESSION NEEDED! */ + /* UNP.usize = u2a(UNP.outputbuf, UNP.usize); */ + + snprintf(tempfile, 1023, "%s" PATHSEP "autoit.%.3u", tmpd, files); + tempfile[1023] = '\0'; + if ((i = open(tempfile, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, S_IRUSR | S_IWUSR)) < 0) { + cli_dbgmsg("autoit: Can't create file %s\n", tempfile); + free(UNP.outputbuf); + return CL_ECREAT; + } + if (cli_writen(i, UNP.outputbuf, UNP.usize) != UNP.usize) { + cli_dbgmsg("autoit: cannot write %d bytes\n", UNP.usize); + close(i); + free(UNP.outputbuf); + return CL_EWRITE; + } + free(UNP.outputbuf); + if (ctx->engine->keeptmp) + cli_dbgmsg("autoit: file extracted to %s\n", tempfile); + else + cli_dbgmsg("autoit: file successfully extracted\n"); + if (lseek(i, 0, SEEK_SET) == -1) { + cli_dbgmsg("autoit: call to lseek() has failed\n"); + close(i); + return CL_ESEEK; + } + if (cli_magic_scan_desc(i, tempfile, ctx, NULL) == CL_VIRUS) { + if (!SCAN_ALLMATCHES) { + close(i); + if (!ctx->engine->keeptmp) + if (cli_unlink(tempfile)) return CL_EUNLINK; + return CL_VIRUS; + } + det = 1; + } + close(i); + if (!ctx->engine->keeptmp) + if (cli_unlink(tempfile)) return CL_EUNLINK; + } + return (det ? CL_VIRUS : ret); +} + +/********************* + LAME realted stuff +*********************/ + +#define ROFL(a, b) ((a << (b % (sizeof(a) << 3))) | (a >> ((sizeof(a) << 3) - (b % (sizeof(a) << 3))))) + +struct LAME { + uint32_t c0; + uint32_t c1; + uint32_t grp1[17]; +}; + +static double LAME_fpusht(struct LAME *l) +{ + union { + double as_double; + struct { + uint32_t lo; + uint32_t hi; + } as_uint; + } ret; + + uint32_t rolled = ROFL(l->grp1[l->c0], 9) + ROFL(l->grp1[l->c1], 13); + + l->grp1[l->c0] = rolled; + + if (!l->c0--) l->c0 = 16; + if (!l->c1--) l->c1 = 16; + + /* if (l->grp1[l->c0] == l->grp2[0]) { */ + /* if (!memcmp(l->grp1, (uint32_t *)l + 0x24 - l->c0, 0x44)) */ + /* return 0.0; */ + /* } */ + + if (fpu_words == FPU_ENDIAN_LITTLE) { + ret.as_uint.lo = rolled << 0x14; + ret.as_uint.hi = 0x3ff00000 | (rolled >> 0xc); + } else { + ret.as_uint.hi = rolled << 0x14; + ret.as_uint.lo = 0x3ff00000 | (rolled >> 0xc); + } + return ret.as_double - 1.0; +} + +static void LAME_srand(struct LAME *l, uint32_t seed) +{ + unsigned int i; + + for (i = 0; i < 17; i++) { + seed *= 0x53A9B4FB; /*1403630843*/ + seed = 1 - seed; + l->grp1[i] = seed; + } + + l->c0 = 0; + l->c1 = 10; + + for (i = 0; i < 9; i++) + LAME_fpusht(l); +} + +static uint8_t LAME_getnext(struct LAME *l) +{ + double x; + uint8_t ret; + + LAME_fpusht(l); + x = LAME_fpusht(l) * 256.0; + if ((int32_t)x < 256) + ret = (uint8_t)x; + else + ret = 0xff; + return ret; +} + +static void LAME_decrypt(uint8_t *cypher, uint32_t size, uint16_t seed) +{ + struct LAME lame; + /* mt_srand_timewrap(struct srand_struc bufDC); */ + + LAME_srand(&lame, (uint32_t)seed); + while (size--) + *cypher++ ^= LAME_getnext(&lame); +} + +/********************* + autoit3 EA06 handler +*********************/ + +static int ea06(cli_ctx *ctx, const uint8_t *base, char *tmpd) +{ + uint8_t b[600], comp, script, *buf; + uint32_t s; + int i, ret, det = 0; + unsigned int files = 0; + char tempfile[1024]; + const char prefixes[] = {'\0', '\0', '@', '$', '\0', '.', '"', '#'}; + const char *opers[] = {",", "=", ">", "<", "<>", ">=", "<=", "(", ")", "+", "-", "/", "*", "&", "[", "]", "==", "^", "+=", "-=", "/=", "*=", "&=", "?", ":"}; + struct UNP UNP; + fmap_t *map = ctx->fmap; + + /* Useless due to a bug in CRC calculation - LMAO!!1 */ + /* if (cli_readn(desc, buf, 24)!=24) */ + /* return CL_CLEAN; */ + /* LAME_decrypt(buf, 0x10, 0x99f2); */ + /* buf+=0x10; */ + base += 16; /* for now we just skip the garbage */ + + while ((ret = cli_checklimits("cli_autoit", ctx, 0, 0, 0)) == CL_CLEAN) { + if (!fmap_need_ptr_once(map, base, 8)) + return (det ? CL_VIRUS : CL_CLEAN); + /* LAME_decrypt(buf, 4, 0x18ee); waste of time */ + if (cli_readint32(base) != 0x52ca436b) { + cli_dbgmsg("autoit: no FILE magic found, giving up (got 0x%08x)\n", cli_readint32(base)); + return (det ? CL_VIRUS : CL_CLEAN); + } + + script = 0; + + s = cli_readint32(base + 4) ^ 0xadbc; + if ((int32_t)(s * 2) < 0) + return (det ? CL_VIRUS : CL_CLEAN); /* the original code wouldn't seek back here */ + base += 8; + if (s < sizeof(b) / 2) { + if (!fmap_need_ptr_once(map, base, s * 2)) + return (det ? CL_VIRUS : CL_CLEAN); + memcpy(b, base, s * 2); + LAME_decrypt(b, s * 2, s + 0xb33f); + u2a(b, s * 2); + cli_dbgmsg("autoit: magic string '%s'\n", b); + if (s == 19 && !memcmp(">>>AUTOIT SCRIPT<<<", b, 19)) + script = 1; + } else { + cli_dbgmsg("autoit: magic string too long to print\n"); + } + base += s * 2; + + if (!fmap_need_ptr_once(map, base, 4)) + return (det ? CL_VIRUS : CL_CLEAN); + s = cli_readint32(base) ^ 0xf820; + if ((int32_t)(s * 2) < 0) + return (det ? CL_VIRUS : CL_CLEAN); /* the original code wouldn't seek back here */ + base += 4; + if (cli_debug_flag && s < sizeof(b) / 2) { + if (!fmap_need_ptr_once(map, base, s * 2)) + return (det ? CL_VIRUS : CL_CLEAN); + memcpy(b, base, s * 2); + LAME_decrypt(b, s * 2, s + 0xf479); + b[s * 2] = '\0'; + b[s * 2 + 1] = '\0'; + u2a(b, s * 2); + cli_dbgmsg("autoit: original filename '%s'\n", b); + } + base += s * 2; + + if (!fmap_need_ptr_once(map, base, 13)) + return (det ? CL_VIRUS : CL_CLEAN); + comp = *base; + UNP.csize = cli_readint32(base + 1) ^ 0x87bc; + if ((int32_t)UNP.csize < 0) { + cli_dbgmsg("autoit: bad file size - giving up\n"); + return (det ? CL_VIRUS : CL_CLEAN); + } + + if (!UNP.csize) { + cli_dbgmsg("autoit: skipping empty file\n"); + base += 13 + 16; + continue; + } + cli_dbgmsg("autoit: compressed size: %x\n", UNP.csize); + cli_dbgmsg("autoit: advertised uncompressed size %x\n", cli_readint32(base + 5) ^ 0x87bc); + cli_dbgmsg("autoit: ref chksum: %x\n", cli_readint32(base + 9) ^ 0xa685); + + base += 13 + 16; + + if (cli_checklimits("autoit", ctx, UNP.csize, 0, 0) != CL_CLEAN) { + base += UNP.csize; + continue; + } + + if (comp == 1 && UNP.csize < sizeof(union unaligned_32)) { + cli_dbgmsg("autoit: compressed size too small, skipping\n"); + continue; + } + + files++; + + if (!(UNP.inputbuf = cli_malloc(UNP.csize))) + return CL_EMEM; + if (!fmap_need_ptr_once(map, base, UNP.csize)) { + cli_dbgmsg("autoit: failed to read compressed stream. broken/truncated file?\n"); + free(UNP.inputbuf); + return (det ? CL_VIRUS : CL_CLEAN); + } + memcpy(UNP.inputbuf, base, UNP.csize); + base += UNP.csize; + LAME_decrypt(UNP.inputbuf, UNP.csize, 0x2477 /* + m4sum (broken by design) */); + + if (comp == 1) { + cli_dbgmsg("autoit: file is compressed\n"); + if (cli_readint32(UNP.inputbuf) != 0x36304145) { + cli_dbgmsg("autoit: bad magic or unsupported version\n"); + free(UNP.inputbuf); + continue; + } + + if (!(UNP.usize = be32_to_host(*(uint32_t *)(UNP.inputbuf + 4)))) + UNP.usize = UNP.csize; /* only a specifically crafted or badly corrupted sample should land here */ + if (cli_checklimits("autoit", ctx, UNP.usize, 0, 0) != CL_CLEAN) { + free(UNP.inputbuf); + continue; + } + if (!(UNP.outputbuf = cli_malloc(UNP.usize))) { + free(UNP.inputbuf); + return CL_EMEM; + } + cli_dbgmsg("autoit: uncompressed size again: %x\n", UNP.usize); + + UNP.cur_output = 0; + UNP.cur_input = 8; + UNP.bitmap.full = 0; + UNP.bits_avail = 0; + UNP.error = 0; + + while (!UNP.error && UNP.cur_output < UNP.usize) { + if (!getbits(&UNP, 1)) { + uint32_t bb, bs, addme = 0; + bb = getbits(&UNP, 15); + + if ((bs = getbits(&UNP, 2)) == 3) { + addme = 3; + if ((bs = getbits(&UNP, 3)) == 7) { + addme = 10; + if ((bs = getbits(&UNP, 5)) == 31) { + addme = 41; + if ((bs = getbits(&UNP, 8)) == 255) { + addme = 296; + while ((bs = getbits(&UNP, 8)) == 255) { + addme += 255; + } + } + } + } + } + bs += 3 + addme; + + /* If getbits set UNP.error, bail out here, since otherwise + * the data we'd write out would be garbage */ + if (UNP.error) { + break; + } + + //cli_dbgmsg("cur_output: %u, bs: %u, bb: %u\n", UNP.cur_output, bs, bb); + if (!CLI_ISCONTAINED(UNP.outputbuf, UNP.usize, &UNP.outputbuf[UNP.cur_output], bs) || + !CLI_ISCONTAINED(UNP.outputbuf, UNP.usize, &UNP.outputbuf[UNP.cur_output - bb], bs)) { + UNP.error = 1; + break; + } + while (bs--) { + UNP.outputbuf[UNP.cur_output] = UNP.outputbuf[UNP.cur_output - bb]; + UNP.cur_output++; + } + } else { + UNP.outputbuf[UNP.cur_output] = (uint8_t)getbits(&UNP, 8); + UNP.cur_output++; + } + } + + free(UNP.inputbuf); + if (UNP.error) { + cli_dbgmsg("autoit: decompression error after %u bytes - partial file may exist\n", UNP.cur_output); + UNP.usize = UNP.cur_output; + } + } else { + cli_dbgmsg("autoit: file is not compressed\n"); + UNP.outputbuf = UNP.inputbuf; + UNP.usize = UNP.csize; + } + + if (UNP.usize < 4) { + cli_dbgmsg("autoit: file is too short\n"); + free(UNP.outputbuf); + continue; + } + + if (script) { + /* From here on, we'll reuse csize to be the size of the + * output buffer */ + UNP.csize = UNP.usize; + if (!(buf = cli_malloc(UNP.csize))) { + free(UNP.outputbuf); + return CL_EMEM; + } + UNP.cur_output = 0; + UNP.cur_input = 4; + UNP.bits_avail = cli_readint32((char *)UNP.outputbuf); + UNP.error = 0; + cli_dbgmsg("autoit: script has got %u lines\n", UNP.bits_avail); + + while (!UNP.error && UNP.bits_avail && UNP.cur_input < UNP.usize) { + uint8_t op; + + switch ((op = UNP.outputbuf[UNP.cur_input++])) { + case 0: /* keyword ID */ { + uint32_t keyword_id; + uint32_t keyword_len; + if (UNP.cur_input >= UNP.usize - 4) { + UNP.error = 1; + cli_dbgmsg("autoit: too few bytes present - expected enough for a keyword ID\n"); + break; + } + keyword_id = cli_readint32((char *)&UNP.outputbuf[UNP.cur_input]); + if (keyword_id >= (sizeof(autoit_keywords) / sizeof(autoit_keywords[0]))) { + UNP.error = 1; + cli_dbgmsg("autoit: unknown AutoIT keyword ID: 0x%x\n", keyword_id); + break; + } + UNP.cur_input += 4; + keyword_len = strlen(autoit_keywords[keyword_id]); + if (UNP.cur_output + keyword_len + 2 >= UNP.csize) { + uint8_t *newout; + UNP.csize += 512; + if (!(newout = cli_realloc(buf, UNP.csize))) { + UNP.error = 1; + break; + } + buf = newout; + } + if (cli_debug_flag) { + if (0 == memcmp(autoit_keywords[keyword_id], "UNKNOWN", MIN(strlen("UNKNOWN"), keyword_len))) { + cli_dbgmsg("autoit: encountered use of unknown keyword ID: %s\n", autoit_keywords[keyword_id]); + } + } + snprintf((char *)&buf[UNP.cur_output], keyword_len + 2, "%s ", autoit_keywords[keyword_id]); + UNP.cur_output += keyword_len + 1; + break; + } + case 1: /* function ID */ { + uint32_t function_id; + uint32_t function_len; + if (UNP.cur_input >= UNP.usize - 4) { + UNP.error = 1; + cli_dbgmsg("autoit: too few bytes present - expected enough for a function ID\n"); + break; + } + function_id = cli_readint32((char *)&UNP.outputbuf[UNP.cur_input]); + if (function_id >= (sizeof(autoit_functions) / sizeof(autoit_functions[0]))) { + UNP.error = 1; + cli_dbgmsg("autoit: unknown AutoIT function ID: 0x%x\n", function_id); + break; + } + UNP.cur_input += 4; + function_len = strlen(autoit_functions[function_id]); + if (UNP.cur_output + function_len + 2 >= UNP.csize) { + uint8_t *newout; + UNP.csize += 512; + if (!(newout = cli_realloc(buf, UNP.csize))) { + UNP.error = 1; + break; + } + buf = newout; + } + if (cli_debug_flag) { + if (0 == memcmp(autoit_functions[function_id], "UNKNOWN", MIN(strlen("UNKNOWN"), function_len))) { + cli_dbgmsg("autoit: encountered use of unknown function ID: %s\n", autoit_functions[function_id]); + } + } + snprintf((char *)&buf[UNP.cur_output], function_len + 2, "%s ", autoit_functions[function_id]); + UNP.cur_output += function_len + 1; + break; + } + case 5: /* */ + if (UNP.cur_input >= UNP.usize - 4) { + UNP.error = 1; + cli_dbgmsg("autoit: not enough space for an int\n"); + break; + } + if (UNP.cur_output + 12 >= UNP.csize) { + uint8_t *newout; + UNP.csize += 512; + if (!(newout = cli_realloc(buf, UNP.csize))) { + UNP.error = 1; + break; + } + buf = newout; + } + snprintf((char *)&buf[UNP.cur_output], 12, "0x%08x ", cli_readint32((char *)&UNP.outputbuf[UNP.cur_input])); + UNP.cur_output += 11; + UNP.cur_input += 4; + break; + + case 0x10: /* */ + { + uint64_t val; + if (UNP.usize < 8 || UNP.cur_input >= UNP.usize - 8) { + UNP.error = 1; + cli_dbgmsg("autoit: not enough space for an int64\n"); + break; + } + if (UNP.cur_output + 20 >= UNP.csize) { + uint8_t *newout; + UNP.csize += 512; + if (!(newout = cli_realloc(buf, UNP.csize))) { + UNP.error = 1; + break; + } + buf = newout; + } + val = (uint64_t)cli_readint32((char *)&UNP.outputbuf[UNP.cur_input + 4]); + val <<= 32; + val += (uint64_t)cli_readint32((char *)&UNP.outputbuf[UNP.cur_input]); + snprintf((char *)&buf[UNP.cur_output], 20, "0x%016lx ", (unsigned long int)val); + UNP.cur_output += 19; + UNP.cur_input += 8; + break; + } + + case 0x20: /* */ + if (UNP.usize < 8 || UNP.cur_input >= UNP.usize - 8) { + UNP.error = 1; + cli_dbgmsg("autoit: not enough space for a double\n"); + break; + } + if (UNP.cur_output + 40 >= UNP.csize) { + uint8_t *newout; + UNP.csize += 512; + if (!(newout = cli_realloc(buf, UNP.csize))) { + UNP.error = 1; + break; + } + buf = newout; + } + if (fpu_words == FPU_ENDIAN_LITTLE) + snprintf((char *)&buf[UNP.cur_output], 39, "%g ", *(double *)&UNP.outputbuf[UNP.cur_input]); + else + do { + double x; + uint8_t *j = (uint8_t *)&x; + unsigned int i; + + for (i = 0; i < 8; i++) + j[7 - i] = UNP.outputbuf[UNP.cur_input + i]; + snprintf((char *)&buf[UNP.cur_output], 39, "%g ", x); /* FIXME: check */ + } while (0); + buf[UNP.cur_output + 38] = ' '; + buf[UNP.cur_output + 39] = '\0'; + UNP.cur_output += strlen((char *)&buf[UNP.cur_output]); + UNP.cur_input += 8; + break; + + case 0x30: /* COSTRUCT */ + case 0x31: /* COMMAND */ + case 0x32: /* MACRO */ + case 0x33: /* VAR */ + case 0x34: /* FUNC */ + case 0x35: /* OBJECT */ + case 0x36: /* STRING */ + case 0x37: /* DIRECTIVE */ + { + uint32_t chars, dchars, i; + + if (UNP.cur_input >= UNP.usize - 4) { + UNP.error = 1; + cli_dbgmsg("autoit: not enough space for size\n"); + break; + } + chars = cli_readint32((char *)&UNP.outputbuf[UNP.cur_input]); + dchars = chars * 2; + UNP.cur_input += 4; + + if (UNP.usize < dchars || UNP.cur_input >= UNP.usize - dchars) { + UNP.error = 1; + cli_dbgmsg("autoit: size too big - needed %d, total %d, avail %d\n", dchars, UNP.usize, UNP.usize - UNP.cur_input); + break; + } + if (UNP.cur_output + chars + 3 >= UNP.csize) { + uint8_t *newout; + UNP.csize += chars + 512; + if (!(newout = cli_realloc(buf, UNP.csize))) { + UNP.error = 1; + break; + } + buf = newout; + } + + if (prefixes[op - 0x30]) + buf[UNP.cur_output++] = prefixes[op - 0x30]; + + if (chars) { + for (i = 0; i < dchars; i += 2) { + UNP.outputbuf[UNP.cur_input + i] ^= (uint8_t)chars; + UNP.outputbuf[UNP.cur_input + i + 1] ^= (uint8_t)(chars >> 8); + } + u2a(&UNP.outputbuf[UNP.cur_input], dchars); + memcpy(&buf[UNP.cur_output], &UNP.outputbuf[UNP.cur_input], chars); + UNP.cur_output += chars; + UNP.cur_input += dchars; + } + if (op == 0x36) + buf[UNP.cur_output++] = '"'; + if (op != 0x34) + buf[UNP.cur_output++] = ' '; + } break; + + case 0x40: /* , */ + case 0x41: /* = */ + case 0x42: /* > */ + case 0x43: /* < */ + case 0x44: /* <> */ + case 0x45: /* >= */ + case 0x46: /* <= */ + case 0x47: /* ( */ + case 0x48: /* ) */ + case 0x49: /* + */ + case 0x4a: /* - */ + case 0x4b: /* / */ + case 0x4c: /* * */ + case 0x4d: /* & */ + case 0x4e: /* [ */ + case 0x4f: /* ] */ + case 0x50: /* == */ + case 0x51: /* ^ */ + case 0x52: /* += */ + case 0x53: /* -= */ + case 0x54: /* /= */ + case 0x55: /* *= */ + case 0x56: /* &= */ + case 0x57: /* ? */ + case 0x58: /* : */ + if (UNP.cur_output + 4 >= UNP.csize) { + uint8_t *newout; + UNP.csize += 512; + if (!(newout = cli_realloc(buf, UNP.csize))) { + UNP.error = 1; + break; + } + buf = newout; + } + UNP.cur_output += snprintf((char *)&buf[UNP.cur_output], 4, "%s ", opers[op - 0x40]); + break; + + case 0x7f: + UNP.bits_avail--; + if (UNP.cur_output + 1 >= UNP.csize) { + uint8_t *newout; + UNP.csize += 512; + if (!(newout = cli_realloc(buf, UNP.csize))) { + UNP.error = 1; + break; + } + buf = newout; + } + buf[UNP.cur_output++] = '\n'; + break; + + default: + cli_dbgmsg("autoit: found unknown op (0x%x)\n", op); + UNP.error = 1; + } + } + + if (UNP.error) + cli_dbgmsg("autoit: decompilation aborted - partial script may exist\n"); + + free(UNP.outputbuf); + } else { + buf = UNP.outputbuf; + UNP.cur_output = UNP.usize; + } + + snprintf(tempfile, 1023, "%s" PATHSEP "autoit.%.3u", tmpd, files); + tempfile[1023] = '\0'; + if ((i = open(tempfile, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, S_IRUSR | S_IWUSR)) < 0) { + cli_dbgmsg("autoit: Can't create file %s\n", tempfile); + free(buf); + return CL_ECREAT; + } + if (cli_writen(i, buf, UNP.cur_output) != UNP.cur_output) { + cli_dbgmsg("autoit: cannot write %d bytes\n", UNP.usize); + close(i); + free(buf); + return CL_EWRITE; + } + free(buf); + if (ctx->engine->keeptmp) + cli_dbgmsg("autoit: %s extracted to %s\n", (script) ? "script" : "file", tempfile); + else + cli_dbgmsg("autoit: %s successfully extracted\n", (script) ? "script" : "file"); + if (lseek(i, 0, SEEK_SET) == -1) { + cli_dbgmsg("autoit: call to lseek() has failed\n"); + close(i); + return CL_ESEEK; + } + if (cli_magic_scan_desc(i, tempfile, ctx, NULL) == CL_VIRUS) { + if (!SCAN_ALLMATCHES) { + close(i); + if (!ctx->engine->keeptmp) + if (cli_unlink(tempfile)) return CL_EUNLINK; + return CL_VIRUS; + } + det = 1; + } + close(i); + if (!ctx->engine->keeptmp) + if (cli_unlink(tempfile)) return CL_EUNLINK; + } + return (det ? CL_VIRUS : ret); +} + +/********************* + autoit3 wrapper +*********************/ + +int cli_scanautoit(cli_ctx *ctx, off_t offset) +{ + const uint8_t *version; + int r; + char *tmpd; + fmap_t *map = ctx->fmap; + + cli_dbgmsg("in scanautoit()\n"); + + if (!(version = fmap_need_off_once(map, offset, sizeof(*version)))) + return CL_EREAD; + + if (!(tmpd = cli_gentemp_with_prefix(ctx->sub_tmpdir, "autoit-tmp"))) + return CL_ETMPDIR; + if (mkdir(tmpd, 0700)) { + cli_dbgmsg("autoit: Can't create temporary directory %s\n", tmpd); + free(tmpd); + return CL_ETMPDIR; + } + if (ctx->engine->keeptmp) + cli_dbgmsg("autoit: Extracting files to %s\n", tmpd); + + switch (*version) { + case 0x35: + r = ea05(ctx, version + 1, tmpd); + break; + case 0x36: + if (fpu_words == FPU_ENDIAN_INITME) + fpu_words = get_fpu_endian(); + if (fpu_words == FPU_ENDIAN_UNKNOWN) { + cli_dbgmsg("autoit: EA06 support not available" + "(cannot extract ea06 doubles, unknown floating double representation).\n"); + r = CL_CLEAN; + } else + r = ea06(ctx, version + 1, tmpd); + break; + default: + /* NOT REACHED */ + cli_dbgmsg("autoit: unknown method\n"); + r = CL_CLEAN; + } + + if (!ctx->engine->keeptmp) + cli_rmdirs(tmpd); + + free(tmpd); + return r; +} diff --git a/clamscan/libclamav/autoit.h b/clamscan/libclamav/autoit.h new file mode 100644 index 0000000..c29d609 --- /dev/null +++ b/clamscan/libclamav/autoit.h @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2007-2013 Sourcefire, Inc. + * + * Authors: Alberto Wu + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef __AUTOIT_H +#define __AUTOIT_H + +#include "others.h" +int cli_scanautoit(cli_ctx *ctx, off_t offset); +#endif diff --git a/clamscan/libclamav/bcfeatures.h b/clamscan/libclamav/bcfeatures.h new file mode 100644 index 0000000..96883ab --- /dev/null +++ b/clamscan/libclamav/bcfeatures.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2009-2013 Sourcefire, Inc. + + * Authors: Török Edvin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ +#ifndef BC_FEATURES_H +#define BC_FEATURES_H + +/* Compatibility for non-clang compilers */ +#ifndef __has_feature +#define __has_feature(x) 0 +#endif + +#if __has_feature(attribute_bounds) +#define EBOUNDS(fieldname) __attribute__((bounds(fieldname))) +#else +#define EBOUNDS(x) +#endif + +#endif diff --git a/clamscan/libclamav/bignum.h b/clamscan/libclamav/bignum.h new file mode 100644 index 0000000..8fdc956 --- /dev/null +++ b/clamscan/libclamav/bignum.h @@ -0,0 +1,28 @@ +#ifndef BIGNUM_H_ +#define BIGNUM_H_ + +#define TFM_CHECK + +#include "bignum_fast.h" +typedef fp_int mp_int; +#define mp_cmp fp_cmp +#define mp_toradix_n(a, b, c, d) fp_toradix_n(a, b, c, d) +#define mp_init(a) (fp_init(a), 0) +#define mp_add fp_add + +#define mp_init_multi(a, b, c, d) (mp_init(a), mp_init(b), mp_init(c), 0) + +#define mp_read_unsigned_bin(a, b, c) (fp_read_unsigned_bin(a, b, c), 0) + +#define mp_div fp_div +#define mp_clear_multi(...) +#define mp_copy(a, b) (fp_copy(a, b), 0) +#define mp_unsigned_bin_size fp_unsigned_bin_size +#define mp_to_unsigned_bin(a, b) (fp_to_unsigned_bin(a, b), 0) +#define mp_read_radix fp_read_radix +#define mp_exptmod fp_exptmod +#define mp_get_int(a) ((a)->used > 0 ? (a)->dp[0] : 0) +#define mp_set_int(a, b) fp_set(a, b) +#define mp_mul_2d fp_mul_2d +#define mp_clear(x) +#endif diff --git a/clamscan/libclamav/bignum_fast.h b/clamscan/libclamav/bignum_fast.h new file mode 100644 index 0000000..6cfb601 --- /dev/null +++ b/clamscan/libclamav/bignum_fast.h @@ -0,0 +1,595 @@ +/* TomsFastMath, a fast ISO C bignum library. + * + * This project is meant to fill in where LibTomMath + * falls short. That is speed ;-) + * + * This project is public domain and free for all purposes. + * + * Tom St Denis, tomstdenis@gmail.com + */ + +/* Oct 1, 2013 + * Adding clamav-config.h include here for size-checking on fall-through case + */ +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#ifndef TFM_H_ +#define TFM_H_ + +#if !defined(__GNUC__) || !defined(__x86_64__) +/* on i686 we run out of registers with -fPIC, and on ia64 we miscompile. + * Just enable this on x86-64 where we know it works */ +#define TFM_NO_ASM +#endif + +#include +#include +#include +#include +#include + +#ifndef MIN +#define MIN(x, y) ((x) < (y) ? (x) : (y)) +#endif + +#ifndef MAX +#define MAX(x, y) ((x) > (y) ? (x) : (y)) +#endif + +/* externally define this symbol to ignore the default settings, useful for changing the build from the make process */ +#ifndef TFM_ALREADY_SET + +/* do we want the large set of small multiplications ? + Enable these if you are going to be doing a lot of small (<= 16 digit) multiplications say in ECC + Or if you're on a 64-bit machine doing RSA as a 1024-bit integer == 16 digits ;-) + */ +#define TFM_SMALL_SET + +/* do we want huge code + Enable these if you are doing 20, 24, 28, 32, 48, 64 digit multiplications (useful for RSA) + Less important on 64-bit machines as 32 digits == 2048 bits + */ +#if 0 +#define TFM_MUL3 +#define TFM_MUL4 +#define TFM_MUL6 +#define TFM_MUL7 +#define TFM_MUL8 +#define TFM_MUL9 +#define TFM_MUL12 +#define TFM_MUL17 +#endif +#define TFM_MUL20 +#define TFM_MUL24 +#define TFM_MUL28 +#define TFM_MUL32 +/*#define TFM_MUL48 +#define TFM_MUL64*/ + +#if 0 +#define TFM_SQR3 +#define TFM_SQR4 +#define TFM_SQR6 +#define TFM_SQR7 +#define TFM_SQR8 +#define TFM_SQR9 +#define TFM_SQR12 +#define TFM_SQR17 +#endif +#define TFM_SQR20 +#define TFM_SQR24 +#define TFM_SQR28 +#define TFM_SQR32 +/*#define TFM_SQR48 +#define TFM_SQR64*/ + +/* do we want some overflow checks + Not required if you make sure your numbers are within range (e.g. by default a modulus for fp_exptmod() can only be upto 2048 bits long) + */ +#define TFM_CHECK + +/* Is the target a P4 Prescott + */ +/* #define TFM_PRESCOTT */ + +/* Do we want timing resistant fp_exptmod() ? + * This makes it slower but also timing invariant with respect to the exponent + */ +/* #define TFM_TIMING_RESISTANT */ + +#endif + +/* autodetect x86-64 and make sure we are using 64-bit digits with x86-64 asm */ +#if defined(__x86_64__) +#if defined(TFM_X86) || defined(TFM_SSE2) || defined(TFM_ARM) +#error x86-64 detected, x86-32/SSE2/ARM optimizations are not valid! +#endif +#if !defined(TFM_X86_64) && !defined(TFM_NO_ASM) +#define TFM_X86_64 +#endif +#endif +#if defined(TFM_X86_64) +#if !defined(FP_64BIT) +#define FP_64BIT +#endif +#endif + +/* try to detect x86-32 */ +#if defined(__i386__) && !defined(TFM_SSE2) +#if defined(TFM_X86_64) || defined(TFM_ARM) +#error x86-32 detected, x86-64/ARM optimizations are not valid! +#endif +#if !defined(TFM_X86) && !defined(TFM_NO_ASM) +#define TFM_X86 +#endif +#endif + +/* make sure we're 32-bit for x86-32/sse/arm/ppc32 */ +#if (defined(TFM_X86) || defined(TFM_SSE2) || defined(TFM_ARM) || defined(TFM_PPC32)) && defined(FP_64BIT) +#warning x86-32, SSE2 and ARM, PPC32 optimizations require 32-bit digits (undefining) +#undef FP_64BIT +#endif + +/* multi asms? */ +#ifdef TFM_X86 +#define TFM_ASM +#endif +#ifdef TFM_X86_64 +#ifdef TFM_ASM +#error TFM_ASM already defined! +#endif +#define TFM_ASM +#endif +#ifdef TFM_SSE2 +#ifdef TFM_ASM +#error TFM_ASM already defined! +#endif +#define TFM_ASM +#endif +#ifdef TFM_ARM +#ifdef TFM_ASM +#error TFM_ASM already defined! +#endif +#define TFM_ASM +#endif +#ifdef TFM_PPC32 +#ifdef TFM_ASM +#error TFM_ASM already defined! +#endif +#define TFM_ASM +#endif +#ifdef TFM_PPC64 +#ifdef TFM_ASM +#error TFM_ASM already defined! +#endif +#define TFM_ASM +#endif +#ifdef TFM_AVR32 +#ifdef TFM_ASM +#error TFM_ASM already defined! +#endif +#define TFM_ASM +#endif + +/* we want no asm? */ +#ifdef TFM_NO_ASM +#undef TFM_X86 +#undef TFM_X86_64 +#undef TFM_SSE2 +#undef TFM_ARM +#undef TFM_PPC32 +#undef TFM_PPC64 +#undef TFM_AVR32 +#undef TFM_ASM +#endif + +/* ECC helpers */ +#ifdef TFM_ECC192 +#ifdef FP_64BIT +#define TFM_MUL3 +#define TFM_SQR3 +#else +#define TFM_MUL6 +#define TFM_SQR6 +#endif +#endif + +#ifdef TFM_ECC224 +#ifdef FP_64BIT +#define TFM_MUL4 +#define TFM_SQR4 +#else +#define TFM_MUL7 +#define TFM_SQR7 +#endif +#endif + +#ifdef TFM_ECC256 +#ifdef FP_64BIT +#define TFM_MUL4 +#define TFM_SQR4 +#else +#define TFM_MUL8 +#define TFM_SQR8 +#endif +#endif + +#ifdef TFM_ECC384 +#ifdef FP_64BIT +#define TFM_MUL6 +#define TFM_SQR6 +#else +#define TFM_MUL12 +#define TFM_SQR12 +#endif +#endif + +#ifdef TFM_ECC521 +#ifdef FP_64BIT +#define TFM_MUL9 +#define TFM_SQR9 +#else +#define TFM_MUL17 +#define TFM_SQR17 +#endif +#endif + +/* some default configurations. + */ +#if defined(FP_64BIT) +/* for GCC only on supported platforms */ +#ifndef CRYPT +typedef unsigned long ulong64; +#endif +typedef ulong64 fp_digit; +typedef unsigned long fp_word __attribute__((mode(TI))); +#else +/* this is to make porting into LibTomCrypt easier :-) */ +#ifndef CRYPT +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef unsigned __int64 ulong64; +typedef signed __int64 long64; +#else +typedef unsigned long long ulong64; +typedef signed long long long64; +#endif +#endif +/* The code requires that fp_word be twice the size of fp_digit. + * Add size-checking for special case (both long and long long are 64) */ +#if (SIZEOF_LONG == 8) && (SIZEOF_LONG_LONG == 8) +typedef unsigned int fp_digit; +#else +typedef unsigned long fp_digit; +#endif +typedef ulong64 fp_word; +#endif + +/* # of digits this is */ +#define DIGIT_BIT (int)((CHAR_BIT) * sizeof(fp_digit)) +/* Max size of any number in bits. Basically the largest size you will be multiplying + * should be half [or smaller] of FP_MAX_SIZE-four_digit + * + * You can externally define this or it defaults to 4096-bits [allowing multiplications upto 2048x2048 bits ] + */ +#ifndef FP_MAX_SIZE +#define FP_MAX_SIZE (8192 + (8 * DIGIT_BIT)) +#endif + +/* will this lib work? */ +#if (CHAR_BIT & 7) +#error CHAR_BIT must be a multiple of eight. +#endif + +#define FP_MASK (fp_digit)(-1) +#define FP_SIZE (FP_MAX_SIZE / DIGIT_BIT) + +/* signs */ +#define FP_ZPOS 0 +#define FP_NEG 1 + +/* return codes */ +#define FP_OKAY 0 +#define FP_VAL 1 +#define FP_MEM 2 + +/* equalities */ +#define FP_LT -1 /* less than */ +#define FP_EQ 0 /* equal to */ +#define FP_GT 1 /* greater than */ + +/* replies */ +#define FP_YES 1 /* yes response */ +#define FP_NO 0 /* no response */ + +/* a FP type */ +typedef struct { + fp_digit dp[FP_SIZE]; + int used, + sign; +} fp_int; + +/* functions */ + +/* returns a TFM ident string useful for debugging... */ +const char *fp_ident(void); + +/* initialize [or zero] an fp int */ +#define fp_init(a) (void)memset((a), 0, sizeof(fp_int)) +#define fp_zero(a) fp_init(a) + +/* zero/even/odd ? */ +#define fp_iszero(a) (((a)->used == 0) ? FP_YES : FP_NO) +#define fp_iseven(a) (((a)->used >= 0 && (((a)->dp[0] & 1) == 0)) ? FP_YES : FP_NO) +#define fp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? FP_YES : FP_NO) + +/* set to a small digit */ +void fp_set(fp_int *a, fp_digit b); + +/* copy from a to b */ +#define fp_copy(a, b) (void)(((a) != (b)) && memcpy((b), (a), sizeof(fp_int))) +#define fp_init_copy(a, b) fp_copy(b, a) + +/* clamp digits */ +#define fp_clamp(a) \ + { \ + while ((a)->used && (a)->dp[(a)->used - 1] == 0) --((a)->used); \ + (a)->sign = (a)->used ? (a)->sign : FP_ZPOS; \ + } + +/* negate and absolute */ +#define fp_neg(a, b) \ + { \ + fp_copy(a, b); \ + (b)->sign ^= 1; \ + fp_clamp(b); \ + } +#define fp_abs(a, b) \ + { \ + fp_copy(a, b); \ + (b)->sign = 0; \ + } + +/* right shift x digits */ +void fp_rshd(fp_int *a, int x); + +/* left shift x digits */ +void fp_lshd(fp_int *a, int x); + +/* signed comparison */ +int fp_cmp(fp_int *a, fp_int *b); + +/* unsigned comparison */ +int fp_cmp_mag(fp_int *a, fp_int *b); + +/* power of 2 operations */ +void fp_div_2d(fp_int *a, int b, fp_int *c, fp_int *d); +void fp_mod_2d(fp_int *a, int b, fp_int *c); +void fp_mul_2d(fp_int *a, int b, fp_int *c); +void fp_2expt(fp_int *a, int b); +void fp_mul_2(fp_int *a, fp_int *c); +void fp_div_2(fp_int *a, fp_int *c); + +/* Counts the number of lsbs which are zero before the first zero bit */ +int fp_cnt_lsb(fp_int *a); + +/* c = a + b */ +void fp_add(fp_int *a, fp_int *b, fp_int *c); + +/* c = a - b */ +void fp_sub(fp_int *a, fp_int *b, fp_int *c); + +/* c = a * b */ +void fp_mul(fp_int *a, fp_int *b, fp_int *c); + +/* b = a*a */ +void fp_sqr(fp_int *a, fp_int *b); + +/* a/b => cb + d == a */ +int fp_div(fp_int *a, fp_int *b, fp_int *c, fp_int *d); + +/* c = a mod b, 0 <= c < b */ +int fp_mod(fp_int *a, fp_int *b, fp_int *c); + +/* compare against a single digit */ +int fp_cmp_d(fp_int *a, fp_digit b); + +/* c = a + b */ +void fp_add_d(fp_int *a, fp_digit b, fp_int *c); + +/* c = a - b */ +void fp_sub_d(fp_int *a, fp_digit b, fp_int *c); + +/* c = a * b */ +void fp_mul_d(fp_int *a, fp_digit b, fp_int *c); + +/* a/b => cb + d == a */ +int fp_div_d(fp_int *a, fp_digit b, fp_int *c, fp_digit *d); + +/* c = a mod b, 0 <= c < b */ +int fp_mod_d(fp_int *a, fp_digit b, fp_digit *c); + +/* ---> number theory <--- */ +/* d = a + b (mod c) */ +int fp_addmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d); + +/* d = a - b (mod c) */ +int fp_submod(fp_int *a, fp_int *b, fp_int *c, fp_int *d); + +/* d = a * b (mod c) */ +int fp_mulmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d); + +/* c = a * a (mod b) */ +int fp_sqrmod(fp_int *a, fp_int *b, fp_int *c); + +/* c = 1/a (mod b) */ +int fp_invmod(fp_int *a, fp_int *b, fp_int *c); + +/* c = (a, b) */ +void fp_gcd(fp_int *a, fp_int *b, fp_int *c); + +/* c = [a, b] */ +void fp_lcm(fp_int *a, fp_int *b, fp_int *c); + +/* setups the montgomery reduction */ +int fp_montgomery_setup(fp_int *a, fp_digit *mp); + +/* computes a = B**n mod b without division or multiplication useful for + * normalizing numbers in a Montgomery system. + */ +void fp_montgomery_calc_normalization(fp_int *a, fp_int *b); + +/* computes x/R == x (mod N) via Montgomery Reduction */ +void fp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp); + +/* d = a**b (mod c) */ +int fp_exptmod(fp_int *a, fp_int *b, fp_int *c, fp_int *d); + +/* primality stuff */ + +/* perform a Miller-Rabin test of a to the base b and store result in "result" */ +void fp_prime_miller_rabin(fp_int *a, fp_int *b, int *result); + +/* 256 trial divisions + 8 Miller-Rabins, returns FP_YES if probable prime */ +int fp_isprime(fp_int *a); + +/* Primality generation flags */ +#define TFM_PRIME_BBS 0x0001 /* BBS style prime */ +#define TFM_PRIME_SAFE 0x0002 /* Safe prime (p-1)/2 == prime */ +#define TFM_PRIME_2MSB_OFF 0x0004 /* force 2nd MSB to 0 */ +#define TFM_PRIME_2MSB_ON 0x0008 /* force 2nd MSB to 1 */ + +/* callback for fp_prime_random, should fill dst with random bytes and return how many read [upto len] */ +typedef int tfm_prime_callback(unsigned char *dst, int len, void *dat); + +#define fp_prime_random(a, t, size, bbs, cb, dat) fp_prime_random_ex(a, t, ((size)*8) + 1, (bbs == 1) ? TFM_PRIME_BBS : 0, cb, dat) + +int fp_prime_random_ex(fp_int *a, int t, int size, int flags, tfm_prime_callback cb, void *dat); + +/* radix conversions */ +int fp_count_bits(fp_int *a); + +int fp_unsigned_bin_size(fp_int *a); +void fp_read_unsigned_bin(fp_int *a, const unsigned char *b, int c); +void fp_to_unsigned_bin(fp_int *a, unsigned char *b); + +int fp_signed_bin_size(fp_int *a); +void fp_read_signed_bin(fp_int *a, unsigned char *b, int c); +void fp_to_signed_bin(fp_int *a, unsigned char *b); + +int fp_read_radix(fp_int *a, const char *str, int radix); +int fp_toradix(fp_int *a, char *str, int radix); +int fp_toradix_n(fp_int *a, char *str, int radix, int maxlen); + +/* VARIOUS LOW LEVEL STUFFS */ +void s_fp_add(fp_int *a, fp_int *b, fp_int *c); +void s_fp_sub(fp_int *a, fp_int *b, fp_int *c); +void fp_reverse(unsigned char *s, int len); + +void fp_mul_comba(fp_int *A, fp_int *B, fp_int *C); + +#ifdef TFM_SMALL_SET +void fp_mul_comba_small(fp_int *A, fp_int *B, fp_int *C); +#endif + +#ifdef TFM_MUL3 +void fp_mul_comba3(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL4 +void fp_mul_comba4(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL6 +void fp_mul_comba6(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL7 +void fp_mul_comba7(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL8 +void fp_mul_comba8(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL9 +void fp_mul_comba9(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL12 +void fp_mul_comba12(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL17 +void fp_mul_comba17(fp_int *A, fp_int *B, fp_int *C); +#endif + +#ifdef TFM_MUL20 +void fp_mul_comba20(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL24 +void fp_mul_comba24(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL28 +void fp_mul_comba28(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL32 +void fp_mul_comba32(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL48 +void fp_mul_comba48(fp_int *A, fp_int *B, fp_int *C); +#endif +#ifdef TFM_MUL64 +void fp_mul_comba64(fp_int *A, fp_int *B, fp_int *C); +#endif + +void fp_sqr_comba(fp_int *A, fp_int *B); + +#ifdef TFM_SMALL_SET +void fp_sqr_comba_small(fp_int *A, fp_int *B); +#endif + +#ifdef TFM_SQR3 +void fp_sqr_comba3(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR4 +void fp_sqr_comba4(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR6 +void fp_sqr_comba6(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR7 +void fp_sqr_comba7(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR8 +void fp_sqr_comba8(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR9 +void fp_sqr_comba9(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR12 +void fp_sqr_comba12(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR17 +void fp_sqr_comba17(fp_int *A, fp_int *B); +#endif + +#ifdef TFM_SQR20 +void fp_sqr_comba20(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR24 +void fp_sqr_comba24(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR28 +void fp_sqr_comba28(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR32 +void fp_sqr_comba32(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR48 +void fp_sqr_comba48(fp_int *A, fp_int *B); +#endif +#ifdef TFM_SQR64 +void fp_sqr_comba64(fp_int *A, fp_int *B); +#endif +extern const char *fp_s_rmap; + +#endif + +/* $Source: /cvs/libtom/tomsfastmath/src/headers/tfm.h,v $ */ +/* $Revision: 1.3 $ */ +/* $Date: 2007/02/27 02:38:44 $ */ diff --git a/clamscan/libclamav/binhex.c b/clamscan/libclamav/binhex.c new file mode 100644 index 0000000..98d04a3 --- /dev/null +++ b/clamscan/libclamav/binhex.c @@ -0,0 +1,274 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2010-2013 Sourcefire, Inc. + * + * Authors: aCaB + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + * + */ + +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#include + +#include "scanners.h" +#include "others.h" +#include "clamav.h" +#include "fmap.h" +#include "binhex.h" + +// clang-format off +static const uint8_t hqxtbl[] = { + /* 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f */ + /* 00-0f */ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + /* 10-1f */ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + /* 20-2f */ 0xff,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0xff,0xff, + /* 30-3f */ 0x0d,0x0e,0x0f,0x10,0x11,0x12,0x13,0xff,0x14,0x15,0xff,0xff,0xff,0xff,0xff,0xff, + /* 40-4f */ 0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0xff, + /* 50-5f */ 0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0xff,0x2c,0x2d,0x2e,0x2f,0xff,0xff,0xff,0xff, + /* 60-6f */ 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0xff,0x37,0x38,0x39,0x3a,0x3b,0x3c,0xff,0xff, + /* 70-7f */ 0x3d,0x3e,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff +}; +// clang-format on + +#define BH_FLUSH_SZ (BUFSIZ - 256) + +int cli_binhex(cli_ctx *ctx) +{ + fmap_t *map = ctx->fmap; + const uint8_t *encoded = NULL; + uint8_t decoded[BUFSIZ], spare_bits = 0, last_byte = 0, this_byte = 0, offset = 0; + size_t enc_done = 0, enc_todo = map->len; + unsigned int dec_done = 0, chunksz = 0, chunkoff = 0; + uint32_t datalen = 0, reslen = 0; + int in_data = 0, in_run = 0, datafd, resfd, ret = CL_CLEAN; + enum binhex_phase { IN_BANNER, + IN_HEADER, + IN_DATA, + IN_LIMBO1, + IN_LIMBO2, + IN_RES } write_phase = IN_BANNER; + char *dname, *rname; + + cli_dbgmsg("in cli_binhex\n"); + if (!map->len) return CL_CLEAN; + + if ((ret = cli_gentempfd(ctx->sub_tmpdir, &dname, &datafd)) != CL_SUCCESS) + return ret; + + if ((ret = cli_gentempfd(ctx->sub_tmpdir, &rname, &resfd)) != CL_SUCCESS) { + close(datafd); + if (cli_unlink(dname)) ret = CL_EUNLINK; + free(dname); + return ret; + } + + memset(decoded, 0, 24); + + while (1) { + uint8_t b; + if (!enc_todo || dec_done >= BH_FLUSH_SZ) { + if (write_phase == IN_HEADER) { + uint32_t namelen = (uint32_t)decoded[0], hdrlen = 1 + namelen + 1 + 4 + 4 + 2; + if (!dec_done) { + cli_dbgmsg("cli_binhex: file is empty\n"); + break; + } + datalen = (decoded[hdrlen] << 24) | (decoded[hdrlen + 1] << 16) | (decoded[hdrlen + 2] << 8) | decoded[hdrlen + 3]; + hdrlen += 4; + reslen = (decoded[hdrlen] << 24) | (decoded[hdrlen + 1] << 16) | (decoded[hdrlen + 2] << 8) | decoded[hdrlen + 3]; + hdrlen += 4 + 2; + decoded[namelen + 1] = 0; + if (dec_done <= hdrlen) { + cli_dbgmsg("cli_binhex: file too short for header\n"); + break; + } + if ((ret = cli_checklimits("cli_binhex(data)", ctx, datalen, 0, 0)) != CL_CLEAN) + break; + if (cli_checklimits("cli_binhex(resources)", ctx, reslen, 0, 0) != CL_CLEAN) + reslen = 0; + cli_dbgmsg("cli_binhex: decoding '%s' - %u bytes of data to %s - %u bytes or resources to %s\n", decoded + 1, datalen, dname, reslen, rname); + memmove(decoded, &decoded[hdrlen], dec_done - hdrlen); + dec_done -= hdrlen; + write_phase++; + } + if (dec_done && write_phase == IN_DATA) { + unsigned int todo = MIN(dec_done, datalen); + datalen -= todo; + dec_done -= todo; + if (cli_writen(datafd, decoded, todo) != todo) { + ret = CL_EWRITE; + break; + } + if (!datalen) { + write_phase++; + if (lseek(datafd, 0, SEEK_SET) == -1) { + cli_dbgmsg("cli_binhex: call to lseek() has failed\n"); + ret = CL_ESEEK; + break; + } + ret = cli_magic_scan_desc(datafd, dname, ctx, NULL); + if (ret == CL_VIRUS) break; + } + if (dec_done) + memmove(decoded, &decoded[todo], dec_done); + } + if (dec_done && write_phase == IN_LIMBO1) { + if (dec_done > 1) { + if (reslen < 5) { + cli_dbgmsg("cli_binhex: skipping resources (too small)\n"); + break; + } + dec_done -= 2; + write_phase += 2; + if (dec_done) + memmove(decoded, &decoded[2], dec_done); + } else { + dec_done--; + write_phase++; + if (dec_done) + memmove(decoded, &decoded[1], dec_done); + } + } + if (dec_done && write_phase == IN_LIMBO2) { + if (reslen < 5) { + cli_dbgmsg("cli_binhex: skipping resources (too small)\n"); + break; + } + write_phase++; + if (--dec_done) + memmove(decoded, &decoded[1], dec_done); + } + if (dec_done && write_phase == IN_RES) { + unsigned int todo = MIN(dec_done, reslen); + reslen -= todo; + dec_done -= todo; + if (cli_writen(resfd, decoded, todo) != todo) { + ret = CL_EWRITE; + break; + } + if (!reslen) { + if (lseek(resfd, 0, SEEK_SET) == -1) { + cli_dbgmsg("cli_binhex: call to lseek() has failed\n"); + ret = CL_ESEEK; + break; + } + ret = cli_magic_scan_desc(resfd, rname, ctx, NULL); + break; + } + } + if (!enc_todo) { + if (write_phase == IN_DATA) { + cli_dbgmsg("cli_binhex: scanning partially extracted data fork\n"); + if (lseek(datafd, 0, SEEK_SET) == -1) { + cli_dbgmsg("cli_binhex: call to lseek() has failed\n"); + ret = CL_ESEEK; + break; + } + ret = cli_magic_scan_desc(datafd, dname, ctx, NULL); + } else if (write_phase == IN_RES) { + cli_dbgmsg("cli_binhex: scanning partially extracted resource fork\n"); + if (lseek(resfd, 0, SEEK_SET) == -1) { + cli_dbgmsg("cli_binhex: call to lseek() has failed\n"); + ret = CL_ESEEK; + break; + } + ret = cli_magic_scan_desc(resfd, rname, ctx, NULL); + } + break; + } + } + + // 'chunksz' must be 0 the first iteration, + // so that 'encoded' will be initialized before first dereference. + if (!chunksz) { + chunksz = MIN(enc_todo, map->pgsz); + encoded = fmap_need_off_once(map, enc_done, chunksz); + if (!encoded) { + ret = CL_EREAD; + break; + } + chunkoff = 0; + } + chunksz--; + + b = encoded[chunkoff++]; + enc_done++; + enc_todo--; + + if ((char)b == '\r' || (char)b == '\n') { + in_data = 1; + continue; + } + if (!in_data) continue; + if (write_phase == IN_BANNER) { + if ((char)b != ':') { + cli_dbgmsg("cli_binhex: broken file (missing stream start identifier)\n"); + break; + } + write_phase++; + } + if ((char)b == ':') + continue; + if (b > 0x7f || (b = hqxtbl[b]) == 0xff) { + cli_dbgmsg("cli_binhex: Invalid character (%02x)\n", encoded[chunkoff - 1]); + break; + } + switch ((offset++) & 3) { /* 6 bits per char */ + case 0: /* left-6h */ + spare_bits = b << 2; + continue; + case 1: /* left-2l + middle-4h */ + this_byte = spare_bits | (b >> 4); + spare_bits = b << 4; + break; + case 2: /* middle-4l + right-2h */ + this_byte = spare_bits | (b >> 2); + spare_bits = b << 6; + break; + case 3: /* right-6l */ + this_byte = spare_bits | b; + } + + if (in_run) { + in_run = 0; + if (!this_byte) + this_byte = 0x90; + else { + while (--this_byte) + decoded[dec_done++] = last_byte; + continue; + } + } else if (this_byte == 0x90) { + in_run = 1; + continue; + } + decoded[dec_done++] = this_byte; + last_byte = this_byte; + } + + close(datafd); + close(resfd); + if (!ctx->engine->keeptmp) { + if (cli_unlink(dname) && ret != CL_VIRUS) ret = CL_EUNLINK; + if (cli_unlink(rname) && ret != CL_VIRUS) ret = CL_EUNLINK; + } + free(dname); + free(rname); + return ret; +} diff --git a/clamscan/libclamav/binhex.h b/clamscan/libclamav/binhex.h new file mode 100644 index 0000000..b75e919 --- /dev/null +++ b/clamscan/libclamav/binhex.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2007-2013 Sourcefire, Inc. + * + * Authors: Nigel Horne + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef __BINHEX_H +#define __BINHEX_H + +#include "others.h" +int cli_binhex(cli_ctx *ctx); + +#endif diff --git a/clamscan/libclamav/blob.c b/clamscan/libclamav/blob.c new file mode 100644 index 0000000..83a769f --- /dev/null +++ b/clamscan/libclamav/blob.c @@ -0,0 +1,695 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2007-2013 Sourcefire, Inc. + * + * Authors: Nigel Horne + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_SYS_PARAM_H +#include /* for NAME_MAX */ +#endif + +#ifdef C_DARWIN +#include +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif + +#include "others.h" +#include "mbox.h" +#include "matcher.h" +#include "scanners.h" +#include "filetypes.h" + +#include + +/* Scheduled for rewrite in 0.94 (bb#804). Disabling for now */ +/* #define MAX_SCAN_SIZE 20*1024 /\* */ +/* * The performance benefit of scanning */ +/* * early disappears on medium and */ +/* * large sized files */ +/* *\/ */ + +static const char *blobGetFilename(const blob *b); + +blob * +blobCreate(void) +{ +#ifdef CL_DEBUG + blob *b = (blob *)cli_calloc(1, sizeof(blob)); + if (b) + b->magic = BLOBCLASS; + cli_dbgmsg("blobCreate\n"); + return b; +#else + return (blob *)cli_calloc(1, sizeof(blob)); +#endif +} + +void blobDestroy(blob *b) +{ +#ifdef CL_DEBUG + cli_dbgmsg("blobDestroy %d\n", b->magic); +#else + cli_dbgmsg("blobDestroy\n"); +#endif + + assert(b != NULL); +#ifdef CL_DEBUG + assert(b->magic == BLOBCLASS); +#endif + + if (b->name) + free(b->name); + if (b->data) + free(b->data); +#ifdef CL_DEBUG + b->magic = INVALIDCLASS; +#endif + free(b); +} + +void blobArrayDestroy(blob *blobList[], int n) +{ + assert(blobList != NULL); + + while (--n >= 0) { + cli_dbgmsg("blobArrayDestroy: %d\n", n); + if (blobList[n]) { + blobDestroy(blobList[n]); + blobList[n] = NULL; + } + } +} + +/* + * No longer needed to be growable, so turn into a normal memory area which + * the caller must free. The passed blob is destroyed + */ +void * +blobToMem(blob *b) +{ + void *ret; + + assert(b != NULL); +#ifdef CL_DEBUG + assert(b->magic == BLOBCLASS); +#endif + + if (!b->isClosed) + blobClose(b); + if (b->name) + free(b->name); +#ifdef CL_DEBUG + b->magic = INVALIDCLASS; +#endif + ret = (void *)b->data; + free(b); + + return ret; +} + +/*ARGSUSED*/ +void blobSetFilename(blob *b, const char *dir, const char *filename) +{ + assert(b != NULL); +#ifdef CL_DEBUG + assert(b->magic == BLOBCLASS); +#endif + assert(filename != NULL); + + UNUSEDPARAM(dir); + + cli_dbgmsg("blobSetFilename: %s\n", filename); + + if (b->name) + free(b->name); + + b->name = cli_strdup(filename); + + if (b->name) + sanitiseName(b->name); +} + +static const char * +blobGetFilename(const blob *b) +{ + assert(b != NULL); +#ifdef CL_DEBUG + assert(b->magic == BLOBCLASS); +#endif + + return b->name; +} + +/* + * Returns <0 for failure + */ +int blobAddData(blob *b, const unsigned char *data, size_t len) +{ +#if HAVE_CLI_GETPAGESIZE + static int pagesize = 0; + int growth; +#endif + + assert(b != NULL); +#ifdef CL_DEBUG + assert(b->magic == BLOBCLASS); +#endif + assert(data != NULL); + + if (len == 0) + return 0; + + if (b->isClosed) { + /* + * Should be cli_dbgmsg, but I want to see them for now, + * and cli_dbgmsg doesn't support debug levels + */ + cli_warnmsg("Reopening closed blob\n"); + b->isClosed = 0; + } + /* + * The payoff here is between reducing the number of calls to + * malloc/realloc and not overallocating memory. A lot of machines + * are more tight with memory than one may imagine which is why + * we don't just allocate a *huge* amount and be done with it. Closing + * the blob helps because that reclaims memory. If you know the maximum + * size of a blob before you start adding data, use blobGrow() that's + * the most optimum + */ +#if HAVE_CLI_GETPAGESIZE + if (pagesize == 0) { + pagesize = cli_getpagesize(); + if (pagesize == 0) + pagesize = 4096; + } + growth = pagesize; + if (len >= (size_t)pagesize) + growth = ((len / pagesize) + 1) * pagesize; + + /*cli_dbgmsg("blobGrow: b->size %lu, b->len %lu, len %lu, growth = %u\n", + b->size, b->len, len, growth);*/ + + if (b->data == NULL) { + assert(b->len == 0); + assert(b->size == 0); + + b->size = growth; + b->data = cli_malloc(growth); + if (NULL == b->data) { + b->size = 0; + return -1; + } + } else if (b->size < b->len + (off_t)len) { + unsigned char *p = cli_realloc(b->data, b->size + growth); + + if (p == NULL) + return -1; + + b->size += growth; + b->data = p; + } +#else + if (b->data == NULL) { + assert(b->len == 0); + assert(b->size == 0); + + b->size = (off_t)len * 4; + b->data = cli_malloc(b->size); + if (NULL == b->data) { + b->size = 0; + return -1; + } + } else if (b->size < b->len + (off_t)len) { + unsigned char *p = cli_realloc(b->data, b->size + (len * 4)); + + if (p == NULL) + return -1; + + b->size += (off_t)len * 4; + b->data = p; + } +#endif + + if (b->data) { + memcpy(&b->data[b->len], data, len); + b->len += (off_t)len; + } else { + b->size = 0; + return -1; + } + return 0; +} + +unsigned char * +blobGetData(const blob *b) +{ + assert(b != NULL); +#ifdef CL_DEBUG + assert(b->magic == BLOBCLASS); +#endif + + if (b->len == 0) + return NULL; + return b->data; +} + +size_t +blobGetDataSize(const blob *b) +{ + assert(b != NULL); +#ifdef CL_DEBUG + assert(b->magic == BLOBCLASS); +#endif + + return b->len; +} + +void blobClose(blob *b) +{ + assert(b != NULL); +#ifdef CL_DEBUG + assert(b->magic == BLOBCLASS); +#endif + + if (b->isClosed) { + cli_warnmsg("Attempt to close a previously closed blob\n"); + return; + } + + /* + * Nothing more is going to be added to this blob. If it'll save more + * than a trivial amount (say 64 bytes) of memory, shrink the allocation + */ + if ((b->size - b->len) >= 64) { + if (b->len == 0) { /* Not likely */ + free(b->data); + b->data = NULL; + cli_dbgmsg("blobClose: recovered all %lu bytes\n", + (unsigned long)b->size); + b->size = 0; + } else { + unsigned char *ptr = cli_realloc(b->data, b->len); + + if (ptr == NULL) { + return; + } + + cli_dbgmsg("blobClose: recovered %lu bytes from %lu\n", + (unsigned long)(b->size - b->len), + (unsigned long)b->size); + b->size = b->len; + b->data = ptr; + } + } + b->isClosed = 1; +} + +/* + * Returns 0 if the blobs are the same + */ +int blobcmp(const blob *b1, const blob *b2) +{ + size_t s1, s2; + + assert(b1 != NULL); + assert(b2 != NULL); + + if (b1 == b2) + return 0; + + s1 = blobGetDataSize(b1); + s2 = blobGetDataSize(b2); + + if (s1 != s2) + return 1; + + if ((s1 == 0) && (s2 == 0)) + return 0; + + return memcmp(blobGetData(b1), blobGetData(b2), s1); +} + +/* + * Return clamav return code + */ +int blobGrow(blob *b, size_t len) +{ + assert(b != NULL); +#ifdef CL_DEBUG + assert(b->magic == BLOBCLASS); +#endif + + if (len == 0) + return CL_SUCCESS; + + if (b->isClosed) { + /* + * Should be cli_dbgmsg, but I want to see them for now, + * and cli_dbgmsg doesn't support debug levels + */ + cli_warnmsg("Growing closed blob\n"); + b->isClosed = 0; + } + if (b->data == NULL) { + assert(b->len == 0); + assert(b->size == 0); + + b->data = cli_malloc(len); + if (b->data) + b->size = (off_t)len; + } else { + unsigned char *ptr = cli_realloc(b->data, b->size + len); + + if (ptr) { + b->size += (off_t)len; + b->data = ptr; + } + } + + return (b->data) ? CL_SUCCESS : CL_EMEM; +} + +fileblob * +fileblobCreate(void) +{ +#ifdef CL_DEBUG + fileblob *fb = (fileblob *)cli_calloc(1, sizeof(fileblob)); + if (fb) + fb->b.magic = BLOBCLASS; + cli_dbgmsg("blobCreate\n"); + return fb; +#else + return (fileblob *)cli_calloc(1, sizeof(fileblob)); +#endif +} + +/* + * Returns CL_CLEAN or CL_VIRUS. Destroys the fileblob and removes the file + * if possible + */ +int fileblobScanAndDestroy(fileblob *fb) +{ + switch (fileblobScan(fb)) { + case CL_VIRUS: + fileblobDestructiveDestroy(fb); + return CL_VIRUS; + case CL_BREAK: + fileblobDestructiveDestroy(fb); + return CL_CLEAN; + default: + fileblobDestroy(fb); + return CL_CLEAN; + } +} + +/* + * Destroy the fileblob, and remove the file associated with it + */ +void fileblobDestructiveDestroy(fileblob *fb) +{ + if (fb->fp && fb->fullname) { + fclose(fb->fp); + cli_dbgmsg("fileblobDestructiveDestroy: %s\n", fb->fullname); + if (!fb->ctx || !fb->ctx->engine->keeptmp) + cli_unlink(fb->fullname); + free(fb->fullname); + fb->fp = NULL; + fb->fullname = NULL; + } + if (fb->b.name) { + free(fb->b.name); + fb->b.name = NULL; + } + fileblobDestroy(fb); +} + +/* + * Destroy the fileblob, and remove the file associated with it if that file is + * empty + */ +void fileblobDestroy(fileblob *fb) +{ + assert(fb != NULL); +#ifdef CL_DEBUG + assert(fb->b.magic == BLOBCLASS); +#endif + + if (fb->b.name && fb->fp) { + fclose(fb->fp); + if (fb->fullname) { + cli_dbgmsg("fileblobDestroy: %s\n", fb->fullname); + if (!fb->isNotEmpty) { + cli_dbgmsg("fileblobDestroy: not saving empty file\n"); + cli_unlink(fb->fullname); + } + } + free(fb->b.name); + + assert(fb->b.data == NULL); + } else if (fb->b.data) { + free(fb->b.data); + if (fb->b.name) { + cli_errmsg("fileblobDestroy: %s not saved: report to https://github.com/Cisco-Talos/clamav/issues\n", + (fb->fullname) ? fb->fullname : fb->b.name); + free(fb->b.name); + } else + cli_errmsg("fileblobDestroy: file not saved (%lu bytes): report to https://github.com/Cisco-Talos/clamav/issues\n", + (unsigned long)fb->b.len); + } + if (fb->fullname) + free(fb->fullname); +#ifdef CL_DEBUG + fb->b.magic = INVALIDCLASS; +#endif + free(fb); +} + +void fileblobPartialSet(fileblob *fb, const char *fullname, const char *arg) +{ + UNUSEDPARAM(arg); + + if (fb->b.name) + return; + + assert(fullname != NULL); + + cli_dbgmsg("fileblobPartialSet: saving to %s\n", fullname); + + fb->fd = open(fullname, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY | O_EXCL, 0600); + if (fb->fd < 0) { + cli_errmsg("fileblobPartialSet: unable to create file: %s\n", fullname); + return; + } + fb->fp = fdopen(fb->fd, "wb"); + + if (fb->fp == NULL) { + cli_errmsg("fileblobSetFilename: fdopen failed\n"); + close(fb->fd); + return; + } + blobSetFilename(&fb->b, fb->ctx ? fb->ctx->sub_tmpdir : NULL, fullname); + if (fb->b.data) + if (fileblobAddData(fb, fb->b.data, fb->b.len) == 0) { + free(fb->b.data); + fb->b.data = NULL; + fb->b.len = fb->b.size = 0; + fb->isNotEmpty = 1; + } + fb->fullname = cli_strdup(fullname); +} + +void fileblobSetFilename(fileblob *fb, const char *dir, const char *filename) +{ + char *fullname; + + if (fb->b.name) + return; + + assert(filename != NULL); + assert(dir != NULL); + + blobSetFilename(&fb->b, dir, filename); + + /* + * Reload the filename, it may be different from the one we've + * asked for, e.g. '/'s taken out + */ + filename = blobGetFilename(&fb->b); + + assert(filename != NULL); + + if (cli_gentempfd(dir, &fullname, &fb->fd) != CL_SUCCESS) return; + + cli_dbgmsg("fileblobSetFilename: file %s saved to %s\n", filename, fullname); + + fb->fp = fdopen(fb->fd, "wb"); + + if (fb->fp == NULL) { + cli_errmsg("fileblobSetFilename: fdopen failed\n"); + close(fb->fd); + free(fullname); + return; + } + if (fb->b.data) + if (fileblobAddData(fb, fb->b.data, fb->b.len) == 0) { + free(fb->b.data); + fb->b.data = NULL; + fb->b.len = fb->b.size = 0; + fb->isNotEmpty = 1; + } + fb->fullname = fullname; +} + +int fileblobAddData(fileblob *fb, const unsigned char *data, size_t len) +{ + if (len == 0) + return 0; + + assert(data != NULL); + + if (fb->fp) { +#if defined(MAX_SCAN_SIZE) && (MAX_SCAN_SIZE > 0) + const cli_ctx *ctx = fb->ctx; + + if (fb->isInfected) /* pretend all was written */ + return 0; + if (ctx) { + int do_scan = 1; + + if (cli_checklimits("fileblobAddData", ctx, fb->bytes_scanned, 0, 0) != CL_CLEAN) + do_scan = 0; + + if (fb->bytes_scanned > MAX_SCAN_SIZE) + do_scan = 0; + if (do_scan) { + if (ctx->scanned) + *ctx->scanned += (unsigned long)len / CL_COUNT_PRECISION; + fb->bytes_scanned += (unsigned long)len; + + if ((len > 5) && cli_updatelimits(ctx, len) == CL_CLEAN && (cli_scan_buff(data, (unsigned int)len, 0, ctx->virname, ctx->engine, CL_TYPE_BINARY_DATA, NULL) == CL_VIRUS)) { + cli_dbgmsg("fileblobAddData: found %s\n", cli_get_last_virus_str(ctx->virname)); + fb->isInfected = 1; + } + } + } +#endif + + if (fwrite(data, len, 1, fb->fp) != 1) { + cli_errmsg("fileblobAddData: Can't write %lu bytes to temporary file %s\n", + (unsigned long)len, fb->b.name); + return -1; + } + fb->isNotEmpty = 1; + return 0; + } + return blobAddData(&(fb->b), data, len); +} + +const char * +fileblobGetFilename(const fileblob *fb) +{ + return blobGetFilename(&(fb->b)); +} + +void fileblobSetCTX(fileblob *fb, cli_ctx *ctx) +{ + fb->ctx = ctx; +} + +/* + * Performs a full scan on the fileblob, returning ClamAV status: + * CL_BREAK means clean + * CL_CLEAN means unknown + * CL_VIRUS means infected + */ +int fileblobScan(const fileblob *fb) +{ + int rc; + cli_ctx *ctx = fb->ctx; + STATBUF sb; + int virus_found = 0; + + if (fb->isInfected) + return CL_VIRUS; + if (fb->fp == NULL || fb->fullname == NULL) { + /* shouldn't happen, scan called before fileblobSetFilename */ + cli_warnmsg("fileblobScan, fullname == NULL\n"); + return CL_ENULLARG; /* there is no CL_UNKNOWN */ + } + if (fb->ctx == NULL) { + /* fileblobSetCTX hasn't been called */ + cli_dbgmsg("fileblobScan, ctx == NULL\n"); + return CL_CLEAN; /* there is no CL_UNKNOWN */ + } + + fflush(fb->fp); + lseek(fb->fd, 0, SEEK_SET); + FSTAT(fb->fd, &sb); + if (cli_matchmeta(fb->ctx, fb->b.name, sb.st_size, sb.st_size, 0, 0, 0, NULL) == CL_VIRUS) { + if (!SCAN_ALLMATCHES) + return CL_VIRUS; + virus_found = 1; + } + + rc = cli_magic_scan_desc(fb->fd, fb->fullname, fb->ctx, fb->b.name); + if (rc == CL_VIRUS || virus_found != 0) { + cli_dbgmsg("%s is infected\n", fb->fullname); + return CL_VIRUS; + } + cli_dbgmsg("%s is clean\n", fb->fullname); + return CL_BREAK; +} + +/* + * Doesn't perform a full scan just lets the caller know if something suspicious has + * been seen yet + */ +int fileblobInfected(const fileblob *fb) +{ + return fb->isInfected; +} + +/* + * Different operating systems allow different characters in their filenames + * FIXME: What does QNX want? There is no #ifdef C_QNX, but if there were + * it may be best to treat it like MSDOS + */ +void sanitiseName(char *name) +{ + char c; + while ((c = *name)) { + if (c != '.' && c != '_' && (c > 'z' || c < '0' || (c > '9' && c < 'A') || (c > 'Z' && c < 'a'))) + *name = '_'; + name++; + } +} diff --git a/clamscan/libclamav/blob.h b/clamscan/libclamav/blob.h new file mode 100644 index 0000000..00c8b8e --- /dev/null +++ b/clamscan/libclamav/blob.h @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2007-2013 Sourcefire, Inc. + * + * Authors: Nigel Horne + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef __BLOB_H +#define __BLOB_H + +/* + * Resizable chunk of memory + */ +typedef struct blob { + char *name; /* filename */ + unsigned char *data; /* the stuff itself */ + off_t len; /* number of bytes of data so far */ + off_t size; /* number of bytes allocated to data so far */ + int isClosed; +#ifdef CL_DEBUG + object_type magic; /* verify that this is a blob */ +#endif +} blob; + +blob *blobCreate(void); +void blobDestroy(blob *b); +void blobArrayDestroy(blob *b[], int n); +void *blobToMem(blob *b); +void blobSetFilename(blob *b, const char *dir, const char *filename); +int blobAddData(blob *b, const unsigned char *data, size_t len); +unsigned char *blobGetData(const blob *b); +size_t blobGetDataSize(const blob *b); +void blobClose(blob *b); +int blobcmp(const blob *b1, const blob *b2); +int blobGrow(blob *b, size_t len); + +/* + * Like a blob, but associated with a file stored in the temporary directory + */ +typedef struct fileblob { + FILE *fp; + int fd; + blob b; /* + * b.name is the name of the attachment as stored in the + * email, not the full path name of the temporary file + */ + char *fullname; /* full pathname of the file */ + cli_ctx *ctx; /* When set we can scan the blob, otherwise NULL */ + unsigned long bytes_scanned; + unsigned int isNotEmpty : 1; + unsigned int isInfected : 1; +} fileblob; + +fileblob *fileblobCreate(void); +int fileblobScanAndDestroy(fileblob *fb); +void fileblobDestructiveDestroy(fileblob *fb); +void fileblobDestroy(fileblob *fb); +void fileblobSetFilename(fileblob *fb, const char *dir, const char *filename); +void fileblobPartialSet(fileblob *fb, const char *fullname, const char *arg); +const char *fileblobGetFilename(const fileblob *fb); +void fileblobSetCTX(fileblob *fb, cli_ctx *ctx); +int fileblobAddData(fileblob *fb, const unsigned char *data, size_t len); +int fileblobScan(const fileblob *fb); +int fileblobInfected(const fileblob *fb); +void sanitiseName(char *name); + +#endif /*_BLOB_H*/ diff --git a/clamscan/libclamav/builtin_bytecodes.h b/clamscan/libclamav/builtin_bytecodes.h new file mode 100644 index 0000000..813121b --- /dev/null +++ b/clamscan/libclamav/builtin_bytecodes.h @@ -0,0 +1,227 @@ +/* + * Builtin ClamAV bytecodes. + * + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2010-2013 Sourcefire, Inc. + * + * Authors: Török Edvin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifndef BUILTIN_BYTECODES_H +#define BUILTIN_BYTECODES_H + +/* bytecode run on startup with interpreter to determine if JIT/bytecode should + * be disabled. It also runs a minimal self-check. + * There can only be one such bytecode, if there is none this is used as + * fallback. + * Usually bytecode.cvd will contain this bytecode */ + +static const char* builtin_bc_startup = + "ClamBCafhhbfkjmld|afefdfggifnf```aa```|biacflfafmfbfcfmb`cnbacacmbachcccmbgfbfcc`ccchcbfdf``bgcaap`clamcoincidencejb:4096\n" + "\n" + "Teddaaahdabahdacahdadahdaeahdafahdagahebfgebidebegebdgebgdebkdebcgebbgebageb`gebofebnfebmfebedeblfebkfebjfebadcbgab`bb`bb`bb`bb`bb`bb`bbifbifbifbifbifbifbifahahahahahahahahahebneebifaaaaaaaab`baabb`bb`baacb`bbadb`baacb`bboeb`baacb`bb`bb`baadb`bbadb`bb`baadb`bbadbadb`bdbadahdbkaahdbbcahdbibahdb`eahdbddahdbodahdbdaahdaiahdakahdamahdahahdbncahdbnbah\n" + "Ebjdaibcdbbf|bcaefnfgfifnfefoedfcfofnfffoelfeffgeflf``bbdbbf|bkaefnfgfifnfefoeffegnfcfdgifofnfaflfifdgigoelfeffgeflf``agbcf|baadfefbfeggfoe`gbgifnfdgoeegifnfdg``bcabcf|afdgefcgdgbc``afbdf|b`adfefbfeggfoe`gbgifnfdgoecgdgbg``bhdbef|b`agfefdgoeefnffgifbgofnfmfefnfdg``aabff|afdgefcgdgac``bidbgf|bdadfifcgafbflfefoebfigdgefcfofdfefoeifff``bjdbgf|aodfifcgafbflfefoejfifdgoeifff``\n" + "G`b`c`@`b`aAa`bfgBifBkeBccBdcBmeBhcBfcB`bBdfBefBdgBefBcfBdgBefBdfBlbB`bBjdBidBdeB`bBnfBefBefBdfBcgB`bB`gBefBnfBdgBifBegBmfB`bBofBbgB`bBbfBefBdgBdgBefBbg@`bidBifBccBhcBfc@`bidBifBdcBhcBfc@`begBcdB`eBeeB`bBdfBofBefBcgBnfBgbBdgB`bBcgBegB`gB`gBofBbgBdgB`bBcdBmdBodBfeBlbB`bBggBofBegBlfBdfB`bBnfBefBefBdfB`bB`cBnbBicBgcB`bBhbBldBldBfeBmdB`bBbcBnbBhcBibB`bBdgBofB`bBggBofBbgBkfBab@`bidBifBecBhcBfc@`bdgB`gBefBnfBdgBifBegBmf@`bidBifBfcBhcBfc@`bgdBkfBfc@`bidBkfBfcBmbBbc@`bidBkfBfcBmbBcc@`bkdBafBdgBhfBlfBofBnf@`bcgBafBdgBhfBlfBofBnfBmbBdgBbfBifBbgBdf@`bbgBggBifBnfBcfBhfBifB`gBmbBcfBfc@`bagBggBifBnfBcfBhfBifB`gBbc@`bgdBcfBcc@`b`gBbeBgeBheB`bBmfBafB`gB`gBifBnfBgfB`bBdfBefBnfBifBefBdfBnb@`bofBneBceBedBldBifBnfBegBhgB`bBifBcgB`bB`gBbgBefBfgBefBnfBdgBifBnfBgfB`bBgbBefBhgBefBcfBmfBefBmfBgbB`bBafBcfBcfBefBcgBcgBnbAjBbeBegBnfB`bB`bBgbBcgBefBdgBcgBefBbfBofBofBlfB`bBmbB`eB`bBcfBlfBafBmfBdfBoeBegBcgBefBoeBjfBifBdgB`bBofBnfBgbBnb@`bnfBneB`eBafBheB`bBifBcgB`bB`gBbgBefBfgBefBnfBdgBifBnfBgfB`bBgbBmfB`gBbgBofBdgBefBcfBdgBgbB`bBafBcfBcfBefBcgBcgBnbAjBbeBegBnfB`bBgbB`gBafBhgBcfBdgBlfB`bBmbBcfBmfB`bBlcBefBhgBefBcfBegBdgBafBbfBlfBefBncBgb@`bmfBneBbeBgeBheB`bBmfBafB`gB`gBifBnfBgfB`bBdfBefBnfBifBefBdfB`bBffBofBbgB`bBegBnfBkfBnfBofBggBnfB`bBbgBefBafBcgBofBnfBnbB`eBlfBefBafBcgBefB`bBbgBefB`gBofBbgBdgB`bBdgBofB`bBhfBdgBdgB`gBjcBobBobBbfBegBgfBcgBnbBcfBlfBafBmfBafBfgBnbBnfBefBdgAj@`bed@`blfBcgBdgBafBbgBdgBegB`gBjcB`bBbfBigBdgBefBcfBofBdfBefB`bBefBhgBefBcfBegBdgBifBofBnfB`bBifBnfB`bBafBegBdgBofB`bBmfBofBdfBef@`bkfBcgBdgBafBbgBdgBegB`gBjcB`bBbfBigBdgBefBcfBofBdfBefB`bBefBhgBefBcfBegBdgBifBofBnfB`bBggBifBdgBhfB`bBifBnfBdgBefBbgB`gBbgBefBdgBefBbgB`bBofBnfBlfBig@`bjfBcgBdgBafBbgBdgBegB`gBjcB`bBbfBigBdgBefBcfBofBdfBefB`bBdfBifBcgBafBbfBlfBefBdf@`bad@Ab`bad@Ac`bad@Ad`bad@Ae`bad@Af`bad@Ag`bad@Ah`bad@Ai`bad@Aj`bad@Ak`bad@Al`bad@Am`bad@An`bad@Ao`bad@B`a`bad@Baa`bad@Bba`bad@Bca`bad@Bda`bad@Bea`bad@Bfa`bad@Bga`bad@Bha`\n" + "A`b`bLblib`bab`b`b`b`bneab`b`bad`ah`aa`bad`ah`aa`b`f`bad`b`b`aa`b`b`aa`b`b`b`b`b`b`aa`b`b`aa`b`b`aa`b`b`aa`b`b`aa`b`b`aa`b`b`aa`b`b`aa`b`b`aa`b`b`aa`b`b`aa`b`b`aa`b`b`b`b`bad`ah`b`b`b`b`aa`b`b`bad`ah`aa`ah`b`b`b`b`aa`b`b`b`b`aa`b`b`b`b`bad`ah`aa`bad`ah`aa`b`b`aa`b`b`b`b`aa`aa`aa`aa`aa`b`b`b`b`b`b`ah`aa`bcd`b`b`aa`bcd`b`b`bcd`b`b`aa`b`b`aa`b`b`b`b`aa`bad`ah`b`b`aa`b`b`aa`bad`ah`b`b`b`b`bad`ah`b`b`b`b`bad`ah`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`b`bad`ah`b`b`b`b`bcd`b`b`b`b`b`b`bad`ah`b`b`b`b`bcd`b`b`b`b`bcd`b`b`aa`b`b`bcd`b`b`aa`b`b`bcd`b`b`aa`b`b`b`b`aa`b`b`b`b`aa`b`b`b`b`Fbbnbec\n" + "Bb`badabbbhdacClnadbadaedbboeacBdadahafgbaeaaageaahaf@aTaaagblaaa\n" + "BbadahdbboeacB`adahaigbahaaajeaahaiAaaTaaajabbaa\n" + "Bb`fakdbboeacAidbadaldbb`fak@db`bamkbalBja`Aedaaaneab`bam@db`b`bbAadabTaaanadac\n" + "Bb`baokbalBka`Aedaab`aeab`bao@db`bab`ab`ab`b`bbababTbaad\n" + "Bb`bbaabbabbaab`bbbaabcbjdBia`@dbaab`bbcaab`bbdaabdaiab`bbcaBicdTaabdaaebaa\n" + "Bb`bbeakbalBma`Aedaabfaeab`bbea@db`b`bbAadaaTaabfab`aaf\n" + "Bb`bbgakbalBna`Ahdaabhaeab`bbga@db`b`bbAadaaTaabhab`aag\n" + "Bb`bbiakbalBoa`Aedaabjaeab`bbia@db`b`bbAadaaTaabjab`aah\n" + "Bb`bbkakbalB`b`Acdaablaeab`bbka@db`b`bbAadaaTaablab`aai\n" + "Bb`bbmakbalBab`Aedaabnaeab`bbma@db`b`bbAadaaTaabnab`aaj\n" + "Bb`bboakbalBbb`Aedaab`beab`bboa@db`b`bbAadaaTaab`bb`aak\n" + "Bb`bbabkbalBcb`Agdaabbbeab`bbab@db`b`bbAadaaTaabbbb`aal\n" + "Bb`bbcbkbalBdb`Amdaabdbeab`bbcb@db`b`bbAadaaTaabdbb`aam\n" + "Bb`bbebkbalBeb`Akdaabfbeab`bbeb@db`b`bbAadaaTaabfbb`aan\n" + "Bb`bbgbkbalBfb`Aidaabhbeab`bbgb@db`b`bbAadaaTaabhbb`aao\n" + "Bb`bbibkbalBgb`Acdaabjbeab`bbib@db`baa`abjbb`b`bbaaaaTbab`a\n" + "Bb`bbkbbbaabkbb`bblbabcbjdBla`@dbkbTbabaa\n" + "BbadbmbdbboeacBeadahbnbgbbmbb`bbob`abnbb`bb`ck`bobAadaabaceab`bb`c@dTaabacbbabha\n" + "Bb`bbbcabcbjdBhb`@dAadbadbccdbboeacBaadahbdcgbbccaabeceaahbdcAjaTaabecbcabla\n" + "Bahbfcgbbmbb`bbgc`abfcb`bbhck`bgcAbdaabiceab`bbhc@dTaabicbeabda\n" + "Bb`bbjcabcbjdBib`@dAadTbabla\n" + "Bb`bbkck`bgcAhdaablceab`bbkc@dTaablcbgabfa\n" + "Bb`bbmcabcbjdBjb`@dAadTbabla\n" + "Bb`bbncabcbjdBkb`@dAadTbabla\n" + "BbadbocdbboeacBaadahb`dgbbocaabadeaahb`dAjaTaabadbjabia\n" + "BbadbbddbboeacBbadahbcdgbbbdaabddeaahbcdAfaTaabddbjabla\n" + "Bb`bbedk`bobB`adaabfdeab`bbed@dTaabfdblabka\n" + "Bb`bbgdabcbjdBjb`@dAadTbabla\n" + "Bb`bbhdabcbidBlb`@d@daabidnab`bbhdAadTaabidb`bbma\n" + "Baabjdnab`bbhdAbdTaabjdboabna\n" + "Baabkdeab`bbhdAbdTaabkdbcbbdb\n" + "Baabldeab`bbhdAadTaabldbbbbdb\n" + "Baabmdeab`bbhd@dTaabmdbabbdb\n" + "Bb`bbndabbafBmb`@dTbabdb\n" + "Bb`bbodabbafBnb`@dTbabdb\n" + "Bb`bb`eabbafBob`@dTbabdb\n" + "Bahbaegbaeaabbeeaahbae@aTaabbebfbbeb\n" + "BbcdbcedbboeacAddb`bbdegbbceaabeeeab`bbde@db`b`bbEamjnmd`Taabeebdcbfb\n" + "BbcdbfedbboeacAfdb`bbgegbbfebcdbhedbboeacAedb`bbiegbbheaabjeiab`bbgebieb`b`bbEbmjnmd`Taabjebdcbgb\n" + "Bb`bbkeab`bbdaableeab`bbiebkeb`b`bbEcmjnmd`Taablebhbbdc\n" + "Bb`bbmegbbfeb`bbneab`bcdaaboeeab`bbmebneb`b`bbEdmjnmd`Taaboebibbdc\n" + "Bbadb`fdbboeacAndahbafgbb`fb`bbbf`abafaabcflbb`bbdf`abcfaabefeab`bbbfbdfb`b`bbEemjnmd`Taabefbjbbdc\n" + "BbadbffdbboeacBaadahbgfgbbffb`bbhf`abgfb`bbifh`bhfBhadbadbjfdbboeacB`adahbkfgbbjfb`bblf`abkfb`bbmfh`blfBdadbadbnfdbboeacBcadahbofgbbnfb`bb`g`abofb`bbagh`b`gB`adb`bbbggbbheb`bbcgh`bbgAhdb`bbdggbbfeb`bbegl`bmfbifb`bbfgl`begbcgb`bbggl`bfgbdgb`bbhgl`bggbagb`bbigh`bbfBladbadbjgdbboeacAodahbkggbbjgb`bblg`abkgb`bbmgh`blgBhadbcdbngdbboeacAddb`bboggbbngb`bb`hl`bogbigb`bbahl`b`hbmgbadbbhdbboeacBeadahbchgbbbhb`bbdh`abchb`bbehh`bdhBhadbcdbfhdbboeacAcdb`bbghgbbfhb`bbhhl`behbghbcdbihdbboeac@db`bbjhgbbihaabkheab`bbhgbjhTaabkhblbbkb\n" + "Bb`bblhabaagbhgTcab`bEfmjnmd\n" + "BbcdbmhdbboeacAadb`bbnhgbbmhaaboheab`bbahbnhTaabohbnbbmb\n" + "Bb`bb`iabaagbahTcab`bEgmjnmd\n" + "BbcdbaidbboeacAbdb`bbbigbbaiaabcieab`bbhhbbiTaabcib`cbob\n" + "Bb`bbdiabaagbhhTcab`bEhmjnmd\n" + "Bb`bbeiabbaaHonnkm``odHm``oonnkdaabfieab`bbeiHhgfedcbadTaabfibbcbac\n" + "Bb`bbgiabaagbeiTcab`bEimjnmd\n" + "Bb`bbhiababcaDm``odaabiieab`bbhiDo``mdb`b`bbHnejkjgjmd`Taabiibdcbcc\n" + "Bb`bbjiabaagbhiTcab`bF`amjnmd\n" + "Bb`bbkibb`bkiTcab`bbkiE\n"; +/* source-code for builtin_bc_startup: */ +#if 0 +const uint16_t __clambc_kind = BC_STARTUP; +int entrypoint() +{ + // Whole platform specific bugs can be disabled with check_platform, + // see clamscan --debug for meaning of bits. + // For example: + //disable_jit_if("Pax mprotect on, with RWX", 0, + // check_platform(0x0affffff, 0xffffffff, 0x19)); + + struct cli_environment env; + get_environment(&env, sizeof(env)); + if (env.has_jit_compiled) { + /* CPU checks */ + switch (env.arch) { + case arch_i386: + disable_jit_if("i[34]86 detected, JIT needs pentium or better",0, + !memcmp(env.cpu,"i386",5) || + !memcmp(env.cpu,"i486",5)); + if (engine_functionality_level() < FUNC_LEVEL_097) { + /* LLVM 2.7 bug, fixed in 2.8, but only 0.97 has 2.8 */ + /* bug is using CMOV instr, when CPU doesn't support it, 2.8 correctly + * handles this, 2.7 doesn't */ + disable_jit_if("CPU doesn't support CMOV, would need 0.97 (LLVM 2.8) to work!",0, + !memcmp(env.cpu,"i586",5) || + !memcmp(env.cpu,"pentium",8) || + !memcmp(env.cpu,"i686",5) || + !memcmp(env.cpu,"k6",3) || + !memcmp(env.cpu,"k6-2",5) || + !memcmp(env.cpu,"k6-3",5) || + !memcmp(env.cpu,"athlon",7) || + !memcmp(env.cpu,"athlon-tbird",13) || + !memcmp(env.cpu,"winchip-c6",11) || + !memcmp(env.cpu,"winchip2",9) || + !memcmp(env.cpu,"c3",3)); + } + break; + default: + break; + } + + /* RWX checks */ + if (!(env.os_features & (1 << feature_map_rwx))) { + disable_jit_if("RWX mapping denied.", 0, 1); + if (env.os_category == os_linux) { + if (env.os_features & (1 << feature_selinux)) + /* all SELinux versions deny RWX mapping when policy says so */ + disable_jit_if("^SELinux is preventing 'execmem' access.\n" + "Run 'setsebool -P clamd_use_jit on'.", 0, 1); + else if (env.os_features & (1 << feature_pax)) + /* recent versions of PaX deny RWX mapping */ + disable_jit_if("^PaX is preventing 'mprotect' access.\n" + "Run 'paxctl -cm '", 0, 1); + else + /* RWX mapping got denied but apparently not due to SELinux/PaX */ + disable_jit_if("^RWX mapping denied for unknown reason." + "Please report to https://github.com/Cisco-Talos/clamav/issues\n", 0, 1); + } + } else { + if ((env.os_category == os_linux || env.os == llvm_os_Linux) && + (env.os_features & (1 << feature_pax_mprotect))) { + /* older versions of PaX allow RWX mapping but silently degrade it to RW + * mapping and kill the program if it tries to execute. */ + disable_jit_if("^PaX is preventing 'mprotect' access.\n" + "Run 'paxctl -cm '", 0, 1); + } + } + } + int s = disable_bytecode_if("",0,0); + switch (s) { + case 0: + debug("startup: bytecode execution in auto mode"); + break; + case 1: + debug("startup: bytecode execution with interpreter only"); + break; + case 2: + debug("startup: bytecode disabled"); + break; + } + + /* check that the OS information is consistent */ + /* JIT == C++ code compiled */ + if (env.has_jit_compiled && !env.cpp_version) { + return 0xdead1; + } + if (env.dconf_level < env.functionality_level) { + return 0xdead2; + } + if (env.functionality_level != engine_functionality_level()) { + return 0xdead3; + } + if (env.dconf_level != engine_dconf_level()) { + return 0xdead4; + } + if (env.big_endian != __is_bigendian()) { + return 0xdead5; + } + + uint32_t a = (env.os_category << 24) | (env.arch << 20) | + (env.compiler << 16) | (env.functionality_level << 8) | + (env.dconf_level); + uint32_t b = (env.big_endian << 28) | (env.sizeof_ptr << 24) | + env.cpp_version; + uint32_t c = (env.os_features << 24) | env.c_version; + if (a != env.platform_id_a) { + debug_print_uint(a); + return 0xdead6; + } + if (b != env.platform_id_b) { + debug_print_uint(b); + return 0xdead7; + } + if (c != env.platform_id_c) { + debug_print_uint(c); + return 0xdead8; + } + c = test1(0xf00dbeef, 0xbeeff00d); + if (c != 0x12345678) { + debug_print_uint(c); + return 0xdead9; + } + c = test2(0xf00d); + if (c != 0xd00f) { + debug_print_uint(c); + return 0xdead10; + } + + /* magic number to tell libclamav that selftest succeeded */ + return 0xda7aba5e; +} + +#endif +#endif diff --git a/clamscan/libclamav/bytecode.c b/clamscan/libclamav/bytecode.c new file mode 100644 index 0000000..99b3d0e --- /dev/null +++ b/clamscan/libclamav/bytecode.c @@ -0,0 +1,3580 @@ +/* + * Load, and verify ClamAV bytecode. + * + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2009-2013 Sourcefire, Inc. + * + * Authors: Török Edvin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#if HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#include +#include +#include + +#if HAVE_JSON +#include "json.h" +#endif + +#include "dconf.h" +#include "clamav.h" +#include "others.h" +#include "pe.h" +#include "bytecode.h" +#include "bytecode_priv.h" +#include "bytecode_detect.h" +#include "readdb.h" +#include "scanners.h" +#include "bytecode_api.h" +#include "bytecode_api_impl.h" +#include "builtin_bytecodes.h" + +#ifndef MAX_TRACKED_BC +#define MAX_TRACKED_BC 64 +#endif +#define BC_EVENTS_PER_SIG 2 +#define MAX_BC_SIGEVENT_ID MAX_TRACKED_BC *BC_EVENTS_PER_SIG + +cli_events_t *g_sigevents = NULL; +unsigned int g_sigid; + +/* dummy values */ +static const uint32_t nomatch[64] = { + 0xdeadbeef, 0xdeaddead, 0xbeefdead, 0xdeaddead, 0xdeadbeef, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0}; +static const uint32_t nooffsets[64] = { + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, + CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE, CLI_OFF_NONE}; + +static const uint16_t nokind; +static const uint32_t nofilesize; +static const struct cli_pe_hook_data nopedata; + +static void context_safe(struct cli_bc_ctx *ctx) +{ + /* make sure these are never NULL */ + if (!ctx->hooks.kind) + ctx->hooks.kind = &nokind; + if (!ctx->hooks.match_counts) + ctx->hooks.match_counts = nomatch; + if (!ctx->hooks.match_offsets) + ctx->hooks.match_offsets = nooffsets; + if (!ctx->hooks.filesize) + ctx->hooks.filesize = &nofilesize; + if (!ctx->hooks.pedata) + ctx->hooks.pedata = &nopedata; +} + +static int cli_bytecode_context_reset(struct cli_bc_ctx *ctx); +struct cli_bc_ctx *cli_bytecode_context_alloc(void) +{ + struct cli_bc_ctx *ctx = cli_calloc(1, sizeof(*ctx)); + if (!ctx) { + cli_errmsg("Out of memory allocating cli_bytecode_context_reset\n"); + return NULL; + } + ctx->bytecode_timeout = 60000; + cli_bytecode_context_reset(ctx); + return ctx; +} + +void cli_bytecode_context_destroy(struct cli_bc_ctx *ctx) +{ + cli_bytecode_context_clear(ctx); + free(ctx); +} + +int cli_bytecode_context_getresult_file(struct cli_bc_ctx *ctx, char **tempfilename) +{ + int fd; + *tempfilename = ctx->tempfile; + fd = ctx->outfd; + ctx->tempfile = NULL; + ctx->outfd = 0; + return fd; +} + +/* resets bytecode state, so you can run another bytecode with same ctx */ +static int cli_bytecode_context_reset(struct cli_bc_ctx *ctx) +{ + unsigned i; + + free(ctx->opsizes); + ctx->opsizes = NULL; + + free(ctx->values); + ctx->values = NULL; + + free(ctx->operands); + ctx->operands = NULL; + + if (ctx->outfd) { + cli_ctx *cctx = ctx->ctx; + if (ctx->outfd) + close(ctx->outfd); + if (ctx->tempfile && (!cctx || !cctx->engine->keeptmp)) { + cli_unlink(ctx->tempfile); + } + free(ctx->tempfile); + ctx->tempfile = NULL; + ctx->outfd = 0; + } + if (ctx->jsnormdir) { + char fullname[1025]; + cli_ctx *cctx = ctx->ctx; + int fd, ret = CL_CLEAN; + + if (!ctx->found) { + snprintf(fullname, 1024, "%s" PATHSEP "javascript", ctx->jsnormdir); + fd = open(fullname, O_RDONLY | O_BINARY); + if (fd >= 0) { + cctx->next_layer_is_normalized = true; // This flag ingested by cli_recursion_stack_push(). + + ret = cli_scan_desc(fd, cctx, CL_TYPE_HTML, 0, NULL, AC_SCAN_VIR, NULL, NULL); + if (ret == CL_CLEAN) { + if (lseek(fd, 0, SEEK_SET) == -1) + cli_dbgmsg("cli_bytecode: call to lseek() has failed\n"); + else { + cctx->next_layer_is_normalized = true; // This flag ingested by cli_recursion_stack_push(). + + ret = cli_scan_desc(fd, cctx, CL_TYPE_TEXT_ASCII, 0, NULL, AC_SCAN_VIR, NULL, NULL); + } + } + close(fd); + } + } + if (!cctx || !cctx->engine->keeptmp) { + cli_rmdirs(ctx->jsnormdir); + } + free(ctx->jsnormdir); + if (ret != CL_CLEAN) + ctx->found = 1; + } + ctx->numParams = 0; + ctx->funcid = 0; + /* don't touch fmap, file_size, and hooks, sections, ctx, timeout, pdf* */ + ctx->off = 0; + ctx->written = 0; + ctx->jsnormwritten = 0; +#if USE_MPOOL + if (ctx->mpool) { + mpool_destroy(ctx->mpool); + ctx->mpool = NULL; + } +#else + /*TODO: implement for no-mmap case too*/ +#endif + for (i = 0; i < ctx->ninflates; i++) + cli_bcapi_inflate_done(ctx, i); + free(ctx->inflates); + ctx->inflates = NULL; + ctx->ninflates = 0; + + for (i = 0; i < ctx->nlzmas; i++) + cli_bcapi_lzma_done(ctx, i); + free(ctx->lzmas); + ctx->lzmas = NULL; + ctx->nlzmas = 0; + +#if HAVE_BZLIB_H + for (i = 0; i < ctx->nbzip2s; i++) + cli_bcapi_bzip2_done(ctx, i); + free(ctx->bzip2s); + ctx->bzip2s = NULL; + ctx->nbzip2s = 0; +#endif + + for (i = 0; i < ctx->nbuffers; i++) + cli_bcapi_buffer_pipe_done(ctx, i); + free(ctx->buffers); + ctx->buffers = NULL; + ctx->nbuffers = 0; + + for (i = 0; i < ctx->nhashsets; i++) + cli_bcapi_hashset_done(ctx, i); + free(ctx->hashsets); + ctx->hashsets = NULL; + ctx->nhashsets = 0; + + for (i = 0; i < ctx->njsnorms; i++) + cli_bcapi_jsnorm_done(ctx, i); + free(ctx->jsnorms); + ctx->jsnorms = NULL; + ctx->njsnorms = 0; + ctx->jsnormdir = NULL; + + for (i = 0; i < ctx->nmaps; i++) + cli_bcapi_map_done(ctx, i); + free(ctx->maps); + ctx->maps = NULL; + ctx->nmaps = 0; + + /* Use input_switch() to free the extracted file fmap, if one exists */ + cli_bcapi_input_switch(ctx, 0); + +#if HAVE_JSON + free((json_object **)(ctx->jsonobjs)); + ctx->jsonobjs = NULL; + ctx->njsonobjs = 0; +#endif + + ctx->containertype = CL_TYPE_ANY; + return CL_SUCCESS; +} + +int cli_bytecode_context_clear(struct cli_bc_ctx *ctx) +{ + cli_bytecode_context_reset(ctx); + memset(ctx, 0, sizeof(*ctx)); + return CL_SUCCESS; +} + +static unsigned typesize(const struct cli_bc *bc, uint16_t type) +{ + struct cli_bc_type *ty; + unsigned j; + + type &= 0x7fff; + if (!type) + return 0; + if (type <= 8) + return 1; + if (type <= 16) + return 2; + if (type <= 32) + return 4; + if (type <= 64) + return 8; + ty = &bc->types[type - 65]; + if (ty->size) + return ty->size; + switch (ty->kind) { + case 2: + case 3: + for (j = 0; j < ty->numElements; j++) + ty->size += typesize(bc, ty->containedTypes[j]); + break; + case 4: + ty->size = ty->numElements * typesize(bc, ty->containedTypes[0]); + break; + default: + break; + } + if (!ty->size && ty->kind != DFunctionType) { + cli_warnmsg("type %d size is 0\n", type - 65); + } + return ty->size; +} + +static unsigned typealign(const struct cli_bc *bc, uint16_t type) +{ + type &= 0x7fff; + if (type <= 64) { + unsigned size = typesize(bc, type); + return size ? size : 1; + } + return bc->types[type - 65].align; +} + +int cli_bytecode_context_setfuncid(struct cli_bc_ctx *ctx, const struct cli_bc *bc, unsigned funcid) +{ + unsigned i, s = 0; + const struct cli_bc_func *func; + if (funcid >= bc->num_func) { + cli_errmsg("bytecode: function ID doesn't exist: %u\n", funcid); + return CL_EARG; + } + func = ctx->func = &bc->funcs[funcid]; + ctx->bc = bc; + ctx->numParams = func->numArgs; + ctx->funcid = funcid; + if (func->numArgs) { + ctx->operands = cli_malloc(sizeof(*ctx->operands) * func->numArgs); + if (!ctx->operands) { + cli_errmsg("bytecode: error allocating memory for parameters\n"); + return CL_EMEM; + } + ctx->opsizes = cli_malloc(sizeof(*ctx->opsizes) * func->numArgs); + if (!ctx->opsizes) { + cli_errmsg("bytecode: error allocating memory for opsizes\n"); + return CL_EMEM; + } + for (i = 0; i < func->numArgs; i++) { + unsigned al = typealign(bc, func->types[i]); + s = (s + al - 1) & ~(al - 1); + ctx->operands[i] = s; + s += ctx->opsizes[i] = typesize(bc, func->types[i]); + } + } + s += 8; /* return value */ + ctx->bytes = s; + ctx->values = cli_malloc(s); + if (!ctx->values) { + cli_errmsg("bytecode: error allocating memory for parameters\n"); + return CL_EMEM; + } + return CL_SUCCESS; +} + +static inline int type_isint(uint16_t type) +{ + return type > 0 && type <= 64; +} + +int cli_bytecode_context_setparam_int(struct cli_bc_ctx *ctx, unsigned i, uint64_t c) +{ + if (i >= ctx->numParams) { + cli_errmsg("bytecode: param index out of bounds: %u\n", i); + return CL_EARG; + } + if (!type_isint(ctx->func->types[i])) { + cli_errmsg("bytecode: parameter type mismatch\n"); + return CL_EARG; + } + switch (ctx->opsizes[i]) { + case 1: + ctx->values[ctx->operands[i]] = c; + break; + case 2: + *(uint16_t *)&ctx->values[ctx->operands[i]] = c; + break; + case 4: + *(uint32_t *)&ctx->values[ctx->operands[i]] = c; + break; + case 8: + *(uint64_t *)&ctx->values[ctx->operands[i]] = c; + break; + } + return CL_SUCCESS; +} + +int cli_bytecode_context_setparam_ptr(struct cli_bc_ctx *ctx, unsigned i, void *data, unsigned datalen) +{ + UNUSEDPARAM(ctx); + UNUSEDPARAM(i); + UNUSEDPARAM(data); + UNUSEDPARAM(datalen); + cli_errmsg("Pointer parameters are not implemented yet!\n"); + return CL_EARG; +} + +static inline uint64_t readNumber(const unsigned char *p, unsigned *off, unsigned len, char *ok) +{ + uint64_t n = 0; + unsigned i, newoff, lim, p0 = p[*off], shift = 0; + + lim = p0 - 0x60; + if (lim > 0x10) { + cli_errmsg("Invalid number type: %c\n", p0); + *ok = 0; + return 0; + } + newoff = *off + lim + 1; + if (newoff > len) { + cli_errmsg("End of line encountered while reading number\n"); + *ok = 0; + return 0; + } + + if (p0 == 0x60) { + *off = newoff; + return 0; + } + + for (i = *off + 1; i < newoff; i++) { + uint64_t v = p[i]; + if (UNLIKELY((v & 0xf0) != 0x60)) { + cli_errmsg("Invalid number part: %c\n", (char)v); + *ok = 0; + return 0; + } + v &= 0xf; + v <<= shift; + n |= v; + shift += 4; + } + *off = newoff; + return n; +} + +static inline funcid_t readFuncID(struct cli_bc *bc, unsigned char *p, + unsigned *off, unsigned len, char *ok) +{ + funcid_t id = readNumber(p, off, len, ok) - 1; + if (*ok && id >= bc->num_func) { + cli_errmsg("Called function out of range: %u >= %u\n", id, bc->num_func); + *ok = 0; + return ~0; + } + return id; +} + +static inline funcid_t readAPIFuncID(struct cli_bc *bc, unsigned char *p, + unsigned *off, unsigned len, char *ok) +{ + funcid_t id = readNumber(p, off, len, ok) - 1; + if (*ok && !cli_bitset_test(bc->uses_apis, id)) { + cli_errmsg("Called undeclared API function: %u\n", id); + *ok = 0; + return ~0; + } + return id; +} + +static inline unsigned readFixedNumber(const unsigned char *p, unsigned *off, + unsigned len, char *ok, unsigned width) +{ + unsigned i, n = 0, shift = 0; + unsigned newoff = *off + width; + if (newoff > len) { + cli_errmsg("Newline encountered while reading number\n"); + *ok = 0; + return 0; + } + for (i = *off; i < newoff; i++) { + unsigned v = p[i]; + if (UNLIKELY((v & 0xf0) != 0x60)) { + cli_errmsg("Invalid number part: %c\n", v); + *ok = 0; + return 0; + } + v &= 0xf; + v <<= shift; + n |= v; + shift += 4; + } + *off = newoff; + return n; +} + +static inline operand_t readOperand(struct cli_bc_func *func, unsigned char *p, + unsigned *off, unsigned len, char *ok) +{ + uint64_t v; + if ((p[*off] & 0xf0) == 0x40 || p[*off] == 0x50) { + uint64_t *dest; + uint16_t ty; + p[*off] |= 0x20; + /* TODO: unique constants */ + func->constants = cli_realloc2(func->constants, (func->numConstants + 1) * sizeof(*func->constants)); + if (!func->constants) { + *ok = 0; + return MAX_OP; + } + v = readNumber(p, off, len, ok); + dest = &func->constants[func->numConstants]; + /* Write the constant to the correct place according to its type. + * This is needed on big-endian machines, because constants are always + * read as u64, but accessed as one of these types: u8, u16, u32, u64 */ + *dest = 0; + ty = 8 * readFixedNumber(p, off, len, ok, 1); + if (!ty) { + /* This is a global variable */ + return 0x80000000 | v; + } + if (ty <= 8) + *(uint8_t *)dest = v; + else if (ty <= 16) + *(uint16_t *)dest = v; + else if (ty <= 32) + *(uint32_t *)dest = v; + else + *dest = v; + return func->numValues + func->numConstants++; + } + v = readNumber(p, off, len, ok); + if (!*ok) + return MAX_OP; + if (v >= func->numValues) { + cli_errmsg("Operand index exceeds bounds: %u >= %u!\n", (unsigned)v, (unsigned)func->numValues); + *ok = 0; + return MAX_OP; + } + return v; +} + +static inline char *readData(const unsigned char *p, unsigned *off, unsigned len, char *ok, unsigned *datalen) +{ + unsigned char *dat, *q; + unsigned l, newoff, i; + if (p[*off] != '|') { + cli_errmsg("Data start marker missing: %c\n", p[*off]); + *ok = 0; + return NULL; + } + (*off)++; + l = readNumber(p, off, len, ok); + if (!l || !ok) { + *datalen = l; + return NULL; + } + newoff = *off + 2 * l; + if (newoff > len) { + cli_errmsg("Line ended while reading data\n"); + *ok = 0; + return 0; + } + dat = cli_malloc(l); + if (!dat) { + cli_errmsg("Cannot allocate memory for data\n"); + *ok = 0; + return NULL; + } + q = dat; + for (i = *off; i < newoff; i += 2) { + const unsigned char v0 = p[i]; + const unsigned char v1 = p[i + 1]; + if (UNLIKELY((v0 & 0xf0) != 0x60 || (v1 & 0xf0) != 0x60)) { + cli_errmsg("Invalid data part: %c%c\n", v0, v1); + *ok = 0; + free(dat); + return 0; + } + *q++ = (v0 & 0xf) | ((v1 & 0xf) << 4); + } + *off = newoff; + *datalen = l; + return (char *)dat; +} + +static inline char *readString(const unsigned char *p, unsigned *off, unsigned len, char *ok) +{ + unsigned stringlen = 0; + char *str = readData(p, off, len, ok, &stringlen); + if (*ok && stringlen && str[stringlen - 1] != '\0') { + str[stringlen - 1] = '\0'; + cli_errmsg("bytecode: string missing \\0 terminator: %s\n", str); + free(str); + *ok = 0; + return NULL; + } + return str; +} + +static int parseHeader(struct cli_bc *bc, unsigned char *buffer, unsigned *linelength) +{ + uint64_t magic1; + unsigned magic2; + char ok = 1; + unsigned offset, len, flevel; + char *pos; + + if (strncmp((const char *)buffer, BC_HEADER, sizeof(BC_HEADER) - 1)) { + cli_errmsg("Missing file magic in bytecode"); + return CL_EMALFDB; + } + offset = sizeof(BC_HEADER) - 1; + len = strlen((const char *)buffer); + bc->metadata.formatlevel = readNumber(buffer, &offset, len, &ok); + if (!ok) { + cli_errmsg("Unable to parse (format) functionality level in bytecode header\n"); + return CL_EMALFDB; + } + /* we support 2 bytecode formats */ + if (bc->metadata.formatlevel != BC_FORMAT_096 && + bc->metadata.formatlevel != BC_FORMAT_LEVEL) { + cli_dbgmsg("Skipping bytecode with (format) functionality level: %u (current %u)\n", + bc->metadata.formatlevel, BC_FORMAT_LEVEL); + return CL_BREAK; + } + /* Optimistic parsing, check for error only at the end.*/ + bc->metadata.timestamp = readNumber(buffer, &offset, len, &ok); + bc->metadata.sigmaker = readString(buffer, &offset, len, &ok); + bc->metadata.targetExclude = readNumber(buffer, &offset, len, &ok); + bc->kind = readNumber(buffer, &offset, len, &ok); + bc->metadata.minfunc = readNumber(buffer, &offset, len, &ok); + bc->metadata.maxfunc = readNumber(buffer, &offset, len, &ok); + flevel = cl_retflevel(); + /* in 0.96 these 2 fields are unused / zero, in post 0.96 these mean + * min/max flevel. + * So 0 for min/max means no min/max + * Note that post 0.96 bytecode/bytecode lsig needs format 7, because + * 0.96 doesn't check lsig functionality level. + */ + if ((bc->metadata.minfunc && bc->metadata.minfunc > flevel) || + (bc->metadata.maxfunc && bc->metadata.maxfunc < flevel)) { + cli_dbgmsg("Skipping bytecode with (engine) functionality level %u-%u (current %u)\n", + bc->metadata.minfunc, bc->metadata.maxfunc, flevel); + return CL_BREAK; + } + bc->metadata.maxresource = readNumber(buffer, &offset, len, &ok); + bc->metadata.compiler = readString(buffer, &offset, len, &ok); + bc->num_types = readNumber(buffer, &offset, len, &ok); + bc->num_func = readNumber(buffer, &offset, len, &ok); + bc->state = bc_loaded; + bc->uses_apis = NULL; + bc->dbgnodes = NULL; + bc->dbgnode_cnt = 0; + if (!ok) { + cli_errmsg("Invalid bytecode header at %u\n", offset); + return CL_EMALFDB; + } + magic1 = readNumber(buffer, &offset, len, &ok); + magic2 = readFixedNumber(buffer, &offset, len, &ok, 2); + if (!ok || magic1 != 0x53e5493e9f3d1c30ull || magic2 != 42) { + unsigned long m0 = magic1 >> 32; + unsigned long m1 = magic1; + cli_errmsg("Magic numbers don't match: %lx%lx, %u\n", m0, m1, magic2); + return CL_EMALFDB; + } + if (buffer[offset] != ':') { + cli_errmsg("Expected : but found: %c\n", buffer[offset]); + return CL_EMALFDB; + } + offset++; + *linelength = strtol((const char *)buffer + offset, &pos, 10); + if (*pos != '\0') { + cli_errmsg("Invalid number: %s\n", buffer + offset); + return CL_EMALFDB; + } + + bc->funcs = cli_calloc(bc->num_func, sizeof(*bc->funcs)); + if (!bc->funcs) { + cli_errmsg("Out of memory allocating %u functions\n", bc->num_func); + return CL_EMEM; + } + bc->types = cli_calloc(bc->num_types, sizeof(*bc->types)); + if (!bc->types) { + cli_errmsg("Out of memory allocating %u types\n", bc->num_types); + return CL_EMEM; + } + return CL_SUCCESS; +} + +static int parseLSig(struct cli_bc *bc, char *buffer) +{ + const char *prefix; + char *vnames, *vend = strchr(buffer, ';'); + if (vend) { + bc->lsig = cli_strdup(buffer); + *vend++ = '\0'; + prefix = buffer; + vnames = strchr(vend, '{'); + } else { + /* Not a logical signature, but we still have a virusname */ + bc->hook_name = cli_strdup(buffer); + bc->lsig = NULL; + } + + return CL_SUCCESS; +} + +static uint16_t readTypeID(struct cli_bc *bc, unsigned char *buffer, + unsigned *offset, unsigned len, char *ok) +{ + uint64_t t = readNumber(buffer, offset, len, ok); + if (!ok) + return ~0; + if (t >= bc->num_types + bc->start_tid) { + cli_errmsg("Invalid type id: %llu\n", (unsigned long long)t); + *ok = 0; + return ~0; + } + return t; +} + +static void parseType(struct cli_bc *bc, struct cli_bc_type *ty, + unsigned char *buffer, unsigned *off, unsigned len, + char *ok) +{ + unsigned j; + + ty->numElements = readNumber(buffer, off, len, ok); + if (!*ok) { + cli_errmsg("Error parsing type\n"); + *ok = 0; + return; + } + ty->containedTypes = cli_malloc(sizeof(*ty->containedTypes) * ty->numElements); + if (!ty->containedTypes) { + cli_errmsg("Out of memory allocating %u types\n", ty->numElements); + *ok = 0; + return; + } + for (j = 0; j < ty->numElements; j++) { + ty->containedTypes[j] = readTypeID(bc, buffer, off, len, ok); + } +} + +static uint16_t containedTy[] = {8, 16, 32, 64}; + +#define NUM_STATIC_TYPES 4 +static void add_static_types(struct cli_bc *bc) +{ + unsigned i; + for (i = 0; i < NUM_STATIC_TYPES; i++) { + bc->types[i].kind = DPointerType; + bc->types[i].numElements = 1; + bc->types[i].containedTypes = &containedTy[i]; + bc->types[i].size = bc->types[i].align = 8; + } +} + +static int parseTypes(struct cli_bc *bc, unsigned char *buffer) +{ + unsigned i, offset = 1, len = strlen((const char *)buffer); + char ok = 1; + + if (buffer[0] != 'T') { + cli_errmsg("Invalid function types header: %c\n", buffer[0]); + return CL_EMALFDB; + } + bc->start_tid = readFixedNumber(buffer, &offset, len, &ok, 2); + if (bc->start_tid != BC_START_TID) { + cli_warnmsg("Type start id mismatch: %u != %u\n", bc->start_tid, + BC_START_TID); + return CL_BREAK; + } + add_static_types(bc); + for (i = (BC_START_TID - 65); i < bc->num_types - 1; i++) { + struct cli_bc_type *ty = &bc->types[i]; + uint8_t t = readFixedNumber(buffer, &offset, len, &ok, 1); + if (!ok) { + cli_errmsg("Error reading type kind\n"); + return CL_EMALFDB; + } + switch (t) { + case 1: + ty->kind = DFunctionType; + ty->size = ty->align = sizeof(void *); + parseType(bc, ty, buffer, &offset, len, &ok); + if (!ok) { + cli_errmsg("Error parsing type %u\n", i); + return CL_EMALFDB; + } + if (!ty->numElements) { + cli_errmsg("Function with no return type? %u\n", i); + return CL_EMALFDB; + } + break; + case 2: + case 3: + ty->kind = (t == 2) ? DPackedStructType : DStructType; + ty->size = ty->align = 0; /* TODO:calculate size/align of structs */ + ty->align = 8; + parseType(bc, ty, buffer, &offset, len, &ok); + if (!ok) { + cli_errmsg("Error parsing type %u\n", i); + return CL_EMALFDB; + } + break; + case 4: + ty->kind = DArrayType; + /* number of elements of array, not subtypes! */ + ty->numElements = readNumber(buffer, &offset, len, &ok); + if (!ok) { + cli_errmsg("Error parsing type %u\n", i); + return CL_EMALFDB; + } + /* fall-through */ + case 5: + if (t == 5) { + ty->kind = DPointerType; + ty->numElements = 1; + } + ty->containedTypes = cli_malloc(sizeof(*ty->containedTypes)); + if (!ty->containedTypes) { + cli_errmsg("Out of memory allocating containedType\n"); + return CL_EMALFDB; + } + ty->containedTypes[0] = readTypeID(bc, buffer, &offset, len, &ok); + if (!ok) { + cli_errmsg("Error parsing type %u\n", i); + return CL_EMALFDB; + } + if (t == 5) { + /* for interpreter, pointers 64-bit there */ + ty->size = ty->align = 8; + } else { + ty->size = ty->numElements * typesize(bc, ty->containedTypes[0]); + ty->align = typealign(bc, ty->containedTypes[0]); + } + break; + default: + cli_errmsg("Invalid type kind: %u\n", t); + return CL_EMALFDB; + } + } + for (i = (BC_START_TID - 65); i < bc->num_types - 1; i++) { + struct cli_bc_type *ty = &bc->types[i]; + if (ty->kind == DArrayType) { + ty->size = ty->numElements * typesize(bc, ty->containedTypes[0]); + ty->align = typealign(bc, ty->containedTypes[0]); + } + } + return CL_SUCCESS; +} + +/* checks whether the type described by tid is the same as the one described by + * apitid. */ +static int types_equal(const struct cli_bc *bc, uint16_t *apity2ty, uint16_t tid, uint16_t apitid) +{ + unsigned i; + const struct cli_bc_type *ty = &bc->types[tid - 65]; + const struct cli_bc_type *apity = &cli_apicall_types[apitid]; + /* If we've already verified type equality, return. + * Since we need to check equality of recursive types, we assume types are + * equal while checking equality of contained types, unless proven + * otherwise. */ + if (apity2ty[apitid] == tid + 1) + return 1; + apity2ty[apitid] = tid + 1; + + if (ty->kind != apity->kind) { + cli_dbgmsg("bytecode: type kind mismatch: %u != %u\n", ty->kind, apity->kind); + return 0; + } + if (ty->numElements != apity->numElements) { + cli_dbgmsg("bytecode: type numElements mismatch: %u != %u\n", ty->numElements, apity->numElements); + return 0; + } + for (i = 0; i < ty->numElements; i++) { + if (apity->containedTypes[i] < BC_START_TID) { + if (ty->containedTypes[i] != apity->containedTypes[i]) { + cli_dbgmsg("bytecode: contained type mismatch: %u != %u\n", + ty->containedTypes[i], apity->containedTypes[i]); + return 0; + } + } else if (!types_equal(bc, apity2ty, ty->containedTypes[i], apity->containedTypes[i] - BC_START_TID)) + return 0; + if (ty->kind == DArrayType) + break; /* validated the contained type already */ + } + return 1; +} + +static int parseApis(struct cli_bc *bc, unsigned char *buffer) +{ + unsigned i, offset = 1, len = strlen((const char *)buffer), maxapi, calls; + char ok = 1; + uint16_t *apity2ty; /*map of api type to current bytecode type ID */ + + if (buffer[0] != 'E') { + cli_errmsg("bytecode: Invalid api header: %c\n", buffer[0]); + return CL_EMALFDB; + } + + maxapi = readNumber(buffer, &offset, len, &ok); + if (!ok) + return CL_EMALFDB; + if (maxapi > cli_apicall_maxapi) { + cli_dbgmsg("bytecode using API %u, but highest API known to libclamav is %u, skipping\n", maxapi, cli_apicall_maxapi); + return CL_BREAK; + } + calls = readNumber(buffer, &offset, len, &ok); + if (!ok) + return CL_EMALFDB; + if (calls > maxapi) { + cli_errmsg("bytecode: attempting to describe more APIs than max: %u > %u\n", calls, maxapi); + return CL_EMALFDB; + } + bc->uses_apis = cli_bitset_init(); + if (!bc->uses_apis) { + cli_errmsg("Out of memory allocating apis bitset\n"); + return CL_EMEM; + } + apity2ty = cli_calloc(cli_apicall_maxtypes, sizeof(*cli_apicall_types)); + if (!apity2ty) { + cli_errmsg("Out of memory allocating apity2ty\n"); + return CL_EMEM; + } + for (i = 0; i < calls; i++) { + unsigned id = readNumber(buffer, &offset, len, &ok); + uint16_t tid = readTypeID(bc, buffer, &offset, len, &ok); + char *name = readString(buffer, &offset, len, &ok); + + /* validate APIcall prototype */ + if (id > maxapi) { + cli_errmsg("bytecode: API id %u out of range, max %u\n", id, maxapi); + ok = 0; + } + /* API ids start from 1 */ + id--; + if (ok && name && strcmp(cli_apicalls[id].name, name)) { + cli_errmsg("bytecode: API %u name mismatch: %s expected %s\n", id, name, cli_apicalls[id].name); + ok = 0; + } + if (ok && !types_equal(bc, apity2ty, tid, cli_apicalls[id].type)) { + cli_errmsg("bytecode: API %u prototype doesn't match\n", id); + ok = 0; + } + /* don't need the name anymore */ + free(name); + if (!ok) { + free(apity2ty); /* free temporary map */ + return CL_EMALFDB; + } + + /* APIcall is valid */ + cli_bitset_set(bc->uses_apis, id); + } + free(apity2ty); /* free temporary map */ + cli_dbgmsg("bytecode: Parsed %u APIcalls, maxapi %u\n", calls, maxapi); + return CL_SUCCESS; +} + +static uint16_t type_components(struct cli_bc *bc, uint16_t id, char *ok) +{ + unsigned i, sum = 0; + const struct cli_bc_type *ty; + if (id <= 64) + return 1; + ty = &bc->types[id - 65]; + /* TODO: protect against recursive types */ + switch (ty->kind) { + case DFunctionType: + cli_errmsg("bytecode: function type not accepted for constant: %u\n", id); + /* don't accept functions as constant initializers */ + *ok = 0; + return 0; + case DPointerType: + return 2; + case DStructType: + case DPackedStructType: + for (i = 0; i < ty->numElements; i++) { + sum += type_components(bc, ty->containedTypes[i], ok); + } + return sum; + case DArrayType: + return type_components(bc, ty->containedTypes[0], ok) * ty->numElements; + default: + *ok = 0; + return 0; + } +} + +static void readConstant(struct cli_bc *bc, unsigned i, unsigned comp, + unsigned char *buffer, unsigned *offset, + unsigned len, char *ok) +{ + unsigned j = 0; + if (*ok && buffer[*offset] == 0x40 && + buffer[*offset + 1] == 0x60) { + /* zero initializer */ + memset(bc->globals[i], 0, sizeof(*bc->globals[0]) * comp); + (*offset) += 2; + return; + } + while (*ok && buffer[*offset] != 0x60) { + if (j >= comp) { + cli_errmsg("bytecode: constant has too many subcomponents, expected %u\n", comp); + *ok = 0; + return; + } + buffer[*offset] |= 0x20; + bc->globals[i][j++] = readNumber(buffer, offset, len, ok); + } + if (*ok && j != comp) { + cli_errmsg("bytecode: constant has too few subcomponents: %u < %u\n", j, comp); + *ok = 0; + } + (*offset)++; +} + +/* parse constant globals with constant initializers */ +static int parseGlobals(struct cli_bc *bc, unsigned char *buffer) +{ + unsigned i, offset = 1, len = strlen((const char *)buffer), numglobals; + unsigned maxglobal; + char ok = 1; + + if (buffer[0] != 'G') { + cli_errmsg("bytecode: Invalid globals header: %c\n", buffer[0]); + return CL_EMALFDB; + } + maxglobal = readNumber(buffer, &offset, len, &ok); + if (maxglobal > cli_apicall_maxglobal) { + cli_dbgmsg("bytecode using global %u, but highest global known to libclamav is %u, skipping\n", maxglobal, cli_apicall_maxglobal); + return CL_BREAK; + } + numglobals = readNumber(buffer, &offset, len, &ok); + bc->globals = cli_calloc(numglobals, sizeof(*bc->globals)); + if (!bc->globals) { + cli_errmsg("bytecode: OOM allocating memory for %u globals\n", numglobals); + return CL_EMEM; + } + bc->globaltys = cli_calloc(numglobals, sizeof(*bc->globaltys)); + if (!bc->globaltys) { + cli_errmsg("bytecode: OOM allocating memory for %u global types\n", numglobals); + return CL_EMEM; + } + bc->num_globals = numglobals; + if (!ok) + return CL_EMALFDB; + for (i = 0; i < numglobals; i++) { + unsigned comp; + bc->globaltys[i] = readTypeID(bc, buffer, &offset, len, &ok); + comp = type_components(bc, bc->globaltys[i], &ok); + if (!ok) + return CL_EMALFDB; + 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); + } + if (!ok) + return CL_EMALFDB; + if (offset != len) { + cli_errmsg("Trailing garbage in globals: %d extra bytes\n", + len - offset); + return CL_EMALFDB; + } + return CL_SUCCESS; +} + +static int parseMD(struct cli_bc *bc, unsigned char *buffer) +{ + unsigned offset = 1, len = strlen((const char *)buffer); + unsigned numMD, i, b; + char ok = 1; + if (buffer[0] != 'D') + return CL_EMALFDB; + numMD = readNumber(buffer, &offset, len, &ok); + if (!ok) { + cli_errmsg("Unable to parse number of MD nodes\n"); + return CL_EMALFDB; + } + b = bc->dbgnode_cnt; + bc->dbgnode_cnt += numMD; + bc->dbgnodes = cli_realloc(bc->dbgnodes, bc->dbgnode_cnt * sizeof(*bc->dbgnodes)); + if (!bc->dbgnodes) + return CL_EMEM; + for (i = 0; i < numMD; i++) { + unsigned j; + struct cli_bc_dbgnode_element *elts; + unsigned el = readNumber(buffer, &offset, len, &ok); + if (!ok) { + cli_errmsg("Unable to parse number of elements\n"); + return CL_EMALFDB; + } + bc->dbgnodes[b + i].numelements = el; + bc->dbgnodes[b + i].elements = elts = cli_calloc(el, sizeof(*elts)); + if (!elts) + return CL_EMEM; + for (j = 0; j < el; j++) { + if (buffer[offset] == '|') { + elts[j].string = readData(buffer, &offset, len, &ok, &elts[j].len); + if (!ok) + return CL_EMALFDB; + } else { + elts[j].len = readNumber(buffer, &offset, len, &ok); + if (!ok) + return CL_EMALFDB; + if (elts[j].len) { + elts[j].constant = readNumber(buffer, &offset, len, &ok); + } else + elts[j].nodeid = readNumber(buffer, &offset, len, &ok); + if (!ok) + return CL_EMALFDB; + } + } + } + cli_dbgmsg("bytecode: Parsed %u nodes total\n", bc->dbgnode_cnt); + return CL_SUCCESS; +} + +static int parseFunctionHeader(struct cli_bc *bc, unsigned fn, unsigned char *buffer) +{ + char ok = 1; + unsigned offset, len, all_locals = 0, i; + struct cli_bc_func *func; + + if (fn >= bc->num_func) { + cli_errmsg("Found more functions than declared: %u >= %u\n", fn, + bc->num_func); + return CL_EMALFDB; + } + func = &bc->funcs[fn]; + len = strlen((const char *)buffer); + + if (buffer[0] != 'A') { + cli_errmsg("Invalid function arguments header: %c\n", buffer[0]); + return CL_EMALFDB; + } + offset = 1; + func->numArgs = readFixedNumber(buffer, &offset, len, &ok, 1); + func->returnType = readTypeID(bc, buffer, &offset, len, &ok); + if (buffer[offset] != 'L') { + cli_errmsg("Invalid function locals header: %c\n", buffer[offset]); + return CL_EMALFDB; + } + offset++; + func->numLocals = readNumber(buffer, &offset, len, &ok); + if (!ok) { + cli_errmsg("Invalid number of arguments/locals\n"); + return CL_EMALFDB; + } + all_locals = func->numArgs + func->numLocals; + if (!all_locals) { + func->types = NULL; + } else { + func->types = cli_calloc(all_locals, sizeof(*func->types)); + if (!func->types) { + cli_errmsg("Out of memory allocating function arguments\n"); + return CL_EMEM; + } + } + for (i = 0; i < all_locals; i++) { + func->types[i] = readNumber(buffer, &offset, len, &ok); + if (readFixedNumber(buffer, &offset, len, &ok, 1)) + func->types[i] |= 0x8000; + } + if (!ok) { + cli_errmsg("Invalid local types\n"); + return CL_EMALFDB; + } + if (buffer[offset] != 'F') { + cli_errmsg("Invalid function body header: %c\n", buffer[offset]); + return CL_EMALFDB; + } + offset++; + func->numInsts = readNumber(buffer, &offset, len, &ok); + if (!ok) { + cli_errmsg("Invalid instructions count\n"); + return CL_EMALFDB; + } + func->numValues = func->numArgs + func->numLocals; + func->insn_idx = 0; + func->numConstants = 0; + func->allinsts = cli_calloc(func->numInsts, sizeof(*func->allinsts)); + if (!func->allinsts) { + cli_errmsg("Out of memory allocating instructions\n"); + return CL_EMEM; + } + func->numBB = readNumber(buffer, &offset, len, &ok); + if (!ok) { + cli_errmsg("Invalid basic block count\n"); + return CL_EMALFDB; + } + func->BB = cli_calloc(func->numBB, sizeof(*func->BB)); + if (!func->BB) { + cli_errmsg("Out of memory allocating basic blocks\n"); + return CL_EMEM; + } + return CL_SUCCESS; +} + +static bbid_t readBBID(struct cli_bc_func *func, const unsigned char *buffer, unsigned *off, unsigned len, char *ok) +{ + unsigned id = readNumber(buffer, off, len, ok); + if (!id || id >= func->numBB) { + cli_errmsg("Basic block ID out of range: %u\n", id); + *ok = 0; + } + if (!*ok) + return ~0; + return id; +} + +/* +static uint16_t get_type(struct cli_bc_func *func, operand_t op) +{ + if (op >= func->numValues) + return 64; + return func->types[op]; +}*/ +static int16_t get_optype(const struct cli_bc_func *bcfunc, operand_t op) +{ + if (op >= bcfunc->numArgs + bcfunc->numLocals) + return 0; + return bcfunc->types[op] & 0x7fff; +} + +static int parseBB(struct cli_bc *bc, unsigned func, unsigned bb, unsigned char *buffer) +{ + char ok = 1; + unsigned offset, len, i, last = 0; + struct cli_bc_bb *BB; + struct cli_bc_func *bcfunc = &bc->funcs[func]; + struct cli_bc_inst inst; + + if (bb >= bcfunc->numBB) { + cli_errmsg("Found too many basic blocks\n"); + return CL_EMALFDB; + } + + BB = &bcfunc->BB[bb]; + len = strlen((const char *)buffer); + if (buffer[0] != 'B') { + cli_errmsg("Invalid basic block header: %c\n", buffer[0]); + return CL_EMALFDB; + } + offset = 1; + BB->numInsts = 0; + BB->insts = &bcfunc->allinsts[bcfunc->insn_idx]; + while (!last) { + unsigned numOp; + if (buffer[offset] == 'T') { + last = 1; + offset++; + /* terminators are void */ + inst.type = 0; + inst.dest = 0; + } else { + inst.type = readNumber(buffer, &offset, len, &ok); + inst.dest = readNumber(buffer, &offset, len, &ok); + } + inst.opcode = readFixedNumber(buffer, &offset, len, &ok, 2); + if (!ok) { + cli_errmsg("Invalid type or operand\n"); + return CL_EMALFDB; + } + if (inst.opcode >= OP_BC_INVALID) { + cli_errmsg("Invalid opcode: %u\n", inst.opcode); + return CL_EMALFDB; + } + + switch (inst.opcode) { + case OP_BC_JMP: + inst.u.jump = readBBID(bcfunc, buffer, &offset, len, &ok); + break; + case OP_BC_RET: + inst.type = readNumber(buffer, &offset, len, &ok); + inst.u.unaryop = readOperand(bcfunc, buffer, &offset, len, &ok); + break; + case OP_BC_BRANCH: + inst.u.branch.condition = readOperand(bcfunc, buffer, &offset, len, &ok); + inst.u.branch.br_true = readBBID(bcfunc, buffer, &offset, len, &ok); + inst.u.branch.br_false = readBBID(bcfunc, buffer, &offset, len, &ok); + break; + case OP_BC_CALL_API: /* fall-through */ + case OP_BC_CALL_DIRECT: + numOp = readFixedNumber(buffer, &offset, len, &ok, 1); + if (ok) { + inst.u.ops.numOps = numOp; + inst.u.ops.opsizes = NULL; + if (!numOp) { + inst.u.ops.ops = NULL; + } else { + inst.u.ops.ops = cli_calloc(numOp, sizeof(*inst.u.ops.ops)); + if (!inst.u.ops.ops) { + cli_errmsg("Out of memory allocating operands\n"); + return CL_EMEM; + } + } + if (inst.opcode == OP_BC_CALL_DIRECT) + inst.u.ops.funcid = readFuncID(bc, buffer, &offset, len, &ok); + else + inst.u.ops.funcid = readAPIFuncID(bc, buffer, &offset, len, &ok); + for (i = 0; i < numOp; i++) { + inst.u.ops.ops[i] = readOperand(bcfunc, buffer, &offset, len, &ok); + } + } + break; + case OP_BC_ZEXT: + case OP_BC_SEXT: + case OP_BC_TRUNC: + inst.u.cast.source = readOperand(bcfunc, buffer, &offset, len, &ok); + inst.u.cast.mask = bcfunc->types[inst.u.cast.source]; + if (inst.u.cast.mask == 1) + inst.u.cast.size = 0; + else if (inst.u.cast.mask <= 8) + inst.u.cast.size = 1; + else if (inst.u.cast.mask <= 16) + inst.u.cast.size = 2; + else if (inst.u.cast.mask <= 32) + inst.u.cast.size = 3; + else if (inst.u.cast.mask <= 64) + inst.u.cast.size = 4; + /* calculate mask */ + if (inst.opcode != OP_BC_SEXT) + inst.u.cast.mask = inst.u.cast.mask != 64 ? (1ull << inst.u.cast.mask) - 1 : ~0ull; + break; + case OP_BC_GEP1: + case OP_BC_GEPZ: + inst.u.three[0] = readNumber(buffer, &offset, len, &ok); + inst.u.three[1] = readOperand(bcfunc, buffer, &offset, len, &ok); + inst.u.three[2] = readOperand(bcfunc, buffer, &offset, len, &ok); + break; + case OP_BC_GEPN: + numOp = readFixedNumber(buffer, &offset, len, &ok, 1); + if (ok) { + inst.u.ops.numOps = numOp + 2; + inst.u.ops.opsizes = NULL; + inst.u.ops.ops = cli_calloc(numOp + 2, sizeof(*inst.u.ops.ops)); + if (!inst.u.ops.ops) { + cli_errmsg("Out of memory allocating operands\n"); + return CL_EMEM; + } + inst.u.ops.ops[0] = readNumber(buffer, &offset, len, &ok); + for (i = 1; i < numOp + 2; i++) + inst.u.ops.ops[i] = readOperand(bcfunc, buffer, &offset, len, &ok); + } + break; + case OP_BC_ICMP_EQ: + case OP_BC_ICMP_NE: + case OP_BC_ICMP_UGT: + case OP_BC_ICMP_UGE: + case OP_BC_ICMP_ULT: + case OP_BC_ICMP_ULE: + case OP_BC_ICMP_SGT: + case OP_BC_ICMP_SGE: + case OP_BC_ICMP_SLE: + case OP_BC_ICMP_SLT: + /* instruction type must be correct before readOperand! */ + inst.type = readNumber(buffer, &offset, len, &ok); + /* fall-through */ + default: + numOp = operand_counts[inst.opcode]; + switch (numOp) { + case 0: + break; + case 1: + inst.u.unaryop = readOperand(bcfunc, buffer, &offset, len, &ok); + break; + case 2: + inst.u.binop[0] = readOperand(bcfunc, buffer, &offset, len, &ok); + inst.u.binop[1] = readOperand(bcfunc, buffer, &offset, len, &ok); + break; + case 3: + inst.u.three[0] = readOperand(bcfunc, buffer, &offset, len, &ok); + inst.u.three[1] = readOperand(bcfunc, buffer, &offset, len, &ok); + inst.u.three[2] = readOperand(bcfunc, buffer, &offset, len, &ok); + break; + default: + cli_errmsg("Opcode %u with too many operands: %u?\n", inst.opcode, numOp); + ok = 0; + break; + } + } + if (inst.opcode == OP_BC_STORE) { + int16_t t = get_optype(bcfunc, inst.u.binop[0]); + if (t) + inst.type = t; + } + if (inst.opcode == OP_BC_COPY) + inst.type = get_optype(bcfunc, inst.u.binop[1]); + if (!ok) { + cli_errmsg("Invalid instructions or operands\n"); + return CL_EMALFDB; + } + if (bcfunc->insn_idx + BB->numInsts >= bcfunc->numInsts) { + cli_errmsg("More instructions than declared in total: %u > %u!\n", + bcfunc->insn_idx + BB->numInsts, bcfunc->numInsts); + return CL_EMALFDB; + } + inst.interp_op = inst.opcode * 5; + if (inst.type > 1) { + if (inst.type <= 8) + inst.interp_op += 1; + else if (inst.type <= 16) + inst.interp_op += 2; + else if (inst.type <= 32) + inst.interp_op += 3; + else if (inst.type <= 65) + inst.interp_op += 4; + else { + cli_dbgmsg("unknown inst type: %d\n", inst.type); + } + } + BB->insts[BB->numInsts++] = inst; + } + if (bb + 1 == bc->funcs[func].numBB) { + if (buffer[offset] != 'E') { + cli_errmsg("Missing basicblock terminator, got: %c\n", buffer[offset]); + return CL_EMALFDB; + } + offset++; + } + if (buffer[offset] == 'D') { + uint32_t num; + offset += 3; + if (offset >= len) + return CL_EMALFDB; + num = (uint32_t)readNumber(buffer, &offset, len, &ok); + if (!ok) + return CL_EMALFDB; + if (num != bcfunc->numInsts) { + cli_errmsg("invalid number of dbg nodes, expected: %u, got: %u\n", bcfunc->numInsts, num); + return CL_EMALFDB; + } + bcfunc->dbgnodes = cli_malloc(num * sizeof(*bcfunc->dbgnodes)); + if (!bcfunc->dbgnodes) { + cli_errmsg("Unable to allocate memory for dbg nodes: %u\n", num * (uint32_t)sizeof(*bcfunc->dbgnodes)); + return CL_EMEM; + } + for (i = 0; (uint32_t)i < num; i++) { + bcfunc->dbgnodes[i] = readNumber(buffer, &offset, len, &ok); + if (!ok) + return CL_EMALFDB; + } + } + if (offset != len) { + cli_errmsg("Trailing garbage in basicblock: %d extra bytes\n", + len - offset); + return CL_EMALFDB; + } + bcfunc->numBytes = 0; + bcfunc->insn_idx += BB->numInsts; + return CL_SUCCESS; +} + +enum parse_state { + PARSE_BC_TYPES = 0, + PARSE_BC_APIS, + PARSE_BC_GLOBALS, + PARSE_BC_LSIG, + PARSE_MD_OPT_HEADER, + PARSE_FUNC_HEADER, + PARSE_BB, + PARSE_SKIP +}; + +struct sigperf_elem { + const char *bc_name; + uint64_t usecs; + unsigned long run_count; + unsigned long match_count; +}; + +static int sigelem_comp(const void *a, const void *b) +{ + const struct sigperf_elem *ela = a; + const struct sigperf_elem *elb = b; + return elb->usecs / elb->run_count - ela->usecs / ela->run_count; +} + +void cli_sigperf_print() +{ + struct sigperf_elem stats[MAX_TRACKED_BC], *elem = stats; + int i, elems = 0, max_name_len = 0, name_len; + + if (!g_sigid || !g_sigevents) { + cli_warnmsg("cli_sigperf_print: statistics requested but no bytecodes were loaded!\n"); + return; + } + + memset(stats, 0, sizeof(stats)); + for (i = 0; i < MAX_TRACKED_BC; i++) { + union ev_val val; + uint32_t count; + const char *name = cli_event_get_name(g_sigevents, i * BC_EVENTS_PER_SIG); + cli_event_get(g_sigevents, i * BC_EVENTS_PER_SIG, &val, &count); + if (!count) { + if (name) + cli_dbgmsg("No event triggered for %s\n", name); + continue; + } + if (name) + name_len = (int)strlen(name); + else + name_len = 0; + if (name_len > max_name_len) + max_name_len = name_len; + elem->bc_name = name ? name : "\"noname\""; + elem->usecs = val.v_int; + elem->run_count = count; + cli_event_get(g_sigevents, i * BC_EVENTS_PER_SIG + 1, &val, &count); + elem->match_count = count; + elem++; + elems++; + } + if (max_name_len < (int)strlen("Bytecode name")) + max_name_len = (int)strlen("Bytecode name"); + + cli_qsort(stats, elems, sizeof(struct sigperf_elem), sigelem_comp); + + elem = stats; + /* name runs matches microsecs avg */ + cli_infomsg(NULL, "%-*s %*s %*s %*s %*s\n", max_name_len, "Bytecode name", + 8, "#runs", 8, "#matches", 12, "usecs total", 9, "usecs avg"); + cli_infomsg(NULL, "%-*s %*s %*s %*s %*s\n", max_name_len, "=============", + 8, "=====", 8, "========", 12, "===========", 9, "========="); + while (elem->run_count) { + cli_infomsg(NULL, "%-*s %*lu %*lu %*" PRIu64 " %*.2f\n", max_name_len, elem->bc_name, + 8, elem->run_count, 8, elem->match_count, + 12, elem->usecs, 9, (double)elem->usecs / elem->run_count); + elem++; + } +} + +static void sigperf_events_init(struct cli_bc *bc) +{ + int ret; + char *bc_name; + + if (!g_sigevents) + g_sigevents = cli_events_new(MAX_BC_SIGEVENT_ID); + + if (!g_sigevents) { + cli_errmsg("No memory for events table\n"); + return; + } + + if (g_sigid > MAX_BC_SIGEVENT_ID - BC_EVENTS_PER_SIG - 1) { + cli_errmsg("sigperf_events_init: events table full. Increase MAX_TRACKED_BC\n"); + return; + } + + if (!(bc_name = bc->lsig)) { + if (!(bc_name = bc->hook_name)) { + cli_dbgmsg("cli_event_define error for time event id %d\n", bc->sigtime_id); + return; + } + } + + cli_dbgmsg("sigperf_events_init(): adding sig ids starting %u for %s\n", g_sigid, bc_name); + + /* register time event */ + bc->sigtime_id = g_sigid; + ret = cli_event_define(g_sigevents, g_sigid++, bc_name, ev_time, multiple_sum); + if (ret) { + cli_errmsg("sigperf_events_init: cli_event_define() error for time event id %d\n", bc->sigtime_id); + bc->sigtime_id = MAX_BC_SIGEVENT_ID + 1; + return; + } + + /* register match count */ + bc->sigmatch_id = g_sigid; + ret = cli_event_define(g_sigevents, g_sigid++, bc_name, ev_int, multiple_sum); + if (ret) { + cli_errmsg("sigperf_events_init: cli_event_define() error for matches event id %d\n", bc->sigmatch_id); + bc->sigmatch_id = MAX_BC_SIGEVENT_ID + 1; + return; + } +} + +void cli_sigperf_events_destroy() +{ + cli_events_free(g_sigevents); +} + +int cli_bytecode_load(struct cli_bc *bc, FILE *f, struct cli_dbio *dbio, int trust, int sigperf) +{ + unsigned row = 0, current_func = 0, bb = 0; + char *buffer; + unsigned linelength = 0; + char firstbuf[FILEBUFF]; + enum parse_state state; + int rc, end = 0; + + memset(bc, 0, sizeof(*bc)); + cli_dbgmsg("Loading %s bytecode\n", trust ? "trusted" : "untrusted"); + bc->trusted = trust; + if (!f && !dbio) { + cli_errmsg("Unable to load bytecode (null file)\n"); + return CL_ENULLARG; + } + if (!cli_dbgets(firstbuf, FILEBUFF, f, dbio)) { + cli_errmsg("Unable to load bytecode (empty file)\n"); + return CL_EMALFDB; + } + cli_chomp(firstbuf); + rc = parseHeader(bc, (unsigned char *)firstbuf, &linelength); + state = PARSE_BC_LSIG; + if (rc == CL_BREAK) { + const char *len = strchr(firstbuf, ':'); + bc->state = bc_skip; + if (!linelength) { + linelength = len ? atoi(len + 1) : 4096; + } + if (linelength < 4096) + linelength = 4096; + cli_dbgmsg("line: %d\n", linelength); + state = PARSE_SKIP; + rc = CL_SUCCESS; + } + if (rc != CL_SUCCESS) { + cli_errmsg("Error at bytecode line %u\n", row); + return rc; + } + buffer = cli_malloc(linelength); + if (!buffer) { + cli_errmsg("Out of memory allocating line of length %u\n", linelength); + return CL_EMEM; + } + while (cli_dbgets(buffer, linelength, f, dbio) && !end) { + cli_chomp(buffer); + row++; + switch (state) { + case PARSE_BC_LSIG: + rc = parseLSig(bc, buffer); +#if 0 +DEAD CODE + if (rc == CL_BREAK) /* skip */ { //FIXME: parseLSig always returns CL_SUCCESS + bc->state = bc_skip; + state = PARSE_SKIP; + continue; + } + if (rc != CL_SUCCESS) { //FIXME: parseLSig always returns CL_SUCCESS + cli_errmsg("Error at bytecode line %u\n", row); + free(buffer); + return rc; + } +#endif + state = PARSE_BC_TYPES; + break; + case PARSE_BC_TYPES: + rc = parseTypes(bc, (unsigned char *)buffer); + if (rc != CL_SUCCESS) { + cli_errmsg("Error at bytecode line %u\n", row); + free(buffer); + return rc; + } + state = PARSE_BC_APIS; + break; + case PARSE_BC_APIS: + rc = parseApis(bc, (unsigned char *)buffer); + if (rc == CL_BREAK) /* skip */ { + bc->state = bc_skip; + state = PARSE_SKIP; + continue; + } + if (rc != CL_SUCCESS) { + cli_errmsg("Error at bytecode line %u\n", row); + free(buffer); + return rc; + } + state = PARSE_BC_GLOBALS; + break; + case PARSE_BC_GLOBALS: + rc = parseGlobals(bc, (unsigned char *)buffer); + if (rc == CL_BREAK) /* skip */ { + bc->state = bc_skip; + state = PARSE_SKIP; + continue; + } + if (rc != CL_SUCCESS) { + cli_errmsg("Error at bytecode line %u\n", row); + free(buffer); + return rc; + } + state = PARSE_MD_OPT_HEADER; + break; + case PARSE_MD_OPT_HEADER: + if (buffer[0] == 'D') { + rc = parseMD(bc, (unsigned char *)buffer); + if (rc != CL_SUCCESS) { + cli_errmsg("Error at bytecode line %u\n", row); + free(buffer); + return rc; + } + break; + } + /* fall-through */ + case PARSE_FUNC_HEADER: + if (*buffer == 'S') { + end = 1; + break; + } + rc = parseFunctionHeader(bc, current_func, (unsigned char *)buffer); + if (rc != CL_SUCCESS) { + cli_errmsg("Error at bytecode line %u\n", row); + free(buffer); + return rc; + } + bb = 0; + state = PARSE_BB; + break; + case PARSE_BB: + rc = parseBB(bc, current_func, bb++, (unsigned char *)buffer); + if (rc != CL_SUCCESS) { + cli_errmsg("Error at bytecode line %u\n", row); + free(buffer); + return rc; + } + if (bb >= bc->funcs[current_func].numBB) { + if (bc->funcs[current_func].insn_idx != bc->funcs[current_func].numInsts) { + cli_errmsg("Parsed different number of instructions than declared: %u != %u\n", + bc->funcs[current_func].insn_idx, bc->funcs[current_func].numInsts); + free(buffer); + return CL_EMALFDB; + } + cli_dbgmsg("Parsed %u BBs, %u instructions\n", + bb, bc->funcs[current_func].numInsts); + state = PARSE_FUNC_HEADER; + current_func++; + } + break; + case PARSE_SKIP: + /* stop at S (source code), readdb.c knows how to skip this one + * */ + if (buffer[0] == 'S') + end = 1; + /* noop parse, but we need to use dbgets with dynamic buffer, + * otherwise we get 'Line too long for provided buffer' */ + break; + } + } + free(buffer); + cli_dbgmsg("Parsed %d functions\n", current_func); + if (sigperf) + sigperf_events_init(bc); + if (current_func != bc->num_func && bc->state != bc_skip) { + cli_errmsg("Loaded less functions than declared: %u vs. %u\n", + current_func, bc->num_func); + return CL_EMALFDB; + } + return CL_SUCCESS; +} + +static struct { + enum bc_events id; + const char *name; + enum ev_type type; + enum multiple_handling multiple; +} bc_events[] = { + {BCEV_VIRUSNAME, "virusname", ev_string, multiple_last}, + {BCEV_EXEC_RETURNVALUE, "returnvalue", ev_int, multiple_last}, + {BCEV_WRITE, "bcapi_write", ev_data_fast, multiple_sum}, + {BCEV_OFFSET, "read offset", ev_int, multiple_sum}, + {BCEV_READ, "read data", ev_data_fast, multiple_sum}, + //{BCEV_READ, "read data", ev_data, multiple_concat}, + {BCEV_DBG_STR, "debug message", ev_data_fast, multiple_sum}, + {BCEV_DBG_INT, "debug int", ev_int, multiple_sum}, + {BCEV_MEM_1, "memmem 1", ev_data_fast, multiple_sum}, + {BCEV_MEM_2, "memmem 2", ev_data_fast, multiple_sum}, + {BCEV_FIND, "find", ev_data_fast, multiple_sum}, + {BCEV_EXTRACTED, "extracted files", ev_int, multiple_sum}, + {BCEV_READ_ERR, "read errors", ev_int, multiple_sum}, + {BCEV_DISASM_FAIL, "disasm fails", ev_int, multiple_sum}, + {BCEV_EXEC_TIME, "bytecode execute", ev_time, multiple_sum}}; + +static int register_events(cli_events_t *ev) +{ + size_t i; + for (i = 0; i < sizeof(bc_events) / sizeof(bc_events[0]); i++) { + if (cli_event_define(ev, bc_events[i].id, bc_events[i].name, bc_events[i].type, + bc_events[i].multiple) == -1) + return -1; + } + return 0; +} + +int cli_bytecode_run(const struct cli_all_bc *bcs, const struct cli_bc *bc, struct cli_bc_ctx *ctx) +{ + int ret = CL_SUCCESS; + struct cli_bc_inst inst; + struct cli_bc_func func; + cli_events_t *jit_ev = NULL, *interp_ev = NULL; + + int test_mode = 0; + cli_ctx *cctx = (cli_ctx *)ctx->ctx; + + if (!ctx || !ctx->bc || !ctx->func) + return CL_ENULLARG; + if (ctx->numParams && (!ctx->values || !ctx->operands)) + return CL_ENULLARG; + + if (cctx && cctx->engine->bytecode_mode == CL_BYTECODE_MODE_TEST) + test_mode = 1; + + if (bc->state == bc_loaded) { + cli_errmsg("bytecode has to be prepared either for interpreter or JIT!\n"); + return CL_EARG; + } + if (bc->state == bc_disabled) { + cli_dbgmsg("bytecode triggered but running bytecodes is disabled\n"); + return CL_SUCCESS; + } + if (cctx) + cli_event_time_start(cctx->perf, PERFT_BYTECODE); + ctx->env = &bcs->env; + context_safe(ctx); + if (test_mode) { + jit_ev = cli_events_new(BCEV_LASTEVENT); + interp_ev = cli_events_new(BCEV_LASTEVENT); + if (!jit_ev || !interp_ev) { + cli_events_free(jit_ev); + cli_events_free(interp_ev); + return CL_EMEM; + } + if (register_events(jit_ev) == -1 || + register_events(interp_ev) == -1) { + cli_events_free(jit_ev); + cli_events_free(interp_ev); + return CL_EBYTECODE_TESTFAIL; + } + } + cli_event_time_start(g_sigevents, bc->sigtime_id); + if (bc->state == bc_interp || test_mode) { + ctx->bc_events = interp_ev; + memset(&func, 0, sizeof(func)); + func.numInsts = 1; + func.numValues = 1; + func.numConstants = 0; + func.numBytes = ctx->bytes; + memset(ctx->values + ctx->bytes - 8, 0, 8); + + inst.opcode = OP_BC_CALL_DIRECT; + inst.interp_op = OP_BC_CALL_DIRECT * 5; + inst.dest = func.numArgs; + inst.type = 0; + inst.u.ops.numOps = ctx->numParams; + inst.u.ops.funcid = ctx->funcid; + inst.u.ops.ops = ctx->operands; + inst.u.ops.opsizes = ctx->opsizes; + cli_dbgmsg("Bytecode %u: executing in interpreter mode\n", bc->id); + + ctx->on_jit = 0; + + cli_event_time_start(interp_ev, BCEV_EXEC_TIME); + ret = cli_vm_execute(ctx->bc, ctx, &func, &inst); + cli_event_time_stop(interp_ev, BCEV_EXEC_TIME); + + cli_event_int(interp_ev, BCEV_EXEC_RETURNVALUE, ret); + cli_event_string(interp_ev, BCEV_VIRUSNAME, ctx->virname); + + /* need to be called here to catch any extracted but not yet scanned files + */ + if (ctx->outfd && (ret != CL_VIRUS || cctx->options->general & CL_SCAN_GENERAL_ALLMATCHES)) + cli_bcapi_extract_new(ctx, -1); + } + if (bc->state == bc_jit || test_mode) { + if (test_mode) { + ctx->off = 0; + } + ctx->bc_events = jit_ev; + cli_dbgmsg("Bytecode %u: executing in JIT mode\n", bc->id); + + ctx->on_jit = 1; + cli_event_time_start(jit_ev, BCEV_EXEC_TIME); + ret = cli_vm_execute_jit(bcs, ctx, &bc->funcs[ctx->funcid]); + cli_event_time_stop(jit_ev, BCEV_EXEC_TIME); + + cli_event_int(jit_ev, BCEV_EXEC_RETURNVALUE, ret); + cli_event_string(jit_ev, BCEV_VIRUSNAME, ctx->virname); + + /* need to be called here to catch any extracted but not yet scanned files + */ + if (ctx->outfd && (ret != CL_VIRUS || cctx->options->general & CL_SCAN_GENERAL_ALLMATCHES)) + cli_bcapi_extract_new(ctx, -1); + } + cli_event_time_stop(g_sigevents, bc->sigtime_id); + if (ctx->virname) + cli_event_count(g_sigevents, bc->sigmatch_id); + + if (test_mode) { + unsigned interp_errors = cli_event_errors(interp_ev); + unsigned jit_errors = cli_event_errors(jit_ev); + unsigned interp_warns = 0, jit_warns = 0; + int ok = 1; + enum bc_events evid; + + if (interp_errors || jit_errors) { + cli_infomsg(cctx, "bytecode %d encountered %u JIT and %u interpreter errors\n", + bc->id, interp_errors, jit_errors); + ok = 0; + } + if (!ctx->no_diff && cli_event_diff_all(interp_ev, jit_ev, NULL)) { + cli_infomsg(cctx, "bytecode %d execution different with JIT and interpreter, see --debug for details\n", + bc->id); + ok = 0; + } + for (evid = BCEV_API_WARN_BEGIN + 1; evid < BCEV_API_WARN_END; evid++) { + union ev_val v; + uint32_t count = 0; + cli_event_get(interp_ev, evid, &v, &count); + interp_warns += count; + count = 0; + cli_event_get(jit_ev, evid, &v, &count); + jit_warns += count; + } + if (interp_warns || jit_warns) { + cli_infomsg(cctx, "bytecode %d encountered %u JIT and %u interpreter warnings\n", + bc->id, interp_warns, jit_warns); + ok = 0; + } + /*cli_event_debug(jit_ev, BCEV_EXEC_TIME); + cli_event_debug(interp_ev, BCEV_EXEC_TIME); + cli_event_debug(g_sigevents, bc->sigtime_id);*/ + if (!ok) { + cli_events_free(jit_ev); + cli_events_free(interp_ev); + return CL_EBYTECODE_TESTFAIL; + } + } + cli_events_free(jit_ev); + cli_events_free(interp_ev); + if (cctx) + cli_event_time_stop(cctx->perf, PERFT_BYTECODE); + return ret; +} + +uint64_t cli_bytecode_context_getresult_int(struct cli_bc_ctx *ctx) +{ + return *(uint32_t *)ctx->values; /*XXX*/ +} + +void cli_bytecode_destroy(struct cli_bc *bc) +{ + unsigned i, j, k; + free(bc->metadata.compiler); + free(bc->metadata.sigmaker); + + if (bc->funcs) { + for (i = 0; i < bc->num_func; i++) { + struct cli_bc_func *f = &bc->funcs[i]; + if (!f) + continue; + free(f->types); + + for (j = 0; j < f->numBB; j++) { + struct cli_bc_bb *BB = &f->BB[j]; + for (k = 0; k < BB->numInsts; k++) { + struct cli_bc_inst *ii = &BB->insts[k]; + if (operand_counts[ii->opcode] > 3 || + ii->opcode == OP_BC_CALL_DIRECT || ii->opcode == OP_BC_CALL_API) { + free(ii->u.ops.ops); + free(ii->u.ops.opsizes); + } + } + } + free(f->BB); + free(f->allinsts); + free(f->constants); + } + free(bc->funcs); + } + if (bc->types) { + for (i = NUM_STATIC_TYPES; i < bc->num_types; i++) { + if (bc->types[i].containedTypes) + free(bc->types[i].containedTypes); + } + free(bc->types); + } + + if (bc->globals) { + for (i = 0; i < bc->num_globals; i++) { + free(bc->globals[i]); + } + free(bc->globals); + } + if (bc->dbgnodes) { + for (i = 0; i < bc->dbgnode_cnt; i++) { + for (j = 0; j < bc->dbgnodes[i].numelements; j++) { + struct cli_bc_dbgnode_element *el = &bc->dbgnodes[i].elements[j]; + if (el && el->string) + free(el->string); + } + } + free(bc->dbgnodes); + } + free(bc->globaltys); + if (bc->uses_apis) + cli_bitset_free(bc->uses_apis); + free(bc->lsig); + free(bc->hook_name); + free(bc->globalBytes); + memset(bc, 0, sizeof(*bc)); +} + +#define MAP(val) \ + do { \ + operand_t o = val; \ + if (o & 0x80000000) { \ + o &= 0x7fffffff; \ + if (o > bc->num_globals) { \ + cli_errmsg("bytecode: global out of range: %u > %u, for instruction %u in function %u\n", \ + o, (unsigned)bc->num_globals, j, i); \ + free(map); \ + free(gmap); \ + return CL_EBYTECODE; \ + } \ + val = 0x80000000 | gmap[o]; \ + break; \ + } \ + if (o >= totValues) { \ + cli_errmsg("bytecode: operand out of range: %u > %u, for instruction %u in function %u\n", o, totValues, j, i); \ + free(map); \ + free(gmap); \ + return CL_EBYTECODE; \ + } \ + val = map[o]; \ + } while (0) + +#define MAPPTR(val) \ + { \ + if ((val < bcfunc->numValues) && bcfunc->types[val] & 0x8000) \ + val = map[val] | 0x40000000; \ + else \ + MAP(val); \ + } + +static inline int64_t ptr_compose(int32_t id, uint32_t offset) +{ + uint64_t i = id; + return (i << 32) | offset; +} + +static inline int get_geptypesize(const struct cli_bc *bc, uint16_t tid) +{ + const struct cli_bc_type *ty; + if (tid >= bc->num_types + 65) { + cli_errmsg("bytecode: typeid out of range %u >= %u\n", tid, bc->num_types); + return -1; + } + if (tid <= 64) { + cli_errmsg("bytecode: invalid type for gep (%u)\n", tid); + return -1; + } + ty = &bc->types[tid - 65]; + if (ty->kind != DPointerType) { + cli_errmsg("bytecode: invalid gep type, must be pointer: %u\n", tid); + return -1; + } + return typesize(bc, ty->containedTypes[0]); +} + +static int calc_gepz(struct cli_bc *bc, struct cli_bc_func *func, uint16_t tid, operand_t op) +{ + unsigned off = 0, i; + uint32_t *gepoff; + const struct cli_bc_type *ty; + if (tid >= bc->num_types + 65) { + cli_errmsg("bytecode: typeid out of range %u >= %u\n", tid, bc->num_types); + return -1; + } + if (tid <= 65) { + cli_errmsg("bytecode: invalid type for gep (%u)\n", tid); + return -1; + } + ty = &bc->types[tid - 65]; + if (ty->kind != DPointerType || ty->containedTypes[0] < 65) { + cli_errmsg("bytecode: invalid gep type, must be pointer to nonint: %u\n", tid); + return -1; + } + ty = &bc->types[ty->containedTypes[0] - 65]; + if (ty->kind != DStructType && ty->kind != DPackedStructType) + return 0; + gepoff = (uint32_t *)&func->constants[op - func->numValues]; + if (*gepoff >= ty->numElements) { + cli_errmsg("bytecode: gep offset out of range: %d >= %d\n", (uint32_t)*gepoff, ty->numElements); + return -1; + } + for (i = 0; i < *gepoff; i++) { + off += typesize(bc, ty->containedTypes[i]); + } + *gepoff = off; + return 1; +} + +static int cli_bytecode_prepare_interpreter(struct cli_bc *bc) +{ + unsigned i, j, k; + uint64_t *gmap; + unsigned bcglobalid = cli_apicall_maxglobal - _FIRST_GLOBAL + 2; + int ret = CL_SUCCESS; + bc->numGlobalBytes = 0; + gmap = cli_malloc(bc->num_globals * sizeof(*gmap)); + if (!gmap) { + cli_errmsg("interpreter: Unable to allocate memory for global map: %zu\n", bc->num_globals * sizeof(*gmap)); + return CL_EMEM; + } + for (j = 0; j < bc->num_globals; j++) { + uint16_t ty = bc->globaltys[j]; + unsigned align = typealign(bc, ty); + assert(align); + bc->numGlobalBytes = (bc->numGlobalBytes + align - 1) & (~(align - 1)); + gmap[j] = bc->numGlobalBytes; + bc->numGlobalBytes += typesize(bc, ty); + } + if (bc->numGlobalBytes) { + bc->globalBytes = cli_calloc(1, bc->numGlobalBytes); + if (!bc->globalBytes) { + cli_errmsg("interpreter: Unable to allocate memory for globalBytes: %u\n", bc->numGlobalBytes); + free(gmap); + return CL_EMEM; + } + } else + bc->globalBytes = NULL; + + for (j = 0; j < bc->num_globals; j++) { + struct cli_bc_type *ty; + if (bc->globaltys[j] < 65) + continue; + ty = &bc->types[bc->globaltys[j] - 65]; + switch (ty->kind) { + case DPointerType: { + uint64_t ptr; + if (bc->globals[j][1] >= _FIRST_GLOBAL) { + ptr = ptr_compose(bc->globals[j][1] - _FIRST_GLOBAL + 1, + bc->globals[j][0]); + } else { + if (bc->globals[j][1] > bc->num_globals) + continue; + ptr = ptr_compose(bcglobalid, + gmap[bc->globals[j][1]] + bc->globals[j][0]); + } + *(uint64_t *)&bc->globalBytes[gmap[j]] = ptr; + break; + } + case DArrayType: { + unsigned elsize, i, off = gmap[j]; + /* TODO: support other than ints in arrays */ + elsize = typesize(bc, ty->containedTypes[0]); + switch (elsize) { + case 1: + for (i = 0; i < ty->numElements; i++) + bc->globalBytes[off + i] = bc->globals[j][i]; + break; + case 2: + for (i = 0; i < ty->numElements; i++) + *(uint16_t *)&bc->globalBytes[off + i * 2] = bc->globals[j][i]; + break; + case 4: + for (i = 0; i < ty->numElements; i++) + *(uint32_t *)&bc->globalBytes[off + i * 4] = bc->globals[j][i]; + break; + case 8: + for (i = 0; i < ty->numElements; i++) + *(uint64_t *)&bc->globalBytes[off + i * 8] = bc->globals[j][i]; + break; + default: + cli_dbgmsg("interpreter: unsupported elsize: %u\n", elsize); + } + break; + } + default: + /*TODO*/ + if (!bc->globals[j][1]) + continue; /* null */ + break; + } + } + + for (i = 0; i < bc->num_func && ret == CL_SUCCESS; i++) { + struct cli_bc_func *bcfunc = &bc->funcs[i]; + unsigned totValues = bcfunc->numValues + bcfunc->numConstants + bc->num_globals; + unsigned *map = cli_malloc(sizeof(*map) * (size_t)totValues); + if (!map) { + cli_errmsg("interpreter: Unable to allocate memory for map: %zu\n", sizeof(*map) * (size_t)totValues); + free(gmap); + return CL_EMEM; + } + bcfunc->numBytes = 0; + for (j = 0; j < bcfunc->numValues; j++) { + uint16_t ty = bcfunc->types[j]; + unsigned align; + align = typealign(bc, ty); + assert(!ty || typesize(bc, ty)); + assert(align); + bcfunc->numBytes = (bcfunc->numBytes + align - 1) & (~(align - 1)); + map[j] = bcfunc->numBytes; + /* printf("%d -> %d, %u\n", j, map[j], typesize(bc, ty)); */ + bcfunc->numBytes += typesize(bc, ty); + /* TODO: don't allow size 0, it is always a bug! */ + } + bcfunc->numBytes = (bcfunc->numBytes + 7) & ~7; + for (j = 0; j < bcfunc->numConstants; j++) { + map[bcfunc->numValues + j] = bcfunc->numBytes; + bcfunc->numBytes += 8; + } + for (j = 0; j < bcfunc->numInsts && ret == CL_SUCCESS; j++) { + struct cli_bc_inst *inst = &bcfunc->allinsts[j]; + inst->dest = map[inst->dest]; + switch (inst->opcode) { + case OP_BC_ADD: + case OP_BC_SUB: + case OP_BC_MUL: + case OP_BC_UDIV: + case OP_BC_SDIV: + case OP_BC_UREM: + case OP_BC_SREM: + case OP_BC_SHL: + case OP_BC_LSHR: + case OP_BC_ASHR: + case OP_BC_AND: + case OP_BC_OR: + case OP_BC_XOR: + case OP_BC_ICMP_EQ: + case OP_BC_ICMP_NE: + case OP_BC_ICMP_UGT: + case OP_BC_ICMP_UGE: + case OP_BC_ICMP_ULT: + case OP_BC_ICMP_ULE: + case OP_BC_ICMP_SGT: + case OP_BC_ICMP_SGE: + case OP_BC_ICMP_SLT: + case OP_BC_ICMP_SLE: + case OP_BC_COPY: + case OP_BC_STORE: + MAP(inst->u.binop[0]); + MAP(inst->u.binop[1]); + break; + case OP_BC_SEXT: + case OP_BC_ZEXT: + case OP_BC_TRUNC: + MAP(inst->u.cast.source); + break; + case OP_BC_BRANCH: + MAP(inst->u.branch.condition); + break; + case OP_BC_JMP: + break; + case OP_BC_RET: + MAP(inst->u.unaryop); + break; + case OP_BC_SELECT: + MAP(inst->u.three[0]); + MAP(inst->u.three[1]); + MAP(inst->u.three[2]); + break; + case OP_BC_CALL_API: /* fall-through */ + case OP_BC_CALL_DIRECT: { + struct cli_bc_func *target = NULL; + if (inst->opcode == OP_BC_CALL_DIRECT) { + target = &bc->funcs[inst->u.ops.funcid]; + if (inst->u.ops.funcid > bc->num_func) { + cli_errmsg("bytecode: called function out of range: %u > %u\n", inst->u.ops.funcid, bc->num_func); + ret = CL_EBYTECODE; + } else if (inst->u.ops.numOps != target->numArgs) { + cli_errmsg("bytecode: call operands don't match function prototype\n"); + ret = CL_EBYTECODE; + } + } else { + /* APIs have at most 2 parameters always */ + if (inst->u.ops.numOps > 5) { + cli_errmsg("bytecode: call operands don't match function prototype\n"); + ret = CL_EBYTECODE; + } + } + if (ret != CL_SUCCESS) + break; + if (inst->u.ops.numOps > 0) { + inst->u.ops.opsizes = cli_malloc(sizeof(*inst->u.ops.opsizes) * inst->u.ops.numOps); + if (!inst->u.ops.opsizes) { + cli_errmsg("Out of memory when allocating operand sizes\n"); + ret = CL_EMEM; + break; + } + } else { + inst->u.ops.opsizes = NULL; + break; + } + for (k = 0; k < inst->u.ops.numOps; k++) { + MAPPTR(inst->u.ops.ops[k]); + if (inst->opcode == OP_BC_CALL_DIRECT) + inst->u.ops.opsizes[k] = typesize(bc, target->types[k]); + else + inst->u.ops.opsizes[k] = 32; /*XXX*/ + } + break; + } + case OP_BC_LOAD: + MAPPTR(inst->u.unaryop); + break; + case OP_BC_GEP1: + if (inst->u.three[1] & 0x80000000 || + bcfunc->types[inst->u.binop[1]] & 0x8000) { + cli_errmsg("bytecode: gep1 of alloca is not allowed\n"); + ret = CL_EBYTECODE; + } + if (ret != CL_SUCCESS) + break; + MAP(inst->u.three[1]); + MAP(inst->u.three[2]); + inst->u.three[0] = get_geptypesize(bc, inst->u.three[0]); + if ((int)(inst->u.three[0]) == -1) + ret = CL_EBYTECODE; + break; + case OP_BC_GEPZ: + /*three[0] is the type*/ + if (inst->u.three[1] & 0x80000000 || + bcfunc->types[inst->u.three[1]] & 0x8000) + inst->interp_op = 5 * (inst->interp_op / 5); + else + inst->interp_op = 5 * (inst->interp_op / 5) + 3; + MAP(inst->u.three[1]); + if (calc_gepz(bc, bcfunc, inst->u.three[0], inst->u.three[2]) == -1) + ret = CL_EBYTECODE; + if (ret == CL_SUCCESS) + MAP(inst->u.three[2]); + break; + /* case OP_BC_GEPN: + *TODO + break;*/ + case OP_BC_MEMSET: + case OP_BC_MEMCPY: + case OP_BC_MEMMOVE: + case OP_BC_MEMCMP: + MAPPTR(inst->u.three[0]); + MAPPTR(inst->u.three[1]); + MAP(inst->u.three[2]); + break; + case OP_BC_RET_VOID: + case OP_BC_ISBIGENDIAN: + case OP_BC_ABORT: + /* no operands */ + break; + case OP_BC_BSWAP16: + case OP_BC_BSWAP32: + case OP_BC_BSWAP64: + MAP(inst->u.unaryop); + break; + case OP_BC_PTRDIFF32: + MAPPTR(inst->u.binop[0]); + MAPPTR(inst->u.binop[1]); + break; + case OP_BC_PTRTOINT64: + MAPPTR(inst->u.unaryop); + break; + default: + cli_warnmsg("Bytecode: unhandled opcode: %d\n", inst->opcode); + ret = CL_EBYTECODE; + } + } + if (map) + free(map); + } + free(gmap); + bc->state = bc_interp; + return ret; +} + +static int add_selfcheck(struct cli_all_bc *bcs) +{ + struct cli_bc_func *func; + struct cli_bc_inst *inst; + struct cli_bc *bc; + + bcs->all_bcs = cli_realloc2(bcs->all_bcs, sizeof(*bcs->all_bcs) * (bcs->count + 1)); + if (!bcs->all_bcs) { + cli_errmsg("cli_loadcbc: Can't allocate memory for bytecode entry\n"); + return CL_EMEM; + } + bc = &bcs->all_bcs[bcs->count++]; + memset(bc, 0, sizeof(*bc)); + + bc->trusted = 1; + bc->num_globals = 1; + bc->globals = cli_calloc(1, sizeof(*bc->globals)); + if (!bc->globals) { + cli_errmsg("Failed to allocate memory for globals\n"); + return CL_EMEM; + } + bc->globals[0] = cli_calloc(1, sizeof(*bc->globals[0])); + if (!bc->globals[0]) { + cli_errmsg("Failed to allocate memory for globals\n"); + return CL_EMEM; + } + bc->globaltys = cli_calloc(1, sizeof(*bc->globaltys)); + if (!bc->globaltys) { + cli_errmsg("Failed to allocate memory for globaltypes\n"); + return CL_EMEM; + } + bc->globaltys[0] = 32; + *bc->globals[0] = 0; + bc->id = ~0; + bc->kind = 0; + bc->num_types = 5; + bc->num_func = 1; + bc->funcs = cli_calloc(1, sizeof(*bc->funcs)); + if (!bc->funcs) { + cli_errmsg("Failed to allocate memory for func\n"); + return CL_EMEM; + } + func = bc->funcs; + func->numInsts = 2; + func->numLocals = 1; + func->numValues = 1; + func->numConstants = 1; + func->numBB = 1; + func->returnType = 32; + func->types = cli_calloc(1, sizeof(*func->types)); + if (!func->types) { + cli_errmsg("Failed to allocate memory for types\n"); + return CL_EMEM; + } + func->types[0] = 32; + func->BB = cli_calloc(1, sizeof(*func->BB)); + if (!func->BB) { + cli_errmsg("Failed to allocate memory for BB\n"); + return CL_EMEM; + } + func->allinsts = cli_calloc(2, sizeof(*func->allinsts)); + if (!func->allinsts) { + cli_errmsg("Failed to allocate memory for insts\n"); + return CL_EMEM; + } + func->BB->numInsts = 2; + func->BB->insts = func->allinsts; + func->constants = cli_calloc(1, sizeof(*func->constants)); + if (!func->constants) { + cli_errmsg("Failed to allocate memory for constants\n"); + return CL_EMEM; + } + func->constants[0] = 0xf00d; + inst = func->allinsts; + + inst->opcode = OP_BC_CALL_API; + inst->u.ops.numOps = 1; + inst->u.ops.opsizes = NULL; + inst->u.ops.ops = cli_calloc(1, sizeof(*inst->u.ops.ops)); + if (!inst->u.ops.ops) { + cli_errmsg("Failed to allocate memory for instructions\n"); + return CL_EMEM; + } + inst->u.ops.ops[0] = 1; + inst->u.ops.funcid = 18; /* test2 */ + inst->dest = 0; + inst->type = 32; + inst->interp_op = inst->opcode * 5 + 3; + + inst = &func->allinsts[1]; + inst->opcode = OP_BC_RET; + inst->type = 32; + inst->u.unaryop = 0; + inst->interp_op = inst->opcode * 5; + + bc->state = bc_loaded; + return 0; +} + +static int run_selfcheck(struct cli_all_bc *bcs) +{ + struct cli_bc_ctx *ctx; + struct cli_bc *bc = &bcs->all_bcs[bcs->count - 1]; + int rc; + if (bc->state != bc_jit && bc->state != bc_interp) { + cli_errmsg("Failed to prepare selfcheck bytecode\n"); + return CL_EBYTECODE; + } + ctx = cli_bytecode_context_alloc(); + if (!ctx) { + cli_errmsg("Failed to allocate bytecode context\n"); + return CL_EMEM; + } + cli_bytecode_context_setfuncid(ctx, bc, 0); + + cli_dbgmsg("bytecode self test running\n"); + ctx->bytecode_timeout = 0; + rc = cli_bytecode_run(bcs, bc, ctx); + cli_bytecode_context_destroy(ctx); + if (rc != CL_SUCCESS) { + cli_errmsg("bytecode self test failed: %s\n", + cl_strerror(rc)); + } else { + cli_dbgmsg("bytecode self test succeeded\n"); + } + return rc; +} + +static int selfcheck(int jit, struct cli_bcengine *engine) +{ + struct cli_all_bc bcs; + int rc; + + memset(&bcs, 0, sizeof(bcs)); + bcs.all_bcs = NULL; + bcs.count = 0; + bcs.engine = engine; + rc = add_selfcheck(&bcs); + if (rc == CL_SUCCESS) { + if (jit) { + if (!bcs.engine) { + cli_dbgmsg("bytecode: JIT disabled\n"); + rc = CL_BREAK; /* no JIT - not fatal */ + } else { + rc = cli_bytecode_prepare_jit(&bcs); + } + } else { + rc = cli_bytecode_prepare_interpreter(bcs.all_bcs); + } + if (rc == CL_SUCCESS) + rc = run_selfcheck(&bcs); + if (rc == CL_BREAK) + rc = CL_SUCCESS; + } + cli_bytecode_destroy(bcs.all_bcs); + free(bcs.all_bcs); + cli_bytecode_done_jit(&bcs, 1); + if (rc != CL_SUCCESS) { + cli_errmsg("Bytecode: failed to run selfcheck in %s mode: %s\n", + jit ? "JIT" : "interpreter", cl_strerror(rc)); + } + return rc; +} + +static int set_mode(struct cl_engine *engine, enum bytecode_mode mode) +{ + if (engine->bytecode_mode == mode) + return 0; + if (engine->bytecode_mode == CL_BYTECODE_MODE_OFF) { + cli_errmsg("bytecode: already turned off, can't turn it on again!\n"); + return -1; + } + cli_dbgmsg("Bytecode: mode changed to %d\n", mode); + if (engine->bytecode_mode == CL_BYTECODE_MODE_TEST) { + if (mode == CL_BYTECODE_MODE_OFF || have_clamjit) { + cli_errmsg("bytecode: in test mode but JIT/bytecode is about to be disabled: %d\n", mode); + engine->bytecode_mode = mode; + return -1; + } + return 0; + } + if (engine->bytecode_mode == CL_BYTECODE_MODE_JIT) { + cli_errmsg("bytecode: in JIT mode but JIT is about to be disabled: %d\n", mode); + engine->bytecode_mode = mode; + return -1; + } + engine->bytecode_mode = mode; + return 0; +} + +/* runs the first bytecode of the specified kind, or the builtin one if no + * bytecode of that kind is loaded */ +static int run_builtin_or_loaded(struct cli_all_bc *bcs, uint8_t kind, const char *builtin_cbc, struct cli_bc_ctx *ctx, const char *desc) +{ + unsigned i, builtin = 0, rc = 0; + struct cli_bc *bc = NULL; + + for (i = 0; i < bcs->count; i++) { + bc = &bcs->all_bcs[i]; + if (bc->kind == kind) + break; + } + if (i == bcs->count) + bc = NULL; + if (!bc) { + /* no loaded bytecode found, load the builtin one! */ + struct cli_dbio dbio; + bc = cli_calloc(1, sizeof(*bc)); + if (!bc) { + cli_errmsg("Out of memory allocating bytecode\n"); + return CL_EMEM; + } + builtin = 1; + + memset(&dbio, 0, sizeof(dbio)); + dbio.usebuf = 1; + dbio.bufpt = dbio.buf = (char *)builtin_cbc; + dbio.bufsize = strlen(builtin_cbc) + 1; + if (!dbio.bufsize || dbio.bufpt[dbio.bufsize - 2] != '\n') { + cli_errmsg("Invalid builtin bytecode: missing terminator\n"); + free(bc); + return CL_EMALFDB; + } + + rc = cli_bytecode_load(bc, NULL, &dbio, 1, 0); + if (rc) { + cli_errmsg("Failed to load builtin %s bytecode\n", desc); + free(bc); + return rc; + } + } + rc = cli_bytecode_prepare_interpreter(bc); + if (rc) { + cli_errmsg("Failed to prepare %s %s bytecode for interpreter: %s\n", + builtin ? "builtin" : "loaded", desc, cl_strerror(rc)); + } + if (bc->state != bc_interp) { + cli_errmsg("Failed to prepare %s %s bytecode for interpreter\n", + builtin ? "builtin" : "loaded", desc); + rc = CL_EMALFDB; + } + if (!rc) { + cli_bytecode_context_setfuncid(ctx, bc, 0); + cli_dbgmsg("Bytecode: %s running (%s)\n", desc, + builtin ? "builtin" : "loaded"); + rc = cli_bytecode_run(bcs, bc, ctx); + } + if (rc) { + cli_errmsg("Failed to execute %s %s bytecode: %s\n", builtin ? "builtin" : "loaded", + desc, cl_strerror(rc)); + } + if (builtin) { + cli_bytecode_destroy(bc); + free(bc); + } + return rc; +} + +int cli_bytecode_prepare2(struct cl_engine *engine, struct cli_all_bc *bcs, unsigned dconfmask) +{ + unsigned i, interp = 0, jitok = 0, jitcount = 0; + int rc; + struct cli_bc_ctx *ctx; + + if (!bcs->count) { + cli_dbgmsg("No bytecodes loaded, not running builtin test\n"); + return CL_SUCCESS; + } + + engine->bytecode_mode = CL_BYTECODE_MODE_AUTO; + cli_detect_environment(&bcs->env); + switch (bcs->env.arch) { + case arch_i386: + case arch_x86_64: + if (!(dconfmask & BYTECODE_JIT_X86)) { + cli_dbgmsg("Bytecode: disabled on X86 via DCONF\n"); + if (set_mode(engine, CL_BYTECODE_MODE_INTERPRETER) == -1) + return CL_EBYTECODE_TESTFAIL; + } + break; + case arch_ppc32: + case arch_ppc64: + if (!(dconfmask & BYTECODE_JIT_PPC)) { + cli_dbgmsg("Bytecode: disabled on PPC via DCONF\n"); + if (set_mode(engine, CL_BYTECODE_MODE_INTERPRETER) == -1) + return CL_EBYTECODE_TESTFAIL; + } + break; + case arch_arm: + if (!(dconfmask & BYTECODE_JIT_ARM)) { + cli_dbgmsg("Bytecode: disabled on ARM via DCONF\n"); + if (set_mode(engine, CL_BYTECODE_MODE_INTERPRETER) == -1) + return CL_EBYTECODE_TESTFAIL; + } + break; + default: + cli_dbgmsg("Bytecode: JIT not supported on this architecture, falling back\n"); + if (set_mode(engine, CL_BYTECODE_MODE_INTERPRETER) == -1) + return CL_EBYTECODE_TESTFAIL; + break; + } + cli_dbgmsg("Bytecode: mode is %d\n", engine->bytecode_mode); + + ctx = cli_bytecode_context_alloc(); + if (!ctx) { + cli_errmsg("Bytecode: failed to allocate bytecode context\n"); + return CL_EMEM; + } + rc = run_builtin_or_loaded(bcs, BC_STARTUP, builtin_bc_startup, ctx, "BC_STARTUP"); + if (rc != CL_SUCCESS) { + cli_warnmsg("Bytecode: BC_STARTUP failed to run, disabling ALL bytecodes! Please report to https://github.com/Cisco-Talos/clamav/issues\n"); + ctx->bytecode_disable_status = 2; + } else { + cli_dbgmsg("Bytecode: disable status is %d\n", ctx->bytecode_disable_status); + rc = cli_bytecode_context_getresult_int(ctx); + /* check magic number, don't use 0 here because it is too easy for a + * buggy bytecode to return 0 */ + if ((unsigned int)rc != (unsigned int)0xda7aba5e) { + cli_warnmsg("Bytecode: selftest failed with code %08x. Please report to https://github.com/Cisco-Talos/clamav/issues\n", + rc); + if (engine->bytecode_mode == CL_BYTECODE_MODE_TEST) + return CL_EBYTECODE_TESTFAIL; + } + } + switch (ctx->bytecode_disable_status) { + case 1: + if (set_mode(engine, CL_BYTECODE_MODE_INTERPRETER) == -1) + return CL_EBYTECODE_TESTFAIL; + break; + case 2: + if (set_mode(engine, CL_BYTECODE_MODE_OFF) == -1) + return CL_EBYTECODE_TESTFAIL; + break; + default: + break; + } + cli_bytecode_context_destroy(ctx); + + if (engine->bytecode_mode != CL_BYTECODE_MODE_INTERPRETER && + engine->bytecode_mode != CL_BYTECODE_MODE_OFF) { + selfcheck(1, bcs->engine); + rc = cli_bytecode_prepare_jit(bcs); + if (rc == CL_SUCCESS) { + jitok = 1; + cli_dbgmsg("Bytecode: %u bytecode prepared with JIT\n", bcs->count); + if (engine->bytecode_mode != CL_BYTECODE_MODE_TEST) + return CL_SUCCESS; + } + if (engine->bytecode_mode == CL_BYTECODE_MODE_JIT) { + cli_errmsg("Bytecode: JIT required, but not all bytecodes could be prepared with JIT\n"); + return CL_EMALFDB; + } + if (rc && engine->bytecode_mode == CL_BYTECODE_MODE_TEST) { + cli_errmsg("Bytecode: Test mode, but not all bytecodes could be prepared with JIT\n"); + return CL_EBYTECODE_TESTFAIL; + } + } else { + cli_bytecode_done_jit(bcs, 0); + } + + if (!(dconfmask & BYTECODE_INTERPRETER)) { + cli_dbgmsg("Bytecode: needs interpreter, but interpreter is disabled\n"); + if (set_mode(engine, CL_BYTECODE_MODE_OFF) == -1) + return CL_EBYTECODE_TESTFAIL; + } + + if (engine->bytecode_mode == CL_BYTECODE_MODE_OFF) { + for (i = 0; i < bcs->count; i++) + bcs->all_bcs[i].state = bc_disabled; + cli_dbgmsg("Bytecode: ALL bytecodes disabled\n"); + return CL_SUCCESS; + } + + for (i = 0; i < bcs->count; i++) { + struct cli_bc *bc = &bcs->all_bcs[i]; + if (bc->state == bc_jit) { + jitcount++; + if (engine->bytecode_mode != CL_BYTECODE_MODE_TEST) + continue; + } + if (bc->state == bc_interp) { + interp++; + continue; + } + rc = cli_bytecode_prepare_interpreter(bc); + if (rc != CL_SUCCESS) { + bc->state = bc_disabled; + cli_warnmsg("Bytecode: %d failed to prepare for interpreter mode\n", bc->id); + return rc; + } + interp++; + } + cli_dbgmsg("Bytecode: %u bytecode prepared with JIT, " + "%u prepared with interpreter, %u total\n", + jitcount, interp, bcs->count); + return CL_SUCCESS; +} + +int cli_bytecode_init(struct cli_all_bc *allbc) +{ + int ret; + memset(allbc, 0, sizeof(*allbc)); + ret = cli_bytecode_init_jit(allbc, 0 /*XXX*/); + cli_dbgmsg("Bytecode initialized in %s mode\n", + allbc->engine ? "JIT" : "interpreter"); + allbc->inited = 1; + return ret; +} + +int cli_bytecode_done(struct cli_all_bc *allbc) +{ + return cli_bytecode_done_jit(allbc, 0); +} + +int cli_bytecode_context_setfile(struct cli_bc_ctx *ctx, fmap_t *map) +{ + ctx->fmap = map; + ctx->file_size = map->len; + ctx->hooks.filesize = &ctx->file_size; + return 0; +} + +int cli_bytecode_runlsig(cli_ctx *cctx, struct cli_target_info *tinfo, + const struct cli_all_bc *bcs, unsigned bc_idx, + const uint32_t *lsigcnt, + const uint32_t *lsigsuboff, fmap_t *map) +{ + int ret; + struct cli_bc_ctx ctx; + const struct cli_bc *bc = &bcs->all_bcs[bc_idx - 1]; + struct cli_pe_hook_data pehookdata; + + if (bc_idx == 0) + return CL_ENULLARG; + + memset(&ctx, 0, sizeof(ctx)); + cli_bytecode_context_setfuncid(&ctx, bc, 0); + ctx.hooks.match_counts = lsigcnt; + ctx.hooks.match_offsets = lsigsuboff; + cli_bytecode_context_setctx(&ctx, cctx); + cli_bytecode_context_setfile(&ctx, map); + if (tinfo && tinfo->status == 1) { + ctx.sections = tinfo->exeinfo.sections; + memset(&pehookdata, 0, sizeof(pehookdata)); + pehookdata.offset = tinfo->exeinfo.offset; + pehookdata.ep = tinfo->exeinfo.ep; + pehookdata.nsections = tinfo->exeinfo.nsections; + pehookdata.hdr_size = tinfo->exeinfo.hdr_size; + ctx.hooks.pedata = &pehookdata; + ctx.resaddr = tinfo->exeinfo.res_addr; + } + if (bc->hook_lsig_id) { + cli_dbgmsg("hook lsig id %d matched (bc %d)\n", bc->hook_lsig_id, bc->id); + /* this is a bytecode for a hook, defer running it until hook is + * executed, so that it has all the info for the hook */ + if (cctx->hook_lsig_matches) + cli_bitset_set(cctx->hook_lsig_matches, bc->hook_lsig_id - 1); + /* save match counts */ + memcpy(&ctx.lsigcnt, lsigcnt, 64 * 4); + memcpy(&ctx.lsigoff, lsigsuboff, 64 * 4); + cli_bytecode_context_clear(&ctx); + return CL_SUCCESS; + } + + cli_dbgmsg("Running bytecode for logical signature match\n"); + ret = cli_bytecode_run(bcs, bc, &ctx); + if (ret != CL_SUCCESS) { + cli_warnmsg("Bytecode %u failed to run: %s\n", bc->id, cl_strerror(ret)); + cli_bytecode_context_clear(&ctx); + return CL_SUCCESS; + } + if (ctx.virname) { + if (cctx->num_viruses == 0) { + int rc; + cli_dbgmsg("Bytecode found virus: %s\n", ctx.virname); + if (!strncmp(ctx.virname, "BC.Heuristics", 13)) + rc = cli_append_possibly_unwanted(cctx, ctx.virname); + else + rc = cli_append_virus(cctx, ctx.virname); + cli_bytecode_context_clear(&ctx); + return rc; + } else { + cli_bytecode_context_clear(&ctx); + return CL_VIRUS; + } + } + ret = cli_bytecode_context_getresult_int(&ctx); + cli_dbgmsg("Bytecode %u returned code: %u\n", bc->id, ret); + cli_bytecode_context_clear(&ctx); + return CL_SUCCESS; +} + +int cli_bytecode_runhook(cli_ctx *cctx, const struct cl_engine *engine, struct cli_bc_ctx *ctx, + unsigned id, fmap_t *map) +{ + const unsigned *hooks = engine->hooks[id - _BC_START_HOOKS]; + unsigned i, hooks_cnt = engine->hooks_cnt[id - _BC_START_HOOKS]; + int ret; + unsigned executed = 0, breakflag = 0, errorflag = 0; + + if (!cctx) + return CL_ENULLARG; + + cli_dbgmsg("Bytecode executing hook id %u (%u hooks)\n", id, hooks_cnt); + /* restore match counts */ + cli_bytecode_context_setfile(ctx, map); + ctx->hooks.match_counts = ctx->lsigcnt; + ctx->hooks.match_offsets = ctx->lsigoff; + for (i = 0; i < hooks_cnt; i++) { + const struct cli_bc *bc = &engine->bcs.all_bcs[hooks[i]]; + if (bc->lsig) { + if (!cctx->hook_lsig_matches || + !cli_bitset_test(cctx->hook_lsig_matches, bc->hook_lsig_id - 1)) + continue; + cli_dbgmsg("Bytecode: executing bytecode %u (lsig matched)\n", bc->id); + } + cli_bytecode_context_setfuncid(ctx, bc, 0); + ret = cli_bytecode_run(&engine->bcs, bc, ctx); + executed++; + if (ret != CL_SUCCESS) { + cli_warnmsg("Bytecode %u failed to run: %s\n", bc->id, cl_strerror(ret)); + errorflag = 1; + continue; + } + if (ctx->virname) { + cli_dbgmsg("Bytecode runhook found virus: %s\n", ctx->virname); + cli_append_virus(cctx, ctx->virname); + if (!(cctx->options->general & CL_SCAN_GENERAL_ALLMATCHES)) { + cli_bytecode_context_clear(ctx); + return CL_VIRUS; + } + cli_bytecode_context_reset(ctx); + continue; + } + ret = cli_bytecode_context_getresult_int(ctx); + /* TODO: use prefix here */ + cli_dbgmsg("Bytecode %u returned %u\n", bc->id, ret); + if (ret == 0xcea5e) { + cli_dbgmsg("Bytecode set BREAK flag in hook!\n"); + breakflag = 1; + } + if (!ret) { + char *tempfile; + int fd = cli_bytecode_context_getresult_file(ctx, &tempfile); + if (fd && fd != -1) { + if (cctx->engine->keeptmp) + cli_dbgmsg("Bytecode %u unpacked file saved in %s\n", + bc->id, tempfile); + else + cli_dbgmsg("Bytecode %u unpacked file\n", bc->id); + lseek(fd, 0, SEEK_SET); + cli_dbgmsg("***** Scanning unpacked file ******\n"); + + ret = cli_magic_scan_desc(fd, tempfile, cctx, NULL); + + if (!cctx->engine->keeptmp) + if (ftruncate(fd, 0) == -1) + cli_dbgmsg("ftruncate failed on %d\n", fd); + close(fd); + if (!cctx->engine->keeptmp) { + if (tempfile && cli_unlink(tempfile)) + ret = CL_EUNLINK; + } + free(tempfile); + if (ret != CL_CLEAN) { + if (ret == CL_VIRUS) { + cli_dbgmsg("Scanning unpacked file by bytecode %u found a virus\n", bc->id); + if (cctx->options->general & CL_SCAN_GENERAL_ALLMATCHES) { + cli_bytecode_context_reset(ctx); + continue; + } + cli_bytecode_context_clear(ctx); + return ret; + } + } + cli_bytecode_context_reset(ctx); + continue; + } + } + cli_bytecode_context_reset(ctx); + } + if (executed) + cli_dbgmsg("Bytecode: executed %u bytecodes for this hook\n", executed); + else + cli_dbgmsg("Bytecode: no logical signature matched, no bytecode executed\n"); + if (errorflag && cctx->engine->bytecode_mode == CL_BYTECODE_MODE_TEST) + return CL_EBYTECODE_TESTFAIL; + return breakflag ? CL_BREAK : CL_CLEAN; +} + +int cli_bytecode_context_setpe(struct cli_bc_ctx *ctx, const struct cli_pe_hook_data *data, const struct cli_exe_section *sections) +{ + ctx->sections = sections; + ctx->hooks.pedata = data; + return 0; +} + +void cli_bytecode_context_setctx(struct cli_bc_ctx *ctx, void *cctx) +{ + ctx->ctx = cctx; + ctx->bytecode_timeout = ((cli_ctx *)cctx)->engine->bytecode_timeout; +} + +void cli_bytecode_describe(const struct cli_bc *bc) +{ + char buf[128]; + int cols; + unsigned i; + time_t stamp; + int had; + + if (!bc) { + printf("(null bytecode)\n"); + return; + } + + stamp = bc->metadata.timestamp; + printf("Bytecode format functionality level: %u\n", bc->metadata.formatlevel); + printf("Bytecode metadata:\n\tcompiler version: %s\n", + bc->metadata.compiler ? bc->metadata.compiler : "N/A"); + printf("\tcompiled on: (%d) %s", + (uint32_t)stamp, + cli_ctime(&stamp, buf, sizeof(buf))); + printf("\tcompiled by: %s\n", bc->metadata.sigmaker ? bc->metadata.sigmaker : "N/A"); + /*TODO: parse and display arch name, also take it into account when + JITing*/ + printf("\ttarget exclude: %d\n", bc->metadata.targetExclude); + printf("\tbytecode type: "); + switch (bc->kind) { + case BC_GENERIC: + puts("generic, not loadable by clamscan/clamd"); + break; + case BC_STARTUP: + puts("run on startup (unique)"); + break; + case BC_LOGICAL: + puts("logical only"); + break; + case BC_PE_UNPACKER: + puts("PE unpacker hook"); + break; + case BC_PE_ALL: + puts("all PE hook"); + break; + case BC_PRECLASS: + puts("preclass hook"); + break; + case BC_ELF_UNPACKER: + puts("ELF unpacker hook"); + break; + case BC_MACHO_UNPACKER: + puts("Mach-O unpacker hook"); + break; + default: + printf("Unknown (type %u)", bc->kind); + break; + } + /* 0 means no limit */ + printf("\tbytecode functionality level: %u - %u\n", + bc->metadata.minfunc, bc->metadata.maxfunc); + printf("\tbytecode logical signature: %s\n", + bc->lsig ? bc->lsig : ""); + printf("\tvirusname prefix: %s\n", + bc->vnameprefix); + printf("\tvirusnames: %u\n", bc->vnames_cnt); + printf("\tbytecode triggered on: "); + switch (bc->kind) { + case BC_GENERIC: + puts("N/A (loaded in clambc only)"); + break; + case BC_LOGICAL: + puts("files matching logical signature"); + break; + case BC_PE_UNPACKER: + if (bc->lsig) + puts("PE files matching logical signature (unpacked)"); + else + puts("all PE files! (unpacked)"); + break; + case BC_PDF: + puts("PDF files"); + break; + case BC_PE_ALL: + if (bc->lsig) + puts("PE files matching logical signature"); + else + puts("all PE files!"); + break; + case BC_PRECLASS: + if (bc->lsig) + puts("PRECLASS files matching logical signature"); + else + puts("all PRECLASS files!"); + break; + case BC_ELF_UNPACKER: + if (bc->lsig) + puts("ELF files matching logical signature (unpacked)"); + else + puts("all ELF files! (unpacked)"); + break; + case BC_MACHO_UNPACKER: + if (bc->lsig) + puts("Mach-O files matching logical signature (unpacked)"); + else + puts("all Mach-O files! (unpacked)"); + break; + default: + puts("N/A (unknown type)\n"); + break; + } + printf("\tnumber of functions: %u\n\tnumber of types: %u\n", + bc->num_func, bc->num_types); + printf("\tnumber of global constants: %u\n", (unsigned)bc->num_globals); + printf("\tnumber of debug nodes: %u\n", bc->dbgnode_cnt); + printf("\tbytecode APIs used:"); + cols = 0; /* remaining */ + had = 0; + for (i = 0; i < cli_apicall_maxapi; i++) { + if (cli_bitset_test(bc->uses_apis, i)) { + unsigned len = strlen(cli_apicalls[i].name); + if (had) + printf(","); + if (len > (unsigned int)cols) { + printf("\n\t"); + cols = 72; + } + printf(" %s", cli_apicalls[i].name); + had = 1; + cols -= len; + } + } + printf("\n"); +} + +const char *bc_tystr[] = { + "DFunctionType", + "DPointerType", + "DStructType", + "DPackedStructType", + "DArrayType"}; + +const char *bc_opstr[] = { + "OP_BC_NULL", + "OP_BC_ADD", /* =1*/ + "OP_BC_SUB", + "OP_BC_MUL", + "OP_BC_UDIV", + "OP_BC_SDIV", + "OP_BC_UREM", + "OP_BC_SREM", + "OP_BC_SHL", + "OP_BC_LSHR", + "OP_BC_ASHR", + "OP_BC_AND", + "OP_BC_OR", + "OP_BC_XOR", + + "OP_BC_TRUNC", + "OP_BC_SEXT", + "OP_BC_ZEXT", + + "OP_BC_BRANCH", + "OP_BC_JMP", + "OP_BC_RET", + "OP_BC_RET_VOID", + + "OP_BC_ICMP_EQ", + "OP_BC_ICMP_NE", + "OP_BC_ICMP_UGT", + "OP_BC_ICMP_UGE", + "OP_BC_ICMP_ULT", + "OP_BC_ICMP_ULE", + "OP_BC_ICMP_SGT", + "OP_BC_ICMP_SGE", + "OP_BC_ICMP_SLE", + "OP_BC_ICMP_SLT", + "OP_BC_SELECT", + "OP_BC_CALL_DIRECT", + "OP_BC_CALL_API", + "OP_BC_COPY", + "OP_BC_GEP1", + "OP_BC_GEPZ", + "OP_BC_GEPN", + "OP_BC_STORE", + "OP_BC_LOAD", + "OP_BC_MEMSET", + "OP_BC_MEMCPY", + "OP_BC_MEMMOVE", + "OP_BC_MEMCMP", + "OP_BC_ISBIGENDIAN", + "OP_BC_ABORT", + "OP_BC_BSWAP16", + "OP_BC_BSWAP32", + "OP_BC_BSWAP64", + "OP_BC_PTRDIFF32", + "OP_BC_PTRTOINT64", + "OP_BC_INVALID" /* last */ +}; + +extern unsigned cli_numapicalls; +static void cli_bytetype_helper(const struct cli_bc *bc, unsigned tid) +{ + unsigned i, j; + const struct cli_bc_type *ty; + + if (tid & 0x8000) { + printf("alloc "); + tid &= 0x7fff; + } + + if (tid < 65) { + printf("i%d", tid); + return; + } + + i = tid - 65; + if (i >= bc->num_types) { + printf("invalid type"); + return; + } + ty = &bc->types[i]; + + switch (ty->kind) { + case DFunctionType: + cli_bytetype_helper(bc, ty->containedTypes[0]); + printf(" func ( "); + for (j = 1; j < ty->numElements; ++j) { + cli_bytetype_helper(bc, ty->containedTypes[0]); + printf(" "); + } + printf(")"); + break; + case DPointerType: + cli_bytetype_helper(bc, ty->containedTypes[0]); + printf("*"); + break; + case DStructType: + case DPackedStructType: + printf("{ "); + for (j = 0; j < ty->numElements; ++j) { + cli_bytetype_helper(bc, ty->containedTypes[0]); + printf(" "); + } + printf("}"); + break; + case DArrayType: + printf("["); + printf("%d x ", ty->numElements); + cli_bytetype_helper(bc, ty->containedTypes[0]); + printf("]"); + break; + default: + printf("unhandled type kind %d, cannot parse", ty->kind); + break; + } +} + +void cli_bytetype_describe(const struct cli_bc *bc) +{ + unsigned i, tid; + + printf("found %d extra types of %d total, starting at tid %d\n", + bc->num_types, 64 + bc->num_types, bc->start_tid); + + printf("TID KIND INTERNAL\n"); + printf("------------------------------------------------------------------------\n"); + for (i = 0, tid = 65; i < bc->num_types - 1; ++i, ++tid) { + printf("%3d: %-20s", tid, bc_tystr[bc->types[i].kind]); + cli_bytetype_helper(bc, tid); + printf("\n"); + } + printf("------------------------------------------------------------------------\n"); +} + +void cli_bytevalue_describe(const struct cli_bc *bc, unsigned funcid) +{ + unsigned i, total = 0; + const struct cli_bc_func *func; + + if (funcid >= bc->num_func) { + printf("bytecode diagnostic: funcid [%u] outside bytecode numfuncs [%u]\n", + funcid, bc->num_func); + return; + } + // globals + printf("found a total of %zu globals\n", bc->num_globals); + printf("GID ID VALUE\n"); + printf("------------------------------------------------------------------------\n"); + for (i = 0; i < bc->num_globals; ++i) { + printf("%3u [%3u]: ", i, i); + cli_bytetype_helper(bc, bc->globaltys[i]); + printf(" unknown\n"); + } + printf("------------------------------------------------------------------------\n"); + + // arguments and local values + func = &bc->funcs[funcid]; + printf("found %d values with %d arguments and %d locals\n", + func->numValues, func->numArgs, func->numLocals); + printf("VID ID VALUE\n"); + printf("------------------------------------------------------------------------\n"); + for (i = 0; i < func->numValues; ++i) { + printf("%3u [%3u]: ", i, total++); + cli_bytetype_helper(bc, func->types[i]); + if (i < func->numArgs) + printf(" argument"); + printf("\n"); + } + printf("------------------------------------------------------------------------\n"); + + // constants + printf("found a total of %d constants\n", func->numConstants); + printf("CID ID VALUE\n"); + printf("------------------------------------------------------------------------\n"); + for (i = 0; i < func->numConstants; ++i) { + printf("%3u [%3u]: " STDu64 "(0x" STDx64 ")\n", i, total++, func->constants[i], func->constants[i]); + } + printf("------------------------------------------------------------------------\n"); + printf("found a total of %u total values\n", total); + printf("------------------------------------------------------------------------\n"); + return; +} + +void cli_byteinst_describe(const struct cli_bc_inst *inst, unsigned *bbnum) +{ + unsigned j; + char inst_str[256]; + const struct cli_apicall *api; + + if (inst->opcode > OP_BC_INVALID) { + printf("opcode %u[%u] of type %u is not implemented yet!", + inst->opcode, inst->interp_op / 5, inst->interp_op % 5); + return; + } + + snprintf(inst_str, sizeof(inst_str), "%-20s[%-3d/%3d/%3d]", bc_opstr[inst->opcode], + inst->opcode, inst->interp_op, inst->interp_op % inst->opcode); + printf("%-35s", inst_str); + switch (inst->opcode) { + // binary operations + case OP_BC_ADD: + printf("%d = %d + %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_SUB: + printf("%d = %d - %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_MUL: + printf("%d = %d * %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_UDIV: + printf("%d = %d / %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_SDIV: + printf("%d = %d / %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_UREM: + printf("%d = %d %% %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_SREM: + printf("%d = %d %% %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_SHL: + printf("%d = %d << %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_LSHR: + printf("%d = %d >> %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_ASHR: + printf("%d = %d >> %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_AND: + printf("%d = %d & %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_OR: + printf("%d = %d | %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_XOR: + printf("%d = %d ^ %d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + + // casting operations + case OP_BC_TRUNC: + printf("%d = %d trunc " STDx64, inst->dest, inst->u.cast.source, inst->u.cast.mask); + break; + case OP_BC_SEXT: + printf("%d = %d sext " STDx64, inst->dest, inst->u.cast.source, inst->u.cast.mask); + break; + case OP_BC_ZEXT: + printf("%d = %d zext " STDx64, inst->dest, inst->u.cast.source, inst->u.cast.mask); + break; + + // control operations (termination instructions) + case OP_BC_BRANCH: + printf("br %d ? bb.%d : bb.%d", inst->u.branch.condition, + inst->u.branch.br_true, inst->u.branch.br_false); + (*bbnum)++; + break; + case OP_BC_JMP: + printf("jmp bb.%d", inst->u.jump); + (*bbnum)++; + break; + case OP_BC_RET: + printf("ret %d", inst->u.unaryop); + (*bbnum)++; + break; + case OP_BC_RET_VOID: + printf("ret void"); + (*bbnum)++; + break; + + // comparison operations + case OP_BC_ICMP_EQ: + printf("%d = (%d == %d)", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_ICMP_NE: + printf("%d = (%d != %d)", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_ICMP_UGT: + printf("%d = (%d > %d)", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_ICMP_UGE: + printf("%d = (%d >= %d)", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_ICMP_ULT: + printf("%d = (%d < %d)", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_ICMP_ULE: + printf("%d = (%d >= %d)", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_ICMP_SGT: + printf("%d = (%d > %d)", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_ICMP_SGE: + printf("%d = (%d >= %d)", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_ICMP_SLE: + printf("%d = (%d <= %d)", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_ICMP_SLT: + printf("%d = (%d < %d)", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_SELECT: + printf("%d = %d ? %d : %d)", inst->dest, inst->u.three[0], + inst->u.three[1], inst->u.three[2]); + break; + + // function calling + case OP_BC_CALL_DIRECT: + printf("%d = call F.%d (", inst->dest, inst->u.ops.funcid); + for (j = 0; j < inst->u.ops.numOps; ++j) { + if (j == inst->u.ops.numOps - 1) { + printf("%d", inst->u.ops.ops[j]); + } else { + printf("%d, ", inst->u.ops.ops[j]); + } + } + printf(")"); + break; + case OP_BC_CALL_API: { + if (inst->u.ops.funcid > cli_numapicalls) { + printf("apicall FID %d not yet implemented!\n", inst->u.ops.funcid); + break; + } + api = &cli_apicalls[inst->u.ops.funcid]; + switch (api->kind) { + case 0: + printf("%d = %s[%d] (%d, %d)", inst->dest, api->name, + inst->u.ops.funcid, inst->u.ops.ops[0], inst->u.ops.ops[1]); + break; + case 1: + printf("%d = %s[%d] (p.%d, %d)", inst->dest, api->name, + inst->u.ops.funcid, inst->u.ops.ops[0], inst->u.ops.ops[1]); + break; + case 2: + printf("%d = %s[%d] (%d)", inst->dest, api->name, + inst->u.ops.funcid, inst->u.ops.ops[0]); + break; + case 3: + printf("p.%d = %s[%d] (%d)", inst->dest, api->name, + inst->u.ops.funcid, inst->u.ops.ops[0]); + break; + case 4: + printf("%d = %s[%d] (p.%d, %d, %d, %d, %d)", inst->dest, api->name, + inst->u.ops.funcid, inst->u.ops.ops[0], inst->u.ops.ops[1], + inst->u.ops.ops[2], inst->u.ops.ops[3], inst->u.ops.ops[4]); + break; + case 5: + printf("%d = %s[%d] ()", inst->dest, api->name, + inst->u.ops.funcid); + break; + case 6: + printf("p.%d = %s[%d] (%d, %d)", inst->dest, api->name, + inst->u.ops.funcid, inst->u.ops.ops[0], inst->u.ops.ops[1]); + break; + case 7: + printf("%d = %s[%d] (%d, %d, %d)", inst->dest, api->name, + inst->u.ops.funcid, inst->u.ops.ops[0], inst->u.ops.ops[1], + inst->u.ops.ops[2]); + break; + case 8: + printf("%d = %s[%d] (p.%d, %d, p.%d, %d)", inst->dest, api->name, + inst->u.ops.funcid, inst->u.ops.ops[0], inst->u.ops.ops[1], + inst->u.ops.ops[2], inst->u.ops.ops[3]); + break; + case 9: + printf("%d = %s[%d] (p.%d, %d, %d)", inst->dest, api->name, + inst->u.ops.funcid, inst->u.ops.ops[0], inst->u.ops.ops[1], + inst->u.ops.ops[2]); + break; + default: + printf("type %u apicalls not yet implemented!\n", api->kind); + break; + } + } break; + + // memory operations + case OP_BC_COPY: + printf("cp %d -> %d", inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_GEP1: + printf("%d = gep1 p.%d + (%d * %d)", inst->dest, inst->u.three[1], + inst->u.three[2], inst->u.three[0]); + break; + case OP_BC_GEPZ: + printf("%d = gepz p.%d + (%d)", inst->dest, + inst->u.three[1], inst->u.three[2]); + break; + case OP_BC_GEPN: + printf("illegal opcode, impossible"); + break; + case OP_BC_STORE: + printf("store %d -> p.%d", inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_LOAD: + printf("load %d <- p.%d", inst->dest, inst->u.unaryop); + break; + + // llvm intrinsics + case OP_BC_MEMSET: + printf("%d = memset (p.%d, %d, %d)", inst->dest, inst->u.three[0], + inst->u.three[1], inst->u.three[2]); + break; + case OP_BC_MEMCPY: + printf("%d = memcpy (p.%d, p.%d, %d)", inst->dest, inst->u.three[0], + inst->u.three[1], inst->u.three[2]); + break; + case OP_BC_MEMMOVE: + printf("%d = memmove (p.%d, p.%d, %d)", inst->dest, inst->u.three[0], + inst->u.three[1], inst->u.three[2]); + break; + case OP_BC_MEMCMP: + printf("%d = memcmp (p.%d, p.%d, %d)", inst->dest, inst->u.three[0], + inst->u.three[1], inst->u.three[2]); + break; + + // utility operations + case OP_BC_ISBIGENDIAN: + printf("%d = isbigendian()", inst->dest); + break; + case OP_BC_ABORT: + printf("ABORT!!"); + break; + case OP_BC_BSWAP16: + printf("%d = bswap16 %d", inst->dest, inst->u.unaryop); + break; + case OP_BC_BSWAP32: + printf("%d = bswap32 %d", inst->dest, inst->u.unaryop); + break; + case OP_BC_BSWAP64: + printf("%d = bswap64 %d", inst->dest, inst->u.unaryop); + break; + case OP_BC_PTRDIFF32: + printf("%d = ptrdiff32 p.%d p.%d", inst->dest, inst->u.binop[0], inst->u.binop[1]); + break; + case OP_BC_PTRTOINT64: + printf("%d = ptrtoint64 p.%d", inst->dest, inst->u.unaryop); + break; + case OP_BC_INVALID: /* last */ + printf("INVALID!!"); + break; + + default: + // redundant check + printf("opcode %u[%u] of type %u is not implemented yet!", + inst->opcode, inst->interp_op / 5, inst->interp_op % 5); + break; + } +} + +void cli_bytefunc_describe(const struct cli_bc *bc, unsigned funcid) +{ + unsigned i, bbnum, bbpre; + const struct cli_bc_func *func; + + if (funcid >= bc->num_func) { + printf("bytecode diagnostic: funcid [%u] outside bytecode numfuncs [%u]\n", + funcid, bc->num_func); + return; + } + + func = &bc->funcs[funcid]; + + printf("FUNCTION ID: F.%d -> NUMINSTS %d\n", funcid, func->numInsts); + printf("BB IDX OPCODE [ID /IID/MOD] INST\n"); + printf("------------------------------------------------------------------------\n"); + bbpre = 0; + bbnum = 0; + for (i = 0; i < func->numInsts; ++i) { + if (bbpre != bbnum) { + printf("\n"); + bbpre = bbnum; + } + + printf("%3d %3d ", bbnum, i); + cli_byteinst_describe(&func->allinsts[i], &bbnum); + printf("\n"); + } + printf("------------------------------------------------------------------------\n"); +} diff --git a/clamscan/libclamav/bytecode.h b/clamscan/libclamav/bytecode.h new file mode 100644 index 0000000..a41f3f7 --- /dev/null +++ b/clamscan/libclamav/bytecode.h @@ -0,0 +1,160 @@ +/* + * Load, verify and execute ClamAV bytecode. + * + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2009-2013 Sourcefire, Inc. + * + * Authors: Török Edvin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ +#ifndef BYTECODE_H +#define BYTECODE_H +#include "clamav-types.h" +#include "clambc.h" +#include +#include "fmap.h" +#include "bytecode_detect.h" +#include "platform.h" + +struct cli_dbio; +struct cli_bc_ctx; +struct cli_bc_func; +struct cli_bc_value; +struct cli_bc_inst; +struct cli_bc_type; +struct cli_bc_engine; +struct cli_bc_dbgnode; +struct bitset_tag; +struct cl_engine; + +enum bc_state { + bc_skip, + bc_loaded, + bc_jit, + bc_interp, + bc_disabled +}; + +struct cli_bc { + struct bytecode_metadata metadata; + unsigned id; + unsigned kind; + unsigned num_types; + unsigned num_func; + struct cli_bc_func *funcs; + struct cli_bc_type *types; + uint64_t **globals; + uint16_t *globaltys; + size_t num_globals; + enum bc_state state; + struct bitset_tag *uses_apis; + char *lsig; + char *vnameprefix; + char **vnames; + unsigned vnames_cnt; + uint16_t start_tid; + struct cli_bc_dbgnode *dbgnodes; + unsigned dbgnode_cnt; + unsigned hook_lsig_id; + unsigned trusted; + uint32_t numGlobalBytes; + uint8_t *globalBytes; + uint32_t sigtime_id, sigmatch_id; + char *hook_name; +}; + +struct cli_all_bc { + struct cli_bc *all_bcs; + unsigned count; + struct cli_bcengine *engine; + struct cli_environment env; + int inited; +}; + +struct cli_pe_hook_data; +struct cli_exe_section; +struct pdf_obj; +struct cli_bc_ctx *cli_bytecode_context_alloc(void); +/* FIXME: we can't include others.h because others.h includes us...*/ +void cli_bytecode_context_setctx(struct cli_bc_ctx *ctx, void *cctx); +int cli_bytecode_context_setfuncid(struct cli_bc_ctx *ctx, const struct cli_bc *bc, unsigned funcid); +int cli_bytecode_context_setparam_int(struct cli_bc_ctx *ctx, unsigned i, uint64_t c); +int cli_bytecode_context_setparam_ptr(struct cli_bc_ctx *ctx, unsigned i, void *data, unsigned datalen); +int cli_bytecode_context_setfile(struct cli_bc_ctx *ctx, fmap_t *map); +int cli_bytecode_context_setpe(struct cli_bc_ctx *ctx, const struct cli_pe_hook_data *data, const struct cli_exe_section *sections); +int cli_bytecode_context_setpdf(struct cli_bc_ctx *ctx, unsigned phase, unsigned nobjs, struct pdf_obj **objs, uint32_t *pdf_flags, uint32_t pdfsize, uint32_t pdfstartoff); +int cli_bytecode_context_clear(struct cli_bc_ctx *ctx); +/* returns file descriptor, sets tempfile. Caller takes ownership, and is + * responsible for freeing/unlinking */ +int cli_bytecode_context_getresult_file(struct cli_bc_ctx *ctx, char **tempfilename); +uint64_t cli_bytecode_context_getresult_int(struct cli_bc_ctx *ctx); +void cli_bytecode_context_destroy(struct cli_bc_ctx *ctx); + +#ifdef __cplusplus +extern "C" { +#endif +extern LIBCLAMAV_EXPORT int have_clamjit; +#ifdef __cplusplus +} +#endif +int cli_bytecode_init(struct cli_all_bc *allbc); +int cli_bytecode_load(struct cli_bc *bc, FILE *f, struct cli_dbio *dbio, int security, int sigperf); +int cli_bytecode_prepare2(struct cl_engine *engine, struct cli_all_bc *allbc, unsigned dconfmask); +int cli_bytecode_run(const struct cli_all_bc *bcs, const struct cli_bc *bc, struct cli_bc_ctx *ctx); +void cli_bytecode_destroy(struct cli_bc *bc); +int cli_bytecode_done(struct cli_all_bc *allbc); + +/* Bytecode IR descriptions */ +void cli_bytecode_describe(const struct cli_bc *bc); +void cli_bytetype_describe(const struct cli_bc *bc); +void cli_bytevalue_describe(const struct cli_bc *bc, unsigned funcid); +void cli_byteinst_describe(const struct cli_bc_inst *inst, unsigned *bbnum); +void cli_bytefunc_describe(const struct cli_bc *bc, unsigned funcid); + +/* Hooks */ +struct cli_exe_info; +struct cli_ctx_tag; +struct cli_target_info; +int cli_bytecode_runlsig(struct cli_ctx_tag *ctx, struct cli_target_info *info, const struct cli_all_bc *bcs, unsigned bc_idx, const uint32_t *lsigcnt, const uint32_t *lsigsuboff, fmap_t *map); +int cli_bytecode_runhook(struct cli_ctx_tag *cctx, const struct cl_engine *engine, struct cli_bc_ctx *ctx, unsigned id, fmap_t *map); + +#ifdef __cplusplus +extern "C" { +#endif + +int bytecode_init(void); +/* Bytecode internal debug API */ +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); +typedef void (*bc_dbg_callback_trace_val)(struct cli_bc_ctx *, const char *name, uint32_t value); +typedef void (*bc_dbg_callback_trace_ptr)(struct cli_bc_ctx *, const void *val); +void cli_bytecode_context_set_trace(struct cli_bc_ctx *, unsigned level, + bc_dbg_callback_trace, + bc_dbg_callback_trace_op, + bc_dbg_callback_trace_val, + bc_dbg_callback_trace_ptr); +void cli_sigperf_print(void); +void cli_sigperf_events_destroy(void); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/clamscan/libclamav/bytecode_api.c b/clamscan/libclamav/bytecode_api.c new file mode 100644 index 0000000..b6c9ae9 --- /dev/null +++ b/clamscan/libclamav/bytecode_api.c @@ -0,0 +1,2340 @@ +/* + * ClamAV bytecode internal API + * + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2009-2013 Sourcefire, Inc. + * + * Authors: Török Edvin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + * MA 02110-1301, USA. + */ + +#ifdef HAVE_CONFIG_H +#include "clamav-config.h" +#endif + +#ifdef HAVE_UNISTD_H +#include +#endif +#include +#include +#include +#include +#include +#include + +#if HAVE_JSON +#include +#endif +#if HAVE_BZLIB_H +#include +#endif + +#include "clamav.h" +#include "clambc.h" +#include "bytecode.h" +#include "bytecode_priv.h" +#include "type_desc.h" +#include "bytecode_api.h" +#include "bytecode_api_impl.h" +#include "others.h" +#include "pe.h" +#include "pdf.h" +#include "disasm.h" +#include "scanners.h" +#include "jsparse/js-norm.h" +#include "hashtab.h" +#include "str.h" +#include "filetypes.h" +#include "lzma_iface.h" + +#define EV ctx->bc_events + +#define STRINGIFY(x) #x +#define TOSTRING(x) STRINGIFY(x) +#define API_MISUSE() cli_event_error_str(EV, "API misuse @" TOSTRING(__LINE__)) + +struct bc_lzma { + struct CLI_LZMA stream; + int32_t from; + int32_t to; +}; + +#if HAVE_BZLIB_H +struct bc_bzip2 { + bz_stream stream; + int32_t from; + int32_t to; +}; +#endif + +uint32_t cli_bcapi_test1(struct cli_bc_ctx *ctx, uint32_t a, uint32_t b) +{ + UNUSEDPARAM(ctx); + return (a == 0xf00dbeef && b == 0xbeeff00d) ? 0x12345678 : 0x55; +} + +uint32_t cli_bcapi_test2(struct cli_bc_ctx *ctx, uint32_t a) +{ + UNUSEDPARAM(ctx); + return a == 0xf00d ? 0xd00f : 0x5555; +} + +int32_t cli_bcapi_read(struct cli_bc_ctx *ctx, uint8_t *data, int32_t size) +{ + size_t n; + if (!ctx->fmap) { + API_MISUSE(); + return -1; + } + if (size < 0 || size > CLI_MAX_ALLOCATION) { + cli_warnmsg("bytecode: negative read size: %d\n", size); + API_MISUSE(); + return -1; + } + n = fmap_readn(ctx->fmap, data, ctx->off, size); + if ((n == 0) || (n == (size_t)-1)) { + cli_dbgmsg("bcapi_read: fmap_readn failed (requested %d)\n", size); + cli_event_count(EV, BCEV_READ_ERR); + return (int32_t)n; + } + cli_event_int(EV, BCEV_OFFSET, ctx->off); + cli_event_fastdata(EV, BCEV_READ, data, size); + //cli_event_data(EV, BCEV_READ, data, n); + ctx->off += n; + return (int32_t)n; +} + +int32_t cli_bcapi_seek(struct cli_bc_ctx *ctx, int32_t pos, uint32_t whence) +{ + off_t off; + if (!ctx->fmap) { + cli_dbgmsg("bcapi_seek: no fmap\n"); + API_MISUSE(); + return -1; + } + switch (whence) { + case 0: + off = pos; + break; + case 1: + off = ctx->off + pos; + break; + case 2: + off = ctx->file_size + pos; + break; + default: + API_MISUSE(); + cli_dbgmsg("bcapi_seek: invalid whence value\n"); + return -1; + } + if (off < 0 || off > ctx->file_size) { + cli_dbgmsg("bcapi_seek: out of file: %lld (max %d)\n", + (long long)off, ctx->file_size); + return -1; + } + cli_event_int(EV, BCEV_OFFSET, off); + ctx->off = off; + return off; +} + +uint32_t cli_bcapi_debug_print_str(struct cli_bc_ctx *ctx, const uint8_t *str, uint32_t len) +{ + UNUSEDPARAM(len); + cli_event_fastdata(EV, BCEV_DBG_STR, str, strlen((const char *)str)); + cli_dbgmsg("bytecode debug: %s\n", str); + return 0; +} + +uint32_t cli_bcapi_debug_print_uint(struct cli_bc_ctx *ctx, uint32_t a) +{ + cli_event_int(EV, BCEV_DBG_INT, a); + //cli_dbgmsg("bytecode debug: %d\n", a); + //return 0; + if (!cli_debug_flag) + return 0; + return fprintf(stderr, "%d", a); +} + +/*TODO: compiler should make sure that only constants are passed here, and not + * pointers to arbitrary locations that may not be valid when bytecode finishes + * executing */ +uint32_t cli_bcapi_setvirusname(struct cli_bc_ctx *ctx, const uint8_t *name, uint32_t len) +{ + UNUSEDPARAM(len); + ctx->virname = (const char *)name; + return 0; +} + +uint32_t cli_bcapi_disasm_x86(struct cli_bc_ctx *ctx, struct DISASM_RESULT *res, uint32_t len) +{ + int n; + const unsigned char *buf; + const unsigned char *next; + UNUSEDPARAM(len); + if (!res || !ctx->fmap || (size_t)(ctx->off) >= ctx->fmap->len) { + API_MISUSE(); + return -1; + } + /* 32 should be longest instr we support decoding. + * When we'll support mmx/sse instructions this should be updated! */ + n = MIN(32, ctx->fmap->len - ctx->off); + buf = fmap_need_off_once(ctx->fmap, ctx->off, n); + if (buf) + next = cli_disasm_one(buf, n, res, 0); + else + next = NULL; + if (!next) { + cli_dbgmsg("bcapi_disasm: failed\n"); + cli_event_count(EV, BCEV_DISASM_FAIL); + return -1; + } + return ctx->off + next - buf; +} + +/* TODO: field in ctx, id of last bytecode that called magicscandesc, reset + * after hooks/other bytecodes are run. TODO: need a more generic solution + * to avoid uselessly recursing on bytecode-unpacked files, but also a way to + * override the limit if we need it in a special situation */ +int32_t cli_bcapi_write(struct cli_bc_ctx *ctx, uint8_t *data, int32_t len) +{ + char err[128]; + size_t res; + + cli_ctx *cctx = (cli_ctx *)ctx->ctx; + if (len < 0) { + cli_warnmsg("Bytecode API: called with negative length!\n"); + API_MISUSE(); + return -1; + } + if (!ctx->outfd) { + ctx->tempfile = cli_gentemp(cctx ? cctx->engine->tmpdir : NULL); + if (!ctx->tempfile) { + cli_dbgmsg("Bytecode API: Unable to allocate memory for tempfile\n"); + cli_event_error_oom(EV, 0); + return -1; + } + ctx->outfd = open(ctx->tempfile, O_RDWR | O_CREAT | O_EXCL | O_TRUNC | O_BINARY, 0600); + if (ctx->outfd == -1) { + ctx->outfd = 0; + cli_warnmsg("Bytecode API: Can't create file %s: %s\n", ctx->tempfile, cli_strerror(errno, err, sizeof(err))); + cli_event_error_str(EV, "cli_bcapi_write: Can't create temporary file"); + free(ctx->tempfile); + return -1; + } + cli_dbgmsg("bytecode opened new tempfile: %s\n", ctx->tempfile); + } + + cli_event_fastdata(ctx->bc_events, BCEV_WRITE, data, len); + if (cli_checklimits("bytecode api", cctx, ctx->written + len, 0, 0)) + return -1; + res = cli_writen(ctx->outfd, data, (size_t)len); + if (res > 0) ctx->written += res; + if (res == (size_t)-1) { + cli_warnmsg("Bytecode API: write failed: %s\n", cli_strerror(errno, err, sizeof(err))); + cli_event_error_str(EV, "cli_bcapi_write: write failed"); + } + return (int32_t)res; +} + +void cli_bytecode_context_set_trace(struct cli_bc_ctx *ctx, unsigned level, + bc_dbg_callback_trace trace, + bc_dbg_callback_trace_op trace_op, + bc_dbg_callback_trace_val trace_val, + bc_dbg_callback_trace_ptr trace_ptr) +{ + ctx->trace = trace; + ctx->trace_op = trace_op; + ctx->trace_val = trace_val; + ctx->trace_ptr = trace_ptr; + ctx->trace_level = level; +} + +uint32_t cli_bcapi_trace_scope(struct cli_bc_ctx *ctx, const uint8_t *scope, uint32_t scopeid) +{ + if (LIKELY(!ctx->trace_level)) + return 0; + if (ctx->scope != (const char *)scope) { + ctx->scope = (const char *)scope ? (const char *)scope : "?"; + ctx->scopeid = scopeid; + ctx->trace_level |= 0x80; /* temporarily increase level to print params */ + } else if ((ctx->trace_level >= trace_scope) && ctx->scopeid != scopeid) { + ctx->scopeid = scopeid; + ctx->trace_level |= 0x40; /* temporarily increase level to print location */ + } + return 0; +} + +uint32_t cli_bcapi_trace_directory(struct cli_bc_ctx *ctx, const uint8_t *dir, uint32_t dummy) +{ + UNUSEDPARAM(dummy); + if (LIKELY(!ctx->trace_level)) + return 0; + ctx->directory = (const char *)dir ? (const char *)dir : ""; + return 0; +} + +uint32_t cli_bcapi_trace_source(struct cli_bc_ctx *ctx, const uint8_t *file, uint32_t line) +{ + if (LIKELY(ctx->trace_level < trace_line)) + return 0; + if (ctx->file != (const char *)file || ctx->line != line) { + ctx->col = 0; + ctx->file = (const char *)file ? (const char *)file : "??"; + ctx->line = line; + } + return 0; +} + +uint32_t cli_bcapi_trace_op(struct cli_bc_ctx *ctx, const uint8_t *op, uint32_t col) +{ + if (LIKELY(ctx->trace_level < trace_col)) + return 0; + if (ctx->trace_level & 0xc0) { + ctx->col = col; + /* func/scope changed and they needed param/location event */ + ctx->trace(ctx, (ctx->trace_level & 0x80) ? trace_func : trace_scope); + ctx->trace_level &= ~0xc0; + } + if (LIKELY(ctx->trace_level < trace_col)) + return 0; + if (ctx->col != col) { + ctx->col = col; + ctx->trace(ctx, trace_col); + } else { + ctx->trace(ctx, trace_line); + } + if (LIKELY(ctx->trace_level < trace_op)) + return 0; + if (ctx->trace_op && op) + ctx->trace_op(ctx, (const char *)op); + return 0; +} + +uint32_t cli_bcapi_trace_value(struct cli_bc_ctx *ctx, const uint8_t *name, uint32_t value) +{ + if (LIKELY(ctx->trace_level < trace_val)) + return 0; + if (ctx->trace_level & 0x80) { + if ((ctx->trace_level & 0x7f) < trace_param) + return 0; + ctx->trace(ctx, trace_param); + } + if (ctx->trace_val && name) + ctx->trace_val(ctx, (const char *)name, value); + return 0; +} + +uint32_t cli_bcapi_trace_ptr(struct cli_bc_ctx *ctx, const uint8_t *ptr, uint32_t dummy) +{ + UNUSEDPARAM(dummy); + if (LIKELY(ctx->trace_level < trace_val)) + return 0; + if (ctx->trace_level & 0x80) { + if ((ctx->trace_level & 0x7f) < trace_param) + return 0; + ctx->trace(ctx, trace_param); + } + if (ctx->trace_ptr) + ctx->trace_ptr(ctx, ptr); + return 0; +} + +uint32_t cli_bcapi_pe_rawaddr(struct cli_bc_ctx *ctx, uint32_t rva) +{ + uint32_t ret; + unsigned err = 0; + const struct cli_pe_hook_data *pe = ctx->hooks.pedata; + ret = cli_rawaddr(rva, ctx->sections, pe->nsections, &err, + ctx->file_size, pe->hdr_size); + if (err) { + cli_dbgmsg("bcapi_pe_rawaddr invalid rva: %u\n", rva); + return PE_INVALID_RVA; + } + return ret; +} + +static inline const char *cli_memmem(const char *haystack, unsigned hlen, + const unsigned char *needle, unsigned nlen) +{ + const char *p; + unsigned char c; + if (!needle || !haystack) { + return NULL; + } + c = *needle++; + if (nlen == 1) + return memchr(haystack, c, hlen); + + while (hlen >= nlen) { + p = haystack; + haystack = memchr(haystack, c, hlen - nlen + 1); + if (!haystack) + return NULL; + hlen -= haystack + 1 - p; + p = haystack + 1; + if (!memcmp(p, needle, nlen - 1)) + return haystack; + haystack = p; + } + return NULL; +} + +int32_t cli_bcapi_file_find(struct cli_bc_ctx *ctx, const uint8_t *data, uint32_t len) +{ + fmap_t *map = ctx->fmap; + if (!map || len <= 0) { + cli_dbgmsg("bcapi_file_find preconditions not met\n"); + API_MISUSE(); + return -1; + } + return cli_bcapi_file_find_limit(ctx, data, len, map->len); +} + +int32_t cli_bcapi_file_find_limit(struct cli_bc_ctx *ctx, const uint8_t *data, uint32_t len, int32_t limit) +{ + char buf[4096]; + fmap_t *map = ctx->fmap; + uint32_t off = ctx->off; + size_t n; + size_t limit_sz; + + if (!map || (len > sizeof(buf) / 4) || (len <= 0) || (limit <= 0)) { + cli_dbgmsg("bcapi_file_find_limit preconditions not met\n"); + API_MISUSE(); + return -1; + } + + limit_sz = (size_t)limit; + + cli_event_int(EV, BCEV_OFFSET, off); + cli_event_fastdata(EV, BCEV_FIND, data, len); + for (;;) { + const char *p; + size_t readlen = sizeof(buf); + if (off + readlen > limit_sz) { + if (off > limit_sz) { + return -1; + } else { + readlen = limit_sz - off; + } + } + n = fmap_readn(map, buf, off, readlen); + if ((n < len) || (n == (size_t)-1)) + return -1; + p = cli_memmem(buf, n, data, len); + if (p) + return off + (p - buf); + off += n; + } + return -1; +} + +int32_t cli_bcapi_file_byteat(struct cli_bc_ctx *ctx, uint32_t off) +{ + unsigned char c; + if (!ctx->fmap) { + cli_dbgmsg("bcapi_file_byteat: no fmap\n"); + return -1; + } + cli_event_int(EV, BCEV_OFFSET, off); + if (fmap_readn(ctx->fmap, &c, off, 1) != 1) { + cli_dbgmsg("bcapi_file_byteat: fmap_readn failed at %u\n", off); + return -1; + } + return c; +} + +uint8_t *cli_bcapi_malloc(struct cli_bc_ctx *ctx, uint32_t size) +{ + void *v; +#if USE_MPOOL + if (!ctx->mpool) { + ctx->mpool = mpool_create(); + if (!ctx->mpool) { + cli_dbgmsg("bytecode: mpool_create failed!\n"); + cli_event_error_oom(EV, 0); + return NULL; + } + } + v = MPOOL_MALLOC(ctx->mpool, size); +#else + /* TODO: implement using a list of pointers we allocated! */ + cli_errmsg("cli_bcapi_malloc not implemented for systems without mmap yet!\n"); + v = cli_malloc(size); +#endif + if (!v) + cli_event_error_oom(EV, size); + return v; +} + +int32_t cli_bcapi_get_pe_section(struct cli_bc_ctx *ctx, struct cli_exe_section *section, uint32_t num) +{ + if (num < ctx->hooks.pedata->nsections) { + memcpy(section, &ctx->sections[num], sizeof(struct cli_exe_section)); + return 0; + } + return -1; +} + +int32_t cli_bcapi_fill_buffer(struct cli_bc_ctx *ctx, uint8_t *buf, + uint32_t buflen, uint32_t filled, + uint32_t pos, uint32_t fill) +{ + int32_t res, remaining, tofill; + UNUSEDPARAM(fill); + if (!buf || !buflen || buflen > CLI_MAX_ALLOCATION || filled > buflen) { + cli_dbgmsg("fill_buffer1\n"); + API_MISUSE(); + return -1; + } + if (ctx->off >= ctx->file_size) { + cli_dbgmsg("fill_buffer2\n"); + API_MISUSE(); + return 0; + } + remaining = filled - pos; + if (remaining) { + if (!CLI_ISCONTAINED(buf, buflen, buf + pos, remaining)) { + cli_dbgmsg("fill_buffer3\n"); + API_MISUSE(); + return -1; + } + memmove(buf, buf + pos, remaining); + } + tofill = buflen - remaining; + if (!CLI_ISCONTAINED(buf, buflen, buf + remaining, tofill)) { + cli_dbgmsg("fill_buffer4\n"); + API_MISUSE(); + return -1; + } + res = cli_bcapi_read(ctx, buf + remaining, tofill); + if (res <= 0) { + cli_dbgmsg("fill_buffer5\n"); + API_MISUSE(); + return res; + } + return remaining + res; +} + +int32_t cli_bcapi_extract_new(struct cli_bc_ctx *ctx, int32_t id) +{ + cli_ctx *cctx; + int res = -1; + + cli_event_count(EV, BCEV_EXTRACTED); + cli_dbgmsg("previous tempfile had %u bytes\n", ctx->written); + if (!ctx->written) + return 0; + if (ctx->ctx && cli_updatelimits(ctx->ctx, ctx->written)) + return -1; + ctx->written = 0; + if (lseek(ctx->outfd, 0, SEEK_SET) == -1) { + cli_dbgmsg("bytecode: call to lseek() has failed\n"); + return CL_ESEEK; + } + cli_dbgmsg("bytecode: scanning extracted file %s\n", ctx->tempfile); + cctx = (cli_ctx *)ctx->ctx; + if (cctx) { + res = cli_magic_scan_desc_type(ctx->outfd, ctx->tempfile, cctx, ctx->containertype, NULL); + if (res == CL_VIRUS) { + ctx->virname = cli_get_last_virus(cctx); + ctx->found = 1; + } + } + if ((cctx && cctx->engine->keeptmp) || + (ftruncate(ctx->outfd, 0) == -1)) { + + close(ctx->outfd); + if (!(cctx && cctx->engine->keeptmp) && ctx->tempfile) + cli_unlink(ctx->tempfile); + free(ctx->tempfile); + ctx->tempfile = NULL; + ctx->outfd = 0; + } + cli_dbgmsg("bytecode: extracting new file with id %u\n", id); + return res; +} + +#define BUF 16 +int32_t cli_bcapi_read_number(struct cli_bc_ctx *ctx, uint32_t radix) +{ + unsigned i; + const char *p; + int32_t result; + + if ((radix != 10 && radix != 16) || !ctx->fmap) + return -1; + cli_event_int(EV, BCEV_OFFSET, ctx->off); + while ((p = fmap_need_off_once(ctx->fmap, ctx->off, BUF))) { + for (i = 0; i < BUF; i++) { + if ((p[i] >= '0' && p[i] <= '9') || (radix == 16 && ((p[i] >= 'a' && p[i] <= 'f') || (p[i] >= 'A' && p[i] <= 'F')))) { + char *endptr; + p = fmap_need_ptr_once(ctx->fmap, p + i, 16); + if (!p) + return -1; + result = strtoul(p, &endptr, radix); + ctx->off += i + (endptr - p); + return result; + } + } + ctx->off += BUF; + } + return -1; +} + +int32_t cli_bcapi_hashset_new(struct cli_bc_ctx *ctx) +{ + unsigned n = ctx->nhashsets + 1; + struct cli_hashset *s = cli_realloc(ctx->hashsets, sizeof(*ctx->hashsets) * n); + if (!s) { + cli_event_error_oom(EV, 0); + return -1; + } + ctx->hashsets = s; + ctx->nhashsets = n; + s = &s[n - 1]; + cli_hashset_init(s, 16, 80); + return n - 1; +} + +static struct cli_hashset *get_hashset(struct cli_bc_ctx *ctx, int32_t id) +{ + if (id < 0 || (unsigned int)id >= ctx->nhashsets || !ctx->hashsets) { + API_MISUSE(); + return NULL; + } + return &ctx->hashsets[id]; +} + +int32_t cli_bcapi_hashset_add(struct cli_bc_ctx *ctx, int32_t id, uint32_t key) +{ + struct cli_hashset *s = get_hashset(ctx, id); + if (!s) + return -1; + return cli_hashset_addkey(s, key); +} + +int32_t cli_bcapi_hashset_remove(struct cli_bc_ctx *ctx, int32_t id, uint32_t key) +{ + struct cli_hashset *s = get_hashset(ctx, id); + if (!s) + return -1; + return cli_hashset_removekey(s, key); +} + +int32_t cli_bcapi_hashset_contains(struct cli_bc_ctx *ctx, int32_t id, uint32_t key) +{ + struct cli_hashset *s = get_hashset(ctx, id); + if (!s) + return -1; + return cli_hashset_contains(s, key); +} + +int32_t cli_bcapi_hashset_empty(struct cli_bc_ctx *ctx, int32_t id) +{ + struct cli_hashset *s = get_hashset(ctx, id); + return s ? !s->count : 1; +} + +int32_t cli_bcapi_hashset_done(struct cli_bc_ctx *ctx, int32_t id) +{ + struct cli_hashset *s = get_hashset(ctx, id); + if (!s) + return -1; + cli_hashset_destroy(s); + if ((unsigned int)id == ctx->nhashsets - 1) { + ctx->nhashsets--; + if (!ctx->nhashsets) { + free(ctx->hashsets); + ctx->hashsets = NULL; + } else { + s = cli_realloc(ctx->hashsets, ctx->nhashsets * sizeof(*s)); + if (s) + ctx->hashsets = s; + } + } + return 0; +} + +int32_t cli_bcapi_buffer_pipe_new(struct cli_bc_ctx *ctx, uint32_t size) +{ + unsigned char *data; + struct bc_buffer *b; + unsigned n = ctx->nbuffers + 1; + + data = cli_calloc(1, size); + if (!data) + return -1; + b = cli_realloc(ctx->buffers, sizeof(*ctx->buffers) * n); + if (!b) { + free(data); + return -1; + } + ctx->buffers = b; + ctx->nbuffers = n; + b = &b[n - 1]; + + b->data = data; + b->size = size; + b->write_cursor = b->read_cursor = 0; + return n - 1; +} + +int32_t cli_bcapi_buffer_pipe_new_fromfile(struct cli_bc_ctx *ctx, uint32_t at) +{ + struct bc_buffer *b; + unsigned n = ctx->nbuffers + 1; + + if (at >= ctx->file_size) + return -1; + + b = cli_realloc(ctx->buffers, sizeof(*ctx->buffers) * n); + if (!b) { + return -1; + } + ctx->buffers = b; + ctx->nbuffers = n; + b = &b[n - 1]; + + /* NULL data means read from file at pos read_cursor */ + b->data = NULL; + b->size = 0; + b->read_cursor = at; + b->write_cursor = 0; + return n - 1; +} + +static struct bc_buffer *get_buffer(struct cli_bc_ctx *ctx, int32_t id) +{ + if (!ctx->buffers || id < 0 || (unsigned int)id >= ctx->nbuffers) { + cli_dbgmsg("bytecode api: invalid buffer id %u\n", id); + return NULL; + } + return &ctx->buffers[id]; +} + +uint32_t cli_bcapi_buffer_pipe_read_avail(struct cli_bc_ctx *ctx, int32_t id) +{ + struct bc_buffer *b = get_buffer(ctx, id); + if (!b) + return 0; + if (b->data) { + if (b->write_cursor <= b->read_cursor) + return 0; + return b->write_cursor - b->read_cursor; + } + if (!ctx->fmap || b->read_cursor >= ctx->file_size) + return 0; + if (b->read_cursor + BUFSIZ <= ctx->file_size) + return BUFSIZ; + return ctx->file_size - b->read_cursor; +} + +const uint8_t *cli_bcapi_buffer_pipe_read_get(struct cli_bc_ctx *ctx, int32_t id, uint32_t size) +{ + struct bc_buffer *b = get_buffer(ctx, id); + if (!b || size > cli_bcapi_buffer_pipe_read_avail(ctx, id) || !size) + return NULL; + if (b->data) + return b->data + b->read_cursor; + return fmap_need_off(ctx->fmap, b->read_cursor, size); +} + +int32_t cli_bcapi_buffer_pipe_read_stopped(struct cli_bc_ctx *ctx, int32_t id, uint32_t amount) +{ + struct bc_buffer *b = get_buffer(ctx, id); + if (!b) + return -1; + if (b->data) { + if (b->write_cursor <= b->read_cursor) + return -1; + if (b->read_cursor + amount > b->write_cursor) + b->read_cursor = b->write_cursor; + else + b->read_cursor += amount; + if (b->read_cursor >= b->size && + b->write_cursor >= b->size) + b->read_cursor = b->write_cursor = 0; + return 0; + } + b->read_cursor += amount; + return 0; +} + +uint32_t cli_bcapi_buffer_pipe_write_avail(struct cli_bc_ctx *ctx, int32_t id) +{ + struct bc_buffer *b = get_buffer(ctx, id); + if (!b) + return 0; + if (!b->data) + return 0; + if (b->write_cursor >= b->size) + return 0; + return b->size - b->write_cursor; +} + +uint8_t *cli_bcapi_buffer_pipe_write_get(struct cli_bc_ctx *ctx, int32_t id, uint32_t size) +{ + struct bc_buffer *b = get_buffer(ctx, id); + if (!b || size > cli_bcapi_buffer_pipe_write_avail(ctx, id) || !size) + return NULL; + if (!b->data) + return NULL; + return b->data + b->write_cursor; +} + +int32_t cli_bcapi_buffer_pipe_write_stopped(struct cli_bc_ctx *ctx, int32_t id, uint32_t size) +{ + struct bc_buffer *b = get_buffer(ctx, id); + if (!b || !b->data) + return -1; + if (b->write_cursor + size >= b->size) + b->write_cursor = b->size; + else + b->write_cursor += size; + return 0; +} + +int32_t cli_bcapi_buffer_pipe_done(struct cli_bc_ctx *ctx, int32_t id) +{ + struct bc_buffer *b = get_buffer(ctx, id); + if (!b) + return -1; + free(b->data); + b->data = NULL; + return -0; +} + +int32_t cli_bcapi_inflate_init(struct cli_bc_ctx *ctx, int32_t from, int32_t to, int32_t windowBits) +{ + int ret; + z_stream stream; + struct bc_inflate *b; + unsigned n = ctx->ninflates + 1; + if (!get_buffer(ctx, from) || !get_buffer(ctx, to)) { + cli_dbgmsg("bytecode api: inflate_init: invalid buffers!\n"); + return -1; + } + b = cli_realloc(ctx->inflates, sizeof(*ctx->inflates) * n); + if (!b) { + return -1; + } + ctx->inflates = b; + ctx->ninflates = n; + b = &b[n - 1]; + + b->from = from; + b->to = to; + b->needSync = 0; + memset(&b->stream, 0, sizeof(stream)); + ret = inflateInit2(&b->stream, windowBits); + switch (ret) { + case Z_MEM_ERROR: + cli_dbgmsg("bytecode api: inflateInit2: out of memory!\n"); + return -1; + case Z_VERSION_ERROR: + cli_dbgmsg("bytecode api: inflateinit2: zlib version error!\n"); + return -1; + case Z_STREAM_ERROR: + cli_dbgmsg("bytecode api: inflateinit2: zlib stream error!\n"); + return -1; + case Z_OK: + break; + default: + cli_dbgmsg("bytecode api: inflateInit2: unknown error %d\n", ret); + return -1; + } + + return n - 1; +} + +static struct bc_inflate *get_inflate(struct cli_bc_ctx *ctx, int32_t id) +{ + if (id < 0 || (unsigned int)id >= ctx->ninflates || !ctx->inflates) + return NULL; + return &ctx->inflates[id]; +} + +int32_t cli_bcapi_inflate_process(struct cli_bc_ctx *ctx, int32_t id) +{ + int ret; + unsigned avail_in_orig, avail_out_orig; + struct bc_inflate *b = get_inflate(ctx, id); + if (!b || b->from == -1 || b->to == -1) + return -1; + + b->stream.avail_in = avail_in_orig = + cli_bcapi_buffer_pipe_read_avail(ctx, b->from); + + b->stream.next_in = (void *)cli_bcapi_buffer_pipe_read_get(ctx, b->from, + b->stream.avail_in); + + b->stream.avail_out = avail_out_orig = + cli_bcapi_buffer_pipe_write_avail(ctx, b->to); + + b->stream.next_out = cli_bcapi_buffer_pipe_write_get(ctx, b->to, + b->stream.avail_out); + + if (!b->stream.avail_in || !b->stream.avail_out || !b->stream.next_in || !b->stream.next_out) + return -1; + /* try hard to extract data, skipping over corrupted data */ + do { + if (!b->needSync) { + ret = inflate(&b->stream, Z_NO_FLUSH); + if (ret == Z_DATA_ERROR) { + cli_dbgmsg("bytecode api: inflate at %lu: %s, trying to recover\n", b->stream.total_in, + b->stream.msg); + b->needSync = 1; + } + } + if (b->needSync) { + ret = inflateSync(&b->stream); + if (ret == Z_OK) { + cli_dbgmsg("bytecode api: successfully recovered inflate stream\n"); + b->needSync = 0; + continue; + } + } + break; + } while (1); + cli_bcapi_buffer_pipe_read_stopped(ctx, b->from, avail_in_orig - b->stream.avail_in); + cli_bcapi_buffer_pipe_write_stopped(ctx, b->to, avail_out_orig - b->stream.avail_out); + + if (ret == Z_MEM_ERROR) { + cli_dbgmsg("bytecode api: out of memory!\n"); + cli_bcapi_inflate_done(ctx, id); + return ret; + } + if (ret == Z_STREAM_END) { + cli_bcapi_inflate_done(ctx, id); + } + if (ret == Z_BUF_ERROR) { + cli_dbgmsg("bytecode api: buffer error!\n"); + } + + return ret; +} + +int32_t cli_bcapi_inflate_done(struct cli_bc_ctx *ctx, int32_t id) +{ + int ret; + struct bc_inflate *b = get_inflate(ctx, id); + if (!b || b->from == -1 || b->to == -1) + return -1; + ret = inflateEnd(&b->stream); + if (ret == Z_STREAM_ERROR) + cli_dbgmsg("bytecode api: inflateEnd: %s\n", b->stream.msg); + b->from = b->to = -1; + return ret; +} + +int32_t cli_bcapi_lzma_init(struct cli_bc_ctx *ctx, int32_t from, int32_t to) +{ + int ret; + struct bc_lzma *b; + unsigned n = ctx->nlzmas + 1; + unsigned avail_in_orig; + + if (!get_buffer(ctx, from) || !get_buffer(ctx, to)) { + cli_dbgmsg("bytecode api: lzma_init: invalid buffers!\n"); + return -1; + } + + avail_in_orig = cli_bcapi_buffer_pipe_read_avail(ctx, from); + if (avail_in_orig < LZMA_PROPS_SIZE + 8) { + cli_dbgmsg("bytecode api: lzma_init: not enough bytes in pipe to read LZMA header!\n"); + return -1; + } + + b = cli_realloc(ctx->lzmas, sizeof(*ctx->lzmas) * n); + if (!b) { + return -1; + } + ctx->lzmas = b; + ctx->nlzmas = n; + b = &b[n - 1]; + + b->from = from; + b->to = to; + memset(&b->stream, 0, sizeof(b->stream)); + + b->stream.avail_in = avail_in_orig; + b->stream.next_in = (void *)cli_bcapi_buffer_pipe_read_get(ctx, b->from, + b->stream.avail_in); + + if ((ret = cli_LzmaInit(&b->stream, 0)) != LZMA_RESULT_OK) { + cli_dbgmsg("bytecode api: LzmaInit: Failed to initialize LZMA decompressor: %d!\n", ret); + cli_bcapi_buffer_pipe_read_stopped(ctx, b->from, avail_in_orig - b->stream.avail_in); + return ret; + } + + cli_bcapi_buffer_pipe_read_stopped(ctx, b->from, avail_in_orig - b->stream.avail_in); + return n - 1; +} + +static struct bc_lzma *get_lzma(struct cli_bc_ctx *ctx, int32_t id) +{ + if (id < 0 || (unsigned int)id >= ctx->nlzmas || !ctx->lzmas) + return NULL; + return &ctx->lzmas[id]; +} + +int32_t cli_bcapi_lzma_process(struct cli_bc_ctx *ctx, int32_t id) +{ + int ret; + unsigned avail_in_orig, avail_out_orig; + struct bc_lzma *b = get_lzma(ctx, id); + if (!b || b->from == -1 || b->to == -1) + return -1; + + b->stream.avail_in = avail_in_orig = + cli_bcapi_buffer_pipe_read_avail(ctx, b->from); + + b->stream.next_in = (void *)cli_bcapi_buffer_pipe_read_get(ctx, b->from, + b->stream.avail_in); + + b->stream.avail_out = avail_out_orig = + cli_bcapi_buffer_pipe_write_avail(ctx, b->to); + b->stream.next_out = (uint8_t *)cli_bcapi_buffer_pipe_write_get(ctx, b->to, + b->stream.avail_out); + + if (!b->stream.avail_in || !b->stream.avail_out || !b->stream.next_in || !b->stream.next_out) + return -1; + + ret = cli_LzmaDecode(&b->stream); + cli_bcapi_buffer_pipe_read_stopped(ctx, b->from, avail_in_orig - b->stream.avail_in); + cli_bcapi_buffer_pipe_write_stopped(ctx, b->to, avail_out_orig - b->stream.avail_out); + + if (ret != LZMA_RESULT_OK && ret != LZMA_STREAM_END) { + cli_dbgmsg("bytecode api: LzmaDecode: Error %d while decoding\n", ret); + cli_bcapi_lzma_done(ctx, id); + } + + return ret; +} + +int32_t cli_bcapi_lzma_done(struct cli_bc_ctx *ctx, int32_t id) +{ + struct bc_lzma *b = get_lzma(ctx, id); + if (!b || b->from == -1 || b->to == -1) + return -1; + cli_LzmaShutdown(&b->stream); + b->from = b->to = -1; + return 0; +} + +int32_t cli_bcapi_bzip2_init(struct cli_bc_ctx *ctx, int32_t from, int32_t to) +{ +#if HAVE_BZLIB_H + int ret; + struct bc_bzip2 *b; + unsigned n = ctx->nbzip2s + 1; + if (!get_buffer(ctx, from) || !get_buffer(ctx, to)) { + cli_dbgmsg("bytecode api: bzip2_init: invalid buffers!\n"); + return -1; + } + b = cli_realloc(ctx->bzip2s, sizeof(*ctx->bzip2s) * n); + if (!b) { + return -1; + } + ctx->bzip2s = b; + ctx->nbzip2s = n; + b = &b[n - 1]; + + b->from = from; + b->to = to; + memset(&b->stream, 0, sizeof(b->stream)); + ret = BZ2_bzDecompressInit(&b->stream, 0, 0); + switch (ret) { + case BZ_CONFIG_ERROR: + cli_dbgmsg("bytecode api: BZ2_bzDecompressInit: Library has been mis-compiled!\n"); + return -1; + case BZ_PARAM_ERROR: + cli_dbgmsg("bytecode api: BZ2_bzDecompressInit: Invalid arguments!\n"); + return -1; + case BZ_MEM_ERROR: + cli_dbgmsg("bytecode api: BZ2_bzDecompressInit: Insufficient memory available!\n"); + return -1; + case BZ_OK: + break; + default: + cli_dbgmsg("bytecode api: BZ2_bzDecompressInit: unknown error %d\n", ret); + return -1; + } + + return n - 1; +#else + return -1; +#endif +} + +#if HAVE_BZLIB_H +static struct bc_bzip2 *get_bzip2(struct cli_bc_ctx *ctx, int32_t id) +{ + if (id < 0 || (unsigned int)id >= ctx->nbzip2s || !ctx->bzip2s) + return NULL; + return &ctx->bzip2s[id]; +} +#endif + +int32_t cli_bcapi_bzip2_process(struct cli_bc_ctx *ctx, int32_t id) +{ +#if HAVE_BZLIB_H + int ret; + unsigned avail_in_orig, avail_out_orig; + struct bc_bzip2 *b = get_bzip2(ctx, id); + if (!b || b->from == -1 || b->to == -1) + return -1; + + b->stream.avail_in = avail_in_orig = + cli_bcapi_buffer_pipe_read_avail(ctx, b->from); + + b->stream.next_in = (void *)cli_bcapi_buffer_pipe_read_get(ctx, b->from, + b->stream.avail_in); + + b->stream.avail_out = avail_out_orig = + cli_bcapi_buffer_pipe_write_avail(ctx, b->to); + + b->stream.next_out = (char *)cli_bcapi_buffer_pipe_write_get(ctx, b->to, + b->stream.avail_out); + + if (!b->stream.avail_in || !b->stream.avail_out || !b->stream.next_in || !b->stream.next_out) + return -1; + /* try hard to extract data, skipping over corrupted data */ + ret = BZ2_bzDecompress(&b->stream); + cli_bcapi_buffer_pipe_read_stopped(ctx, b->from, avail_in_orig - b->stream.avail_in); + cli_bcapi_buffer_pipe_write_stopped(ctx, b->to, avail_out_orig - b->stream.avail_out); + + /* check if nothing written whatsoever */ + if ((ret != BZ_OK) && (b->stream.avail_out == avail_out_orig)) { + /* Inflation failed */ + cli_errmsg("cli_bcapi_bzip2_process: failed to decompress data\n"); + } + + return ret; +#else + return -1; +#endif +} + +int32_t cli_bcapi_bzip2_done(struct cli_bc_ctx *ctx, int32_t id) +{ +#if HAVE_BZLIB_H + struct bc_bzip2 *b = get_bzip2(ctx, id); + if (!b || b->from == -1 || b->to == -1) + return -1; + BZ2_bzDecompressEnd(&b->stream); + b->from = b->to = -1; + return 0; +#else + return -1; +#endif +} + +int32_t cli_bcapi_bytecode_rt_error(struct cli_bc_ctx *ctx, int32_t id) +{ + int32_t line = id >> 8; + int32_t col = id & 0xff; + UNUSEDPARAM(ctx); + cli_warnmsg("Bytecode runtime error at line %u, col %u\n", line, col); + return 0; +} + +int32_t cli_bcapi_jsnorm_init(struct cli_bc_ctx *ctx, int32_t from) +{ + struct parser_state *state; + struct bc_jsnorm *b; + unsigned n = ctx->njsnorms + 1; + if (!get_buffer(ctx, from)) { + cli_dbgmsg("bytecode api: jsnorm_init: invalid buffers!\n"); + return -1; + } + state = cli_js_init(); + if (!state) + return -1; + b = cli_realloc(ctx->jsnorms, sizeof(*ctx->jsnorms) * n); + if (!b) { + cli_js_destroy(state); + return -1; + } + ctx->jsnorms = b; + ctx->njsnorms = n; + b = &b[n - 1]; + b->from = from; + b->state = state; + if (!ctx->jsnormdir) { + cli_ctx *cctx = (cli_ctx *)ctx->ctx; + ctx->jsnormdir = cli_gentemp_with_prefix(cctx ? cctx->engine->tmpdir : NULL, "normalized-js"); + if (ctx->jsnormdir) { + if (mkdir(ctx->jsnormdir, 0700)) { + cli_dbgmsg("js: can't create temp dir %s\n", ctx->jsnormdir); + free(ctx->jsnormdir); + return CL_ETMPDIR; + } + } + } + return n - 1; +} + +static struct bc_jsnorm *get_jsnorm(struct cli_bc_ctx *ctx, int32_t id) +{ + if (id < 0 || (unsigned int)id >= ctx->njsnorms || !ctx->jsnorms) + return NULL; + return &ctx->jsnorms[id]; +} + +int32_t cli_bcapi_jsnorm_process(struct cli_bc_ctx *ctx, int32_t id) +{ + unsigned avail; + const unsigned char *in; + cli_ctx *cctx = ctx->ctx; + struct bc_jsnorm *b = get_jsnorm(ctx, id); + if (!b || b->from == -1 || !b->state) + return -1; + + avail = cli_bcapi_buffer_pipe_read_avail(ctx, b->from); + in = cli_bcapi_buffer_pipe_read_get(ctx, b->from, avail); + if (!avail || !in) + return -1; + if (cctx && cli_checklimits("bytecode js api", cctx, ctx->jsnormwritten + avail, 0, 0)) + return -1; + cli_bcapi_buffer_pipe_read_stopped(ctx, b->from, avail); + cli_js_process_buffer(b->state, (char *)in, avail); + return 0; +} + +int32_t cli_bcapi_jsnorm_done(struct cli_bc_ctx *ctx, int32_t id) +{ + struct bc_jsnorm *b = get_jsnorm(ctx, id); + if (!b || b->from == -1) + return -1; + if (ctx->ctx && cli_updatelimits(ctx->ctx, ctx->jsnormwritten)) + return -1; + ctx->jsnormwritten = 0; + cli_js_parse_done(b->state); + cli_js_output(b->state, ctx->jsnormdir); + cli_js_destroy(b->state); + b->from = -1; + return 0; +} + +static inline double myround(double a) +{ + if (a < 0) + return a - 0.5; + return a + 0.5; +} + +int32_t cli_bcapi_ilog2(struct cli_bc_ctx *ctx, uint32_t a, uint32_t b) +{ + double f; + UNUSEDPARAM(ctx); + if (!b) + return 0x7fffffff; + /* log(a/b) is -32..32, so 2^26*32=2^31 covers the entire range of int32 */ + f = (1 << 26) * log((double)a / b) / log(2); + return (int32_t)myround(f); +} + +int32_t cli_bcapi_ipow(struct cli_bc_ctx *ctx, int32_t a, int32_t b, int32_t c) +{ + UNUSEDPARAM(ctx); + if (!a && b < 0) + return 0x7fffffff; + return (int32_t)myround(c * pow(a, b)); +} + +uint32_t cli_bcapi_iexp(struct cli_bc_ctx *ctx, int32_t a, int32_t b, int32_t c) +{ + double f; + UNUSEDPARAM(ctx); + if (!b) + return 0x7fffffff; + f = c * exp((double)a / b); + return (uint32_t)myround(f); +} + +int32_t cli_bcapi_isin(struct cli_bc_ctx *ctx, int32_t a, int32_t b, int32_t c) +{ + double f; + UNUSEDPARAM(ctx); + if (!b) + return 0x7fffffff; + f = c * sin((double)a / b); + return (int32_t)myround(f); +} + +int32_t cli_bcapi_icos(struct cli_bc_ctx *ctx, int32_t a, int32_t b, int32_t c) +{ + double f; + UNUSEDPARAM(ctx); + if (!b) + return 0x7fffffff; + f = c * cos((double)a / b); + return (int32_t)myround(f); +} + +int32_t cli_bcapi_memstr(struct cli_bc_ctx *ctx, const uint8_t *h, int32_t hs, + const uint8_t *n, int32_t ns) +{ + const uint8_t *s; + if (!h || !n || hs < 0 || ns < 0) { + API_MISUSE(); + return -1; + } + cli_event_fastdata(EV, BCEV_MEM_1, h, hs); + cli_event_fastdata(EV, BCEV_MEM_2, n, ns); + s = (const uint8_t *)cli_memstr((const char *)h, hs, (const char *)n, ns); + if (!s) + return -1; + return s - h; +} + +int32_t cli_bcapi_hex2ui(struct cli_bc_ctx *ctx, uint32_t ah, uint32_t bh) +{ + char result = 0; + unsigned char in[2]; + UNUSEDPARAM(ctx); + + in[0] = ah; + in[1] = bh; + + if (cli_hex2str_to((const char *)in, &result, 2) == -1) + return -1; + return result; +} + +int32_t cli_bcapi_atoi(struct cli_bc_ctx *ctx, const uint8_t *str, int32_t len) +{ + int32_t number = 0; + const uint8_t *end = str + len; + UNUSEDPARAM(ctx); + + while (isspace(*str) && str < end) str++; + if (str == end) + return -1; /* all spaces */ + if (*str == '+') str++; + if (str == end) + return -1; /* all spaces and +*/ + if (*str == '-') + return -1; /* only positive numbers */ + if (!isdigit(*str)) + return -1; + while (isdigit(*str) && str < end) { + number = number * 10 + (*str - '0'); + } + return number; +} + +uint32_t cli_bcapi_debug_print_str_start(struct cli_bc_ctx *ctx, const uint8_t *s, uint32_t len) +{ + UNUSEDPARAM(ctx); + + if (!s || len <= 0) + return -1; + cli_event_fastdata(EV, BCEV_DBG_STR, s, len); + cli_dbgmsg("bytecode debug: %.*s", len, s); + return 0; +} + +uint32_t cli_bcapi_debug_print_str_nonl(struct cli_bc_ctx *ctx, const uint8_t *s, uint32_t len) +{ + UNUSEDPARAM(ctx); + + if (!s || len <= 0) + return -1; + if (!cli_debug_flag) + return 0; + return fwrite(s, 1, len, stderr); +} + +uint32_t cli_bcapi_entropy_buffer(struct cli_bc_ctx *ctx, uint8_t *s, int32_t len) +{ + uint32_t probTable[256]; + unsigned int i; + double entropy = 0; + double log2 = log(2); + + UNUSEDPARAM(ctx); + + if (!s || len <= 0) + return -1; + memset(probTable, 0, sizeof(probTable)); + for (i = 0; i < (unsigned int)len; i++) { + probTable[s[i]]++; + } + for (i = 0; i < 256; i++) { + double p; + if (!probTable[i]) + continue; + p = (double)probTable[i] / len; + entropy += -p * log(p) / log2; + } + entropy *= 1 << 26; + return (uint32_t)entropy; +} + +int32_t cli_bcapi_map_new(struct cli_bc_ctx *ctx, int32_t keysize, int32_t valuesize) +{ + unsigned n = ctx->nmaps + 1; + struct cli_map *s; + if (!keysize) + return -1; + s = cli_realloc(ctx->maps, sizeof(*ctx->maps) * n); + if (!s) + return -1; + ctx->maps = s; + ctx->nmaps = n; + s = &s[n - 1]; + cli_map_init(s, keysize, valuesize, 16); + return n - 1; +} + +static struct cli_map *get_hashtab(struct cli_bc_ctx *ctx, int32_t id) +{ + if (id < 0 || (unsigned int)id >= ctx->nmaps || !ctx->maps) + return NULL; + return &ctx->maps[id]; +} + +int32_t cli_bcapi_map_addkey(struct cli_bc_ctx *ctx, const uint8_t *key, int32_t keysize, int32_t id) +{ + struct cli_map *s = get_hashtab(ctx, id); + if (!s) + return -1; + return cli_map_addkey(s, key, keysize); +} + +int32_t cli_bcapi_map_setvalue(struct cli_bc_ctx *ctx, const uint8_t *value, int32_t valuesize, int32_t id) +{ + struct cli_map *s = get_hashtab(ctx, id); + if (!s) + return -1; + return cli_map_setvalue(s, value, valuesize); +} + +int32_t cli_bcapi_map_remove(struct cli_bc_ctx *ctx, const uint8_t *key, int32_t keysize, int32_t id) +{ + struct cli_map *s = get_hashtab(ctx, id); + if (!s) + return -1; + return cli_map_removekey(s, key, keysize); +} + +int32_t cli_bcapi_map_find(struct cli_bc_ctx *ctx, const uint8_t *key, int32_t keysize, int32_t id) +{ + struct cli_map *s = get_hashtab(ctx, id); + if (!s) + return -1; + return cli_map_find(s, key, keysize); +} + +int32_t cli_bcapi_map_getvaluesize(struct cli_bc_ctx *ctx, int32_t id) +{ + struct cli_map *s = get_hashtab(ctx, id); + if (!s) + return -1; + return cli_map_getvalue_size(s); +} + +uint8_t *cli_bcapi_map_getvalue(struct cli_bc_ctx *ctx, int32_t id, int32_t valuesize) +{ + struct cli_map *s = get_hashtab(ctx, id); + if (!s) + return NULL; + if (cli_map_getvalue_size(s) != valuesize) + return NULL; + return cli_map_getvalue(s); +} + +int32_t cli_bcapi_map_done(struct cli_bc_ctx *ctx, int32_t id) +{ + struct cli_map *s = get_hashtab(ctx, id); + if (!s) + return -1; + cli_map_delete(s); + if ((unsigned int)id == ctx->nmaps - 1) { + ctx->nmaps--; + if (!ctx->nmaps) { + free(ctx->maps); + ctx->maps = NULL; + } else { + s = cli_realloc(ctx->maps, ctx->nmaps * (sizeof(*s))); + if (s) + ctx->maps = s; + } + } + return 0; +} + +uint32_t cli_bcapi_engine_functionality_level(struct cli_bc_ctx *ctx) +{ + UNUSEDPARAM(ctx); + return cl_retflevel(); +} + +uint32_t cli_bcapi_engine_dconf_level(struct cli_bc_ctx *ctx) +{ + UNUSEDPARAM(ctx); + return CL_FLEVEL_DCONF; +} + +uint32_t cli_bcapi_engine_scan_options(struct cli_bc_ctx *ctx) +{ + cli_ctx *cctx = (cli_ctx *)ctx->ctx; + uint32_t options = CL_SCAN_RAW; + + if (cctx->options->general & CL_SCAN_GENERAL_ALLMATCHES) + options |= CL_SCAN_ALLMATCHES; + if (cctx->options->general & CL_SCAN_GENERAL_HEURISTICS) + options |= CL_SCAN_ALGORITHMIC; + if (cctx->options->general & CL_SCAN_GENERAL_COLLECT_METADATA) + options |= CL_SCAN_FILE_PROPERTIES; + if (cctx->options->general & CL_SCAN_GENERAL_HEURISTIC_PRECEDENCE) + options |= CL_SCAN_HEURISTIC_PRECEDENCE; + + if (cctx->options->parse & CL_SCAN_PARSE_ARCHIVE) + options |= CL_SCAN_ARCHIVE; + if (cctx->options->parse & CL_SCAN_PARSE_ELF) + options |= CL_SCAN_ELF; + if (cctx->options->parse & CL_SCAN_PARSE_PDF) + options |= CL_SCAN_PDF; + if (cctx->options->parse & CL_SCAN_PARSE_SWF) + options |= CL_SCAN_SWF; + if (cctx->options->parse & CL_SCAN_PARSE_HWP3) + options |= CL_SCAN_HWP3; + if (cctx->options->parse & CL_SCAN_PARSE_XMLDOCS) + options |= CL_SCAN_XMLDOCS; + if (cctx->options->parse & CL_SCAN_PARSE_MAIL) + options |= CL_SCAN_MAIL; + if (cctx->options->parse & CL_SCAN_PARSE_OLE2) + options |= CL_SCAN_OLE2; + if (cctx->options->parse & CL_SCAN_PARSE_HTML) + options |= CL_SCAN_HTML; + if (cctx->options->parse & CL_SCAN_PARSE_PE) + options |= CL_SCAN_PE; + // if (cctx->options->parse & CL_SCAN_MAIL_URL) + // options |= CL_SCAN_MAILURL; /* deprecated circa 2009 */ + + if (cctx->options->heuristic & CL_SCAN_HEURISTIC_BROKEN) + options |= CL_SCAN_BLOCKBROKEN; + if (cctx->options->heuristic & CL_SCAN_HEURISTIC_EXCEEDS_MAX) + options |= CL_SCAN_BLOCKMAX; + if (cctx->options->heuristic & CL_SCAN_HEURISTIC_PHISHING_SSL_MISMATCH) + options |= CL_SCAN_PHISHING_BLOCKSSL; + if (cctx->options->heuristic & CL_SCAN_HEURISTIC_PHISHING_CLOAK) + options |= CL_SCAN_PHISHING_BLOCKCLOAK; + if (cctx->options->heuristic & CL_SCAN_HEURISTIC_MACROS) + options |= CL_SCAN_BLOCKMACROS; + if ((cctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE) || + (cctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED_DOC)) + options |= CL_SCAN_BLOCKENCRYPTED; + if (cctx->options->heuristic & CL_SCAN_HEURISTIC_PARTITION_INTXN) + options |= CL_SCAN_PARTITION_INTXN; + if (cctx->options->heuristic & CL_SCAN_HEURISTIC_STRUCTURED) + options |= CL_SCAN_STRUCTURED; + if (cctx->options->heuristic & CL_SCAN_HEURISTIC_STRUCTURED_SSN_NORMAL) + options |= CL_SCAN_STRUCTURED_SSN_NORMAL; + if (cctx->options->heuristic & CL_SCAN_HEURISTIC_STRUCTURED_SSN_STRIPPED) + options |= CL_SCAN_STRUCTURED_SSN_STRIPPED; + + if (cctx->options->mail & CL_SCAN_MAIL_PARTIAL_MESSAGE) + options |= CL_SCAN_PARTIAL_MESSAGE; + + if (cctx->options->dev & CL_SCAN_DEV_COLLECT_SHA) + options |= CL_SCAN_INTERNAL_COLLECT_SHA; + if (cctx->options->dev & CL_SCAN_DEV_COLLECT_PERFORMANCE_INFO) + options |= CL_SCAN_PERFORMANCE_INFO; + + return options; +} + +uint32_t cli_bcapi_engine_scan_options_ex(struct cli_bc_ctx *ctx, const uint8_t *option_name, uint32_t name_len) +{ + uint32_t i = 0; + uint32_t result = 0; + char *option_name_l = NULL; + + if (ctx == NULL || option_name == NULL || name_len == 0) { + cli_warnmsg("engine_scan_options_ex: Invalid arguments!\n"); + goto done; + } + + cli_ctx *cctx = (cli_ctx *)ctx->ctx; + if (cctx == NULL || cctx->options == NULL) { + cli_warnmsg("engine_scan_options_ex: Invalid arguments!\n"); + goto done; + } + + option_name_l = malloc(name_len + 1); + if (NULL == option_name_l) { + cli_warnmsg("Failed to allocate memory for option name.\n"); + goto done; + } + + for (i = 0; i < name_len; i++) { + option_name_l[0] = tolower(option_name[i]); + } + option_name_l[name_len] = '\0'; + + if (strncmp(option_name_l, "general", MIN(name_len, sizeof("general")))) { + if (cli_memstr(option_name_l, name_len, "allmatch", sizeof("allmatch"))) { + result = (cctx->options->general & CL_SCAN_GENERAL_ALLMATCHES) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "collect metadata", sizeof("collect metadata"))) { + result = (cctx->options->general & CL_SCAN_GENERAL_COLLECT_METADATA) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "heuristics", sizeof("heuristics"))) { + result = (cctx->options->general & CL_SCAN_GENERAL_HEURISTICS) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "precedence", sizeof("precedence"))) { + result = (cctx->options->general & CL_SCAN_GENERAL_HEURISTIC_PRECEDENCE) ? 1 : 0; + } + /* else unknown option */ + } else if (strncmp(option_name_l, "parse", MIN(name_len, sizeof("parse")))) { + if (cli_memstr(option_name_l, name_len, "archive", sizeof("archive"))) { + result = (cctx->options->parse & CL_SCAN_PARSE_ARCHIVE) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "elf", sizeof("elf"))) { + result = (cctx->options->parse & CL_SCAN_PARSE_ELF) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "pdf", sizeof("pdf"))) { + result = (cctx->options->parse & CL_SCAN_PARSE_PDF) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "swf", sizeof("swf"))) { + result = (cctx->options->parse & CL_SCAN_PARSE_SWF) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "hwp3", sizeof("hwp3"))) { + result = (cctx->options->parse & CL_SCAN_PARSE_HWP3) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "xmldocs", sizeof("xmldocs"))) { + result = (cctx->options->parse & CL_SCAN_PARSE_XMLDOCS) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "mail", sizeof("mail"))) { + result = (cctx->options->parse & CL_SCAN_PARSE_MAIL) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "ole2", sizeof("ole2"))) { + result = (cctx->options->parse & CL_SCAN_PARSE_OLE2) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "html", sizeof("html"))) { + result = (cctx->options->parse & CL_SCAN_PARSE_HTML) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "pe", sizeof("pe"))) { + result = (cctx->options->parse & CL_SCAN_PARSE_PE) ? 1 : 0; + } + /* else unknown option */ + } else if (strncmp(option_name_l, "heuristic", MIN(name_len, sizeof("heuristic")))) { + if (cli_memstr(option_name_l, name_len, "broken", sizeof("broken"))) { + result = (cctx->options->heuristic & CL_SCAN_HEURISTIC_BROKEN) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "exceeds max", sizeof("exceeds max"))) { + result = (cctx->options->heuristic & CL_SCAN_HEURISTIC_EXCEEDS_MAX) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "phishing ssl mismatch", sizeof("phishing ssl mismatch"))) { + result = (cctx->options->heuristic & CL_SCAN_HEURISTIC_PHISHING_SSL_MISMATCH) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "phishing cloak", sizeof("phishing cloak"))) { + result = (cctx->options->heuristic & CL_SCAN_HEURISTIC_PHISHING_CLOAK) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "macros", sizeof("macros"))) { + result = (cctx->options->heuristic & CL_SCAN_HEURISTIC_MACROS) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "encrypted archive", sizeof("encrypted archive"))) { + result = (cctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "encrypted doc", sizeof("encrypted doc"))) { + result = (cctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED_DOC) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "partition intersection", sizeof("partition intersection"))) { + result = (cctx->options->heuristic & CL_SCAN_HEURISTIC_PARTITION_INTXN) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "structured", sizeof("structured"))) { + result = (cctx->options->heuristic & CL_SCAN_HEURISTIC_STRUCTURED) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "structured ssn normal", sizeof("structured ssn normal"))) { + result = (cctx->options->heuristic & CL_SCAN_HEURISTIC_STRUCTURED_SSN_NORMAL) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "structured ssn stripped", sizeof("structured ssn stripped"))) { + result = (cctx->options->heuristic & CL_SCAN_HEURISTIC_STRUCTURED_SSN_STRIPPED) ? 1 : 0; + } + /* else unknown option */ + } else if (strncmp(option_name_l, "mail", MIN(name_len, sizeof("mail")))) { + if (cli_memstr(option_name_l, name_len, "partial message", sizeof("partial message"))) { + result = (cctx->options->mail & CL_SCAN_MAIL_PARTIAL_MESSAGE) ? 1 : 0; + } + /* else unknown option */ + } else if (strncmp(option_name_l, "dev", MIN(name_len, sizeof("dev")))) { + if (cli_memstr(option_name_l, name_len, "collect sha", sizeof("collect sha"))) { + result = (cctx->options->dev & CL_SCAN_DEV_COLLECT_SHA) ? 1 : 0; + } else if (cli_memstr(option_name_l, name_len, "collect performance info", sizeof("collect performance info"))) { + result = (cctx->options->dev & CL_SCAN_DEV_COLLECT_PERFORMANCE_INFO) ? 1 : 0; + } + /* else unknown option */ + } + /* else unknown option */ + +done: + + if (NULL != option_name_l) + free(option_name_l); + + return result; +} + +uint32_t cli_bcapi_engine_db_options(struct cli_bc_ctx *ctx) +{ + cli_ctx *cctx = (cli_ctx *)ctx->ctx; + return cctx->engine->dboptions; +} + +int32_t cli_bcapi_extract_set_container(struct cli_bc_ctx *ctx, uint32_t ftype) +{ + if (ftype > CL_TYPE_IGNORED) + return -1; + ctx->containertype = ftype; + return 0; +} + +int32_t cli_bcapi_input_switch(struct cli_bc_ctx *ctx, int32_t extracted_file) +{ + fmap_t *map; + if (0 == extracted_file) { + /* + * Set input back to original fmap. + */ + if (0 == ctx->extracted_file_input) { + /* Input already set to original fmap, nothing to do. */ + return 0; + } + + /* Free the fmap used for the extracted file */ + funmap(ctx->fmap); + + /* Restore pointer to original fmap */ + cli_bytecode_context_setfile(ctx, ctx->save_map); + ctx->save_map = NULL; + + ctx->extracted_file_input = 0; + cli_dbgmsg("bytecode api: input switched back to main file\n"); + return 0; + } else { + /* + * Set input to extracted file. + */ + if (1 == ctx->extracted_file_input) { + /* Input already set to extracted file, nothing to do. */ + return 0; + } + + if (ctx->outfd < 0) { + /* no valid fd to switch to use for fmap */ + return -1; + } + + /* Create fmap for the extracted file */ + map = fmap(ctx->outfd, 0, 0, NULL); + if (!map) { + cli_warnmsg("can't mmap() extracted temporary file %s\n", ctx->tempfile); + return -1; + } + + /* Save off pointer to original fmap */ + ctx->save_map = ctx->fmap; + cli_bytecode_context_setfile(ctx, map); + + ctx->extracted_file_input = 1; + cli_dbgmsg("bytecode api: input switched to extracted file\n"); + return 0; + } +} + +uint32_t cli_bcapi_get_environment(struct cli_bc_ctx *ctx, struct cli_environment *env, uint32_t len) +{ + if (len > sizeof(*env)) { + cli_dbgmsg("cli_bcapi_get_environment len %u > %lu\n", len, (unsigned long)sizeof(*env)); + return -1; + } + memcpy(env, ctx->env, len); + return 0; +} + +uint32_t cli_bcapi_disable_bytecode_if(struct cli_bc_ctx *ctx, const int8_t *reason, uint32_t len, uint32_t cond) +{ + UNUSEDPARAM(len); + if (ctx->bc->kind != BC_STARTUP) { + cli_dbgmsg("Bytecode must be BC_STARTUP to call disable_bytecode_if\n"); + return -1; + } + if (!cond) + return ctx->bytecode_disable_status; + if (*reason == '^') + cli_warnmsg("Bytecode: disabling completely because %s\n", reason + 1); + else + cli_dbgmsg("Bytecode: disabling completely because %s\n", reason); + ctx->bytecode_disable_status = 2; + return ctx->bytecode_disable_status; +} + +uint32_t cli_bcapi_disable_jit_if(struct cli_bc_ctx *ctx, const int8_t *reason, uint32_t len, uint32_t cond) +{ + UNUSEDPARAM(len); + if (ctx->bc->kind != BC_STARTUP) { + cli_dbgmsg("Bytecode must be BC_STARTUP to call disable_jit_if\n"); + return -1; + } + if (!cond) + return ctx->bytecode_disable_status; + if (*reason == '^') + cli_warnmsg("Bytecode: disabling JIT because %s\n", reason + 1); + else + cli_dbgmsg("Bytecode: disabling JIT because %s\n", reason); + if (ctx->bytecode_disable_status != 2) /* no reenabling */ + ctx->bytecode_disable_status = 1; + return ctx->bytecode_disable_status; +} + +int32_t cli_bcapi_version_compare(struct cli_bc_ctx *ctx, const uint8_t *lhs, uint32_t lhs_len, + const uint8_t *rhs, uint32_t rhs_len) +{ + unsigned i = 0, j = 0; + unsigned long li = 0, ri = 0; + UNUSEDPARAM(ctx); + do { + while (i < lhs_len && j < rhs_len && lhs[i] == rhs[j] && + !isdigit(lhs[i]) && !isdigit(rhs[j])) { + i++; + j++; + } + if (i == lhs_len && j == rhs_len) + return 0; + if (i == lhs_len) + return -1; + if (j == rhs_len) + return 1; + if (!isdigit(lhs[i]) || !isdigit(rhs[j])) + return lhs[i] < rhs[j] ? -1 : 1; + while (isdigit(lhs[i]) && i < lhs_len) + li = 10 * li + (lhs[i++] - '0'); + while (isdigit(rhs[j]) && j < rhs_len) + ri = 10 * ri + (rhs[j++] - '0'); + if (li < ri) + return -1; + if (li > ri) + return 1; + } while (1); +} + +static int check_bits(uint32_t query, uint32_t value, uint8_t shift, uint8_t mask) +{ + uint8_t q = (query >> shift) & mask; + uint8_t v = (value >> shift) & mask; + /* q == mask -> ANY */ + if (q == v || q == mask) + return 1; + return 0; +} + +uint32_t cli_bcapi_check_platform(struct cli_bc_ctx *ctx, uint32_t a, uint32_t b, uint32_t c) +{ + unsigned ret = + check_bits(a, ctx->env->platform_id_a, 24, 0xff) && + check_bits(a, ctx->env->platform_id_a, 20, 0xf) && + check_bits(a, ctx->env->platform_id_a, 16, 0xf) && + check_bits(a, ctx->env->platform_id_a, 8, 0xff) && + check_bits(a, ctx->env->platform_id_a, 0, 0xff) && + check_bits(b, ctx->env->platform_id_b, 28, 0xf) && + check_bits(b, ctx->env->platform_id_b, 24, 0xf) && + check_bits(b, ctx->env->platform_id_b, 16, 0xff) && + check_bits(b, ctx->env->platform_id_b, 8, 0xff) && + check_bits(b, ctx->env->platform_id_b, 0, 0xff) && + check_bits(c, ctx->env->platform_id_c, 24, 0xff) && + check_bits(c, ctx->env->platform_id_c, 16, 0xff) && + check_bits(c, ctx->env->platform_id_c, 8, 0xff) && + check_bits(c, ctx->env->platform_id_c, 0, 0xff); + if (ret) { + cli_dbgmsg("check_platform(0x%08x,0x%08x,0x%08x) = match\n", a, b, c); + } + return ret; +} + +int cli_bytecode_context_setpdf(struct cli_bc_ctx *ctx, unsigned phase, + unsigned nobjs, + struct pdf_obj **objs, uint32_t *pdf_flags, + uint32_t pdfsize, uint32_t pdfstartoff) +{ + ctx->pdf_nobjs = nobjs; + ctx->pdf_objs = objs; + ctx->pdf_flags = pdf_flags; + ctx->pdf_size = pdfsize; + ctx->pdf_startoff = pdfstartoff; + ctx->pdf_phase = phase; + return 0; +} + +int32_t cli_bcapi_pdf_get_obj_num(struct cli_bc_ctx *ctx) +{ + if (!ctx->pdf_phase) + return -1; + return ctx->pdf_nobjs; +} + +int32_t cli_bcapi_pdf_get_flags(struct cli_bc_ctx *ctx) +{ + if (!ctx->pdf_phase) + return -1; + return *ctx->pdf_flags; +} + +int32_t cli_bcapi_pdf_set_flags(struct cli_bc_ctx *ctx, int32_t flags) +{ + if (!ctx->pdf_phase) + return -1; + cli_dbgmsg("cli_pdf: bytecode set_flags %08x -> %08x\n", + *ctx->pdf_flags, + flags); + *ctx->pdf_flags = flags; + return 0; +} + +int32_t cli_bcapi_pdf_lookupobj(struct cli_bc_ctx *ctx, uint32_t objid) +{ + unsigned i; + if (!ctx->pdf_phase) + return -1; + for (i = 0; i < ctx->pdf_nobjs; i++) { + if (ctx->pdf_objs[i]->id == objid) + return i; + } + return -1; +} + +uint32_t cli_bcapi_pdf_getobjsize(struct cli_bc_ctx *ctx, int32_t objidx) +{ + if (!ctx->pdf_phase || + (uint32_t)objidx >= ctx->pdf_nobjs || + ctx->pdf_phase == PDF_PHASE_POSTDUMP /* map is obj itself, no access to pdf anymore */ + ) + return 0; + if ((uint32_t)(objidx + 1) == ctx->pdf_nobjs) + return ctx->pdf_size - ctx->pdf_objs[objidx]->start; + return ctx->pdf_objs[objidx + 1]->start - ctx->pdf_objs[objidx]->start - 4; +} + +const uint8_t *cli_bcapi_pdf_getobj(struct cli_bc_ctx *ctx, int32_t objidx, uint32_t amount) +{ + uint32_t size = cli_bcapi_pdf_getobjsize(ctx, objidx); + if (amount > size) + return NULL; + return fmap_need_off(ctx->fmap, ctx->pdf_objs[objidx]->start, amount); +} + +int32_t cli_bcapi_pdf_getobjid(struct cli_bc_ctx *ctx, int32_t objidx) +{ + if (!ctx->pdf_phase || + (uint32_t)objidx >= ctx->pdf_nobjs) + return -1; + return ctx->pdf_objs[objidx]->id; +} + +int32_t cli_bcapi_pdf_getobjflags(struct cli_bc_ctx *ctx, int32_t objidx) +{ + if (!ctx->pdf_phase || + (uint32_t)objidx >= ctx->pdf_nobjs) + return -1; + return ctx->pdf_objs[objidx]->flags; +} + +int32_t cli_bcapi_pdf_setobjflags(struct cli_bc_ctx *ctx, int32_t objidx, int32_t flags) +{ + if (!ctx->pdf_phase || + (uint32_t)objidx >= ctx->pdf_nobjs) + return -1; + cli_dbgmsg("cli_pdf: bytecode setobjflags %08x -> %08x\n", + ctx->pdf_objs[objidx]->flags, + flags); + ctx->pdf_objs[objidx]->flags = flags; + return 0; +} + +int32_t cli_bcapi_pdf_get_offset(struct cli_bc_ctx *ctx, int32_t objidx) +{ + if (!ctx->pdf_phase || + (uint32_t)objidx >= ctx->pdf_nobjs) + return -1; + return ctx->pdf_startoff + ctx->pdf_objs[objidx]->start; +} + +int32_t cli_bcapi_pdf_get_phase(struct cli_bc_ctx *ctx) +{ + return ctx->pdf_phase; +} + +int32_t cli_bcapi_pdf_get_dumpedobjid(struct cli_bc_ctx *ctx) +{ + if (ctx->pdf_phase != PDF_PHASE_POSTDUMP) + return -1; + return ctx->pdf_dumpedid; +} + +int32_t cli_bcapi_running_on_jit(struct cli_bc_ctx *ctx) +{ + ctx->no_diff = 1; + return ctx->on_jit; +} + +int32_t cli_bcapi_get_file_reliability(struct cli_bc_ctx *ctx) +{ + cli_ctx *cctx = (cli_ctx *)ctx->ctx; + return cctx ? cctx->corrupted_input : 3; +} + +int32_t cli_bcapi_json_is_active(struct cli_bc_ctx *ctx) +{ +#if HAVE_JSON + cli_ctx *cctx = (cli_ctx *)ctx->ctx; + if (cctx->properties != NULL) { + return 1; + } +#else + UNUSEDPARAM(ctx); + cli_dbgmsg("bytecode api: libjson is not enabled!\n"); +#endif + return 0; +} + +static int32_t cli_bcapi_json_objs_init(struct cli_bc_ctx *ctx) +{ +#if HAVE_JSON + unsigned n = ctx->njsonobjs + 1; + json_object **j, **jobjs = (json_object **)(ctx->jsonobjs); + cli_ctx *cctx = (cli_ctx *)ctx->ctx; + + j = cli_realloc(jobjs, sizeof(json_object *) * n); + if (!j) { /* memory allocation failure */ + cli_event_error_oom(EV, 0); + return -1; + } + ctx->jsonobjs = (void **)j; + ctx->njsonobjs = n; + j[n - 1] = cctx->properties; + + return 0; +#else + UNUSEDPARAM(ctx); + return -1; +#endif +} + +#define INIT_JSON_OBJS(ctx) \ + if (!cli_bcapi_json_is_active(ctx)) \ + return -1; \ + if (ctx->njsonobjs == 0) { \ + if (cli_bcapi_json_objs_init(ctx)) { \ + return -1; \ + } \ + } + +int32_t cli_bcapi_json_get_object(struct cli_bc_ctx *ctx, const int8_t *name, int32_t name_len, int32_t objid) +{ +#if HAVE_JSON + unsigned n; + json_object **j, *jobj, **jobjs; + char *namep; + + INIT_JSON_OBJS(ctx); + jobjs = ((json_object **)(ctx->jsonobjs)); + if (objid < 0 || (unsigned int)objid >= ctx->njsonobjs) { + cli_dbgmsg("bytecode api[json_get_object]: invalid json objid requested\n"); + return -1; + } + + if (!name || name_len < 0) { + cli_dbgmsg("bytecode api[json_get_object]: unnamed object queried\n"); + return -1; + } + + n = ctx->njsonobjs + 1; + jobj = jobjs[objid]; + if (!jobj) /* shouldn't be possible */ + return -1; + namep = (char *)cli_malloc(sizeof(char) * (name_len + 1)); + if (!namep) + return -1; + strncpy(namep, (char *)name, name_len); + namep[name_len] = '\0'; + + if (!json_object_object_get_ex(jobj, namep, &jobj)) { /* object not found */ + free(namep); + return 0; + } + + j = cli_realloc(jobjs, sizeof(json_object *) * n); + if (!j) { /* memory allocation failure */ + free(namep); + cli_event_error_oom(EV, 0); + return -1; + } + ctx->jsonobjs = (void **)j; + ctx->njsonobjs = n; + j[n - 1] = jobj; + + cli_dbgmsg("bytecode api[json_get_object]: assigned %s => ID %d\n", namep, n - 1); + free(namep); + return n - 1; +#else + UNUSEDPARAM(ctx); + UNUSEDPARAM(name); + UNUSEDPARAM(name_len); + UNUSEDPARAM(objid); + cli_dbgmsg("bytecode api: libjson is not enabled!\n"); + return -1; +#endif +} + +int32_t cli_bcapi_json_get_type(struct cli_bc_ctx *ctx, int32_t objid) +{ +#if HAVE_JSON + enum json_type type; + json_object **jobjs; + + INIT_JSON_OBJS(ctx); + jobjs = ((json_object **)(ctx->jsonobjs)); + if (objid < 0 || (unsigned int)objid >= ctx->njsonobjs) { + cli_dbgmsg("bytecode api[json_get_type]: invalid json objid requested\n"); + return -1; + } + + type = json_object_get_type(jobjs[objid]); + switch (type) { + case json_type_null: + return JSON_TYPE_NULL; + case json_type_boolean: + return JSON_TYPE_BOOLEAN; + case json_type_double: + return JSON_TYPE_DOUBLE; + case json_type_int: + return JSON_TYPE_INT; + case json_type_object: + return JSON_TYPE_OBJECT; + case json_type_array: + return JSON_TYPE_ARRAY; + case json_type_string: + return JSON_TYPE_STRING; + default: + cli_dbgmsg("bytecode api[json_get_type]: unrecognized json type %d\n", type); + } + +#else + UNUSEDPARAM(ctx); + UNUSEDPARAM(objid); + cli_dbgmsg("bytecode api: libjson is not enabled!\n"); +#endif + return -1; +} + +int32_t cli_bcapi_json_get_array_length(struct cli_bc_ctx *ctx, int32_t objid) +{ +#if HAVE_JSON + enum json_type type; + json_object **jobjs; + + INIT_JSON_OBJS(ctx); + jobjs = (json_object **)(ctx->jsonobjs); + if (objid < 0 || (unsigned int)objid >= ctx->njsonobjs) { + cli_dbgmsg("bytecode api[json_array_get_length]: invalid json objid requested\n"); + return -1; + } + + type = json_object_get_type(jobjs[objid]); + if (type != json_type_array) { + return -2; /* error code for not an array */ + } + + return json_object_array_length(jobjs[objid]); +#else + UNUSEDPARAM(ctx); + UNUSEDPARAM(objid); + cli_dbgmsg("bytecode api: libjson is not enabled!\n"); + return -1; +#endif +} + +int32_t cli_bcapi_json_get_array_idx(struct cli_bc_ctx *ctx, int32_t idx, int32_t objid) +{ +#if HAVE_JSON + enum json_type type; + unsigned n; + int length; + json_object **j, *jarr = NULL, *jobj = NULL, **jobjs; + + INIT_JSON_OBJS(ctx); + jobjs = (json_object **)(ctx->jsonobjs); + if (objid < 0 || (unsigned int)objid >= ctx->njsonobjs) { + cli_dbgmsg("bytecode api[json_array_get_idx]: invalid json objid requested\n"); + return -1; + } + + jarr = jobjs[objid]; + if (!jarr) /* shouldn't be possible */ + return -1; + + type = json_object_get_type(jarr); + if (type != json_type_array) { + return -2; /* error code for not an array */ + } + + length = json_object_array_length(jarr); + if (idx >= 0 && idx < length) { + n = ctx->njsonobjs + 1; + + jobj = json_object_array_get_idx(jarr, idx); + if (!jobj) { /* object not found */ + return 0; + } + + j = cli_realloc(jobjs, sizeof(json_object *) * n); + if (!j) { /* memory allocation failure */ + cli_event_error_oom(EV, 0); + return -1; + } + ctx->jsonobjs = (void **)j; + ctx->njsonobjs = n; + j[n - 1] = jobj; + + cli_dbgmsg("bytecode api[json_array_get_idx]: assigned array @ %d => ID %d\n", idx, n - 1); + return n - 1; + } + + return 0; +#else + UNUSEDPARAM(ctx); + UNUSEDPARAM(idx); + UNUSEDPARAM(objid); + cli_dbgmsg("bytecode api: libjson is not enabled!\n"); + return -1; +#endif +} + +int32_t cli_bcapi_json_get_string_length(struct cli_bc_ctx *ctx, int32_t objid) +{ +#if HAVE_JSON + enum json_type type; + json_object *jobj, **jobjs; + int32_t len; + const char *jstr; + + INIT_JSON_OBJS(ctx); + jobjs = (json_object **)(ctx->jsonobjs); + if (objid < 0 || (unsigned int)objid >= ctx->njsonobjs) { + cli_dbgmsg("bytecode api[json_get_string_length]: invalid json objid requested\n"); + return -1; + } + + jobj = jobjs[objid]; + if (!jobj) /* shouldn't be possible */ + return -1; + + type = json_object_get_type(jobj); + if (type != json_type_string) { + return -2; /* error code for not an array */ + } + + //len = json_object_get_string_len(jobj); /* not in JSON <0.10 */ + jstr = json_object_get_string(jobj); + len = strlen(jstr); + + return len; +#else + UNUSEDPARAM(ctx); + UNUSEDPARAM(objid); + cli_dbgmsg("bytecode api: libjson is not enabled!\n"); + return -1; +#endif +} + +int32_t cli_bcapi_json_get_string(struct cli_bc_ctx *ctx, int8_t *str, int32_t str_len, int32_t objid) +{ +#if HAVE_JSON + enum json_type type; + json_object *jobj, **jobjs; + int32_t len; + const char *jstr; + + INIT_JSON_OBJS(ctx); + jobjs = (json_object **)(ctx->jsonobjs); + if (objid < 0 || (unsigned int)objid >= ctx->njsonobjs) { + cli_dbgmsg("bytecode api[json_get_string]: invalid json objid requested\n"); + return -1; + } + + jobj = jobjs[objid]; + if (!jobj) /* shouldn't be possible */ + return -1; + + type = json_object_get_type(jobj); + if (type != json_type_string) { + return -2; /* error code for not an array */ + } + + //len = json_object_get_string_len(jobj); /* not in JSON <0.10 */ + jstr = json_object_get_string(jobj); + len = strlen(jstr); + + if (len + 1 > str_len) { + /* limit on str-len */ + strncpy((char *)str, jstr, str_len - 1); + str[str_len - 1] = '\0'; + return str_len; + } else { + /* limit on len+1 */ + strncpy((char *)str, jstr, len); + str[len] = '\0'; + return len + 1; + } +#else + UNUSEDPARAM(ctx); + UNUSEDPARAM(str); + UNUSEDPARAM(str_len); + UNUSEDPARAM(objid); + cli_dbgmsg("bytecode api: libjson is not enabled!\n"); + return -1; +#endif +} + +int32_t cli_bcapi_json_get_boolean(struct cli_bc_ctx *ctx, int32_t objid) +{ +#if HAVE_JSON + json_object *jobj, **jobjs; + + INIT_JSON_OBJS(ctx); + jobjs = (json_object **)(ctx->jsonobjs); + if (objid < 0 || (unsigned int)objid >= ctx->njsonobjs) { + cli_dbgmsg("bytecode api[json_get_boolean]: invalid json objid requested\n"); + return -1; + } + + jobj = jobjs[objid]; + return json_object_get_boolean(jobj); +#else + UNUSEDPARAM(ctx); + UNUSEDPARAM(objid); + cli_dbgmsg("bytecode api: libjson is not enabled!\n"); + return 0; +#endif +} + +int32_t cli_bcapi_json_get_int(struct cli_bc_ctx *ctx, int32_t objid) +{ +#if HAVE_JSON + json_object *jobj, **jobjs; + + INIT_JSON_OBJS(ctx); + jobjs = (json_object **)(ctx->jsonobjs); + if (objid < 0 || (unsigned int)objid >= ctx->njsonobjs) { + cli_dbgmsg("bytecode api[json_get_int]: invalid json objid requested\n"); + return -1; + } + + jobj = jobjs[objid]; + return json_object_get_int(jobj); +#else + UNUSEDPARAM(ctx); + UNUSEDPARAM(objid); + cli_dbgmsg("bytecode api: libjson is not enabled!\n"); + return 0; +#endif +} + +//int64_t cli_bcapi_json_get_int64(struct cli_bc_ctx *ctx, int32_t objid); +//double cli_bcapi_json_get_double(struct cli_bc_ctx *ctx, int32_t objid); diff --git a/clamscan/libclamav/bytecode_api.h b/clamscan/libclamav/bytecode_api.h new file mode 100644 index 0000000..0296dde --- /dev/null +++ b/clamscan/libclamav/bytecode_api.h @@ -0,0 +1,1459 @@ +/* + * Copyright (C) 2013-2022 Cisco Systems, Inc. and/or its affiliates. All rights reserved. + * Copyright (C) 2009-2013 Sourcefire, Inc. + + * Authors: Török Edvin, Kevin Lin + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +/** @file bytecode_api.h */ +#ifndef BYTECODE_API_H +#define BYTECODE_API_H + +#ifdef __CLAMBC__ +#include "bytecode_execs.h" +#include "bytecode_pe.h" +#include "bytecode_disasm.h" +#include "bytecode_detect.h" +#endif + +#ifndef __CLAMBC__ +struct cli_exe_section; +struct DISASM_RESULT; +#endif + +#ifdef __CLAMBC__ +enum { + /** + * \group_pe + * Invalid RVA specified + */ + PE_INVALID_RVA = 0xFFFFFFFF +}; +#endif + +#ifndef __CLAMBC__ +#define PE_INVALID_RVA 0xFFFFFFFF +#endif + +/** +\group_config + * Specifies the bytecode type and how ClamAV executes it + */ +enum BytecodeKind { + /** generic bytecode, not tied a specific hook */ + BC_GENERIC = 0, + /** triggered at startup, only one is allowed per ClamAV startup */ + BC_STARTUP = 1, + _BC_START_HOOKS = 256, + /** executed on a logical trigger */ + BC_LOGICAL = 256, + /** specifies a PE unpacker, executed on PE files on a logical trigger */ + BC_PE_UNPACKER, + /** specifies a PDF hook, executes at a predetermined point of PDF parsing for PDF files */ + BC_PDF, + /** specifies a PE hook, executes at a predetermined point in PE parsing for PE files, + * both packed and unpacked files */ + BC_PE_ALL, + /** specifies a PRECLASS hook, executes at the end of file property collection and + * operates on the original file targeted for property collection */ + BC_PRECLASS, + /** specifies an ELF unpacker, executed on ELF files on a logical trigger */ + BC_ELF_UNPACKER, + /** specifies an Mach-O unpacker, executed on Mach-O files on a logical trigger */ + BC_MACHO_UNPACKER, + _BC_LAST_HOOK +}; + +/** +\group_config + * LibClamAV functionality level constants + */ +enum FunctionalityLevels { + FUNC_LEVEL_096 = 51, /**< LibClamAV release 0.96.0: bytecode engine released */ + FUNC_LEVEL_096_dev = 52, + FUNC_LEVEL_096_1 = 53, /**< LibClamAV release 0.96.1: logical signature use of VI/macros + * requires this minimum functionality level */ + FUNC_LEVEL_096_1_dev = 54, + FUNC_LEVEL_096_2 = 54, /**< LibClamAV release 0.96.2: PDF Hooks require this minimum level */ + FUNC_LEVEL_096_2_dev = 55, + FUNC_LEVEL_096_3 = 55, /**< LibClamAV release 0.96.3: BC_PE_ALL bytecodes require this minimum level */ + FUNC_LEVEL_096_4 = 56, /**< LibClamAV release 0.96.4: minimum recommended engine version, older versions have quadratic load time */ + FUNC_LEVEL_096_5 = 58, /**< LibClamAV release 0.96.5 */ + + FUNC_LEVEL_097 = 60, /**< LibClamAV release 0.97.0: older bytecodes may incorrectly use 57 */ + FUNC_LEVEL_097_1 = 61, /**< LibClamAV release 0.97.1 */ + FUNC_LEVEL_097_2 = 62, /**< LibClamAV release 0.97.2 */ + FUNC_LEVEL_097_3 = 63, /**< LibClamAV release 0.97.3: last bcc changes as former team resigns*/ + FUNC_LEVEL_097_4 = 64, /**< LibClamAV release 0.97.4 */ + FUNC_LEVEL_097_5 = 65, /**< LibClamAV release 0.97.5 */ + FUNC_LEVEL_097_6 = 67, /**< LibClamAV release 0.97.6 */ + FUNC_LEVEL_097_7 = 68, /**< LibClamAV release 0.97.7 */ + FUNC_LEVEL_097_8 = 69, /**< LibClamAV release 0.97.8 */ + + FUNC_LEVEL_098 = 74, /**< LibClamAV release 0.98.0 */ + FUNC_LEVEL_098_1 = 76, /**< LibClamAV release 0.98.1: last syncing to clamav*/ + FUNC_LEVEL_098_2 = 77, /**< LibClamAV release 0.98.2 */ + FUNC_LEVEL_098_3 = 77, /**< LibClamAV release 0.98.3 */ + FUNC_LEVEL_098_4 = 77, /**< LibClamAV release 0.98.4 */ + FUNC_LEVEL_098_5 = 79, /**< LibClamAV release 0.98.5: JSON reading API requires this minimum level */ + FUNC_LEVEL_098_6 = 79, /**< LibClamAV release 0.98.6 */ + FUNC_LEVEL_098_7 = 80, /**< LibClamAV release 0.98.7: BC_PRECLASS bytecodes require minimum level */ + + FUNC_LEVEL_099 = 81, /**< LibClamAV release 0.99.0 */ + FUNC_LEVEL_099_1 = 82, /**< LibClamAV release 0.99.1 */ + FUNC_LEVEL_099_2 = 82, /**< LibClamAV release 0.99.2: not a typo, the FLEVEL did not change */ + FUNC_LEVEL_099_3 = 84, /**< LibClamAV release 0.99.3 */ + FUNC_LEVEL_099_4 = 85, /**< LibClamAV release 0.99.4 */ + + FUNC_LEVEL_0100_BETA = 90, /**< LibClamAV release 0.100.0-BETA */ + FUNC_LEVEL_0100 = 91, /**< LibClamAV release 0.100.0 */ + FUNC_LEVEL_0100_1 = 92, /**< LibClamAV release 0.100.1 */ + FUNC_LEVEL_0100_2 = 93, /**< LibClamAV release 0.100.2 */ + FUNC_LEVEL_0100_3 = 94, /**< LibClamAV release 0.100.3 */ + + FUNC_LEVEL_0101_BETA = 100, /**< LibClamAV release 0.101.0-BETA */ + FUNC_LEVEL_0101 = 101, /**< LibClamAV release 0.101.0 */ + FUNC_LEVEL_0101_1 = 102, /**< LibClamAV release 0.101.1 */ + FUNC_LEVEL_0101_2 = 102, /**< LibClamAV release 0.101.2 */ + FUNC_LEVEL_0101_3 = 102, /**< LibClamAV release 0.101.3 */ + FUNC_LEVEL_0101_4 = 105, /**< LibClamAV release 0.101.4 */ + FUNC_LEVEL_0101_5 = 106, /**< LibClamAV release 0.101.5 */ + + FUNC_LEVEL_0102_BETA = 110, /**< LibClamAV release 0.102.0-BETA */ + FUNC_LEVEL_0102 = 111, /**< LibClamAV release 0.102.0 */ + FUNC_LEVEL_0102_1 = 112, /**< LibClamAV release 0.102.1 */ + + FUNC_LEVEL_0103_BETA = 120, /**< LibClamAV release 0.103.0-BETA */ + FUNC_LEVEL_0103 = 121, /**< LibClamAV release 0.103.0 */ + FUNC_LEVEL_0103_1 = 122, /**< LibClamAV release 0.103.1 */ + FUNC_LEVEL_0103_2 = 123, /**< LibClamAV release 0.103.2 */ + FUNC_LEVEL_0103_3 = 124, /**< LibClamAV release 0.103.3 */ + FUNC_LEVEL_0103_4 = 125, /**< LibClamAV release 0.103.4 */ + FUNC_LEVEL_0103_5 = 126, /**< LibClamAV release 0.103.5 */ + FUNC_LEVEL_0103_6 = 127, /**< LibClamAV release 0.103.6 */ + FUNC_LEVEL_0103_7 = 128, /**< LibClamAV release 0.103.7 */ +}; + +/** +\group_pdf + * Phase of PDF parsing used for PDF Hooks + */ +enum pdf_phase { + PDF_PHASE_NONE, /* not a PDF */ + PDF_PHASE_PARSED, /* after parsing a PDF, object flags can be set etc. */ + PDF_PHASE_POSTDUMP, /* after an obj was dumped and scanned */ + PDF_PHASE_END, /* after the pdf scan finished */ + PDF_PHASE_PRE /* before pdf is parsed at all */ +}; + +/** +\group_pdf + * PDF flags + */ +enum pdf_flag { + BAD_PDF_VERSION = 0, /* */ + BAD_PDF_HEADERPOS, /* */ + BAD_PDF_TRAILER, /* */ + BAD_PDF_TOOMANYOBJS, /* */ + BAD_STREAM_FILTERS, /* */ + BAD_FLATE, /* */ + BAD_FLATESTART, /* */ + BAD_STREAMSTART, /* */ + BAD_ASCIIDECODE, /* */ + BAD_INDOBJ, /* */ + UNTERMINATED_OBJ_DICT, /* */ + ESCAPED_COMMON_PDFNAME, /* */ + HEX_JAVASCRIPT, /* */ + UNKNOWN_FILTER, /* */ + MANY_FILTERS, /* */ + HAS_OPENACTION, /* */ + BAD_STREAMLEN, /* */ + ENCRYPTED_PDF, /* */ + LINEARIZED_PDF, /* not bad, just as flag */ + DECRYPTABLE_PDF, /* */ + HAS_LAUNCHACTION /* */ +}; + +/** +\group_pdf + * PDF obj flags + */ +enum pdf_objflags { + OBJ_STREAM = 0, /* */ + OBJ_DICT, /* */ + OBJ_EMBEDDED_FILE, /* */ + OBJ_FILTER_AH, /* */ + OBJ_FILTER_A85, /* */ + OBJ_FILTER_FLATE, /* */ + OBJ_FILTER_LZW, /* */ + OBJ_FILTER_RL, /* */ + OBJ_FILTER_FAX, /* */ + OBJ_FILTER_JBIG2, /* */ + OBJ_FILTER_DCT, /* */ + OBJ_FILTER_JPX, /* */ + OBJ_FILTER_CRYPT, /* */ + OBJ_FILTER_UNKNOWN, /* */ + OBJ_JAVASCRIPT, /* */ + OBJ_OPENACTION, /* */ + OBJ_HASFILTERS, /* */ + OBJ_SIGNED, /* */ + OBJ_IMAGE, /* */ + OBJ_TRUNCATED, /* */ + OBJ_FORCEDUMP, /* */ + OBJ_FILTER_STANDARD, /* */ + OBJ_LAUNCHACTION, /* */ + OBJ_PAGE, /* */ + OBJ_CONTENTS /* */ +}; + +/** +\group_json + * JSON types + */ +enum bc_json_type { + JSON_TYPE_NULL = 0, /* */ + JSON_TYPE_BOOLEAN, /* */ + JSON_TYPE_DOUBLE, /* */ + JSON_TYPE_INT, /* */ + JSON_TYPE_OBJECT, /* */ + JSON_TYPE_ARRAY, /* */ + JSON_TYPE_STRING /* */ +}; + +/** +\group_adt + * LZMA return codes + */ +enum lzma_returncode { + LZMA_RESULT_OK = 0, /* Function completed successfully */ + LZMA_RESULT_DATA_ERROR = 1, /* The LZMA stream contained invalid data */ + LZMA_STREAM_END = 2 /* The LZMA stream ended unexpectedly */ +}; + +/** +\group adt + * Bzip2 return codes + */ +enum bzip2_returncode { + BZIP2_OK = 0, /* Function returned without error */ + BZIP2_SEQUENCE_ERROR = -1, + BZIP2_PARAM_ERROR = -2, + BZIP2_MEM_ERROR = -3, + BZIP2_DATA_ERROR = -4, + BZIP2_DATA_ERROR_MAGIC = -5, + BZIP2_IO_ERROR = -6, + BZIP2_UNEXPECTED_EOF = -7, + BZIP2_OUTBUFF_FULL = -8, + BZIP2_CONFIG_ERROR = -9, + BZIP2_RUN_OK = 1, + BZIP2_FLUSH_OK = 2, + BZIP2_FINISH_OK = 3, + BZIP2_STREAM_END = 4 +}; + +/** +\group_engine + * Scan option flag values for engine_scan_options(). *DEPRECATED* + */ +// clang-format off +enum { + CL_SCAN_RAW = 0x0, + CL_SCAN_ARCHIVE = 0x1, + CL_SCAN_MAIL = 0x2, + CL_SCAN_OLE2 = 0x4, + CL_SCAN_BLOCKENCRYPTED = 0x8, + CL_SCAN_HTML = 0x10, + CL_SCAN_PE = 0x20, + CL_SCAN_BLOCKBROKEN = 0x40, + CL_SCAN_MAILURL = 0x80, /* deprecated circa 2009 */ + CL_SCAN_BLOCKMAX = 0x100, + CL_SCAN_ALGORITHMIC = 0x200, + // UNUSED = 0x400, + CL_SCAN_PHISHING_BLOCKSSL = 0x800, /* ssl mismatches, not ssl by itself*/ + CL_SCAN_PHISHING_BLOCKCLOAK = 0x1000, + CL_SCAN_ELF = 0x2000, + CL_SCAN_PDF = 0x4000, + CL_SCAN_STRUCTURED = 0x8000, + CL_SCAN_STRUCTURED_SSN_NORMAL = 0x10000, + CL_SCAN_STRUCTURED_SSN_STRIPPED = 0x20000, + CL_SCAN_PARTIAL_MESSAGE = 0x40000, + CL_SCAN_HEURISTIC_PRECEDENCE = 0x80000, + CL_SCAN_BLOCKMACROS = 0x100000, + CL_SCAN_ALLMATCHES = 0x200000, + CL_SCAN_SWF = 0x400000, + CL_SCAN_PARTITION_INTXN = 0x800000, + CL_SCAN_XMLDOCS = 0x1000000, + CL_SCAN_HWP3 = 0x2000000, + // UNUSED = 0x4000000, + // UNUSED = 0x8000000, + CL_SCAN_FILE_PROPERTIES = 0x10000000, + // UNUSED = 0x20000000, + CL_SCAN_PERFORMANCE_INFO = 0x40000000, /* Collect performance timings */ + CL_SCAN_INTERNAL_COLLECT_SHA = 0x80000000 /* Enables hash output in sha-collect builds - for internal use only */ +}; +// clang-format on + +#ifdef __CLAMBC__ + +/* --------------- BEGIN GLOBALS -------------------------------------------- */ +/** +\group_globals + * Logical signature match counts + * @brief This is a low-level variable, use the Macros in bytecode_local.h instead to + * access it. + */ +extern const uint32_t __clambc_match_counts[64]; + +/** +\group_globals + * Logical signature match offsets + * @brief This is a low-level variable, use the Macros in bytecode_local.h instead to + * access it. + */ +extern const uint32_t __clambc_match_offsets[64]; + +/** +\group_globals + * PE data, if this is a PE hook. + */ +extern const struct cli_pe_hook_data __clambc_pedata; +/** +\group_globals + * File size (max 4G). + */ +extern const uint32_t __clambc_filesize[1]; + +/** +\group_globals + * Kind of the bytecode, affects LibClamAV usage + */ +const uint16_t __clambc_kind; +/* ---------------- END GLOBALS --------------------------------------------- */ +/* ---------------- BEGIN 0.96 APIs (don't touch) --------------------------- */ +/** + * Test api. + * @param[in] a 0xf00dbeef + * @param[in] b 0xbeeff00d + * @return 0x12345678 if parameters match, 0x55 otherwise +*/ +uint32_t test1(uint32_t a, uint32_t b); + +/** +\group_file + * Reads specified amount of bytes from the current file + * into a buffer. Also moves current position in the file. + * @param[in] size amount of bytes to read + * @param[out] data pointer to buffer where data is read into + * @return amount read. + */ +int32_t read(uint8_t* data, int32_t size); + +/** +\group_file + */ +enum { + /**set file position to specified absolute position */ + SEEK_SET = 0, + /**set file position relative to current position */ + SEEK_CUR, + /**set file position relative to file end*/ + SEEK_END +}; + +/** +\group_file + * Writes the specified amount of bytes from a buffer to the + * current temporary file. + * @param[in] data pointer to buffer of data to write + * @param[in] size amount of bytes to write + * \p size bytes to temporary file, from the buffer pointed to + * byte + * @return amount of bytes successfully written + */ +int32_t write(uint8_t* data, int32_t size); + +/** +\group_file + * Changes the current file position to the specified one. + * @sa SEEK_SET, SEEK_CUR, SEEK_END + * @param[in] pos offset (absolute or relative depending on \p whence param) + * @param[in] whence one of \p SEEK_SET, \p SEEK_CUR, \p SEEK_END + * @return absolute position in file + */ +int32_t seek(int32_t pos, uint32_t whence); + +/** +\group_scan + * Sets the name of the virus found. + * @param[in] name the name of the virus + * @param[in] len length of the virusname + * @return 0 + */ +uint32_t setvirusname(const uint8_t* name, uint32_t len); + +/** +\group_debug + * Prints a debug message string. + * @param[in] str Message to print + * @param[in] len length of message to print + * @return 0 + */ +uint32_t debug_print_str(const uint8_t* str, uint32_t len); + +/** +\group_debug + * Prints a number as a debug message. + * This is similar to \p debug_print_str_nonl. + * @param[in] a number to print + * @return 0 + */ +uint32_t debug_print_uint(uint32_t a); + +/** +\group_disasm + * Disassembles starting from current file position, the specified amount of + * bytes. + * @param[out] result pointer to struct holding result + * @param[in] len how many bytes to disassemble + * @return 0 for success + * + * You can use lseek to disassemble starting from a different location. + * This is a low-level API, the result is in ClamAV type-8 signature format + * (64 bytes/instruction). + * \sa DisassembleAt + */ +uint32_t disasm_x86(struct DISASM_RESULT* result, uint32_t len); + +/* tracing API, private */ + +/* a scope: lexical block, function, or compile unit */ +uint32_t trace_directory(const uint8_t* directory, uint32_t dummy); +uint32_t trace_scope(const uint8_t* newscope, uint32_t scopeid); +uint32_t trace_source(const uint8_t* srcfile, uint32_t line); +uint32_t trace_op(const uint8_t* opname, uint32_t column); +uint32_t trace_value(const uint8_t* name, uint32_t v); +uint32_t trace_ptr(const uint8_t* ptr, uint32_t dummy); + +/** +\group_pe + * Converts a RVA (Relative Virtual Address) to + * an absolute PE file offset. + * @param[in] rva a rva address from the PE file + * @return absolute file offset mapped to the \p rva, + * or PE_INVALID_RVA if the \p rva is invalid. + */ +uint32_t pe_rawaddr(uint32_t rva); + +/** +\group_file + * Looks for the specified sequence of bytes in the current file. + * @param[in] data the sequence of bytes to look for + * @param[in] len length of \p data, cannot be more than 1024 + * @return offset in the current file if match is found, -1 otherwise + */ +int32_t file_find(const uint8_t* data, uint32_t len); + +/** +\group_file + * Read a single byte from current file + * @param[in] offset file offset + * @return byte at offset \p off in the current file, or -1 if offset is + * invalid + */ +int32_t file_byteat(uint32_t offset); + +/** +\group_adt + * Allocates memory. Currently this memory is freed automatically on exit + * from the bytecode, and there is no way to free it sooner. + * @param[in] size amount of memory to allocate in bytes + * @return pointer to allocated memory + */ +void* malloc(uint32_t size); + +/** + * Test api2. + * @param[in] a 0xf00d + * @return 0xd00f if parameter matches, 0x5555 otherwise + */ +uint32_t test2(uint32_t a); + +/** +\group_pe + * Gets information about the specified PE section. + * @param[out] section PE section information will be stored here + * @param[in] num PE section number + * @return 0 - success + * @return -1 - failure + */ +int32_t get_pe_section(struct cli_exe_section* section, uint32_t num); + +/** +\group_file + * Fills the specified buffer with at least \p fill bytes. + * @param[out] buffer the buffer to fill + * @param[in] len length of buffer + * @param[in] filled how much of the buffer is currently filled + * @param[in] cursor position of cursor in buffer + * @param[in] fill amount of bytes to fill in (0 is valid) + * @return <0 on error + * @return 0 on EOF + * @return number bytes available in buffer (starting from 0)\n + * The character at the cursor will be at position 0 after this call. + */ +int32_t fill_buffer(uint8_t* buffer, uint32_t len, uint32_t filled, + uint32_t cursor, uint32_t fill); + +/** +\group_scan + * Prepares for extracting a new file, if we've already extracted one it scans + * it. + * @param[in] id an id for the new file (for example position in container) + * @return 1 if previous extracted file was infected + */ +int32_t extract_new(int32_t id); + +/** +\group_file + * Reads a number in the specified radix starting from the current position. + * Non-numeric characters are ignored. + * @param[in] radix 10 or 16 + * @return the number read + */ +int32_t read_number(uint32_t radix); + +/** +\group_adt + * Creates a new hashset and returns its id. + * @return ID for new hashset + */ +int32_t hashset_new(void); + +/** +\group_adt + * Add a new 32-bit key to the hashset. + * @param[in] hs ID of hashset (from hashset_new) + * @param[in] key the key to add + * @return 0 on success + */ +int32_t hashset_add(int32_t hs, uint32_t key); + +/** +\group_adt + * Remove a 32-bit key from the hashset. + * @param[in] hs ID of hashset (from hashset_new) + * @param[in] key the key to add + * @return 0 on success + */ +int32_t hashset_remove(int32_t hs, uint32_t key); + +/** +\group_adt + * Returns whether the hashset contains the specified key. + * @param[in] hs ID of hashset (from hashset_new) + * @param[in] key the key to lookup + * @return 1 if found + * @return 0 if not found + * @return <0 on invalid hashset ID + */ +int32_t hashset_contains(int32_t hs, uint32_t key); + +/** +\group_adt + * Deallocates the memory used by the specified hashset. + * Trying to use the hashset after this will result in an error. + * The hashset may not be used after this. + * All hashsets are automatically deallocated when bytecode + * finishes execution. + * @param[in] id ID of hashset (from hashset_new) + * @return 0 on success + */ +int32_t hashset_done(int32_t id); + +/** +\group_adt + * Returns whether the hashset is empty. + * @param[in] id of hashset (from hashset_new) + * @return 0 on success + */ +int32_t hashset_empty(int32_t id); + +/** +\group_adt + * Creates a new pipe with the specified buffer size + * @param[in] size size of buffer + * @return ID of newly created buffer_pipe + */ +int32_t buffer_pipe_new(uint32_t size); + +/** + \group_adt + * Creates a new pipe with the specified buffer size w/ tied input + * to the current file, at the specified position. + * @param[in] pos starting position of pipe input in current file + * @return ID of newly created buffer_pipe + */ +int32_t buffer_pipe_new_fromfile(uint32_t pos); + +/** +\group_adt + * Returns the amount of bytes available to read. + * @param[in] id ID of buffer_pipe + * @return amount of bytes available to read + */ +uint32_t buffer_pipe_read_avail(int32_t id); + +/** +\group_adt + * Returns a pointer to the buffer for reading. + * The 'amount' parameter should be obtained by a call to + * buffer_pipe_read_avail(). + * @param[in] id ID of buffer_pipe + * @param[in] amount to read + * @return pointer to buffer, or NULL if buffer has less than + * specified amount + */ +//uint8_t *buffer_pipe_read_get(int32_t id, uint32_t amount); +const uint8_t* buffer_pipe_read_get(int32_t id, uint32_t amount); + +/** +\group_adt + * Updates read cursor in buffer_pipe. + * @param[in] id ID of buffer_pipe + * @param[in] amount amount of bytes to move read cursor + * @return 0 on success + */ +int32_t buffer_pipe_read_stopped(int32_t id, uint32_t amount); + +/** +\group_adt + * Returns the amount of bytes available for writing. + * @param[in] id ID of buffer_pipe + * @return amount of bytes available for writing + */ +uint32_t buffer_pipe_write_avail(int32_t id); + +/** +\group_adt + * Returns pointer to writable buffer. + * The 'size' parameter should be obtained by a call to + * buffer_pipe_write_avail(). + * @param[in] id ID of buffer_pipe + * @param[in] size amount of bytes to write + * @return pointer to write buffer, or NULL if requested amount + * is more than what is available in the buffer + */ +uint8_t* buffer_pipe_write_get(int32_t id, uint32_t size); + +/** +\group_adt + * Updates the write cursor in buffer_pipe. + * @param[in] id ID of buffer_pipe + * @param[in] amount amount of bytes to move write cursor + * @return 0 on success + */ +int32_t buffer_pipe_write_stopped(int32_t id, uint32_t amount); + +/** +\group_adt + * Deallocate memory used by buffer. + * After this all attempts to use this buffer will result in error. + * All buffer_pipes are automatically deallocated when bytecode + * finishes execution. + * @param[in] id ID of buffer_pipe + * @return 0 on success + */ +int32_t buffer_pipe_done(int32_t id); + +/** +\group_adt + * Initializes inflate data structures for decompressing data + * 'from_buffer' and writing uncompressed uncompressed data 'to_buffer'. + * @param[in] from_buffer ID of buffer_pipe to read compressed data from + * @param[in] to_buffer ID of buffer_pipe to write decompressed data to + * @param[in] windowBits (see zlib documentation) + * @return ID of newly created inflate data structure, <0 on failure + */ +int32_t inflate_init(int32_t from_buffer, int32_t to_buffer, int32_t windowBits); + +/** +\group_adt + * Inflate all available data in the input buffer, and write to output buffer. + * Stops when the input buffer becomes empty, or write buffer becomes full. + * Also attempts to recover from corrupted inflate stream (via inflateSync). + * This function can be called repeatedly on success after filling the input + * buffer, and flushing the output buffer. + * The inflate stream is done processing when 0 bytes are available from output + * buffer, and input buffer is not empty. + * @param[in] id ID of inflate data structure + * @return 0 on success, zlib error code otherwise + */ +int32_t inflate_process(int32_t id); + +/** +\group_adt + * Deallocates inflate data structure. + * Using the inflate data structure after this will result in an error. + * All inflate data structures are automatically deallocated when bytecode + * finishes execution. + * @param[in] id ID of inflate data structure + * @return 0 on success. + */ +int32_t inflate_done(int32_t id); + +/** +\group_scan + * Report a runtime error at the specified locationID. + * @param[in] locationid (line << 8) | (column&0xff) + * @return 0 + */ +int32_t bytecode_rt_error(int32_t locationid); + +/** +\group_js + * Initializes JS normalizer for reading 'from_buffer'. + * Normalized JS will be written to a single tempfile, + * one normalized JS per line, and automatically scanned + * when the bytecode finishes execution. + * @param[in] from_buffer ID of buffer_pipe to read javascript from + * @return ID of JS normalizer, <0 on failure + */ +int32_t jsnorm_init(int32_t from_buffer); + +/** +\group_js + * Normalize all javascript from the input buffer, and write to tempfile. + * You can call this function repeatedly on success, if you (re)fill the input + * buffer. + * @param[in] id ID of JS normalizer + * @return 0 on success, <0 on failure + */ +int32_t jsnorm_process(int32_t id); + +/** +\group_js + * Flushes JS normalizer. + * @param[in] id ID of js normalizer to flush + * @return 0 on success, <0 on failure + */ +int32_t jsnorm_done(int32_t id); + +/* ---------------- END 0.96 APIs (don't touch) --------------------------- */ +/* ---------------- BEGIN 0.96.1 APIs ------------------------------------- */ + +/* ---------------- Math -------------------------------------------------- */ + +/** +\group_math + * Returns 2^26*log2(a/b) + * @param[in] a input + * @param[in] b input + * @return 2^26*log2(a/b) + */ +int32_t ilog2(uint32_t a, uint32_t b); + +/** +\group_math + * Returns c*a^b. + * @param[in] a integer + * @param[in] b integer + * @param[in] c integer + * @return c*pow(a,b) + */ +int32_t ipow(int32_t a, int32_t b, int32_t c); + +/** +\group_math + * Returns exp(a/b)*c + * @param[in] a integer + * @param[in] b integer + * @param[in] c integer + * @return c*exp(a/b) + */ +uint32_t iexp(int32_t a, int32_t b, int32_t c); + +/** +\group_math + * Returns c*sin(a/b). + * @param[in] a integer + * @param[in] b integer + * @param[in] c integer + * @return c*sin(a/b) + */ +int32_t isin(int32_t a, int32_t b, int32_t c); + +/** +\group_math + * Returns c*cos(a/b). + * @param[in] a integer + * @param[in] b integer + * @param[in] c integer + * @return c*sin(a/b) + */ +int32_t icos(int32_t a, int32_t b, int32_t c); + +/* ---------------- String operations --------------------------------------- */ +/** +\group_string + * Return position of match, -1 otherwise. + * @param[in] haystack buffer to search + * @param[in] haysize size of \p haystack + * @param[in] needle substring to search + * @param[in] needlesize size of needle + * @return location of match, -1 otherwise + */ +int32_t memstr(const uint8_t* haystack, int32_t haysize, + const uint8_t* needle, int32_t needlesize); + +/** +\group_string + * Returns hexadecimal characters \p hex1 and \p hex2 converted to 8-bit + * number. + * @param[in] hex1 hexadecimal character + * @param[in] hex2 hexadecimal character + * @return hex1 hex2 converted to 8-bit integer, -1 on error + */ +int32_t hex2ui(uint32_t hex1, uint32_t hex2); + +/** +\group_string + * Converts string to positive number. + * @param[in] str buffer + * @param[in] size size of \p str + * @return >0 string converted to number if possible, -1 on error + */ +int32_t atoi(const uint8_t* str, int32_t size); + +/** +\group_debug + * Prints a debug message with a trailing newline, + * but preceded by 'LibClamAV debug'. + * @param[in] str the string + * @param[in] len length of \p str + * @return 0 + */ +uint32_t debug_print_str_start(const uint8_t* str, uint32_t len); + +/** +\group_debug + * Prints a debug message with a trailing newline, + * and not preceded by 'LibClamAV debug'. + * @param[in] str the string + * @param[in] len length of \p str + * @return 0 + */ +uint32_t debug_print_str_nonl(const uint8_t* str, uint32_t len); + +/** +\group_string + * Returns an approximation for the entropy of \p buffer. + * @param[in] buffer input buffer + * @param[in] size size of buffer + * @return entropy estimation * 2^26 + */ +uint32_t entropy_buffer(uint8_t* buffer, int32_t size); + +/* ------------------ Data Structures --------------------------------------- */ +/** +\group_adt + * Creates a new map and returns its id. + * @param[in] keysize size of key + * @param[in] valuesize size of value, if 0 then value is allocated separately + * @return ID of new map + */ +int32_t map_new(int32_t keysize, int32_t valuesize); + +/** +\group_adt + * Inserts the specified key/value pair into the map. + * @param[in] id id of table + * @param[in] key key + * @param[in] ksize size of \p key + * @return 0 - if key existed before + * @return 1 - if key didn't exist before + * @return <0 - if ksize doesn't match keysize specified at table creation + */ +int32_t map_addkey(const uint8_t* key, int32_t ksize, int32_t id); + +/** +\group_adt + * Sets the value for the last inserted key with map_addkey. + * @param[in] id id of table + * @param[in] value value + * @param[in] vsize size of \p value + * @return 0 - if update was successful + * @return <0 - if there is no last key + */ +int32_t map_setvalue(const uint8_t* value, int32_t vsize, int32_t id); + +/** +\group_adt + * Remove an element from the map. + * @param[in] id id of map + * @param[in] key key + * @param[in] ksize size of key + * @return 0 on success, key was present + * @return 1 if key was not present + * @return <0 if ksize doesn't match keysize specified at table creation + */ +int32_t map_remove(const uint8_t* key, int32_t ksize, int32_t id); + +/** +\group_adt + * Looks up key in map. + * The map remember the last looked up key (so you can retrieve the + * value). + * @param[in] id id of map + * @param[in] key key + * @param[in] ksize size of key + * @return 0 - if not found + * @return 1 - if found + * @return <0 - if ksize doesn't match the size specified at table creation + */ +int32_t map_find(const uint8_t* key, int32_t ksize, int32_t id); + +/** +\group_adt + * Returns the size of value obtained during last map_find. + * @param[in] id id of map. + * @return size of value + */ +int32_t map_getvaluesize(int32_t id); + +/** +\group_adt + * Returns the value obtained during last map_find. + * @param[in] id id of map. + * @param[in] size size of value (obtained from map_getvaluesize) + * @return value + */ +uint8_t* map_getvalue(int32_t id, int32_t size); + +/** +\group_adt + * Deallocates the memory used by the specified map. + * Trying to use the map after this will result in an error. + * All maps are automatically deallocated when the bytecode finishes + * execution. + * @param[in] id id of map + * @return 0 - success + * @return -1 - invalid map + */ +int32_t map_done(int32_t id); + +/* -------------- File Operations ------------------------------------------- */ +/** +\group_file + * Looks for the specified sequence of bytes in the current file, up to the + * specified position. + * @param[in] data the sequence of bytes to look for + * @param[in] len length of \p data, cannot be more than 1024 + * @param[in] maxpos maximum position to look for a match, + * note that this is 1 byte after the end of last possible match: + * match_pos + \p len < \p maxpos + * @return offset in the current file if match is found, -1 otherwise + */ +int32_t file_find_limit(const uint8_t* data, uint32_t len, int32_t maxpos); + +/* ------------- Engine Query ----------------------------------------------- */ +/** +\group_engine + * Returns the current engine (feature) functionality level. + * To map these to ClamAV releases, compare it with #FunctionalityLevels. + * @return an integer representing current engine functionality level. + */ +uint32_t engine_functionality_level(void); + +/** +\group_engine + * Returns the current engine (dconf) functionality level. + * Usually identical to engine_functionality_level(), unless distro backported + * patches. Compare with #FunctionalityLevels. + * @return an integer representing the DCONF (security fixes) level. + */ +uint32_t engine_dconf_level(void); + +/** +\group_engine + * Returns the current engine's scan options. **DEPRECATED** + * @return CL_SCAN* flags + */ +uint32_t engine_scan_options(void); + +/** +\group_engine + * Returns the current engine's db options. + * @return CL_DB_* flags + */ +uint32_t engine_db_options(void); + +/* ---------------- Scan Control -------------------------------------------- */ +/** +\group_scan + * Sets the container type for the currently extracted file. + * @param[in] container container type (CL_TYPE_*) + * @return current setting for container (CL_TYPE_ANY default) + */ +int32_t extract_set_container(uint32_t container); + +/** +\group_scan + * Toggles the read/seek API to read from the currently extracted file, and + * back. + * You must call seek after switching inputs to position the cursor to a valid + * position. + * @param[in] extracted_file 1 - switch to reading from extracted file\n + 0 - switch back to original input + * @return -1 on error (if no extracted file exists) + * @return 0 on success + */ +int32_t input_switch(int32_t extracted_file); + +/* ---------------- END 0.96.1 APIs ------------------------------------- */ +/* ---------------- BEGIN 0.96.2 APIs ----------------------------------- */ + +/** +\group_env + * Queries the environment this bytecode runs in. + * Used by BC_STARTUP to disable bytecode when bugs are known for the current + * platform. + * @param[out] env - the full environment + * @param[in] len - size of \p env + * @return 0 + */ +uint32_t get_environment(struct cli_environment* env, uint32_t len); + +/** +\group_env + * Disables the bytecode completely if condition is true. + * Can only be called from the BC_STARTUP bytecode. + * @param[in] reason - why the bytecode had to be disabled + * @param[in] len - length of reason + * @param[in] cond - condition + * @return 0 - auto mode + * @return 1 - JIT disabled + * @return 2 - fully disabled + */ +uint32_t disable_bytecode_if(const int8_t* reason, uint32_t len, uint32_t cond); + +/** +\group_env + * Disables the JIT completely if condition is true. + * Can only be called from the BC_STARTUP bytecode. + * @param[in] reason - why the JIT had to be disabled + * @param[in] len - length of reason + * @param[in] cond - condition + * @return 0 - auto mode + * @return 1 - JIT disabled + * @return 2 - fully disabled + */ +uint32_t disable_jit_if(const int8_t* reason, uint32_t len, uint32_t cond); + +/** + \group_env + * Compares two version numbers. + * @param[in] lhs - left hand side of comparison + * @param[in] lhs_len - length of \p lhs + * @param[in] rhs - right hand side of comparison + * @param[in] rhs_len - length of \p rhs + * @return -1 - lhs < rhs + * @return 0 - lhs == rhs + * @return 1 - lhs > rhs + */ +int32_t version_compare(const uint8_t* lhs, uint32_t lhs_len, + const uint8_t* rhs, uint32_t rhs_len); + +/** +\group_env + * Disables the JIT if the platform id matches. + * 0xff can be used instead of a field to mark ANY. + * @param[in] a - os_category << 24 | arch << 20 | compiler << 16 | flevel << 8 | dconf + * @param[in] b - big_endian << 28 | sizeof_ptr << 24 | cpp_version + * @param[in] c - os_features << 24 | c_version + * @return 0 - no match + * @return 1 - match + */ +uint32_t check_platform(uint32_t a, uint32_t b, uint32_t c); + +/* --------------------- PDF APIs ----------------------------------- */ +/** +\group_pdf + * Return number of pdf objects + * @return -1 - if not called from PDF hook + * @return >=0 - number of PDF objects +*/ +int32_t pdf_get_obj_num(void); + +/** +\group_pdf + * Return the flags for the entire PDF (as set so far). + * @return -1 - if not called from PDF hook + * @return >=0 - pdf flags + */ +int32_t pdf_get_flags(void); + +/** +\group_pdf + * Sets the flags for the entire PDF. + * It is recommended that you retrieve old flags, and just add new ones. + * @param[in] flags - flags to set. + * @return 0 - success + -1 - invalid phase */ +int32_t pdf_set_flags(int32_t flags); + +/** +\group_pdf + * Lookup pdf object with specified id. + * @param[in] id - pdf id (objnumber << 8 | generationid) + * @return -1 - if object id doesn't exist + * @return >=0 - object index + */ +int32_t pdf_lookupobj(uint32_t id); + +/** +\group_pdf + * Return the size of the specified PDF obj. + * @param[in] objidx - object index (from 0), not object id! + * @return 0 - if not called from PDF hook, or invalid objnum + * @return >=0 - size of object */ +uint32_t pdf_getobjsize(int32_t objidx); + +/** +\group_pdf + * Return the undecoded object. + * Meant only for reading, write modifies the fmap buffer, so avoid! + * @param[in] objidx - object index (from 0), not object id! + * @param[in] amount - size returned by pdf_getobjsize (or smaller) + * @return NULL - invalid objidx/amount + * @return pointer - pointer to original object */ +//uint8_t *pdf_getobj(int32_t objidx, uint32_t amount); +const uint8_t* pdf_getobj(int32_t objidx, uint32_t amount); + +/** +\group_pdf + * Return the object id for the specified object index. + * @param[in] objidx - object index (from 0) + * @return -1 - object index invalid + * @return >=0 - object id (obj id << 8 | generation id) + */ +int32_t pdf_getobjid(int32_t objidx); + +/** +\group_pdf + * Return the object flags for the specified object index. + * @param[in] objidx - object index (from 0) + * @return -1 - object index invalid + * @return >=0 - object flags + */ +int32_t pdf_getobjflags(int32_t objidx); + +/** +\group_pdf + * Sets the object flags for the specified object index. + * This can be used to force dumping of a certain obj, by setting the + * OBJ_FORCEDUMP flag for example. + * @param[in] objidx - object index (from 0) + * @param[in] flags - value to set flags + * @return -1 - object index invalid + * @return >=0 - flags set + */ +int32_t pdf_setobjflags(int32_t objidx, int32_t flags); + +/** +\group_pdf + * Return the object's offset in the PDF. + * @param[in] objidx - object index (from 0) + * @return -1 - object index invalid + * @return >=0 - offset + */ +int32_t pdf_get_offset(int32_t objidx); + +/** +\group_pdf + * Return an 'enum pdf_phase'. + * Identifies at which phase this bytecode was called. + * @return the current #pdf_phase + */ +int32_t pdf_get_phase(void); + +/** +\group_pdf + * Return the currently dumped obj index. + * Valid only in PDF_PHASE_POSTDUMP. + * @return >=0 - object index + * @return -1 - invalid phase + */ +int32_t pdf_get_dumpedobjid(void); + +/* ----------------------------- Icon APIs -------------------------- */ +/** +\group_icon + * Attempts to match current executable's icon against the specified icon + * groups. + * @param[in] group1 - same as GROUP1 in LDB signatures + * @param[in] group1_len - length of \p group1 + * @param[in] group2 - same as GROUP2 in LDB signatures + * @param[in] group2_len - length of \p group2 + * @return -1 - invalid call, or sizes (only valid for PE hooks) + * @return 0 - not a match + * @return 1 - match + */ +int32_t matchicon(const uint8_t* group1, int32_t group1_len, + const uint8_t* group2, int32_t group2_len); +/* ---------------- END 0.96.2 APIs ----------------------------------- */ +/* ----------------- BEGIN 0.96.4 APIs ---------------------------------- */ +/** +\group_engine + * Returns whether running on JIT. As side-effect it disables + * interp / JIT comparisons in test mode (errors are still checked) + * @return 1 - running on JIT + * @return 0 - running on ClamAV interpreter + */ +int32_t running_on_jit(void); + +/** +\group_file + * Get file reliability flag, higher value means less reliable. + * When >0 import tables and such are not reliable + * @return 0 - normal + * @return 1 - embedded PE + * @return 2 - unpacker created file (not impl. yet) + */ +int32_t get_file_reliability(void); + +/* ----------------- END 0.96.4 APIs ---------------------------------- */ +/* ----------------- BEGIN 0.98.4 APIs -------------------------------- */ +/* ----------------- JSON Parsing APIs -------------------------------- */ +/** +\group_json + * @return 0 - json is disabled or option not specified + * @return 1 - json is active and properties are available + */ +int32_t json_is_active(void); + +/** +\group_json + * @return objid of json object with specified name + * @return 0 if json object of specified name cannot be found + * @return -1 if an error has occurred + * @param[in] name - name of object in ASCII + * @param[in] name_len - length of specified name (not including terminating NULL), + * must be >= 0 + * @param[in] objid - id value of json object to query + */ +int32_t json_get_object(const int8_t* name, int32_t name_len, int32_t objid); + +/** +\group_json + * @return type (json_type) of json object specified + * @return -1 if type unknown or invalid id + * @param[in] objid - id value of json object to query + */ +int32_t json_get_type(int32_t objid); + +/** +\group_json + * @return number of elements in the json array of objid + * @return -1 if an error has occurred + * @return -2 if object is not JSON_TYPE_ARRAY + * @param[in] objid - id value of json object (should be JSON_TYPE_ARRAY) to query + */ +int32_t json_get_array_length(int32_t objid); + +/** +\group_json + * @return objid of json object at idx of json array of objid + * @return 0 if invalid idx + * @return -1 if an error has occurred + * @return -2 if object is not JSON_TYPE_ARRAY + * @param[in] idx - index of array to query, must be >= 0 and less than array length + * @param[in] objid - id value of json object (should be JSON_TYPE_ARRAY) to query + */ +int32_t json_get_array_idx(int32_t idx, int32_t objid); + +/** +\group_json + * @return length of json string of objid, not including terminating null-character + * @return -1 if an error has occurred + * @return -2 if object is not JSON_TYPE_STRING + * @param[in] objid - id value of json object (should be JSON_TYPE_STRING) to query + */ +int32_t json_get_string_length(int32_t objid); + +/** +\group_json + * @return number of characters transferred (capped by str_len), + * including terminating null-character + * @return -1 if an error has occurred + * @return -2 if object is not JSON_TYPE_STRING + * @param[out] str - user location to store string data; will be null-terminated + * @param[in] str_len - length of str or limit of string data to read, + * including terminating null-character + * @param[in] objid - id value of json object (should be JSON_TYPE_STRING) to query + */ +int32_t json_get_string(int8_t* str, int32_t str_len, int32_t objid); + +/** +\group_json + * @return boolean value of queried objid; will force other types to boolean + * @param[in] objid - id value of json object to query + */ +int32_t json_get_boolean(int32_t objid); + +/** +\group_json + * @return integer value of queried objid; will force other types to integer + * @param[in] objid - id value of json object to query + */ +int32_t json_get_int(int32_t objid); + +//int64_t json_get_int64(int32_t objid); +/* bytecode does not support double type */ +//double json_get_double(int32_t objid); + +/* ----------------- END 0.98.4 APIs ---------------------------------- */ +/* ----------------- BEGIN 0.101.0 APIs ------------------------------- */ +/* ----------------- Scan Options APIs -------------------------------- */ +/** +\group_engine + * Check if any given scan option is enabled. + * Returns non-zero if the following named options are set: + * + * "general allmatch" - all-match mode is enabled + * "general collect metadata" - --gen-json is enabled + * "general heuristics" - --gen-json is enabled + * + * "parse archive" - archive parsing is enabled + * "parse pdf" - pdf parsing is enabled + * "parse swf" - swf parsing is enabled + * "parse hwp3" - hwp3 parsing is enabled + * "parse xmldocs" - xmldocs parsing is enabled + * "parse mail" - mail parsing is enabled + * "parse ole2" - ole2 parsing is enabled + * "parse html" - html parsing is enabled + * "parse pe" - pe parsing is enabled + * + * "heuristic precedence" - heuristic signatures are set to take precedence + * "heuristic broken" - broken pe heuristic is enabled + * "heuristic exceeds max" - heuristic for when max settings are exceeded is enabled + * "heuristic phishing ssl mismatch" - phishing ssl mismatch heuristic is enabled + * "heuristic phishing cloak" - phishing cloak heuristic is enabled + * "heuristic macros" - macros heuristic is enabled + * "heuristic encrypted" - encrypted heuristic is enabled + * "heuristic partition intersection" - macpartition intersectionros heuristic is enabled + * "heuristic structured" - structured heuristic is enabled + * "heuristic structured ssn normal" - structured ssn normal heuristic is enabled + * "heuristic structured ssn stripped" - structured ssn stripped heuristic is enabled + * + * "mail partial message" - parsing of partial mail messages is enabled + * + * "dev collect sha" - --dev-collect-hashes is enabled + * "dev collect performance info" - --dev-performance is enabled + * + * @param[in] scan_options enum value for desired scan option category. + * @return CL_SCAN_