diff --git a/3rdparty/libmagic/src/cdf.h b/3rdparty/libmagic/src/cdf.h
deleted file mode 100644
index 177868eb55ee3dcd19e578d239df2850a647b4ab..0000000000000000000000000000000000000000
--- a/3rdparty/libmagic/src/cdf.h
+++ /dev/null
@@ -1,326 +0,0 @@
-/*-
- * Copyright (c) 2008 Christos Zoulas
- * All rights reserved.
- *
- * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
- */
-/*
- * Parse Composite Document Files, the format used in Microsoft Office
- * document files before they switched to zipped XML.
- * Info from: http://sc.openoffice.org/compdocfileformat.pdf
- *
- * N.B. This is the "Composite Document File" format, and not the
- * "Compound Document Format", nor the "Channel Definition Format".
- */
-
-#ifndef _H_CDF_
-#define _H_CDF_
-
-#ifdef WIN32
-#include <winsock2.h>
-#define timespec timeval
-#define tv_nsec tv_usec
-#endif
-#ifdef __DJGPP__
-#define timespec timeval
-#define tv_nsec tv_usec
-#endif
-
-typedef int32_t cdf_secid_t;
-
-#define CDF_LOOP_LIMIT					10000
-
-#define CDF_SECID_NULL					0
-#define CDF_SECID_FREE					-1
-#define CDF_SECID_END_OF_CHAIN				-2
-#define CDF_SECID_SECTOR_ALLOCATION_TABLE		-3
-#define CDF_SECID_MASTER_SECTOR_ALLOCATION_TABLE	-4
-
-typedef struct {
-	uint64_t	h_magic;
-#define CDF_MAGIC	0xE11AB1A1E011CFD0LL
-	uint64_t	h_uuid[2];
-	uint16_t	h_revision;
-	uint16_t	h_version;
-	uint16_t	h_byte_order;
-	uint16_t	h_sec_size_p2;
-	uint16_t	h_short_sec_size_p2;
-	uint8_t		h_unused0[10];
-	uint32_t	h_num_sectors_in_sat;
-	uint32_t	h_secid_first_directory;
-	uint8_t		h_unused1[4];
-	uint32_t	h_min_size_standard_stream;
-	cdf_secid_t	h_secid_first_sector_in_short_sat;
-	uint32_t	h_num_sectors_in_short_sat;
-	cdf_secid_t	h_secid_first_sector_in_master_sat;
-	uint32_t	h_num_sectors_in_master_sat;
-	cdf_secid_t	h_master_sat[436/4];
-} cdf_header_t;
-
-#define CDF_SEC_SIZE(h) ((size_t)(1 << (h)->h_sec_size_p2))
-#define CDF_SEC_POS(h, secid) (CDF_SEC_SIZE(h) + (secid) * CDF_SEC_SIZE(h))
-#define CDF_SHORT_SEC_SIZE(h)	((size_t)(1 << (h)->h_short_sec_size_p2))
-#define CDF_SHORT_SEC_POS(h, secid) ((secid) * CDF_SHORT_SEC_SIZE(h))
-
-typedef int32_t cdf_dirid_t;
-#define CDF_DIRID_NULL	-1
-
-typedef int64_t cdf_timestamp_t;
-#define CDF_BASE_YEAR	1601
-#define CDF_TIME_PREC	10000000
-
-typedef struct {
-	uint16_t	d_name[32];
-	uint16_t	d_namelen;
-	uint8_t		d_type;
-#define CDF_DIR_TYPE_EMPTY		0
-#define CDF_DIR_TYPE_USER_STORAGE	1
-#define CDF_DIR_TYPE_USER_STREAM	2
-#define CDF_DIR_TYPE_LOCKBYTES		3
-#define CDF_DIR_TYPE_PROPERTY		4
-#define CDF_DIR_TYPE_ROOT_STORAGE	5
-	uint8_t		d_color;
-#define CDF_DIR_COLOR_READ	0
-#define CDF_DIR_COLOR_BLACK	1
-	cdf_dirid_t	d_left_child;
-	cdf_dirid_t	d_right_child;
-	cdf_dirid_t	d_storage;
-	uint64_t	d_storage_uuid[2];
-	uint32_t	d_flags;
-	cdf_timestamp_t d_created;
-	cdf_timestamp_t d_modified;
-	cdf_secid_t	d_stream_first_sector;
-	uint32_t	d_size;
-	uint32_t	d_unused0;
-} cdf_directory_t;
-
-#define CDF_DIRECTORY_SIZE	128
-
-typedef struct {
-	cdf_secid_t *sat_tab;
-	size_t sat_len;
-} cdf_sat_t;
-
-typedef struct {
-	cdf_directory_t *dir_tab;
-	size_t dir_len;
-} cdf_dir_t;
-
-typedef struct {
-	void *sst_tab;
-	size_t sst_len;
-	size_t sst_dirlen;
-} cdf_stream_t;
-
-typedef struct {
-	uint32_t	cl_dword;
-	uint16_t	cl_word[2];
-	uint8_t		cl_two[2];
-	uint8_t		cl_six[6];
-} cdf_classid_t;
-
-typedef struct {
-	uint16_t	si_byte_order;
-	uint16_t	si_zero;
-	uint16_t	si_os_version;
-	uint16_t	si_os;
-	cdf_classid_t	si_class;
-	uint32_t	si_count;
-} cdf_summary_info_header_t;
-
-#define CDF_SECTION_DECLARATION_OFFSET 0x1c
-
-typedef struct {
-	cdf_classid_t	sd_class;
-	uint32_t	sd_offset;
-} cdf_section_declaration_t;
-
-typedef struct {
-	uint32_t	sh_len;
-	uint32_t	sh_properties;
-} cdf_section_header_t;
-
-typedef struct {
-	uint32_t	pi_id;
-	uint32_t	pi_type;
-	union {
-		uint16_t	_pi_u16;
-		int16_t		_pi_s16;
-		uint32_t	_pi_u32;
-		int32_t		_pi_s32;
-		uint64_t	_pi_u64;
-		int64_t		_pi_s64;
-		cdf_timestamp_t _pi_tp;
-		float		_pi_f;
-		double		_pi_d;
-		struct {
-			uint32_t s_len;
-			const char *s_buf;
-		} _pi_str;
-	} pi_val;
-#define pi_u64	pi_val._pi_u64
-#define pi_s64	pi_val._pi_s64
-#define pi_u32	pi_val._pi_u32
-#define pi_s32	pi_val._pi_s32
-#define pi_u16	pi_val._pi_u16
-#define pi_s16	pi_val._pi_s16
-#define pi_f	pi_val._pi_f
-#define pi_d	pi_val._pi_d
-#define pi_tp	pi_val._pi_tp
-#define pi_str	pi_val._pi_str
-} cdf_property_info_t;
-
-#define CDF_ROUND(val, by)     (((val) + (by) - 1) & ~((by) - 1))
-
-/* Variant type definitions */
-#define CDF_EMPTY		0x00000000
-#define CDF_NULL		0x00000001
-#define CDF_SIGNED16		0x00000002
-#define CDF_SIGNED32		0x00000003
-#define CDF_FLOAT		0x00000004
-#define CDF_DOUBLE		0x00000005
-#define CDF_CY			0x00000006
-#define CDF_DATE		0x00000007
-#define CDF_BSTR		0x00000008
-#define CDF_DISPATCH		0x00000009
-#define CDF_ERROR		0x0000000a
-#define CDF_BOOL		0x0000000b
-#define CDF_VARIANT		0x0000000c
-#define CDF_UNKNOWN		0x0000000d
-#define CDF_DECIMAL		0x0000000e
-#define CDF_SIGNED8		0x00000010
-#define CDF_UNSIGNED8		0x00000011
-#define CDF_UNSIGNED16		0x00000012
-#define CDF_UNSIGNED32		0x00000013
-#define CDF_SIGNED64		0x00000014
-#define CDF_UNSIGNED64		0x00000015
-#define CDF_INT			0x00000016
-#define CDF_UINT		0x00000017
-#define CDF_VOID		0x00000018
-#define CDF_HRESULT		0x00000019
-#define CDF_PTR			0x0000001a
-#define CDF_SAFEARRAY		0x0000001b
-#define CDF_CARRAY		0x0000001c
-#define CDF_USERDEFINED		0x0000001d
-#define CDF_LENGTH32_STRING	0x0000001e
-#define CDF_LENGTH32_WSTRING	0x0000001f
-#define CDF_FILETIME		0x00000040
-#define CDF_BLOB		0x00000041
-#define CDF_STREAM		0x00000042
-#define CDF_STORAGE		0x00000043
-#define CDF_STREAMED_OBJECT	0x00000044
-#define CDF_STORED_OBJECT	0x00000045
-#define CDF_BLOB_OBJECT		0x00000046
-#define CDF_CLIPBOARD		0x00000047
-#define CDF_CLSID		0x00000048
-#define CDF_VECTOR		0x00001000
-#define CDF_ARRAY		0x00002000
-#define CDF_BYREF		0x00004000
-#define CDF_RESERVED		0x00008000
-#define CDF_ILLEGAL		0x0000ffff
-#define CDF_ILLEGALMASKED	0x00000fff
-#define CDF_TYPEMASK		0x00000fff
-
-#define CDF_PROPERTY_CODE_PAGE			0x00000001
-#define CDF_PROPERTY_TITLE			0x00000002
-#define CDF_PROPERTY_SUBJECT			0x00000003
-#define CDF_PROPERTY_AUTHOR			0x00000004
-#define CDF_PROPERTY_KEYWORDS			0x00000005
-#define CDF_PROPERTY_COMMENTS			0x00000006
-#define CDF_PROPERTY_TEMPLATE			0x00000007
-#define CDF_PROPERTY_LAST_SAVED_BY		0x00000008
-#define CDF_PROPERTY_REVISION_NUMBER		0x00000009
-#define CDF_PROPERTY_TOTAL_EDITING_TIME		0x0000000a
-#define CDF_PROPERTY_LAST_PRINTED		0X0000000b
-#define CDF_PROPERTY_CREATE_TIME		0x0000000c
-#define CDF_PROPERTY_LAST_SAVED_TIME		0x0000000d
-#define CDF_PROPERTY_NUMBER_OF_PAGES		0x0000000e
-#define CDF_PROPERTY_NUMBER_OF_WORDS		0x0000000f
-#define CDF_PROPERTY_NUMBER_OF_CHARACTERS	0x00000010
-#define CDF_PROPERTY_THUMBNAIL			0x00000011
-#define CDF_PROPERTY_NAME_OF_APPLICATION	0x00000012
-#define CDF_PROPERTY_SECURITY			0x00000013
-#define CDF_PROPERTY_LOCALE_ID			0x80000000
-
-typedef struct {
-	int i_fd;
-	const unsigned char *i_buf;
-	size_t i_len;
-} cdf_info_t;
-
-struct timespec;
-int cdf_timestamp_to_timespec(struct timespec *, cdf_timestamp_t);
-int cdf_timespec_to_timestamp(cdf_timestamp_t *, const struct timespec *);
-int cdf_read_header(const cdf_info_t *, cdf_header_t *);
-void cdf_swap_header(cdf_header_t *);
-void cdf_unpack_header(cdf_header_t *, char *);
-void cdf_swap_dir(cdf_directory_t *);
-void cdf_unpack_dir(cdf_directory_t *, char *);
-void cdf_swap_class(cdf_classid_t *);
-ssize_t cdf_read_sector(const cdf_info_t *, void *, size_t, size_t,
-    const cdf_header_t *, cdf_secid_t);
-ssize_t cdf_read_short_sector(const cdf_stream_t *, void *, size_t, size_t,
-    const cdf_header_t *, cdf_secid_t);
-int cdf_read_sat(const cdf_info_t *, cdf_header_t *, cdf_sat_t *);
-size_t cdf_count_chain(const cdf_sat_t *, cdf_secid_t, size_t);
-int cdf_read_long_sector_chain(const cdf_info_t *, const cdf_header_t *,
-    const cdf_sat_t *, cdf_secid_t, size_t, cdf_stream_t *);
-int cdf_read_short_sector_chain(const cdf_header_t *, const cdf_sat_t *,
-    const cdf_stream_t *, cdf_secid_t, size_t, cdf_stream_t *);
-int cdf_read_sector_chain(const cdf_info_t *, const cdf_header_t *,
-    const cdf_sat_t *, const cdf_sat_t *, const cdf_stream_t *, cdf_secid_t,
-    size_t, cdf_stream_t *);
-int cdf_read_dir(const cdf_info_t *, const cdf_header_t *, const cdf_sat_t *,
-    cdf_dir_t *);
-int cdf_read_ssat(const cdf_info_t *, const cdf_header_t *, const cdf_sat_t *,
-    cdf_sat_t *);
-int cdf_read_short_stream(const cdf_info_t *, const cdf_header_t *,
-    const cdf_sat_t *, const cdf_dir_t *, cdf_stream_t *,
-    const cdf_directory_t **);
-int cdf_read_property_info(const cdf_stream_t *, const cdf_header_t *, uint32_t,
-    cdf_property_info_t **, size_t *, size_t *);
-int cdf_read_summary_info(const cdf_info_t *, const cdf_header_t *,
-    const cdf_sat_t *, const cdf_sat_t *, const cdf_stream_t *,
-    const cdf_dir_t *, cdf_stream_t *);
-int cdf_unpack_summary_info(const cdf_stream_t *, const cdf_header_t *,
-    cdf_summary_info_header_t *, cdf_property_info_t **, size_t *);
-int cdf_print_classid(char *, size_t, const cdf_classid_t *);
-int cdf_print_property_name(char *, size_t, uint32_t);
-int cdf_print_elapsed_time(char *, size_t, cdf_timestamp_t);
-uint16_t cdf_tole2(uint16_t);
-uint32_t cdf_tole4(uint32_t);
-uint64_t cdf_tole8(uint64_t);
-char *cdf_ctime(const time_t *, char *);
-
-#ifdef CDF_DEBUG
-void cdf_dump_header(const cdf_header_t *);
-void cdf_dump_sat(const char *, const cdf_sat_t *, size_t);
-void cdf_dump(void *, size_t);
-void cdf_dump_stream(const cdf_header_t *, const cdf_stream_t *);
-void cdf_dump_dir(const cdf_info_t *, const cdf_header_t *, const cdf_sat_t *,
-    const cdf_sat_t *, const cdf_stream_t *, const cdf_dir_t *);
-void cdf_dump_property_info(const cdf_property_info_t *, size_t);
-void cdf_dump_summary_info(const cdf_header_t *, const cdf_stream_t *);
-#endif
-
-
-#endif /* _H_CDF_ */
diff --git a/3rdparty/libmagic/src/config.h b/3rdparty/libmagic/src/config.h
deleted file mode 100644
index 41cc4687bedacffc7c34faa713838f2ad7aa54c2..0000000000000000000000000000000000000000
--- a/3rdparty/libmagic/src/config.h
+++ /dev/null
@@ -1,373 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define if building universal (internal helper macro) */
-#undef AC_APPLE_UNIVERSAL_BUILD
-
-/* Define in built-in ELF support is used */
-#undef BUILTIN_ELF
-
-/* Define for ELF core file support */
-#undef ELFCORE
-
-/* Define to 1 if you have the `asctime_r' function. */
-#undef HAVE_ASCTIME_R
-
-/* Define to 1 if you have the `asprintf' function. */
-#undef HAVE_ASPRINTF
-
-/* Define to 1 if you have the `ctime_r' function. */
-#undef HAVE_CTIME_R
-
-/* HAVE_DAYLIGHT */
-#undef HAVE_DAYLIGHT
-
-/* Define to 1 if you have the declaration of `daylight', and to 0 if you
-   don't. */
-#undef HAVE_DECL_DAYLIGHT
-
-/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't.
-   */
-#undef HAVE_DECL_TZNAME
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define to 1 if you have the <err.h> header file. */
-#undef HAVE_ERR_H
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define to 1 if you have the `fmtcheck' function. */
-#undef HAVE_FMTCHECK
-
-/* Define to 1 if you have the `fork' function. */
-#undef HAVE_FORK
-
-/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
-#undef HAVE_FSEEKO
-
-/* Define to 1 if you have the `getline' function. */
-#undef HAVE_GETLINE
-
-/* Define to 1 if you have the <getopt.h> header file. */
-#undef HAVE_GETOPT_H
-
-/* Define to 1 if you have the `getopt_long' function. */
-#undef HAVE_GETOPT_LONG
-
-/* Define to 1 if you have the `getpagesize' function. */
-#undef HAVE_GETPAGESIZE
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the `gnurx' library (-lgnurx). */
-#undef HAVE_LIBGNURX
-
-/* Define to 1 if you have the `z' library (-lz). */
-#undef HAVE_LIBZ
-
-/* Define to 1 if you have the <limits.h> header file. */
-#define HAVE_LIMITS_H 1
-
-/* Define to 1 if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
-
-/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
-#undef HAVE_MBRTOWC
-
-/* Define to 1 if <wchar.h> declares mbstate_t. */
-#undef HAVE_MBSTATE_T
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the `mkostemp' function. */
-#undef HAVE_MKOSTEMP
-
-/* Define to 1 if you have the `mkstemp' function. */
-#undef HAVE_MKSTEMP
-
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define to 1 if you have the `pread' function. */
-#undef HAVE_PREAD
-
-/* Define to 1 if you have the <stddef.h> header file. */
-#define HAVE_STDDEF_H 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strcasestr' function. */
-#undef HAVE_STRCASESTR
-
-/* Define to 1 if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> 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. */
-#undef HAVE_STRNDUP
-
-/* Define to 1 if you have the `strtof' function. */
-#define HAVE_STRTOF 1
-
-/* Define to 1 if you have the `strtoul' function. */
-#define HAVE_STRTOUL 1
-
-/* HAVE_STRUCT_OPTION */
-#undef HAVE_STRUCT_OPTION
-
-/* Define to 1 if `st_rdev' is a member of `struct stat'. */
-#undef HAVE_STRUCT_STAT_ST_RDEV
-
-/* Define to 1 if `tm_gmtoff' is a member of `struct tm'. */
-#undef HAVE_STRUCT_TM_TM_GMTOFF
-
-/* Define to 1 if `tm_zone' is a member of `struct tm'. */
-#undef HAVE_STRUCT_TM_TM_ZONE
-
-/* Define to 1 if you have the <sys/mman.h> header file. */
-#undef HAVE_SYS_MMAN_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#undef HAVE_SYS_TIME_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/utime.h> header file. */
-#undef HAVE_SYS_UTIME_H
-
-/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
-#undef HAVE_SYS_WAIT_H
-
-/* HAVE_TM_ISDST */
-#undef HAVE_TM_ISDST
-
-/* HAVE_TM_ZONE */
-#undef HAVE_TM_ZONE
-
-/* HAVE_TZNAME */
-#undef HAVE_TZNAME
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define to 1 if you have the `utime' function. */
-#define HAVE_UTIME 1
-
-/* Define to 1 if you have the `utimes' function. */
-#undef HAVE_UTIMES
-
-/* Define to 1 if you have the <utime.h> header file. */
-#define HAVE_UTIME_H 1
-
-/* Define to 1 if you have the `vasprintf' function. */
-#undef HAVE_VASPRINTF
-
-/* Define to 1 if you have the `vfork' function. */
-#undef HAVE_VFORK
-
-/* Define to 1 if you have the <vfork.h> header file. */
-#undef HAVE_VFORK_H
-
-/* Define to 1 or 0, depending whether the compiler supports simple visibility
-   declarations. */
-#undef HAVE_VISIBILITY
-
-/* Define to 1 if you have the <wchar.h> header file. */
-#define HAVE_WCHAR_H 1
-
-/* Define to 1 if you have the <wctype.h> header file. */
-#define HAVE_WCTYPE_H 1
-
-/* Define to 1 if you have the `wcwidth' function. */
-#undef HAVE_WCWIDTH
-
-/* Define to 1 if `fork' works. */
-#undef HAVE_WORKING_FORK
-
-/* Define to 1 if `vfork' works. */
-#undef HAVE_WORKING_VFORK
-
-/* Define to 1 if you have the <zlib.h> header file. */
-#define HAVE_ZLIB_H 1
-
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
-#undef LT_OBJDIR
-
-/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
-   */
-#undef MAJOR_IN_MKDEV
-
-/* Define to 1 if `major', `minor', and `makedev' are declared in
-   <sysmacros.h>. */
-#undef MAJOR_IN_SYSMACROS
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the home page for this package. */
-#undef PACKAGE_URL
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-#undef TM_IN_SYS_TIME
-
-/* Enable extensions on AIX 3, Interix.  */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-/* Enable threading extensions on Solaris.  */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# undef _POSIX_PTHREAD_SEMANTICS
-#endif
-/* Enable extensions on HP NonStop.  */
-#ifndef _TANDEM_SOURCE
-# undef _TANDEM_SOURCE
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# undef __EXTENSIONS__
-#endif
-
-/* Version number of package */
-#define VERSION "7"
-
-/* 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
-
-/* 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
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-#undef _POSIX_SOURCE
-
-/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
-   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
-   #define below would cause a syntax error. */
-#undef _UINT32_T
-
-/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
-   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
-   #define below would cause a syntax error. */
-#undef _UINT64_T
-
-/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
-   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
-   #define below would cause a syntax error. */
-#undef _UINT8_T
-
-/* Define to empty if `const' does not conform to ANSI C. */
-#undef const
-
-/* Define to the type of a signed integer type of width exactly 32 bits if
-   such a type exists and the standard includes do not define it. */
-#undef int32_t
-
-/* Define to the type of a signed integer type of width exactly 64 bits if
-   such a type exists and the standard includes do not define it. */
-#undef int64_t
-
-/* Define to a type if <wchar.h> does not define. */
-#undef mbstate_t
-
-/* Define to `long int' if <sys/types.h> does not define. */
-#undef off_t
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef pid_t
-
-/* Define to `unsigned int' if <sys/types.h> does not define. */
-#undef size_t
-
-/* Define to the type of an unsigned integer type of width exactly 16 bits if
-   such a type exists and the standard includes do not define it. */
-#undef uint16_t
-
-/* Define to the type of an unsigned integer type of width exactly 32 bits if
-   such a type exists and the standard includes do not define it. */
-#undef uint32_t
-
-/* Define to the type of an unsigned integer type of width exactly 64 bits if
-   such a type exists and the standard includes do not define it. */
-#undef uint64_t
-
-/* Define to the type of an unsigned integer type of width exactly 8 bits if
-   such a type exists and the standard includes do not define it. */
-#undef uint8_t
-
-/* Define as `fork' if `vfork' does not work. */
-#undef vfork
diff --git a/3rdparty/libmagic/src/elfclass.h b/3rdparty/libmagic/src/elfclass.h
deleted file mode 100644
index 010958a4296fb8872a0203cc928617cb268fb6d8..0000000000000000000000000000000000000000
--- a/3rdparty/libmagic/src/elfclass.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) Christos Zoulas 2008.
- * All Rights Reserved.
- * 
- * 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 immediately at the beginning of the file, without modification,
- *    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 AUTHOR 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 AUTHOR 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.
- */
-	if (nbytes <= sizeof(elfhdr))
-		return 0;
-
-	u.l = 1;
-	(void)memcpy(&elfhdr, buf, sizeof elfhdr);
-	swap = (u.c[sizeof(int32_t) - 1] + 1) != elfhdr.e_ident[EI_DATA];
-
-	type = elf_getu16(swap, elfhdr.e_type);
-	switch (type) {
-#ifdef ELFCORE
-	case ET_CORE:
-		flags |= FLAGS_IS_CORE;
-		if (dophn_core(ms, clazz, swap, fd,
-		    (off_t)elf_getu(swap, elfhdr.e_phoff),
-		    elf_getu16(swap, elfhdr.e_phnum), 
-		    (size_t)elf_getu16(swap, elfhdr.e_phentsize),
-		    fsize, &flags) == -1)
-			return -1;
-		break;
-#endif
-	case ET_EXEC:
-	case ET_DYN:
-		if (dophn_exec(ms, clazz, swap, fd,
-		    (off_t)elf_getu(swap, elfhdr.e_phoff),
-		    elf_getu16(swap, elfhdr.e_phnum), 
-		    (size_t)elf_getu16(swap, elfhdr.e_phentsize),
-		    fsize, &flags, elf_getu16(swap, elfhdr.e_shnum))
-		    == -1)
-			return -1;
-		/*FALLTHROUGH*/
-	case ET_REL:
-		if (doshn(ms, clazz, swap, fd,
-		    (off_t)elf_getu(swap, elfhdr.e_shoff),
-		    elf_getu16(swap, elfhdr.e_shnum),
-		    (size_t)elf_getu16(swap, elfhdr.e_shentsize),
-		    fsize, &flags, elf_getu16(swap, elfhdr.e_machine),
-		    (int)elf_getu16(swap, elfhdr.e_shstrndx)) == -1)
-			return -1;
-		break;
-
-	default:
-		break;
-	}
-	return 1;
diff --git a/3rdparty/libmagic/src/file.h b/3rdparty/libmagic/src/file.h
deleted file mode 100644
index a7891f9d499555667d613fd38519435d8643f71c..0000000000000000000000000000000000000000
--- a/3rdparty/libmagic/src/file.h
+++ /dev/null
@@ -1,549 +0,0 @@
-/*
- * Copyright (c) Ian F. Darwin 1986-1995.
- * Software written by Ian F. Darwin and others;
- * maintained 1995-present by Christos Zoulas and others.
- *
- * 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 immediately at the beginning of the file, without modification,
- *    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 AUTHOR 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 AUTHOR 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.h - definitions for file(1) program
- * @(#)$File: file.h,v 1.149 2014/03/15 21:47:40 christos Exp $
- */
-
-#ifndef __file_h__
-#define __file_h__
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <memory.h>
-
-#ifdef WIN32
-  #ifdef _WIN64
-    #define SIZE_T_FORMAT "I64"
-  #else
-    #define SIZE_T_FORMAT ""
-  #endif
-  #define INT64_T_FORMAT "I64"
-#else
-  #define SIZE_T_FORMAT "z"
-  #define INT64_T_FORMAT "ll"
-#endif
-
-#include <stdio.h>	/* Include that here, to make sure __P gets defined */
-#include <errno.h>
-#include <fcntl.h>	/* For open and flags */
-
-#ifdef HAVE_STDINT_H
-#ifndef __STDC_LIMIT_MACROS
-#define __STDC_LIMIT_MACROS
-#endif
-#include <stdint.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#include <regex.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/param.h>
-/* Do this here and now, because struct stat gets re-defined on solaris */
-#include <sys/stat.h>
-#include <stdarg.h>
-
-#define ENABLE_CONDITIONALS
-
-#ifndef MAGIC
-#define MAGIC "/etc/magic"
-#endif
-
-#if defined(__EMX__) || defined (WIN32)
-#define PATHSEP	';'
-#else
-#define PATHSEP	':'
-#endif
-
-#define private static
-
-#if HAVE_VISIBILITY
-#define public  __attribute__ ((__visibility__("default")))
-#ifndef protected
-#define protected __attribute__ ((__visibility__("hidden")))
-#endif
-#else
-#define public
-#ifndef protected
-#define protected
-#endif
-#endif
-
-#ifndef __arraycount
-#define __arraycount(a) (sizeof(a) / sizeof(a[0]))
-#endif
-
-#ifndef __GNUC_PREREQ__
-#ifdef __GNUC__
-#define	__GNUC_PREREQ__(x, y)						\
-	((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) ||			\
-	 (__GNUC__ > (x)))
-#else
-#define	__GNUC_PREREQ__(x, y)	0
-#endif
-#endif
-
-#ifndef __GNUC__
-#ifndef __attribute__
-#define __attribute__(a)
-#endif
-#endif
-
-#ifndef MIN
-#define	MIN(a,b)	(((a) < (b)) ? (a) : (b))
-#endif
-
-#ifndef MAX
-#define	MAX(a,b)	(((a) > (b)) ? (a) : (b))
-#endif
-
-#ifndef HOWMANY
-# define HOWMANY (256 * 1024)	/* how much of the file to look at */
-#endif
-#define MAXMAGIS 8192		/* max entries in any one magic file
-				   or directory */
-#define MAXDESC	64		/* max len of text description/MIME type */
-#define MAXMIME	80		/* max len of text MIME type */
-#define MAXstring 64		/* max len of "string" types */
-
-#define MAGICNO		0xF11E041C
-#define VERSIONNO	11
-#define FILE_MAGICSIZE	248
-
-#define	FILE_LOAD	0
-#define FILE_CHECK	1
-#define FILE_COMPILE	2
-#define FILE_LIST	3
-
-union VALUETYPE {
-	uint8_t b;
-	uint16_t h;
-	uint32_t l;
-	uint64_t q;
-	uint8_t hs[2];	/* 2 bytes of a fixed-endian "short" */
-	uint8_t hl[4];	/* 4 bytes of a fixed-endian "long" */
-	uint8_t hq[8];	/* 8 bytes of a fixed-endian "quad" */
-	char s[MAXstring];	/* the search string or regex pattern */
-	unsigned char us[MAXstring];
-	float f;
-	double d;
-};
-
-struct magic {
-	/* Word 1 */
-	uint16_t cont_level;	/* level of ">" */
-	uint8_t flag;
-#define INDIR		0x01	/* if '(...)' appears */
-#define OFFADD		0x02	/* if '>&' or '>...(&' appears */
-#define INDIROFFADD	0x04	/* if '>&(' appears */
-#define UNSIGNED	0x08	/* comparison is unsigned */
-#define NOSPACE		0x10	/* suppress space character before output */
-#define BINTEST		0x20	/* test is for a binary type (set only
-				   for top-level tests) */
-#define TEXTTEST	0x40	/* for passing to file_softmagic */
-
-	uint8_t factor;
-
-	/* Word 2 */
-	uint8_t reln;		/* relation (0=eq, '>'=gt, etc) */
-	uint8_t vallen;		/* length of string value, if any */
-	uint8_t type;		/* comparison type (FILE_*) */
-	uint8_t in_type;	/* type of indirection */
-#define 			FILE_INVALID	0
-#define 			FILE_BYTE	1
-#define				FILE_SHORT	2
-#define				FILE_DEFAULT	3
-#define				FILE_LONG	4
-#define				FILE_STRING	5
-#define				FILE_DATE	6
-#define				FILE_BESHORT	7
-#define				FILE_BELONG	8
-#define				FILE_BEDATE	9
-#define				FILE_LESHORT	10
-#define				FILE_LELONG	11
-#define				FILE_LEDATE	12
-#define				FILE_PSTRING	13
-#define				FILE_LDATE	14
-#define				FILE_BELDATE	15
-#define				FILE_LELDATE	16
-#define				FILE_REGEX	17
-#define				FILE_BESTRING16	18
-#define				FILE_LESTRING16	19
-#define				FILE_SEARCH	20
-#define				FILE_MEDATE	21
-#define				FILE_MELDATE	22
-#define				FILE_MELONG	23
-#define				FILE_QUAD	24
-#define				FILE_LEQUAD	25
-#define				FILE_BEQUAD	26
-#define				FILE_QDATE	27
-#define				FILE_LEQDATE	28
-#define				FILE_BEQDATE	29
-#define				FILE_QLDATE	30
-#define				FILE_LEQLDATE	31
-#define				FILE_BEQLDATE	32
-#define				FILE_FLOAT	33
-#define				FILE_BEFLOAT	34
-#define				FILE_LEFLOAT	35
-#define				FILE_DOUBLE	36
-#define				FILE_BEDOUBLE	37
-#define				FILE_LEDOUBLE	38
-#define				FILE_BEID3	39
-#define				FILE_LEID3	40
-#define				FILE_INDIRECT	41
-#define				FILE_QWDATE	42
-#define				FILE_LEQWDATE	43
-#define				FILE_BEQWDATE	44
-#define				FILE_NAME	45
-#define				FILE_USE	46
-#define				FILE_CLEAR	47
-#define				FILE_NAMES_SIZE	48 /* size of array to contain all names */
-
-#define IS_STRING(t) \
-	((t) == FILE_STRING || \
-	 (t) == FILE_PSTRING || \
-	 (t) == FILE_BESTRING16 || \
-	 (t) == FILE_LESTRING16 || \
-	 (t) == FILE_REGEX || \
-	 (t) == FILE_SEARCH || \
-	 (t) == FILE_NAME || \
-	 (t) == FILE_USE)
-
-#define FILE_FMT_NONE 0
-#define FILE_FMT_NUM  1 /* "cduxXi" */
-#define FILE_FMT_STR  2 /* "s" */
-#define FILE_FMT_QUAD 3 /* "ll" */
-#define FILE_FMT_FLOAT 4 /* "eEfFgG" */
-#define FILE_FMT_DOUBLE 5 /* "eEfFgG" */
-
-	/* Word 3 */
-	uint8_t in_op;		/* operator for indirection */
-	uint8_t mask_op;	/* operator for mask */
-#ifdef ENABLE_CONDITIONALS
-	uint8_t cond;		/* conditional type */
-#else
-	uint8_t dummy;
-#endif
-	uint8_t factor_op;
-#define		FILE_FACTOR_OP_PLUS	'+'
-#define		FILE_FACTOR_OP_MINUS	'-'
-#define		FILE_FACTOR_OP_TIMES	'*'
-#define		FILE_FACTOR_OP_DIV	'/'
-#define		FILE_FACTOR_OP_NONE	'\0'
-
-#define				FILE_OPS	"&|^+-*/%"
-#define				FILE_OPAND	0
-#define				FILE_OPOR	1
-#define				FILE_OPXOR	2
-#define				FILE_OPADD	3
-#define				FILE_OPMINUS	4
-#define				FILE_OPMULTIPLY	5
-#define				FILE_OPDIVIDE	6
-#define				FILE_OPMODULO	7
-#define				FILE_OPS_MASK	0x07 /* mask for above ops */
-#define				FILE_UNUSED_1	0x08
-#define				FILE_UNUSED_2	0x10
-#define				FILE_UNUSED_3	0x20
-#define				FILE_OPINVERSE	0x40
-#define				FILE_OPINDIRECT	0x80
-
-#ifdef ENABLE_CONDITIONALS
-#define				COND_NONE	0
-#define				COND_IF		1
-#define				COND_ELIF	2
-#define				COND_ELSE	3
-#endif /* ENABLE_CONDITIONALS */
-
-	/* Word 4 */
-	uint32_t offset;	/* offset to magic number */
-	/* Word 5 */
-	int32_t in_offset;	/* offset from indirection */
-	/* Word 6 */
-	uint32_t lineno;	/* line number in magic file */
-	/* Word 7,8 */
-	union {
-		uint64_t _mask;	/* for use with numeric and date types */
-		struct {
-			uint32_t _count;	/* repeat/line count */
-			uint32_t _flags;	/* modifier flags */
-		} _s;		/* for use with string types */
-	} _u;
-#define num_mask _u._mask
-#define str_range _u._s._count
-#define str_flags _u._s._flags
-	/* Words 9-16 */
-	union VALUETYPE value;	/* either number or string */
-	/* Words 17-32 */
-	char desc[MAXDESC];	/* description */
-	/* Words 33-52 */
-	char mimetype[MAXMIME]; /* MIME type */
-	/* Words 53-54 */
-	char apple[8];
-};
-
-#define BIT(A)   (1 << (A))
-#define STRING_COMPACT_WHITESPACE		BIT(0)
-#define STRING_COMPACT_OPTIONAL_WHITESPACE	BIT(1)
-#define STRING_IGNORE_LOWERCASE			BIT(2)
-#define STRING_IGNORE_UPPERCASE			BIT(3)
-#define REGEX_OFFSET_START			BIT(4)
-#define STRING_TEXTTEST				BIT(5)
-#define STRING_BINTEST				BIT(6)
-#define PSTRING_1_BE				BIT(7)
-#define PSTRING_1_LE				BIT(7)
-#define PSTRING_2_BE				BIT(8)
-#define PSTRING_2_LE				BIT(9)
-#define PSTRING_4_BE				BIT(10)
-#define PSTRING_4_LE				BIT(11)
-#define PSTRING_LEN	\
-    (PSTRING_1_BE|PSTRING_2_LE|PSTRING_2_BE|PSTRING_4_LE|PSTRING_4_BE)
-#define PSTRING_LENGTH_INCLUDES_ITSELF		BIT(12)
-#define	STRING_TRIM				BIT(13)
-#define CHAR_COMPACT_WHITESPACE			'W'
-#define CHAR_COMPACT_OPTIONAL_WHITESPACE	'w'
-#define CHAR_IGNORE_LOWERCASE			'c'
-#define CHAR_IGNORE_UPPERCASE			'C'
-#define CHAR_REGEX_OFFSET_START			's'
-#define CHAR_TEXTTEST				't'
-#define	CHAR_TRIM				'T'
-#define CHAR_BINTEST				'b'
-#define CHAR_PSTRING_1_BE			'B'
-#define CHAR_PSTRING_1_LE			'B'
-#define CHAR_PSTRING_2_BE			'H'
-#define CHAR_PSTRING_2_LE			'h'
-#define CHAR_PSTRING_4_BE			'L'
-#define CHAR_PSTRING_4_LE			'l'
-#define CHAR_PSTRING_LENGTH_INCLUDES_ITSELF     'J'
-#define STRING_IGNORE_CASE		(STRING_IGNORE_LOWERCASE|STRING_IGNORE_UPPERCASE)
-#define STRING_DEFAULT_RANGE		100
-
-
-/* list of magic entries */
-struct mlist {
-	struct magic *magic;		/* array of magic entries */
-	uint32_t nmagic;		/* number of entries in array */
-	void *map;			/* internal resources used by entry */
-	struct mlist *next, *prev;
-};
-
-#ifdef __cplusplus
-#define CAST(T, b)	static_cast<T>(b)
-#define RCAST(T, b)	reinterpret_cast<T>(b)
-#else
-#define CAST(T, b)	(T)(b)
-#define RCAST(T, b)	(T)(b)
-#endif
-
-struct level_info {
-	int32_t off;
-	int got_match;
-#ifdef ENABLE_CONDITIONALS
-	int last_match;
-	int last_cond;	/* used for error checking by parse() */
-#endif
-};
-
-#define MAGIC_SETS	2
-
-struct magic_set {
-	struct mlist *mlist[MAGIC_SETS];	/* list of regular entries */
-	struct cont {
-		size_t len;
-		struct level_info *li;
-	} c;
-	struct out {
-		char *buf;		/* Accumulation buffer */
-		char *pbuf;		/* Printable buffer */
-	} o;
-	uint32_t offset;
-	int error;
-	int flags;			/* Control magic tests. */
-	int event_flags;		/* Note things that happened. */
-#define 		EVENT_HAD_ERR		0x01
-	const char *file;
-	size_t line;			/* current magic line number */
-
-	/* data for searches */
-	struct {
-		const char *s;		/* start of search in original source */
-		size_t s_len;		/* length of search region */
-		size_t offset;		/* starting offset in source: XXX - should this be off_t? */
-		size_t rm_len;		/* match length */
-	} search;
-
-	/* FIXME: Make the string dynamically allocated so that e.g.
-	   strings matched in files can be longer than MAXstring */
-	union VALUETYPE ms_value;	/* either number or string */
-};
-
-/* Type for Unicode characters */
-typedef unsigned long unichar;
-
-struct stat;
-#define FILE_T_LOCAL	1
-#define FILE_T_WINDOWS	2
-protected const char *file_fmttime(uint64_t, int, char *);
-protected struct magic_set *file_ms_alloc(int);
-protected void file_ms_free(struct magic_set *);
-protected int file_buffer(struct magic_set *, int, const char *, const void *,
-    size_t);
-protected int file_fsmagic(struct magic_set *, const char *, struct stat *);
-protected int file_pipe2file(struct magic_set *, int, const void *, size_t);
-protected int file_vprintf(struct magic_set *, const char *, va_list)
-    __attribute__((__format__(__printf__, 2, 0)));
-protected size_t file_printedlen(const struct magic_set *);
-protected int file_replace(struct magic_set *, const char *, const char *);
-protected int file_printf(struct magic_set *, const char *, ...)
-    __attribute__((__format__(__printf__, 2, 3)));
-protected int file_reset(struct magic_set *);
-protected int file_tryelf(struct magic_set *, int, const unsigned char *,
-    size_t);
-protected int file_trycdf(struct magic_set *, int, const unsigned char *,
-    size_t);
-#if HAVE_FORK
-protected int file_zmagic(struct magic_set *, int, const char *,
-    const unsigned char *, size_t);
-#endif
-protected int file_ascmagic(struct magic_set *, const unsigned char *, size_t,
-    int);
-protected int file_ascmagic_with_encoding(struct magic_set *,
-    const unsigned char *, size_t, unichar *, size_t, const char *,
-    const char *, int);
-protected int file_encoding(struct magic_set *, const unsigned char *, size_t,
-    unichar **, size_t *, const char **, const char **, const char **);
-protected int file_is_tar(struct magic_set *, const unsigned char *, size_t);
-protected int file_softmagic(struct magic_set *, const unsigned char *, size_t,
-    size_t, int, int);
-protected int file_apprentice(struct magic_set *, const char *, int);
-protected int file_magicfind(struct magic_set *, const char *, struct mlist *);
-protected uint64_t file_signextend(struct magic_set *, struct magic *,
-    uint64_t);
-protected void file_badread(struct magic_set *);
-protected void file_badseek(struct magic_set *);
-protected void file_oomem(struct magic_set *, size_t);
-protected void file_error(struct magic_set *, int, const char *, ...)
-    __attribute__((__format__(__printf__, 3, 4)));
-protected void file_magerror(struct magic_set *, const char *, ...)
-    __attribute__((__format__(__printf__, 2, 3)));
-protected void file_magwarn(struct magic_set *, const char *, ...)
-    __attribute__((__format__(__printf__, 2, 3)));
-protected void file_mdump(struct magic *);
-protected void file_showstr(FILE *, const char *, size_t);
-protected size_t file_mbswidth(const char *);
-protected const char *file_getbuffer(struct magic_set *);
-protected ssize_t sread(int, void *, size_t, int);
-protected int file_check_mem(struct magic_set *, unsigned int);
-protected int file_looks_utf8(const unsigned char *, size_t, unichar *,
-    size_t *);
-protected size_t file_pstring_length_size(const struct magic *);
-protected size_t file_pstring_get_length(const struct magic *, const char *);
-#ifdef __EMX__
-protected int file_os2_apptype(struct magic_set *, const char *, const void *,
-    size_t);
-#endif /* __EMX__ */
-
-
-#ifndef COMPILE_ONLY
-extern const char *file_names[];
-extern const size_t file_nnames;
-#endif
-
-#ifndef HAVE_STRERROR
-extern int sys_nerr;
-extern char *sys_errlist[];
-#define strerror(e) \
-	(((e) >= 0 && (e) < sys_nerr) ? sys_errlist[(e)] : "Unknown error")
-#endif
-
-#ifndef HAVE_STRTOUL
-#define strtoul(a, b, c)	strtol(a, b, c)
-#endif
-
-#ifndef HAVE_PREAD
-ssize_t pread(int, void *, size_t, off_t);
-#endif
-#ifndef HAVE_VASPRINTF
-int vasprintf(char **, const char *, va_list);
-#endif
-#ifndef HAVE_ASPRINTF
-int asprintf(char **, const char *, ...);
-#endif
-
-#ifndef HAVE_STRLCPY
-size_t strlcpy(char *, const char *, size_t);
-#endif
-#ifndef HAVE_STRLCAT
-size_t strlcat(char *, const char *, size_t);
-#endif
-#ifndef HAVE_STRCASESTR
-char *strcasestr(const char *, const char *);
-#endif
-#ifndef HAVE_GETLINE
-ssize_t getline(char **, size_t *, FILE *);
-ssize_t getdelim(char **, size_t *, int, FILE *);
-#endif
-#ifndef HAVE_CTIME_R
-char   *ctime_r(const time_t *, char *);
-#endif
-#ifndef HAVE_ASCTIME_R
-char   *asctime_r(const struct tm *, char *);
-#endif
-#ifndef HAVE_FMTCHECK
-const char *fmtcheck(const char *, const char *) 
-     __attribute__((__format_arg__(2)));
-#endif
-
-#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H) && !defined(QUICK)
-#define QUICK
-#endif
-
-#ifndef O_BINARY
-#define O_BINARY	0
-#endif
-
-#ifndef __cplusplus
-#if defined(__GNUC__) && (__GNUC__ >= 3)
-#define FILE_RCSID(id) \
-static const char rcsid[] __attribute__((__used__)) = id;
-#else
-#define FILE_RCSID(id) \
-static const char *rcsid(const char *p) { \
-	return rcsid(p = id); \
-}
-#endif
-#else
-#define FILE_RCSID(id)
-#endif
-
-#endif /* __file_h__ */
diff --git a/3rdparty/libmagic/src/file_opts.h b/3rdparty/libmagic/src/file_opts.h
deleted file mode 100644
index db34eb732b05def0467837fa1f6a2d6e9e8035b5..0000000000000000000000000000000000000000
--- a/3rdparty/libmagic/src/file_opts.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Table of command-line options
- *
- * The first column specifies the short name, if any, or 0 if none.
- * The second column specifies the long name.
- * The third column specifies whether it takes a parameter.
- * The fourth column is the documentation.
- *
- * N.B. The long options' order must correspond to the code in file.c,
- * and OPTSTRING must be kept up-to-date with the short options.
- * Pay particular attention to the numbers of long-only options in the
- * switch statement!
- */
-
-OPT_LONGONLY("help", 0, "                 display this help and exit\n")
-OPT('v', "version", 0, "              output version information and exit\n")
-OPT('m', "magic-file", 1, " LIST      use LIST as a colon-separated list of magic\n"
-    "                               number files\n")
-OPT('z', "uncompress", 0, "           try to look inside compressed files\n")
-OPT('b', "brief", 0, "                do not prepend filenames to output lines\n")
-OPT('c', "checking-printout", 0, "    print the parsed form of the magic file, use in\n"
-    "                               conjunction with -m to debug a new magic file\n"
-    "                               before installing it\n")
-OPT('e', "exclude", 1, " TEST         exclude TEST from the list of test to be\n"
-    "                               performed for file. Valid tests are:\n"
-    "                               %o\n")
-OPT('f', "files-from", 1, " FILE      read the filenames to be examined from FILE\n")
-OPT('F', "separator", 1, " STRING     use string as separator instead of `:'\n")
-OPT('i', "mime", 0, "                 output MIME type strings (--mime-type and\n"
-    "                               --mime-encoding)\n")
-OPT_LONGONLY("apple", 0, "                output the Apple CREATOR/TYPE\n")
-OPT_LONGONLY("mime-type", 0, "            output the MIME type\n")
-OPT_LONGONLY("mime-encoding", 0, "        output the MIME encoding\n")
-OPT('k', "keep-going", 0, "           don't stop at the first match\n")
-OPT('l', "list", 0, "                 list magic strength\n")
-#ifdef S_IFLNK
-OPT('L', "dereference", 0, "          follow symlinks (default)\n")
-OPT('h', "no-dereference", 0, "       don't follow symlinks\n")
-#endif
-OPT('n', "no-buffer", 0, "            do not buffer output\n")
-OPT('N', "no-pad", 0, "               do not pad output\n")
-OPT('0', "print0", 0, "               terminate filenames with ASCII NUL\n")
-#if defined(HAVE_UTIME) || defined(HAVE_UTIMES)
-OPT('p', "preserve-date", 0, "        preserve access times on files\n")
-#endif
-OPT('r', "raw", 0, "                  don't translate unprintable chars to \\ooo\n")
-OPT('s', "special-files", 0, "        treat special (block/char devices) files as\n"
-    "                             ordinary ones\n")
-OPT('C', "compile", 0, "              compile file specified by -m\n")
-OPT('d', "debug", 0, "                print debugging messages\n")
diff --git a/3rdparty/libmagic/src/magic.h b/3rdparty/libmagic/src/magic.h
deleted file mode 100644
index 535a177b885dbdbf22d9aff35a12cbc164d7fa70..0000000000000000000000000000000000000000
--- a/3rdparty/libmagic/src/magic.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) Christos Zoulas 2003.
- * All Rights Reserved.
- *
- * 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 immediately at the beginning of the file, without modification,
- *    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 AUTHOR 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 AUTHOR 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 _MAGIC_H
-#define _MAGIC_H
-
-#include <sys/types.h>
-
-#define	MAGIC_NONE		0x000000 /* No flags */
-#define	MAGIC_DEBUG		0x000001 /* Turn on debugging */
-#define	MAGIC_SYMLINK		0x000002 /* Follow symlinks */
-#define	MAGIC_COMPRESS		0x000004 /* Check inside compressed files */
-#define	MAGIC_DEVICES		0x000008 /* Look at the contents of devices */
-#define	MAGIC_MIME_TYPE		0x000010 /* Return the MIME type */
-#define	MAGIC_CONTINUE		0x000020 /* Return all matches */
-#define	MAGIC_CHECK		0x000040 /* Print warnings to stderr */
-#define	MAGIC_PRESERVE_ATIME	0x000080 /* Restore access time on exit */
-#define	MAGIC_RAW		0x000100 /* Don't translate unprintable chars */
-#define	MAGIC_ERROR		0x000200 /* Handle ENOENT etc as real errors */
-#define	MAGIC_MIME_ENCODING	0x000400 /* Return the MIME encoding */
-#define MAGIC_MIME		(MAGIC_MIME_TYPE|MAGIC_MIME_ENCODING)
-#define	MAGIC_APPLE		0x000800 /* Return the Apple creator and type */
-
-#define	MAGIC_NO_CHECK_COMPRESS	0x001000 /* Don't check for compressed files */
-#define	MAGIC_NO_CHECK_TAR	0x002000 /* Don't check for tar files */
-#define	MAGIC_NO_CHECK_SOFT	0x004000 /* Don't check magic entries */
-#define	MAGIC_NO_CHECK_APPTYPE	0x008000 /* Don't check application type */
-#define	MAGIC_NO_CHECK_ELF	0x010000 /* Don't check for elf details */
-#define	MAGIC_NO_CHECK_TEXT	0x020000 /* Don't check for text files */
-#define	MAGIC_NO_CHECK_CDF	0x040000 /* Don't check for cdf files */
-#define	MAGIC_NO_CHECK_TOKENS	0x100000 /* Don't check tokens */
-#define MAGIC_NO_CHECK_ENCODING 0x200000 /* Don't check text encodings */
-
-/* No built-in tests; only consult the magic file */
-#define MAGIC_NO_CHECK_BUILTIN	( \
-	MAGIC_NO_CHECK_COMPRESS	| \
-	MAGIC_NO_CHECK_TAR	| \
-/*	MAGIC_NO_CHECK_SOFT	| */ \
-	MAGIC_NO_CHECK_APPTYPE	| \
-	MAGIC_NO_CHECK_ELF	| \
-	MAGIC_NO_CHECK_TEXT	| \
-	MAGIC_NO_CHECK_CDF	| \
-	MAGIC_NO_CHECK_TOKENS	| \
-	MAGIC_NO_CHECK_ENCODING	| \
-	0			  \
-)
-
-/* Defined for backwards compatibility (renamed) */
-#define	MAGIC_NO_CHECK_ASCII	MAGIC_NO_CHECK_TEXT
-
-/* Defined for backwards compatibility; do nothing */
-#define	MAGIC_NO_CHECK_FORTRAN	0x000000 /* Don't check ascii/fortran */
-#define	MAGIC_NO_CHECK_TROFF	0x000000 /* Don't check ascii/troff */
-
-#define MAGIC_VERSION		517	/* This implementation */
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct magic_set *magic_t;
-magic_t magic_open(int);
-void magic_close(magic_t);
-
-const char *magic_getpath(const char *, int);
-const char *magic_file(magic_t, const char *);
-const char *magic_descriptor(magic_t, int);
-const char *magic_buffer(magic_t, const void *, size_t);
-
-const char *magic_error(magic_t);
-int magic_setflags(magic_t, int);
-
-int magic_version(void);
-int magic_load(magic_t, const char *);
-int magic_compile(magic_t, const char *);
-int magic_check(magic_t, const char *);
-int magic_list(magic_t, const char *);
-int magic_errno(magic_t);
-
-#ifdef __cplusplus
-};
-#endif
-
-#endif /* _MAGIC_H */
diff --git a/3rdparty/libmagic/src/mygetopt.h b/3rdparty/libmagic/src/mygetopt.h
deleted file mode 100644
index ef87525eaf5bb447ffbda32f39a2e14175ed6bae..0000000000000000000000000000000000000000
--- a/3rdparty/libmagic/src/mygetopt.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*	$NetBSD: getopt.h,v 1.8 2007/11/06 19:21:18 christos Exp $	*/
-
-/*-
- * Copyright (c) 2000 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Dieter Baron and Thomas Klausner.
- *
- * 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.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *        This product includes software developed by the NetBSD
- *        Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *    contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 _GETOPT_H_
-#define _GETOPT_H_
-
-#include <unistd.h>
-
-/*
- * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions
- */
-#define no_argument        0
-#define required_argument  1
-#define optional_argument  2
-
-struct option {
-	/* name of long option */
-	const char *name;
-	/*
-	 * one of no_argument, required_argument, and optional_argument:
-	 * whether option takes an argument
-	 */
-	int has_arg;
-	/* if not NULL, set *flag to val when option found */
-	int *flag;
-	/* if flag not NULL, value to set *flag to; else return value */
-	int val;
-};
-
-int getopt_long(int, char * const *, const char *,
-    const struct option *, int *);
- 
-#endif /* !_GETOPT_H_ */
diff --git a/3rdparty/libmagic/src/readelf.h b/3rdparty/libmagic/src/readelf.h
deleted file mode 100644
index 732b20c88e728761ba19ee2d8c75d619420c4fc1..0000000000000000000000000000000000000000
--- a/3rdparty/libmagic/src/readelf.h
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
- * Copyright (c) Christos Zoulas 2003.
- * All Rights Reserved.
- * 
- * 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 immediately at the beginning of the file, without modification,
- *    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 AUTHOR 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 AUTHOR 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.
- */
-/*
- * @(#)Id: readelf.h,v 1.9 2002/05/16 18:45:56 christos Exp
- *
- * Provide elf data structures for non-elf machines, allowing file
- * non-elf hosts to determine if an elf binary is stripped.
- * Note: cobbled from the linux header file, with modifications
- */
-#ifndef __fake_elf_h__
-#define	__fake_elf_h__
-
-#if HAVE_STDINT_H
-#include <stdint.h>
-#endif
-
-typedef uint32_t	Elf32_Addr;
-typedef uint32_t	Elf32_Off;
-typedef uint16_t	Elf32_Half;
-typedef uint32_t	Elf32_Word;
-typedef uint8_t		Elf32_Char;
-
-typedef	uint64_t 	Elf64_Addr;
-typedef	uint64_t 	Elf64_Off;
-typedef uint64_t 	Elf64_Xword;
-typedef uint16_t	Elf64_Half;
-typedef uint32_t	Elf64_Word;
-typedef uint8_t		Elf64_Char;
-
-#define	EI_NIDENT	16
-
-typedef struct {
-    Elf32_Char	e_ident[EI_NIDENT];
-    Elf32_Half	e_type;
-    Elf32_Half	e_machine;
-    Elf32_Word	e_version;
-    Elf32_Addr	e_entry;  /* Entry point */
-    Elf32_Off	e_phoff;
-    Elf32_Off	e_shoff;
-    Elf32_Word	e_flags;
-    Elf32_Half	e_ehsize;
-    Elf32_Half	e_phentsize;
-    Elf32_Half	e_phnum;
-    Elf32_Half	e_shentsize;
-    Elf32_Half	e_shnum;
-    Elf32_Half	e_shstrndx;
-} Elf32_Ehdr;
-
-typedef struct {
-    Elf64_Char	e_ident[EI_NIDENT];
-    Elf64_Half	e_type;
-    Elf64_Half	e_machine;
-    Elf64_Word	e_version;
-    Elf64_Addr	e_entry;  /* Entry point */
-    Elf64_Off	e_phoff;
-    Elf64_Off	e_shoff;
-    Elf64_Word	e_flags;
-    Elf64_Half	e_ehsize;
-    Elf64_Half	e_phentsize;
-    Elf64_Half	e_phnum;
-    Elf64_Half	e_shentsize;
-    Elf64_Half	e_shnum;
-    Elf64_Half	e_shstrndx;
-} Elf64_Ehdr;
-
-/* e_type */
-#define	ET_REL		1
-#define	ET_EXEC		2
-#define	ET_DYN		3
-#define	ET_CORE		4
-
-/* e_machine (used only for SunOS 5.x hardware capabilities) */
-#define	EM_SPARC	2
-#define	EM_386		3
-#define	EM_SPARC32PLUS	18
-#define	EM_SPARCV9	43
-#define	EM_IA_64	50
-#define	EM_AMD64	62
-
-/* sh_type */
-#define	SHT_SYMTAB	2
-#define	SHT_NOTE	7
-#define	SHT_DYNSYM	11
-#define	SHT_SUNW_cap	0x6ffffff5	/* SunOS 5.x hw/sw capabilites */
-
-/* elf type */
-#define	ELFDATANONE	0		/* e_ident[EI_DATA] */
-#define	ELFDATA2LSB	1
-#define	ELFDATA2MSB	2
-
-/* elf class */
-#define	ELFCLASSNONE	0
-#define	ELFCLASS32	1
-#define	ELFCLASS64	2
-
-/* magic number */
-#define	EI_MAG0		0		/* e_ident[] indexes */
-#define	EI_MAG1		1
-#define	EI_MAG2		2
-#define	EI_MAG3		3
-#define	EI_CLASS	4
-#define	EI_DATA		5
-#define	EI_VERSION	6
-#define	EI_PAD		7
-
-#define	ELFMAG0		0x7f		/* EI_MAG */
-#define	ELFMAG1		'E'
-#define	ELFMAG2		'L'
-#define	ELFMAG3		'F'
-#define	ELFMAG		"\177ELF"
-
-#define	OLFMAG1		'O'
-#define	OLFMAG		"\177OLF"
-
-typedef struct {
-    Elf32_Word	p_type;
-    Elf32_Off	p_offset;
-    Elf32_Addr	p_vaddr;
-    Elf32_Addr	p_paddr;
-    Elf32_Word	p_filesz;
-    Elf32_Word	p_memsz;
-    Elf32_Word	p_flags;
-    Elf32_Word	p_align;
-} Elf32_Phdr;
-
-typedef struct {
-    Elf64_Word	p_type;
-    Elf64_Word	p_flags;
-    Elf64_Off	p_offset;
-    Elf64_Addr	p_vaddr;
-    Elf64_Addr	p_paddr;
-    Elf64_Xword	p_filesz;
-    Elf64_Xword	p_memsz;
-    Elf64_Xword	p_align;
-} Elf64_Phdr;
-
-#define	PT_NULL		0		/* p_type */
-#define	PT_LOAD		1
-#define	PT_DYNAMIC	2
-#define	PT_INTERP	3
-#define	PT_NOTE		4
-#define	PT_SHLIB	5
-#define	PT_PHDR		6
-#define	PT_NUM		7
-
-typedef struct {
-    Elf32_Word	sh_name;
-    Elf32_Word	sh_type;
-    Elf32_Word	sh_flags;
-    Elf32_Addr	sh_addr;
-    Elf32_Off	sh_offset;
-    Elf32_Word	sh_size;
-    Elf32_Word	sh_link;
-    Elf32_Word	sh_info;
-    Elf32_Word	sh_addralign;
-    Elf32_Word	sh_entsize;
-} Elf32_Shdr;
-
-typedef struct {
-    Elf64_Word	sh_name;
-    Elf64_Word	sh_type;
-    Elf64_Off	sh_flags;
-    Elf64_Addr	sh_addr;
-    Elf64_Off	sh_offset;
-    Elf64_Off	sh_size;
-    Elf64_Word	sh_link;
-    Elf64_Word	sh_info;
-    Elf64_Off	sh_addralign;
-    Elf64_Off	sh_entsize;
-} Elf64_Shdr;
-
-#define	NT_NETBSD_CORE_PROCINFO		1
-
-/* Note header in a PT_NOTE section */
-typedef struct elf_note {
-    Elf32_Word	n_namesz;	/* Name size */
-    Elf32_Word	n_descsz;	/* Content size */
-    Elf32_Word	n_type;		/* Content type */
-} Elf32_Nhdr;
-
-typedef struct {
-    Elf64_Word	n_namesz;
-    Elf64_Word	n_descsz;
-    Elf64_Word	n_type;
-} Elf64_Nhdr;
-
-/* Notes used in ET_CORE */
-#define	NT_PRSTATUS	1
-#define	NT_PRFPREG	2
-#define	NT_PRPSINFO	3
-#define	NT_PRXREG	4
-#define	NT_TASKSTRUCT	4
-#define	NT_PLATFORM	5
-#define	NT_AUXV		6
-
-/* Note types used in executables */
-/* NetBSD executables (name = "NetBSD") */
-#define	NT_NETBSD_VERSION	1
-#define	NT_NETBSD_EMULATION	2
-#define	NT_FREEBSD_VERSION	1
-#define	NT_OPENBSD_VERSION	1
-#define	NT_DRAGONFLY_VERSION	1
-/*
- * GNU executables (name = "GNU")
- * word[0]: GNU OS tags
- * word[1]: major version
- * word[2]: minor version
- * word[3]: tiny version
- */
-#define	NT_GNU_VERSION		1
-
-/* GNU OS tags */
-#define	GNU_OS_LINUX	0
-#define	GNU_OS_HURD	1
-#define	GNU_OS_SOLARIS	2
-#define	GNU_OS_KFREEBSD	3
-#define	GNU_OS_KNETBSD	4
-
-/*
- * GNU Hardware capability information 
- * word[0]: Number of entries
- * word[1]: Bitmask of enabled entries
- * Followed by a byte id, and a NUL terminated string per entry
- */
-#define	NT_GNU_HWCAP		2
-
-/*
- * GNU Build ID generated by ld
- * 160 bit SHA1 [default] 
- * 128 bit md5 or uuid
- */
-#define	NT_GNU_BUILD_ID		3
-
-/*
- * NetBSD-specific note type: PaX.
- * There should be 1 NOTE per executable.
- * name: PaX\0
- * namesz: 4
- * desc:
- *	word[0]: capability bitmask
- * descsz: 4
- */
-#define NT_NETBSD_PAX		3
-#define NT_NETBSD_PAX_MPROTECT		0x01	/* Force enable Mprotect */
-#define NT_NETBSD_PAX_NOMPROTECT	0x02	/* Force disable Mprotect */
-#define NT_NETBSD_PAX_GUARD		0x04	/* Force enable Segvguard */
-#define NT_NETBSD_PAX_NOGUARD		0x08	/* Force disable Servguard */
-#define NT_NETBSD_PAX_ASLR		0x10	/* Force enable ASLR */
-#define NT_NETBSD_PAX_NOASLR		0x20	/* Force disable ASLR */
-
-/*
- * NetBSD-specific note type: MACHINE_ARCH.
- * There should be 1 NOTE per executable.
- * name:	NetBSD\0
- * namesz:	7
- * desc:	string
- * descsz:	variable
- */
-#define NT_NETBSD_MARCH		5
-
-/*
- * NetBSD-specific note type: COMPILER MODEL.
- * There should be 1 NOTE per executable.
- * name:	NetBSD\0
- * namesz:	7
- * desc:	string
- * descsz:	variable
- */
-#define NT_NETBSD_CMODEL	6
-
-#if !defined(ELFSIZE) && defined(ARCH_ELFSIZE)
-#define ELFSIZE ARCH_ELFSIZE
-#endif
-/* SunOS 5.x hardware/software capabilities */
-typedef struct {
-	Elf32_Word	c_tag;
-	union {
-		Elf32_Word	c_val;
-		Elf32_Addr	c_ptr;
-	} c_un;
-} Elf32_Cap;
-
-typedef struct {
-	Elf64_Xword	c_tag;
-	union {
-		Elf64_Xword	c_val;
-		Elf64_Addr	c_ptr;
-	} c_un;
-} Elf64_Cap;
-
-/* SunOS 5.x hardware/software capability tags */
-#define	CA_SUNW_NULL	0
-#define	CA_SUNW_HW_1	1
-#define	CA_SUNW_SF_1	2
-
-/* SunOS 5.x software capabilities */
-#define	SF1_SUNW_FPKNWN	0x01
-#define	SF1_SUNW_FPUSED	0x02
-#define	SF1_SUNW_MASK	0x03
-
-/* SunOS 5.x hardware capabilities: sparc */
-#define	AV_SPARC_MUL32		0x0001
-#define	AV_SPARC_DIV32		0x0002
-#define	AV_SPARC_FSMULD		0x0004
-#define	AV_SPARC_V8PLUS		0x0008
-#define	AV_SPARC_POPC		0x0010
-#define	AV_SPARC_VIS		0x0020
-#define	AV_SPARC_VIS2		0x0040
-#define	AV_SPARC_ASI_BLK_INIT	0x0080
-#define	AV_SPARC_FMAF		0x0100
-#define	AV_SPARC_FJFMAU		0x4000
-#define	AV_SPARC_IMA		0x8000
-
-/* SunOS 5.x hardware capabilities: 386 */
-#define	AV_386_FPU		0x00000001
-#define	AV_386_TSC		0x00000002
-#define	AV_386_CX8		0x00000004
-#define	AV_386_SEP		0x00000008
-#define	AV_386_AMD_SYSC		0x00000010
-#define	AV_386_CMOV		0x00000020
-#define	AV_386_MMX		0x00000040
-#define	AV_386_AMD_MMX		0x00000080
-#define	AV_386_AMD_3DNow	0x00000100
-#define	AV_386_AMD_3DNowx	0x00000200
-#define	AV_386_FXSR		0x00000400
-#define	AV_386_SSE		0x00000800
-#define	AV_386_SSE2		0x00001000
-#define	AV_386_PAUSE		0x00002000
-#define	AV_386_SSE3		0x00004000
-#define	AV_386_MON		0x00008000
-#define	AV_386_CX16		0x00010000
-#define	AV_386_AHF		0x00020000
-#define	AV_386_TSCP		0x00040000
-#define	AV_386_AMD_SSE4A	0x00080000
-#define	AV_386_POPCNT		0x00100000
-#define	AV_386_AMD_LZCNT	0x00200000
-#define	AV_386_SSSE3		0x00400000
-#define	AV_386_SSE4_1		0x00800000
-#define	AV_386_SSE4_2		0x01000000
-
-#endif
diff --git a/3rdparty/libmagic/src/tar.h b/3rdparty/libmagic/src/tar.h
deleted file mode 100644
index 854d4552e6084c29b3ff8457048f2db4fce9786c..0000000000000000000000000000000000000000
--- a/3rdparty/libmagic/src/tar.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) Ian F. Darwin 1986-1995.
- * Software written by Ian F. Darwin and others;
- * maintained 1995-present by Christos Zoulas and others.
- *
- * 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 immediately at the beginning of the file, without modification,
- *    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 AUTHOR 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 AUTHOR 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.
- */
-/*
- * Header file for public domain tar (tape archive) program.
- *
- * @(#)tar.h 1.20 86/10/29	Public Domain.
- *
- * Created 25 August 1985 by John Gilmore, ihnp4!hoptoad!gnu.
- *
- * $File: tar.h,v 1.13 2010/11/30 14:58:53 rrt Exp $ # checkin only
- */
-
-/*
- * Header block on tape.
- *
- * I'm going to use traditional DP naming conventions here.
- * A "block" is a big chunk of stuff that we do I/O on.
- * A "record" is a piece of info that we care about.
- * Typically many "record"s fit into a "block".
- */
-#define	RECORDSIZE	512
-#define	NAMSIZ	100
-#define	TUNMLEN	32
-#define	TGNMLEN	32
-
-union record {
-	unsigned char	charptr[RECORDSIZE];
-	struct header {
-		char	name[NAMSIZ];
-		char	mode[8];
-		char	uid[8];
-		char	gid[8];
-		char	size[12];
-		char	mtime[12];
-		char	chksum[8];
-		char	linkflag;
-		char	linkname[NAMSIZ];
-		char	magic[8];
-		char	uname[TUNMLEN];
-		char	gname[TGNMLEN];
-		char	devmajor[8];
-		char	devminor[8];
-	} header;
-};
-
-/* The magic field is filled with this if uname and gname are valid. */
-#define	TMAGIC		"ustar"		/* 5 chars and a null */
-#define	GNUTMAGIC	"ustar  "	/* 7 chars and a null */
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2be6f6973fc4b2445bc3f2faefb81c8cf008dce0..5e1266e1ea560fe2c1837f99b2b946c527b5daef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -77,9 +77,12 @@ if(WIN32)
   add_definitions ("-D__WINDOWS__")
   add_definitions ("-D_CRT_SECURE_NO_WARNINGS")
   add_definitions ("-DCURL_STATICLIB")
+  add_definitions("-DHAVE_PREAD")
+  add_definitions("-DHAVE_MMAP")
+  add_definitions("-DHAVE_STRNDUP")
 
   if(DAP_RELEASE)
-    set(_CCOPT "-static -Wall -O3 -fno-ident -ffast-math -ftree-vectorize -mfpmath=sse -mmmx -msse2 -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all")
+    set(_CCOPT "-static -std=gnu11 -Wall -O3 -fno-ident -ffast-math -ftree-vectorize -mfpmath=sse -mmmx -msse2 -fno-asynchronous-unwind-tables -ffunction-sections -Wl,--gc-sections -Wl,--strip-all")
   else()
     set(_CCOPT "-mconsole -static -Wall -pg")
     set(_LOPT "-mconsole -static -pg")
@@ -94,7 +97,6 @@ if(WIN32)
   include_directories(3rdparty/wepoll/include/)
   include_directories(3rdparty/uthash/src/)
   include_directories(3rdparty/libjson-c/)
-  include_directories(3rdparty/libmagic/src/)
   include_directories(3rdparty/curl/include/)
   include_directories(3rdparty/libsqlite3/)
 
@@ -180,10 +182,7 @@ if(WIN32)
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libjson-c[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libmemcached[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/wepoll[x86_64CLANG].a
-    ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libmagic[x86_64CLANG].a
-    #${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/cuttdb[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libsqlite3[x86_64CLANG].a
-    ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/regex[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libmongoc[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libbson[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/curl[x86_64CLANG].a
@@ -225,10 +224,7 @@ if(WIN32)
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libjson-c[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libmemcached[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/wepoll[x86_64CLANG].a
-    ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libmagic[x86_64CLANG].a
-    #${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/cuttdb[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libsqlite3[x86_64CLANG].a
-    ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/regex[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libmongoc[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libbson[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/curl[x86_64CLANG].a
@@ -270,10 +266,7 @@ if(WIN32)
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libjson-c[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libmemcached[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/wepoll[x86_64CLANG].a
-    ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libmagic[x86_64CLANG].a
-    #${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/cuttdb[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libsqlite3[x86_64CLANG].a
-    ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/regex[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libmongoc[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/libbson[x86_64CLANG].a
     ${CMAKE_CURRENT_SOURCE_DIR}/lib/[x86_64CLANG]/curl[x86_64CLANG].a
diff --git a/lib/[x86_64CLANG]/cuttdb[x86_64CLANG].a b/lib/[x86_64CLANG]/cuttdb[x86_64CLANG].a
deleted file mode 100644
index 475f289fae927a51c5afcaa9773dd4d44424e58c..0000000000000000000000000000000000000000
Binary files a/lib/[x86_64CLANG]/cuttdb[x86_64CLANG].a and /dev/null differ
diff --git a/lib/[x86_64CLANG]/libmagic[x86_64CLANG].a b/lib/[x86_64CLANG]/libmagic[x86_64CLANG].a
deleted file mode 100644
index 2c7a5df6de2ad08056c1643e59dc220cb5ea5635..0000000000000000000000000000000000000000
Binary files a/lib/[x86_64CLANG]/libmagic[x86_64CLANG].a and /dev/null differ
diff --git a/lib/[x86_64CLANG]/regex[x86_64CLANG].a b/lib/[x86_64CLANG]/regex[x86_64CLANG].a
deleted file mode 100644
index 6201f7b8100610ac51f698846b0ecc88201203bb..0000000000000000000000000000000000000000
Binary files a/lib/[x86_64CLANG]/regex[x86_64CLANG].a and /dev/null differ
diff --git a/libdap b/libdap
index ffbc1f0f61cc6b50a85481cd2f9af98dab904a9e..33e7d24a901b3da05b7a544b0f16e7819e5f9ddb 160000
--- a/libdap
+++ b/libdap
@@ -1 +1 @@
-Subproject commit ffbc1f0f61cc6b50a85481cd2f9af98dab904a9e
+Subproject commit 33e7d24a901b3da05b7a544b0f16e7819e5f9ddb
diff --git a/libdap-chain b/libdap-chain
index 008b7a65045c6b20b7daf743b112ba16aa0172a9..727b02e44f3de250f30f07e85a77b7ca533c1381 160000
--- a/libdap-chain
+++ b/libdap-chain
@@ -1 +1 @@
-Subproject commit 008b7a65045c6b20b7daf743b112ba16aa0172a9
+Subproject commit 727b02e44f3de250f30f07e85a77b7ca533c1381
diff --git a/libdap-chain-crypto b/libdap-chain-crypto
index 1a7f57339041f51675a766fb7848d16c6010ff11..edd115a5a70c61f291f1a23d2c9cd97e2580dad6 160000
--- a/libdap-chain-crypto
+++ b/libdap-chain-crypto
@@ -1 +1 @@
-Subproject commit 1a7f57339041f51675a766fb7848d16c6010ff11
+Subproject commit edd115a5a70c61f291f1a23d2c9cd97e2580dad6
diff --git a/libdap-chain-cs-dag b/libdap-chain-cs-dag
index df1fa851860bc747f9d72ecee35d1876301d4e3c..32e3379f20226742c8c3923542ad477a344c0d8d 160000
--- a/libdap-chain-cs-dag
+++ b/libdap-chain-cs-dag
@@ -1 +1 @@
-Subproject commit df1fa851860bc747f9d72ecee35d1876301d4e3c
+Subproject commit 32e3379f20226742c8c3923542ad477a344c0d8d
diff --git a/libdap-chain-cs-dag-poa b/libdap-chain-cs-dag-poa
index 84a791174f53f0aee5c2881ef18bc1a117e81933..89b08b17c7cc88084b73618eb50d7981d5841039 160000
--- a/libdap-chain-cs-dag-poa
+++ b/libdap-chain-cs-dag-poa
@@ -1 +1 @@
-Subproject commit 84a791174f53f0aee5c2881ef18bc1a117e81933
+Subproject commit 89b08b17c7cc88084b73618eb50d7981d5841039
diff --git a/libdap-chain-cs-dag-pos b/libdap-chain-cs-dag-pos
index 87759842ed0159a065cf374ce01194174949bce4..ec95a81cb57f76695978653e3f114c8fadc86fb7 160000
--- a/libdap-chain-cs-dag-pos
+++ b/libdap-chain-cs-dag-pos
@@ -1 +1 @@
-Subproject commit 87759842ed0159a065cf374ce01194174949bce4
+Subproject commit ec95a81cb57f76695978653e3f114c8fadc86fb7
diff --git a/libdap-chain-gdb b/libdap-chain-gdb
index eb4cec1af570b411ba19dc5b03589dd02be9db09..09e66a5af669b96d449dca2aa31a5110a20c4586 160000
--- a/libdap-chain-gdb
+++ b/libdap-chain-gdb
@@ -1 +1 @@
-Subproject commit eb4cec1af570b411ba19dc5b03589dd02be9db09
+Subproject commit 09e66a5af669b96d449dca2aa31a5110a20c4586
diff --git a/libdap-chain-global-db b/libdap-chain-global-db
index 82d8d1ab4d4fa8884a19b98c730dca13849f9c1b..8a2ada22f759cb41241152c6e6db6a7b7cf5b9d2 160000
--- a/libdap-chain-global-db
+++ b/libdap-chain-global-db
@@ -1 +1 @@
-Subproject commit 82d8d1ab4d4fa8884a19b98c730dca13849f9c1b
+Subproject commit 8a2ada22f759cb41241152c6e6db6a7b7cf5b9d2
diff --git a/libdap-chain-mempool b/libdap-chain-mempool
index 6a91d6b8a821b5e3ad470bf75452cfaeab1899a0..a8470d724c512d2c2a0ae595a6fdc76fca5dc3a3 160000
--- a/libdap-chain-mempool
+++ b/libdap-chain-mempool
@@ -1 +1 @@
-Subproject commit 6a91d6b8a821b5e3ad470bf75452cfaeab1899a0
+Subproject commit a8470d724c512d2c2a0ae595a6fdc76fca5dc3a3
diff --git a/libdap-chain-net b/libdap-chain-net
index 37eb1ddca764eb558224371801967b4d96b93965..d86852191d6171c71be1ea8213e2c4da4ba42963 160000
--- a/libdap-chain-net
+++ b/libdap-chain-net
@@ -1 +1 @@
-Subproject commit 37eb1ddca764eb558224371801967b4d96b93965
+Subproject commit d86852191d6171c71be1ea8213e2c4da4ba42963
diff --git a/libdap-chain-net-srv-app b/libdap-chain-net-srv-app
index ded8730d0f24ff7190ac449faa3ef37442e06283..687c93b6bea96ea61643b9291ff63854fcfec4bd 160000
--- a/libdap-chain-net-srv-app
+++ b/libdap-chain-net-srv-app
@@ -1 +1 @@
-Subproject commit ded8730d0f24ff7190ac449faa3ef37442e06283
+Subproject commit 687c93b6bea96ea61643b9291ff63854fcfec4bd
diff --git a/libdap-chain-net-srv-app-db b/libdap-chain-net-srv-app-db
index 3c829aad679b5e16c2990803e279c44eca3ff80e..26383433d779c08de1202777d7a59a28661e2e39 160000
--- a/libdap-chain-net-srv-app-db
+++ b/libdap-chain-net-srv-app-db
@@ -1 +1 @@
-Subproject commit 3c829aad679b5e16c2990803e279c44eca3ff80e
+Subproject commit 26383433d779c08de1202777d7a59a28661e2e39
diff --git a/libdap-chain-net-srv-datum b/libdap-chain-net-srv-datum
index 5e8c58dddce04ebd45d807cf4d1a7ff1fca2b9a9..68a210096b429cb52eeb554d813dcde60b5001fe 160000
--- a/libdap-chain-net-srv-datum
+++ b/libdap-chain-net-srv-datum
@@ -1 +1 @@
-Subproject commit 5e8c58dddce04ebd45d807cf4d1a7ff1fca2b9a9
+Subproject commit 68a210096b429cb52eeb554d813dcde60b5001fe
diff --git a/libdap-chain-net-srv-datum-pool b/libdap-chain-net-srv-datum-pool
index 6146cb0e11e1348009220e053bbf3d911986388c..58ce43ef4a62920a060d3cbb15b971ca7e5f66aa 160000
--- a/libdap-chain-net-srv-datum-pool
+++ b/libdap-chain-net-srv-datum-pool
@@ -1 +1 @@
-Subproject commit 6146cb0e11e1348009220e053bbf3d911986388c
+Subproject commit 58ce43ef4a62920a060d3cbb15b971ca7e5f66aa
diff --git a/libdap-chain-wallet b/libdap-chain-wallet
index 93c2043d3c74fc6dceba75d2d9862317d9ba6990..667ebb8a98add85b06ce32e7b5faf4e33079a370 160000
--- a/libdap-chain-wallet
+++ b/libdap-chain-wallet
@@ -1 +1 @@
-Subproject commit 93c2043d3c74fc6dceba75d2d9862317d9ba6990
+Subproject commit 667ebb8a98add85b06ce32e7b5faf4e33079a370
diff --git a/libdap-client b/libdap-client
index ca5ac6ff584ba8220aba04ffa8be1fc6bc0a5d57..f79a79029bb0f8e14ba91a50954e4882159ec764 160000
--- a/libdap-client
+++ b/libdap-client
@@ -1 +1 @@
-Subproject commit ca5ac6ff584ba8220aba04ffa8be1fc6bc0a5d57
+Subproject commit f79a79029bb0f8e14ba91a50954e4882159ec764
diff --git a/libdap-server b/libdap-server
index bb8ae807da895f315f41d18910d06f3710ea5e92..9e7533d55957ae9c141d88058de8ba85879037b6 160000
--- a/libdap-server
+++ b/libdap-server
@@ -1 +1 @@
-Subproject commit bb8ae807da895f315f41d18910d06f3710ea5e92
+Subproject commit 9e7533d55957ae9c141d88058de8ba85879037b6
diff --git a/libdap-server-core b/libdap-server-core
index 1d74e9451906fbaa752c04242d266fdd84f944d3..4f37a7b680a178a4d65e876cf09a564947b29d5b 160000
--- a/libdap-server-core
+++ b/libdap-server-core
@@ -1 +1 @@
-Subproject commit 1d74e9451906fbaa752c04242d266fdd84f944d3
+Subproject commit 4f37a7b680a178a4d65e876cf09a564947b29d5b
diff --git a/libdap-server-udp b/libdap-server-udp
index 2aaaad5981206379c1a7e7c8af3dc3d6aa26e2e7..bc2b2cc19bf7d0bb220bf65277304ae135196309 160000
--- a/libdap-server-udp
+++ b/libdap-server-udp
@@ -1 +1 @@
-Subproject commit 2aaaad5981206379c1a7e7c8af3dc3d6aa26e2e7
+Subproject commit bc2b2cc19bf7d0bb220bf65277304ae135196309
diff --git a/libdap-stream b/libdap-stream
index a7ee4c8a206e6e5bb1290ba83b00abe0052f2183..3f52f8671d2c2c8761b7671081d0f5dcc249d8f0 160000
--- a/libdap-stream
+++ b/libdap-stream
@@ -1 +1 @@
-Subproject commit a7ee4c8a206e6e5bb1290ba83b00abe0052f2183
+Subproject commit 3f52f8671d2c2c8761b7671081d0f5dcc249d8f0
diff --git a/libdap-stream-ch b/libdap-stream-ch
index c07c5e4a379f8d66052306c8d40db334d0ff6500..4cb19381567085019e7a20666c38dbb7a13754ac 160000
--- a/libdap-stream-ch
+++ b/libdap-stream-ch
@@ -1 +1 @@
-Subproject commit c07c5e4a379f8d66052306c8d40db334d0ff6500
+Subproject commit 4cb19381567085019e7a20666c38dbb7a13754ac
diff --git a/libdap-stream-ch-chain b/libdap-stream-ch-chain
index 2beb1453e0ad96e8e62357867076a316b5af9895..e261dfd63807d9fdf3848f5dca4f692b1b6fdd51 160000
--- a/libdap-stream-ch-chain
+++ b/libdap-stream-ch-chain
@@ -1 +1 @@
-Subproject commit 2beb1453e0ad96e8e62357867076a316b5af9895
+Subproject commit e261dfd63807d9fdf3848f5dca4f692b1b6fdd51
diff --git a/libdap-stream-ch-chain-net b/libdap-stream-ch-chain-net
index 71ae6ccd1c2ec6d12916835c10b74df0e6ad9dd5..fbc53b02fbe8ae852a2bae346e06fc6d6d23cbb8 160000
--- a/libdap-stream-ch-chain-net
+++ b/libdap-stream-ch-chain-net
@@ -1 +1 @@
-Subproject commit 71ae6ccd1c2ec6d12916835c10b74df0e6ad9dd5
+Subproject commit fbc53b02fbe8ae852a2bae346e06fc6d6d23cbb8
diff --git a/libdap-stream-ch-chain-net-srv b/libdap-stream-ch-chain-net-srv
index 0f688991c41eab20f8919aa947619d396be4826e..f9e047fd1a670bd4427708f55fbc2747c5878c21 160000
--- a/libdap-stream-ch-chain-net-srv
+++ b/libdap-stream-ch-chain-net-srv
@@ -1 +1 @@
-Subproject commit 0f688991c41eab20f8919aa947619d396be4826e
+Subproject commit f9e047fd1a670bd4427708f55fbc2747c5878c21
diff --git a/libdap-stream-ch-vpn b/libdap-stream-ch-vpn
index f497c3140894142241e6b64d22c9ea81757d641f..2ba9406f59d6afa530a408a9cc3af5f9148fd648 160000
--- a/libdap-stream-ch-vpn
+++ b/libdap-stream-ch-vpn
@@ -1 +1 @@
-Subproject commit f497c3140894142241e6b64d22c9ea81757d641f
+Subproject commit 2ba9406f59d6afa530a408a9cc3af5f9148fd648
diff --git a/sources/main.c b/sources/main.c
index 7b18f3002cc8f24c54189f45b645daad9976eae6..a4be574852cfcfe96cb8cb2ac4f21d8cdee4e83b 100644
--- a/sources/main.c
+++ b/sources/main.c
@@ -62,10 +62,13 @@
 #include "dap_server.h"
 #include "dap_http.h"
 #include "dap_http_folder.h"
+
+#ifndef _WIN32
 #include "db_core.h"
 #include "db_http.h"
 #include "db_http_file.h"
 #include "db_auth.h"
+#endif
 
 #include "dap_events.h"
 #include "dap_enc.h"
@@ -86,9 +89,12 @@
 #include "dap_chain_net_srv_app_db.h"
 #include "dap_chain_net_srv_datum.h"
 #include "dap_chain_net_srv_datum_pool.h"
+
+#ifndef _WIN32
 #include "dap_chain_net_srv_vpn.h"
 #include "dap_chain_net_srv_vpn_cdb_server_list.h"
 #include "dap_chain_net_vpn_client.h"
+#endif
 
 #include "dap_chain_global_db.h"
 #include "dap_chain_mempool.h"
@@ -180,7 +186,7 @@ int main( int argc, const char **argv )
 	else
  	   log_it( L_ATT, "*** NORMAL MODE ***" );
 
-	dap_log_level_set( bDebugMode ? L_DEBUG: L_NOTICE );
+    dap_log_level_set( bDebugMode ? L_DEBUG: L_INFO );
 
     log_it( L_DAP, "*** CellFrame Node version: %s ***", DAP_VERSION );
 
@@ -295,6 +301,7 @@ int main( int argc, const char **argv )
         return -69;
     }
     // vpn server
+#ifndef _WIN32
     if(dap_config_get_item_bool_default(g_config, "vpn", "enabled", false)) {
         if(dap_chain_net_srv_vpn_init(g_config) != 0) {
             log_it(L_ERROR, "Can't init dap chain network service vpn module");
@@ -306,7 +313,7 @@ int main( int argc, const char **argv )
         log_it(L_ERROR, "Can't init dap chain network service vpn client");
         return -71;
     }
-
+#endif
 
 
 	if ( enc_http_init() != 0 ) {
@@ -451,7 +458,6 @@ int main( int argc, const char **argv )
             return -10;
         }
     }
-#endif
 
     // If CDB module switched on
     if( dap_config_get_item_bool_default(g_config,"cdb","enabled",false) ) {
@@ -476,7 +482,7 @@ int main( int argc, const char **argv )
             dap_chain_net_srv_vpn_cdb_server_list_add_proc ( DAP_HTTP(l_server), SLIST_URL);
         }
     }
-
+#endif
 
 	// Endless loop for server's requests processing
 	rc = dap_server_loop(l_server);
diff --git a/sources/main_node_tool.c b/sources/main_node_tool.c
index b4daca59a50517fd8763e60a3b0eb9f098598cf0..667fad800130ac228c7a7dd8231f938ac6cb0a0c 100644
--- a/sources/main_node_tool.c
+++ b/sources/main_node_tool.c
@@ -71,7 +71,10 @@
 #include "dap_chain_net_srv_app_db.h"
 #include "dap_chain_net_srv_datum.h"
 #include "dap_chain_net_srv_datum_pool.h"
+
+#ifndef _WIN32
 #include "dap_chain_net_srv_vpn.h"
+#endif
 
 #include "dap_stream_session.h"
 #include "dap_stream.h"