Browse code

Replacing libclamav/cltypes.h with clamav-types.h.in, which generates a header clamav-types.h that we install alongside clamav.h.

Micah Snyder authored on 2018/12/06 10:46:20
Showing 142 changed files
... ...
@@ -34,6 +34,8 @@ endif
34 34
 pkgconfigdir = $(libdir)/pkgconfig
35 35
 pkgconfig_DATA = libclamav.pc
36 36
 
37
+nodist_include_HEADERS = clamav-types.h
38
+
37 39
 # don't complain that configuration files and databases are not removed, this is intended
38 40
 distuninstallcheck_listfiles = find . -type f ! -name clamd.conf ! -name freshclam.conf ! -name daily.cvd ! -name main.cvd -print
39 41
 DISTCLEANFILES = target.h
... ...
@@ -33,6 +33,7 @@
33 33
 #  MA 02110-1301, USA.
34 34
 
35 35
 
36
+
36 37
 VPATH = @srcdir@
37 38
 am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
38 39
 am__make_running_with_option = \
... ...
@@ -119,7 +120,8 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
119 119
 	$(top_srcdir)/docs/man/freshclam.conf.5.in \
120 120
 	$(top_srcdir)/docs/man/sigtool.1.in \
121 121
 	$(top_srcdir)/docs/man/clamdtop.1.in \
122
-	$(top_srcdir)/docs/man/clamsubmit.1.in COPYING config/ar-lib \
122
+	$(top_srcdir)/docs/man/clamsubmit.1.in \
123
+	$(srcdir)/clamav-types.h.in COPYING config/ar-lib \
123 124
 	config/compile config/config.guess config/config.rpath \
124 125
 	config/config.sub config/install-sh config/missing \
125 126
 	config/ylwrap config/ltmain.sh $(top_srcdir)/config/ar-lib \
... ...
@@ -203,6 +205,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
203 203
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
204 204
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
205 205
 	$(top_srcdir)/m4/reorganization/strni.m4 \
206
+	$(top_srcdir)/m4/reorganization/types.m4 \
206 207
 	$(top_srcdir)/configure.ac
207 208
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
208 209
 	$(ACLOCAL_M4)
... ...
@@ -215,7 +218,8 @@ CONFIG_CLEAN_FILES = clamav-config libclamav.pc platform.h \
215 215
 	docs/man/clambc.1 docs/man/clamconf.1 docs/man/clamd.8 \
216 216
 	docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 \
217 217
 	docs/man/freshclam.1 docs/man/freshclam.conf.5 \
218
-	docs/man/sigtool.1 docs/man/clamdtop.1 docs/man/clamsubmit.1
218
+	docs/man/sigtool.1 docs/man/clamdtop.1 docs/man/clamsubmit.1 \
219
+	clamav-types.h
219 220
 CONFIG_CLEAN_VPATH_FILES =
220 221
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
221 222
 am__vpath_adj = case $$p in \
... ...
@@ -244,7 +248,8 @@ am__uninstall_files_from_dir = { \
244 244
     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
245 245
          $(am__cd) "$$dir" && rm -f $$files; }; \
246 246
   }
247
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"
247
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" \
248
+	"$(DESTDIR)$(includedir)"
248 249
 SCRIPTS = $(bin_SCRIPTS)
249 250
 AM_V_P = $(am__v_P_@AM_V@)
250 251
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
... ...
@@ -274,6 +279,7 @@ am__can_run_installinfo = \
274 274
     *) (install-info --version) >/dev/null 2>&1;; \
275 275
   esac
276 276
 DATA = $(pkgconfig_DATA)
277
+HEADERS = $(nodist_include_HEADERS)
277 278
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
278 279
   distclean-recursive maintainer-clean-recursive
279 280
 am__recursive_targets = \
... ...
@@ -393,6 +399,8 @@ CXXDEPMODE = @CXXDEPMODE@
393 393
 CXXFLAGS = @CXXFLAGS@
394 394
 CYGPATH_W = @CYGPATH_W@
395 395
 DBDIR = @DBDIR@
396
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
397
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
396 398
 DEFS = @DEFS@
397 399
 DEPDIR = @DEPDIR@
398 400
 DLLTOOL = @DLLTOOL@
... ...
@@ -407,6 +415,7 @@ FGREP = @FGREP@
407 407
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
408 408
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
409 409
 GCOV = @GCOV@
410
+GENERATE_WARNING = @GENERATE_WARNING@
410 411
 GENHTML = @GENHTML@
411 412
 GETENT = @GETENT@
412 413
 GPERF = @GPERF@
... ...
@@ -421,6 +430,11 @@ INSTALL_DATA = @INSTALL_DATA@
421 421
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
422 422
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
423 423
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
424
+INT16_DEF = @INT16_DEF@
425
+INT32_DEF = @INT32_DEF@
426
+INT64_DEF = @INT64_DEF@
427
+INT8_DEF = @INT8_DEF@
428
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
424 429
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
425 430
 JSON_LDFLAGS = @JSON_LDFLAGS@
426 431
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -502,6 +516,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
502 502
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
503 503
 THREAD_LIBS = @THREAD_LIBS@
504 504
 TH_SAFE = @TH_SAFE@
505
+UINT16_DEF = @UINT16_DEF@
506
+UINT32_DEF = @UINT32_DEF@
507
+UINT64_DEF = @UINT64_DEF@
508
+UINT8_DEF = @UINT8_DEF@
505 509
 VERSION = @VERSION@
506 510
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
507 511
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -582,6 +600,7 @@ EXTRA_DIST = examples shared libclamav.pc.in COPYING.bzip2 COPYING.lzma COPYING.
582 582
 bin_SCRIPTS = clamav-config
583 583
 pkgconfigdir = $(libdir)/pkgconfig
584 584
 pkgconfig_DATA = libclamav.pc
585
+nodist_include_HEADERS = clamav-types.h
585 586
 
586 587
 # don't complain that configuration files and databases are not removed, this is intended
587 588
 distuninstallcheck_listfiles = find . -type f ! -name clamd.conf ! -name freshclam.conf ! -name daily.cvd ! -name main.cvd -print
... ...
@@ -680,6 +699,8 @@ docs/man/clamdtop.1: $(top_builddir)/config.status $(top_srcdir)/docs/man/clamdt
680 680
 	cd $(top_builddir) && $(SHELL) ./config.status $@
681 681
 docs/man/clamsubmit.1: $(top_builddir)/config.status $(top_srcdir)/docs/man/clamsubmit.1.in
682 682
 	cd $(top_builddir) && $(SHELL) ./config.status $@
683
+clamav-types.h: $(top_builddir)/config.status $(srcdir)/clamav-types.h.in
684
+	cd $(top_builddir) && $(SHELL) ./config.status $@
683 685
 install-binSCRIPTS: $(bin_SCRIPTS)
684 686
 	@$(NORMAL_INSTALL)
685 687
 	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
... ...
@@ -760,6 +781,27 @@ uninstall-pkgconfigDATA:
760 760
 	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
761 761
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
762 762
 	dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
763
+install-nodist_includeHEADERS: $(nodist_include_HEADERS)
764
+	@$(NORMAL_INSTALL)
765
+	@list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \
766
+	if test -n "$$list"; then \
767
+	  echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
768
+	  $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
769
+	fi; \
770
+	for p in $$list; do \
771
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
772
+	  echo "$$d$$p"; \
773
+	done | $(am__base_list) | \
774
+	while read files; do \
775
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
776
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
777
+	done
778
+
779
+uninstall-nodist_includeHEADERS:
780
+	@$(NORMAL_UNINSTALL)
781
+	@list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \
782
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
783
+	dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
763 784
 
764 785
 # This directory's subdirectories are mostly independent; you can cd
765 786
 # into them and run 'make' without going through this Makefile.
... ...
@@ -1059,10 +1101,10 @@ distcleancheck: distclean
1059 1059
 	       exit 1; } >&2
1060 1060
 check-am: all-am
1061 1061
 check: check-recursive
1062
-all-am: Makefile $(SCRIPTS) $(DATA) clamav-config.h
1062
+all-am: Makefile $(SCRIPTS) $(DATA) $(HEADERS) clamav-config.h
1063 1063
 installdirs: installdirs-recursive
1064 1064
 installdirs-am:
1065
-	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \
1065
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
1066 1066
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
1067 1067
 	done
1068 1068
 install: install-recursive
... ...
@@ -1118,7 +1160,7 @@ info: info-recursive
1118 1118
 
1119 1119
 info-am:
1120 1120
 
1121
-install-data-am: install-pkgconfigDATA
1121
+install-data-am: install-nodist_includeHEADERS install-pkgconfigDATA
1122 1122
 
1123 1123
 install-dvi: install-dvi-recursive
1124 1124
 
... ...
@@ -1164,7 +1206,8 @@ ps: ps-recursive
1164 1164
 
1165 1165
 ps-am:
1166 1166
 
1167
-uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA
1167
+uninstall-am: uninstall-binSCRIPTS uninstall-nodist_includeHEADERS \
1168
+	uninstall-pkgconfigDATA
1168 1169
 
1169 1170
 .MAKE: $(am__recursive_targets) all install-am install-strip
1170 1171
 
... ...
@@ -1179,13 +1222,14 @@ uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA
1179 1179
 	install-binSCRIPTS install-data install-data-am install-dvi \
1180 1180
 	install-dvi-am install-exec install-exec-am install-html \
1181 1181
 	install-html-am install-info install-info-am install-man \
1182
-	install-pdf install-pdf-am install-pkgconfigDATA install-ps \
1183
-	install-ps-am install-strip installcheck installcheck-am \
1184
-	installcheck-binSCRIPTS installdirs installdirs-am \
1185
-	maintainer-clean maintainer-clean-generic mostlyclean \
1186
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
1187
-	tags tags-am uninstall uninstall-am uninstall-binSCRIPTS \
1188
-	uninstall-pkgconfigDATA
1182
+	install-nodist_includeHEADERS install-pdf install-pdf-am \
1183
+	install-pkgconfigDATA install-ps install-ps-am install-strip \
1184
+	installcheck installcheck-am installcheck-binSCRIPTS \
1185
+	installdirs installdirs-am maintainer-clean \
1186
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
1187
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
1188
+	uninstall-am uninstall-binSCRIPTS \
1189
+	uninstall-nodist_includeHEADERS uninstall-pkgconfigDATA
1189 1190
 
1190 1191
 lcov:
1191 1192
 	($(MAKE); cd unit_tests; $(MAKE) lcov)
... ...
@@ -177,6 +177,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
177 177
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
178 178
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
179 179
 	$(top_srcdir)/m4/reorganization/strni.m4 \
180
+	$(top_srcdir)/m4/reorganization/types.m4 \
180 181
 	$(top_srcdir)/configure.ac
181 182
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
182 183
 	$(ACLOCAL_M4)
... ...
@@ -347,6 +348,8 @@ CXXDEPMODE = @CXXDEPMODE@
347 347
 CXXFLAGS = @CXXFLAGS@
348 348
 CYGPATH_W = @CYGPATH_W@
349 349
 DBDIR = @DBDIR@
350
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
351
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
350 352
 DEFS = @DEFS@ -DCL_NOLIBCLAMAV
351 353
 DEPDIR = @DEPDIR@
352 354
 DLLTOOL = @DLLTOOL@
... ...
@@ -361,6 +364,7 @@ FGREP = @FGREP@
361 361
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
362 362
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
363 363
 GCOV = @GCOV@
364
+GENERATE_WARNING = @GENERATE_WARNING@
364 365
 GENHTML = @GENHTML@
365 366
 GETENT = @GETENT@
366 367
 GPERF = @GPERF@
... ...
@@ -375,6 +379,11 @@ INSTALL_DATA = @INSTALL_DATA@
375 375
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
376 376
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
377 377
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
378
+INT16_DEF = @INT16_DEF@
379
+INT32_DEF = @INT32_DEF@
380
+INT64_DEF = @INT64_DEF@
381
+INT8_DEF = @INT8_DEF@
382
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
378 383
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
379 384
 JSON_LDFLAGS = @JSON_LDFLAGS@
380 385
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -456,6 +465,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
456 456
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
457 457
 THREAD_LIBS = @THREAD_LIBS@
458 458
 TH_SAFE = @TH_SAFE@
459
+UINT16_DEF = @UINT16_DEF@
460
+UINT32_DEF = @UINT32_DEF@
461
+UINT64_DEF = @UINT64_DEF@
462
+UINT8_DEF = @UINT8_DEF@
459 463
 VERSION = @VERSION@
460 464
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
461 465
 WERR_CFLAGS = @WERR_CFLAGS@
462 466
new file mode 100644
... ...
@@ -0,0 +1,84 @@
0
+/*
1
+ *  Copyright (C) 2015-2018 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
2
+ *  Copyright (C) 2007-2008 Sourcefire, Inc.
3
+ *
4
+ *  Authors: Tomasz Kojm, Micah Snyder
5
+ *
6
+ *  @GENERATE_WARNING@
7
+ *
8
+ *  This program is free software; you can redistribute it and/or modify
9
+ *  it under the terms of the GNU General Public License version 2 as
10
+ *  published by the Free Software Foundation.
11
+ *
12
+ *  This program is distributed in the hope that it will be useful,
13
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
+ *  GNU General Public License for more details.
16
+ *
17
+ *  You should have received a copy of the GNU General Public License
18
+ *  along with this program; if not, write to the Free Software
19
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20
+ *  MA 02110-1301, USA.
21
+ */
22
+
23
+#ifndef __CLAMAV_TYPES_H
24
+#define __CLAMAV_TYPES_H
25
+
26
+@INT_TYPES_HEADER@
27
+
28
+@INT8_DEF@
29
+@UINT8_DEF@
30
+
31
+@INT16_DEF@
32
+@UINT16_DEF@
33
+
34
+@INT32_DEF@
35
+@UINT32_DEF@
36
+
37
+@INT64_DEF@
38
+@UINT64_DEF@
39
+
40
+/* Ensure we have print format types */
41
+/* PRIu64 should be in <inttypes.h> */
42
+#ifndef _SF64_PREFIX
43
+    @DEFINE_SF64_PREFIX@
44
+#endif
45
+
46
+#ifndef PRIu64
47
+    #define PRIu64 _SF64_PREFIX "u"
48
+#endif
49
+#ifndef PRIx64
50
+    #define PRIx64 _SF64_PREFIX "i"
51
+#endif
52
+#ifndef PRIi64
53
+    #define PRIi64 _SF64_PREFIX "x"
54
+#endif
55
+
56
+#ifndef STDu64
57
+    #define STDu64 "%" PRIu64
58
+    #define STDi64 "%" PRIi64
59
+    #define STDx64 "%" PRIx64
60
+#endif
61
+
62
+/* PRIu32 should also be in <inttypes.h> */
63
+#ifndef PRIu32
64
+    #ifndef _SF32_PREFIX
65
+        @DEFINE_SF32_PREFIX@
66
+    #endif
67
+
68
+    #define PRIu32 _SF32_PREFIX "u"
69
+    #define PRIi32 _SF32_PREFIX "i"
70
+    #define PRIx32 _SF32_PREFIX "x"
71
+#endif
72
+
73
+#ifndef STDu32
74
+    #define STDu32 "%" PRIu32
75
+    #define STDi32 "%" PRIi32
76
+    #define STDx32 "%" PRIx32
77
+#endif
78
+
79
+#ifndef INT32_MAX
80
+    #define INT32_MAX 2147483647
81
+#endif
82
+
83
+#endif
... ...
@@ -158,6 +158,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
158 158
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
159 159
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
160 160
 	$(top_srcdir)/m4/reorganization/strni.m4 \
161
+	$(top_srcdir)/m4/reorganization/types.m4 \
161 162
 	$(top_srcdir)/configure.ac
162 163
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
163 164
 	$(ACLOCAL_M4)
... ...
@@ -283,6 +284,8 @@ CXXDEPMODE = @CXXDEPMODE@
283 283
 CXXFLAGS = @CXXFLAGS@
284 284
 CYGPATH_W = @CYGPATH_W@
285 285
 DBDIR = @DBDIR@
286
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
287
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
286 288
 DEFS = @DEFS@
287 289
 DEPDIR = @DEPDIR@
288 290
 DLLTOOL = @DLLTOOL@
... ...
@@ -297,6 +300,7 @@ FGREP = @FGREP@
297 297
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
298 298
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
299 299
 GCOV = @GCOV@
300
+GENERATE_WARNING = @GENERATE_WARNING@
300 301
 GENHTML = @GENHTML@
301 302
 GETENT = @GETENT@
302 303
 GPERF = @GPERF@
... ...
@@ -311,6 +315,11 @@ INSTALL_DATA = @INSTALL_DATA@
311 311
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
312 312
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
313 313
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
314
+INT16_DEF = @INT16_DEF@
315
+INT32_DEF = @INT32_DEF@
316
+INT64_DEF = @INT64_DEF@
317
+INT8_DEF = @INT8_DEF@
318
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
314 319
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
315 320
 JSON_LDFLAGS = @JSON_LDFLAGS@
316 321
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -392,6 +401,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
392 392
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
393 393
 THREAD_LIBS = @THREAD_LIBS@
394 394
 TH_SAFE = @TH_SAFE@
395
+UINT16_DEF = @UINT16_DEF@
396
+UINT32_DEF = @UINT32_DEF@
397
+UINT64_DEF = @UINT64_DEF@
398
+UINT8_DEF = @UINT8_DEF@
395 399
 VERSION = @VERSION@
396 400
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
397 401
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -23,7 +23,6 @@
23 23
 #if HAVE_CONFIG_H
24 24
 #include "clamav-config.h"
25 25
 #endif
26
-#include "cltypes.h"
27 26
 #ifndef _WIN32
28 27
 #include <sys/time.h>
29 28
 #endif
... ...
@@ -176,6 +176,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
176 176
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
177 177
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
178 178
 	$(top_srcdir)/m4/reorganization/strni.m4 \
179
+	$(top_srcdir)/m4/reorganization/types.m4 \
179 180
 	$(top_srcdir)/configure.ac
180 181
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
181 182
 	$(ACLOCAL_M4)
... ...
@@ -301,6 +302,8 @@ CXXDEPMODE = @CXXDEPMODE@
301 301
 CXXFLAGS = @CXXFLAGS@
302 302
 CYGPATH_W = @CYGPATH_W@
303 303
 DBDIR = @DBDIR@
304
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
305
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
304 306
 DEFS = @DEFS@ -DCL_NOTHREADS
305 307
 DEPDIR = @DEPDIR@
306 308
 DLLTOOL = @DLLTOOL@
... ...
@@ -315,6 +318,7 @@ FGREP = @FGREP@
315 315
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
316 316
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
317 317
 GCOV = @GCOV@
318
+GENERATE_WARNING = @GENERATE_WARNING@
318 319
 GENHTML = @GENHTML@
319 320
 GETENT = @GETENT@
320 321
 GPERF = @GPERF@
... ...
@@ -329,6 +333,11 @@ INSTALL_DATA = @INSTALL_DATA@
329 329
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
330 330
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
331 331
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
332
+INT16_DEF = @INT16_DEF@
333
+INT32_DEF = @INT32_DEF@
334
+INT64_DEF = @INT64_DEF@
335
+INT8_DEF = @INT8_DEF@
336
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
332 337
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
333 338
 JSON_LDFLAGS = @JSON_LDFLAGS@
334 339
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -410,6 +419,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
410 410
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
411 411
 THREAD_LIBS = @THREAD_LIBS@
412 412
 TH_SAFE = @TH_SAFE@
413
+UINT16_DEF = @UINT16_DEF@
414
+UINT32_DEF = @UINT32_DEF@
415
+UINT64_DEF = @UINT64_DEF@
416
+UINT8_DEF = @UINT8_DEF@
413 417
 VERSION = @VERSION@
414 418
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
415 419
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -179,6 +179,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
179 179
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
180 180
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
181 181
 	$(top_srcdir)/m4/reorganization/strni.m4 \
182
+	$(top_srcdir)/m4/reorganization/types.m4 \
182 183
 	$(top_srcdir)/configure.ac
183 184
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
184 185
 	$(ACLOCAL_M4)
... ...
@@ -358,6 +359,8 @@ CXXDEPMODE = @CXXDEPMODE@
358 358
 CXXFLAGS = @CXXFLAGS@
359 359
 CYGPATH_W = @CYGPATH_W@
360 360
 DBDIR = @DBDIR@
361
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
362
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
361 363
 DEFS = @DEFS@
362 364
 DEPDIR = @DEPDIR@
363 365
 DLLTOOL = @DLLTOOL@
... ...
@@ -372,6 +375,7 @@ FGREP = @FGREP@
372 372
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
373 373
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
374 374
 GCOV = @GCOV@
375
+GENERATE_WARNING = @GENERATE_WARNING@
375 376
 GENHTML = @GENHTML@
376 377
 GETENT = @GETENT@
377 378
 GPERF = @GPERF@
... ...
@@ -386,6 +390,11 @@ INSTALL_DATA = @INSTALL_DATA@
386 386
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
387 387
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
388 388
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
389
+INT16_DEF = @INT16_DEF@
390
+INT32_DEF = @INT32_DEF@
391
+INT64_DEF = @INT64_DEF@
392
+INT8_DEF = @INT8_DEF@
393
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
389 394
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
390 395
 JSON_LDFLAGS = @JSON_LDFLAGS@
391 396
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -467,6 +476,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
467 467
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
468 468
 THREAD_LIBS = @THREAD_LIBS@
469 469
 TH_SAFE = @TH_SAFE@
470
+UINT16_DEF = @UINT16_DEF@
471
+UINT32_DEF = @UINT32_DEF@
472
+UINT64_DEF = @UINT64_DEF@
473
+UINT8_DEF = @UINT8_DEF@
470 474
 VERSION = @VERSION@
471 475
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
472 476
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -29,7 +29,7 @@
29 29
 #include <stdlib.h>
30 30
 #include "shared/optparser.h"
31 31
 #include "thrmgr.h"
32
-#include "cltypes.h"
32
+#include "clamav-types.h"
33 33
 
34 34
 enum mode {
35 35
     MODE_COMMAND,
... ...
@@ -61,7 +61,6 @@
61 61
 #include "shared.h"
62 62
 #include "libclamav/others.h"
63 63
 #include "libclamav/readdb.h"
64
-#include "libclamav/cltypes.h"
65 64
 
66 65
 #define BUFFSIZE 1024
67 66
 
... ...
@@ -176,6 +176,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
176 176
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
177 177
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
178 178
 	$(top_srcdir)/m4/reorganization/strni.m4 \
179
+	$(top_srcdir)/m4/reorganization/types.m4 \
179 180
 	$(top_srcdir)/configure.ac
180 181
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
181 182
 	$(ACLOCAL_M4)
... ...
@@ -312,6 +313,8 @@ CXXDEPMODE = @CXXDEPMODE@
312 312
 CXXFLAGS = @CXXFLAGS@
313 313
 CYGPATH_W = @CYGPATH_W@
314 314
 DBDIR = @DBDIR@
315
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
316
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
315 317
 DEFS = @DEFS@ -DCL_NOTHREADS -DCL_NOLIBCLAMAV
316 318
 DEPDIR = @DEPDIR@
317 319
 DLLTOOL = @DLLTOOL@
... ...
@@ -326,6 +329,7 @@ FGREP = @FGREP@
326 326
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
327 327
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
328 328
 GCOV = @GCOV@
329
+GENERATE_WARNING = @GENERATE_WARNING@
329 330
 GENHTML = @GENHTML@
330 331
 GETENT = @GETENT@
331 332
 GPERF = @GPERF@
... ...
@@ -340,6 +344,11 @@ INSTALL_DATA = @INSTALL_DATA@
340 340
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
341 341
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
342 342
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
343
+INT16_DEF = @INT16_DEF@
344
+INT32_DEF = @INT32_DEF@
345
+INT64_DEF = @INT64_DEF@
346
+INT8_DEF = @INT8_DEF@
347
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
343 348
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
344 349
 JSON_LDFLAGS = @JSON_LDFLAGS@
345 350
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -421,6 +430,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
421 421
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
422 422
 THREAD_LIBS = @THREAD_LIBS@
423 423
 TH_SAFE = @TH_SAFE@
424
+UINT16_DEF = @UINT16_DEF@
425
+UINT32_DEF = @UINT32_DEF@
426
+UINT64_DEF = @UINT64_DEF@
427
+UINT8_DEF = @UINT8_DEF@
424 428
 VERSION = @VERSION@
425 429
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
426 430
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -158,6 +158,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
158 158
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
159 159
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
160 160
 	$(top_srcdir)/m4/reorganization/strni.m4 \
161
+	$(top_srcdir)/m4/reorganization/types.m4 \
161 162
 	$(top_srcdir)/configure.ac
162 163
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
163 164
 	$(ACLOCAL_M4)
... ...
@@ -318,6 +319,8 @@ CXXDEPMODE = @CXXDEPMODE@
318 318
 CXXFLAGS = @CXXFLAGS@
319 319
 CYGPATH_W = @CYGPATH_W@
320 320
 DBDIR = @DBDIR@
321
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
322
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
321 323
 DEFS = @DEFS@ -DCL_NOTHREADS -DCL_NOLIBCLAMAV
322 324
 DEPDIR = @DEPDIR@
323 325
 DLLTOOL = @DLLTOOL@
... ...
@@ -332,6 +335,7 @@ FGREP = @FGREP@
332 332
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
333 333
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
334 334
 GCOV = @GCOV@
335
+GENERATE_WARNING = @GENERATE_WARNING@
335 336
 GENHTML = @GENHTML@
336 337
 GETENT = @GETENT@
337 338
 GPERF = @GPERF@
... ...
@@ -346,6 +350,11 @@ INSTALL_DATA = @INSTALL_DATA@
346 346
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
347 347
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
348 348
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
349
+INT16_DEF = @INT16_DEF@
350
+INT32_DEF = @INT32_DEF@
351
+INT64_DEF = @INT64_DEF@
352
+INT8_DEF = @INT8_DEF@
353
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
349 354
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
350 355
 JSON_LDFLAGS = @JSON_LDFLAGS@
351 356
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -427,6 +436,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
427 427
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
428 428
 THREAD_LIBS = @THREAD_LIBS@
429 429
 TH_SAFE = @TH_SAFE@
430
+UINT16_DEF = @UINT16_DEF@
431
+UINT32_DEF = @UINT32_DEF@
432
+UINT64_DEF = @UINT64_DEF@
433
+UINT8_DEF = @UINT8_DEF@
430 434
 VERSION = @VERSION@
431 435
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
432 436
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -177,6 +177,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
177 177
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
178 178
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
179 179
 	$(top_srcdir)/m4/reorganization/strni.m4 \
180
+	$(top_srcdir)/m4/reorganization/types.m4 \
180 181
 	$(top_srcdir)/configure.ac
181 182
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
182 183
 	$(ACLOCAL_M4)
... ...
@@ -303,6 +304,8 @@ CXXDEPMODE = @CXXDEPMODE@
303 303
 CXXFLAGS = @CXXFLAGS@
304 304
 CYGPATH_W = @CYGPATH_W@
305 305
 DBDIR = @DBDIR@
306
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
307
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
306 308
 DEFS = @DEFS@ -DCL_NOTHREADS
307 309
 DEPDIR = @DEPDIR@
308 310
 DLLTOOL = @DLLTOOL@
... ...
@@ -317,6 +320,7 @@ FGREP = @FGREP@
317 317
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
318 318
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
319 319
 GCOV = @GCOV@
320
+GENERATE_WARNING = @GENERATE_WARNING@
320 321
 GENHTML = @GENHTML@
321 322
 GETENT = @GETENT@
322 323
 GPERF = @GPERF@
... ...
@@ -331,6 +335,11 @@ INSTALL_DATA = @INSTALL_DATA@
331 331
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
332 332
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
333 333
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
334
+INT16_DEF = @INT16_DEF@
335
+INT32_DEF = @INT32_DEF@
336
+INT64_DEF = @INT64_DEF@
337
+INT8_DEF = @INT8_DEF@
338
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
334 339
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
335 340
 JSON_LDFLAGS = @JSON_LDFLAGS@
336 341
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -412,6 +421,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
412 412
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
413 413
 THREAD_LIBS = @THREAD_LIBS@
414 414
 TH_SAFE = @TH_SAFE@
415
+UINT16_DEF = @UINT16_DEF@
416
+UINT32_DEF = @UINT32_DEF@
417
+UINT64_DEF = @UINT64_DEF@
418
+UINT8_DEF = @UINT8_DEF@
415 419
 VERSION = @VERSION@
416 420
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
417 421
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -63,7 +63,6 @@
63 63
 #include "libclamav/matcher-pcre.h"
64 64
 #include "libclamav/str.h"
65 65
 #include "libclamav/readdb.h"
66
-#include "libclamav/cltypes.h"
67 66
 
68 67
 #ifdef C_LINUX
69 68
 dev_t procdev;
... ...
@@ -176,6 +176,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
176 176
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
177 177
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
178 178
 	$(top_srcdir)/m4/reorganization/strni.m4 \
179
+	$(top_srcdir)/m4/reorganization/types.m4 \
179 180
 	$(top_srcdir)/configure.ac
180 181
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
181 182
 	$(ACLOCAL_M4)
... ...
@@ -301,6 +302,8 @@ CXXDEPMODE = @CXXDEPMODE@
301 301
 CXXFLAGS = @CXXFLAGS@
302 302
 CYGPATH_W = @CYGPATH_W@
303 303
 DBDIR = @DBDIR@
304
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
305
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
304 306
 DEFS = @DEFS@ -DCL_NOTHREADS
305 307
 DEPDIR = @DEPDIR@
306 308
 DLLTOOL = @DLLTOOL@
... ...
@@ -315,6 +318,7 @@ FGREP = @FGREP@
315 315
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
316 316
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
317 317
 GCOV = @GCOV@
318
+GENERATE_WARNING = @GENERATE_WARNING@
318 319
 GENHTML = @GENHTML@
319 320
 GETENT = @GETENT@
320 321
 GPERF = @GPERF@
... ...
@@ -329,6 +333,11 @@ INSTALL_DATA = @INSTALL_DATA@
329 329
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
330 330
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
331 331
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
332
+INT16_DEF = @INT16_DEF@
333
+INT32_DEF = @INT32_DEF@
334
+INT64_DEF = @INT64_DEF@
335
+INT8_DEF = @INT8_DEF@
336
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
332 337
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
333 338
 JSON_LDFLAGS = @JSON_LDFLAGS@
334 339
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -410,6 +419,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
410 410
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
411 411
 THREAD_LIBS = @THREAD_LIBS@
412 412
 TH_SAFE = @TH_SAFE@
413
+UINT16_DEF = @UINT16_DEF@
414
+UINT32_DEF = @UINT32_DEF@
415
+UINT64_DEF = @UINT64_DEF@
416
+UINT8_DEF = @UINT8_DEF@
413 417
 VERSION = @VERSION@
414 418
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
415 419
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -646,6 +646,18 @@ am__EXEEXT_FALSE
646 646
 am__EXEEXT_TRUE
647 647
 LTLIBOBJS
648 648
 LIBOBJS
649
+DEFINE_SF64_PREFIX
650
+DEFINE_SF32_PREFIX
651
+INT_TYPES_HEADER
652
+UINT64_DEF
653
+INT64_DEF
654
+UINT32_DEF
655
+INT32_DEF
656
+UINT16_DEF
657
+INT16_DEF
658
+UINT8_DEF
659
+INT8_DEF
660
+GENERATE_WARNING
649 661
 HAVE_STRNI
650 662
 JSON_LDFLAGS
651 663
 JSON_LIBS
... ...
@@ -29156,7 +29168,148 @@ else
29156 29156
     mspack_msg="External, $LIBMSPACK_CFLAGS $LIBMSPACK_LIBS"
29157 29157
 fi
29158 29158
 
29159
-ac_config_files="$ac_config_files clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamd/clamav-daemon.service clamd/clamav-daemon.socket clamdscan/Makefile clamsubmit/Makefile clamav-milter/Makefile freshclam/clamav-freshclam.service freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile test/Makefile unit_tests/Makefile clamdtop/Makefile clambc/Makefile libfreshclam/Makefile Makefile clamav-config libclamav.pc platform.h docs/man/clamav-milter.8 docs/man/clamav-milter.conf.5 docs/man/clambc.1 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1 docs/man/clamdtop.1 docs/man/clamsubmit.1"
29159
+ac_config_files="$ac_config_files clamscan/Makefile database/Makefile docs/Makefile clamd/Makefile clamd/clamav-daemon.service clamd/clamav-daemon.socket clamdscan/Makefile clamsubmit/Makefile clamav-milter/Makefile freshclam/clamav-freshclam.service freshclam/Makefile sigtool/Makefile clamconf/Makefile etc/Makefile test/Makefile unit_tests/Makefile clamdtop/Makefile clambc/Makefile libfreshclam/Makefile Makefile clamav-config libclamav.pc platform.h docs/man/clamav-milter.8 docs/man/clamav-milter.conf.5 docs/man/clambc.1 docs/man/clamconf.1 docs/man/clamd.8 docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 docs/man/freshclam.1 docs/man/freshclam.conf.5 docs/man/sigtool.1 docs/man/clamdtop.1 docs/man/clamsubmit.1 clamav-types.h"
29160
+
29161
+
29162
+# Define variables needed to generate clamav-types.h.
29163
+# Define a warning for the user, so they don't edit clamav-types.h
29164
+GENERATE_WARNING="Warning: This file is generated with ./configure. Do not edit!"
29165
+
29166
+
29167
+# Initialize definitions to empty strings, in case they're not needed.
29168
+INT8_DEF=""
29169
+
29170
+UINT8_DEF=""
29171
+
29172
+INT16_DEF=""
29173
+
29174
+UINT16_DEF=""
29175
+
29176
+INT32_DEF=""
29177
+
29178
+UINT32_DEF=""
29179
+
29180
+INT64_DEF=""
29181
+
29182
+UINT64_DEF=""
29183
+
29184
+
29185
+# Check sys/int_types.h first, to give it higher priority on Solaris
29186
+ac_fn_c_check_header_mongrel "$LINENO" "sys/int_types.h" "ac_cv_header_sys_int_types_h" "$ac_includes_default"
29187
+if test "x$ac_cv_header_sys_int_types_h" = xyes; then :
29188
+           INT_TYPES_HEADER="#include <sys/int_types.h>"
29189
+
29190
+
29191
+else
29192
+           ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
29193
+if test "x$ac_cv_header_inttypes_h" = xyes; then :
29194
+                   INT_TYPES_HEADER="#include <inttypes.h>"
29195
+
29196
+
29197
+else
29198
+                   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
29199
+if test "x$ac_cv_header_stdint_h" = xyes; then :
29200
+                           INT_TYPES_HEADER="#include <stdint.h>"
29201
+
29202
+
29203
+else
29204
+                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29205
+/* end confdefs.h.  */
29206
+
29207
+
29208
+                                        #ifndef _MSC_VER
29209
+                                            error: _MSC_VER not found!
29210
+                                        #endif
29211
+
29212
+
29213
+int
29214
+main ()
29215
+{
29216
+
29217
+  ;
29218
+  return 0;
29219
+}
29220
+
29221
+_ACEOF
29222
+if ac_fn_c_try_compile "$LINENO"; then :
29223
+                                   INT_TYPES_HEADER="#include <stdint.h>"
29224
+
29225
+
29226
+else
29227
+                                   INT8_DEF="typedef signed char int8_t;"
29228
+
29229
+                                UINT8_DEF="typedef unsigned char uint8_t;"
29230
+
29231
+
29232
+                                if test $ac_cv_sizeof_int = 2; then
29233
+                                    INT16_DEF="typedef signed int int16_t;"
29234
+
29235
+                                    UINT16_DEF="typedef unsigned int uint16_t;"
29236
+
29237
+                                elif test $ac_cv_sizeof_short = 2; then
29238
+                                    INT16_DEF="typedef signed short int16_t;"
29239
+
29240
+                                    UINT16_DEF="typedef unsigned short uint16_t;"
29241
+
29242
+                                fi
29243
+
29244
+                                if test $ac_cv_sizeof_int = 4; then
29245
+                                    INT32_DEF="typedef signed int int32_t;"
29246
+
29247
+                                    UINT32_DEF="typedef unsigned int uint32_t;"
29248
+
29249
+                                elif test $ac_cv_sizeof_long = 4; then
29250
+                                    INT32_DEF="typedef signed long int32_t;"
29251
+
29252
+                                    UINT32_DEF="typedef unsigned long uint32_t;"
29253
+
29254
+                                fi
29255
+
29256
+                                if test $ac_cv_sizeof_long = 8; then
29257
+                                    INT64_DEF="typedef signed long int64_t;"
29258
+
29259
+                                    UINT64_DEF="typedef unsigned long uint64_t;"
29260
+
29261
+                                elif test $ac_cv_sizeof_long_long = 8; then
29262
+                                    INT64_DEF="typedef signed long long int64_t;"
29263
+
29264
+                                    UINT64_DEF="typedef unsigned long long uint64_t;"
29265
+
29266
+                                fi
29267
+
29268
+
29269
+fi
29270
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29271
+
29272
+fi
29273
+
29274
+
29275
+
29276
+fi
29277
+
29278
+
29279
+
29280
+fi
29281
+
29282
+
29283
+
29284
+# If _SF64_PREFIX isn't defined, this may be used.
29285
+if test $ac_cv_sizeof_int = 4; then
29286
+    DEFINE_SF32_PREFIX="#define _SF32_PREFIX \"\""
29287
+
29288
+elif test $ac_cv_sizeof_long = 4; then
29289
+    DEFINE_SF32_PREFIX="#define _SF32_PREFIX \"l\""
29290
+
29291
+fi
29292
+
29293
+# If _SF32_PREFIX isn't defined, this may be used.
29294
+if test $ac_cv_sizeof_long = 8; then
29295
+    DEFINE_SF64_PREFIX="#define _SF64_PREFIX \"l\""
29296
+
29297
+elif test $ac_cv_sizeof_long_long = 8; then
29298
+    DEFINE_SF64_PREFIX="#define _SF64_PREFIX \"ll\""
29299
+
29300
+fi
29160 29301
 
29161 29302
 
29162 29303
 cat >confcache <<\_ACEOF
... ...
@@ -30405,6 +30558,7 @@ do
30405 30405
     "docs/man/sigtool.1") CONFIG_FILES="$CONFIG_FILES docs/man/sigtool.1" ;;
30406 30406
     "docs/man/clamdtop.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamdtop.1" ;;
30407 30407
     "docs/man/clamsubmit.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamsubmit.1" ;;
30408
+    "clamav-types.h") CONFIG_FILES="$CONFIG_FILES clamav-types.h" ;;
30408 30409
 
30409 30410
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
30410 30411
   esac
... ...
@@ -33289,6 +33443,7 @@ do
33289 33289
     "docs/man/sigtool.1") CONFIG_FILES="$CONFIG_FILES docs/man/sigtool.1" ;;
33290 33290
     "docs/man/clamdtop.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamdtop.1" ;;
33291 33291
     "docs/man/clamsubmit.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamsubmit.1" ;;
33292
+    "clamav-types.h") CONFIG_FILES="$CONFIG_FILES clamav-types.h" ;;
33292 33293
     "libclamav/Makefile") CONFIG_FILES="$CONFIG_FILES libclamav/Makefile" ;;
33293 33294
 
33294 33295
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
... ...
@@ -190,8 +190,12 @@ docs/man/freshclam.conf.5
190 190
 docs/man/sigtool.1
191 191
 docs/man/clamdtop.1
192 192
 docs/man/clamsubmit.1
193
+clamav-types.h
193 194
 ])
194 195
 
196
+# Define variables needed to generate clamav-types.h.
197
+m4_include([m4/reorganization/types.m4])
198
+
195 199
 AC_OUTPUT
196 200
 
197 201
 if test "$enable_llvm" = "yes" && test "$subdirfailed" != "no"; then
... ...
@@ -174,6 +174,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
174 174
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
175 175
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
176 176
 	$(top_srcdir)/m4/reorganization/strni.m4 \
177
+	$(top_srcdir)/m4/reorganization/types.m4 \
177 178
 	$(top_srcdir)/configure.ac
178 179
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
179 180
 	$(ACLOCAL_M4)
... ...
@@ -249,6 +250,8 @@ CXXDEPMODE = @CXXDEPMODE@
249 249
 CXXFLAGS = @CXXFLAGS@
250 250
 CYGPATH_W = @CYGPATH_W@
251 251
 DBDIR = @DBDIR@
252
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
253
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
252 254
 DEFS = @DEFS@
253 255
 DEPDIR = @DEPDIR@
254 256
 DLLTOOL = @DLLTOOL@
... ...
@@ -263,6 +266,7 @@ FGREP = @FGREP@
263 263
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
264 264
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
265 265
 GCOV = @GCOV@
266
+GENERATE_WARNING = @GENERATE_WARNING@
266 267
 GENHTML = @GENHTML@
267 268
 GETENT = @GETENT@
268 269
 GPERF = @GPERF@
... ...
@@ -277,6 +281,11 @@ INSTALL_DATA = @INSTALL_DATA@
277 277
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
278 278
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
279 279
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
280
+INT16_DEF = @INT16_DEF@
281
+INT32_DEF = @INT32_DEF@
282
+INT64_DEF = @INT64_DEF@
283
+INT8_DEF = @INT8_DEF@
284
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
280 285
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
281 286
 JSON_LDFLAGS = @JSON_LDFLAGS@
282 287
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -358,6 +367,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
358 358
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
359 359
 THREAD_LIBS = @THREAD_LIBS@
360 360
 TH_SAFE = @TH_SAFE@
361
+UINT16_DEF = @UINT16_DEF@
362
+UINT32_DEF = @UINT32_DEF@
363
+UINT64_DEF = @UINT64_DEF@
364
+UINT8_DEF = @UINT8_DEF@
361 365
 VERSION = @VERSION@
362 366
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
363 367
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -174,6 +174,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
174 174
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
175 175
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
176 176
 	$(top_srcdir)/m4/reorganization/strni.m4 \
177
+	$(top_srcdir)/m4/reorganization/types.m4 \
177 178
 	$(top_srcdir)/configure.ac
178 179
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
179 180
 	$(ACLOCAL_M4)
... ...
@@ -283,6 +284,8 @@ CXXDEPMODE = @CXXDEPMODE@
283 283
 CXXFLAGS = @CXXFLAGS@
284 284
 CYGPATH_W = @CYGPATH_W@
285 285
 DBDIR = @DBDIR@
286
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
287
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
286 288
 DEFS = @DEFS@
287 289
 DEPDIR = @DEPDIR@
288 290
 DLLTOOL = @DLLTOOL@
... ...
@@ -297,6 +300,7 @@ FGREP = @FGREP@
297 297
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
298 298
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
299 299
 GCOV = @GCOV@
300
+GENERATE_WARNING = @GENERATE_WARNING@
300 301
 GENHTML = @GENHTML@
301 302
 GETENT = @GETENT@
302 303
 GPERF = @GPERF@
... ...
@@ -311,6 +315,11 @@ INSTALL_DATA = @INSTALL_DATA@
311 311
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
312 312
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
313 313
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
314
+INT16_DEF = @INT16_DEF@
315
+INT32_DEF = @INT32_DEF@
316
+INT64_DEF = @INT64_DEF@
317
+INT8_DEF = @INT8_DEF@
318
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
314 319
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
315 320
 JSON_LDFLAGS = @JSON_LDFLAGS@
316 321
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -392,6 +401,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
392 392
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
393 393
 THREAD_LIBS = @THREAD_LIBS@
394 394
 TH_SAFE = @TH_SAFE@
395
+UINT16_DEF = @UINT16_DEF@
396
+UINT32_DEF = @UINT32_DEF@
397
+UINT64_DEF = @UINT64_DEF@
398
+UINT8_DEF = @UINT8_DEF@
395 399
 VERSION = @VERSION@
396 400
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
397 401
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -175,6 +175,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
175 175
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
176 176
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
177 177
 	$(top_srcdir)/m4/reorganization/strni.m4 \
178
+	$(top_srcdir)/m4/reorganization/types.m4 \
178 179
 	$(top_srcdir)/configure.ac
179 180
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
180 181
 	$(ACLOCAL_M4)
... ...
@@ -279,6 +280,8 @@ CXXDEPMODE = @CXXDEPMODE@
279 279
 CXXFLAGS = @CXXFLAGS@
280 280
 CYGPATH_W = @CYGPATH_W@
281 281
 DBDIR = @DBDIR@
282
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
283
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
282 284
 DEFS = @DEFS@
283 285
 DEPDIR = @DEPDIR@
284 286
 DLLTOOL = @DLLTOOL@
... ...
@@ -293,6 +296,7 @@ FGREP = @FGREP@
293 293
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
294 294
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
295 295
 GCOV = @GCOV@
296
+GENERATE_WARNING = @GENERATE_WARNING@
296 297
 GENHTML = @GENHTML@
297 298
 GETENT = @GETENT@
298 299
 GPERF = @GPERF@
... ...
@@ -307,6 +311,11 @@ INSTALL_DATA = @INSTALL_DATA@
307 307
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
308 308
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
309 309
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
310
+INT16_DEF = @INT16_DEF@
311
+INT32_DEF = @INT32_DEF@
312
+INT64_DEF = @INT64_DEF@
313
+INT8_DEF = @INT8_DEF@
314
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
310 315
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
311 316
 JSON_LDFLAGS = @JSON_LDFLAGS@
312 317
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -388,6 +397,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
388 388
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
389 389
 THREAD_LIBS = @THREAD_LIBS@
390 390
 TH_SAFE = @TH_SAFE@
391
+UINT16_DEF = @UINT16_DEF@
392
+UINT32_DEF = @UINT32_DEF@
393
+UINT64_DEF = @UINT64_DEF@
394
+UINT8_DEF = @UINT8_DEF@
391 395
 VERSION = @VERSION@
392 396
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
393 397
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -179,6 +179,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
179 179
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
180 180
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
181 181
 	$(top_srcdir)/m4/reorganization/strni.m4 \
182
+	$(top_srcdir)/m4/reorganization/types.m4 \
182 183
 	$(top_srcdir)/configure.ac
183 184
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
184 185
 	$(ACLOCAL_M4)
... ...
@@ -336,6 +337,8 @@ CXXDEPMODE = @CXXDEPMODE@
336 336
 CXXFLAGS = @CXXFLAGS@
337 337
 CYGPATH_W = @CYGPATH_W@
338 338
 DBDIR = @DBDIR@
339
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
340
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
339 341
 DEFS = @DEFS@ -DCL_NOTHREADS
340 342
 DEPDIR = @DEPDIR@
341 343
 DLLTOOL = @DLLTOOL@
... ...
@@ -350,6 +353,7 @@ FGREP = @FGREP@
350 350
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
351 351
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
352 352
 GCOV = @GCOV@
353
+GENERATE_WARNING = @GENERATE_WARNING@
353 354
 GENHTML = @GENHTML@
354 355
 GETENT = @GETENT@
355 356
 GPERF = @GPERF@
... ...
@@ -364,6 +368,11 @@ INSTALL_DATA = @INSTALL_DATA@
364 364
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
365 365
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
366 366
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
367
+INT16_DEF = @INT16_DEF@
368
+INT32_DEF = @INT32_DEF@
369
+INT64_DEF = @INT64_DEF@
370
+INT8_DEF = @INT8_DEF@
371
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
367 372
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
368 373
 JSON_LDFLAGS = @JSON_LDFLAGS@
369 374
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -445,6 +454,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
445 445
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
446 446
 THREAD_LIBS = @THREAD_LIBS@
447 447
 TH_SAFE = @TH_SAFE@
448
+UINT16_DEF = @UINT16_DEF@
449
+UINT32_DEF = @UINT32_DEF@
450
+UINT64_DEF = @UINT64_DEF@
451
+UINT8_DEF = @UINT8_DEF@
448 452
 VERSION = @VERSION@
449 453
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
450 454
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -39,7 +39,6 @@
39 39
 
40 40
 #include "mirman.h"
41 41
 
42
-#include "libclamav/cltypes.h"
43 42
 #include "libclamav/clamav.h"
44 43
 
45 44
 #include "shared/output.h"
... ...
@@ -19,7 +19,7 @@
19 19
 #ifndef __MIRMAN_H
20 20
 #define __MIRMAN_H
21 21
 
22
-#include "libclamav/cltypes.h"
22
+#include "clamav-types.h"
23 23
 #include "freshclamcodes.h"
24 24
 
25 25
 typedef enum mir_status_tag {
... ...
@@ -311,7 +311,6 @@ libclamav_la_SOURCES = \
311 311
 	ole2_extract.h \
312 312
 	vba_extract.c \
313 313
 	vba_extract.h \
314
-	cltypes.h \
315 314
 	msexpand.c \
316 315
 	msexpand.h \
317 316
 	pe.c \
... ...
@@ -205,6 +205,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
205 205
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
206 206
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
207 207
 	$(top_srcdir)/m4/reorganization/strni.m4 \
208
+	$(top_srcdir)/m4/reorganization/types.m4 \
208 209
 	$(top_srcdir)/configure.ac
209 210
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
210 211
 	$(ACLOCAL_M4)
... ...
@@ -254,14 +255,13 @@ am__libclamav_la_SOURCES_DIST = matcher-ac.c matcher-ac.h matcher-bm.c \
254 254
 	filetypes.h filetypes_int.h rtf.c rtf.h blob.c blob.h mbox.c \
255 255
 	mbox.h message.c message.h table.c table.h text.c text.h \
256 256
 	ole2_extract.c ole2_extract.h vba_extract.c vba_extract.h \
257
-	cltypes.h msexpand.c msexpand.h pe.c pe.h pe_icons.c \
258
-	pe_icons.h disasm.c disasm.h disasm-common.h disasmpriv.h \
259
-	upx.c upx.h htmlnorm.c htmlnorm.h libmspack.c libmspack.h \
260
-	rebuildpe.c rebuildpe.h petite.c petite.h wwunpack.c \
261
-	wwunpack.h unsp.c unsp.h aspack.c aspack.h packlibs.c \
262
-	packlibs.h fsg.c fsg.h mew.c mew.h upack.c upack.h line.c \
263
-	line.h untar.c untar.h unzip.c unzip.h ooxml.c ooxml.h \
264
-	inflate64.c inflate64.h inffixed64.h inflate64_priv.h \
257
+	msexpand.c msexpand.h pe.c pe.h pe_icons.c pe_icons.h disasm.c \
258
+	disasm.h disasm-common.h disasmpriv.h upx.c upx.h htmlnorm.c \
259
+	htmlnorm.h libmspack.c libmspack.h rebuildpe.c rebuildpe.h \
260
+	petite.c petite.h wwunpack.c wwunpack.h unsp.c unsp.h aspack.c \
261
+	aspack.h packlibs.c packlibs.h fsg.c fsg.h mew.c mew.h upack.c \
262
+	upack.h line.c line.h untar.c untar.h unzip.c unzip.h ooxml.c \
263
+	ooxml.h inflate64.c inflate64.h inffixed64.h inflate64_priv.h \
265 264
 	special.c special.h binhex.c binhex.h is_tar.c is_tar.h tnef.c \
266 265
 	tnef.h autoit.c autoit.h unarj.c unarj.h nsis/bzlib.c \
267 266
 	nsis/bzlib_private.h nsis/nsis_bzlib.h nsis/nulsft.c \
... ...
@@ -903,6 +903,8 @@ CXXDEPMODE = @CXXDEPMODE@
903 903
 CXXFLAGS = @CXXFLAGS@
904 904
 CYGPATH_W = @CYGPATH_W@
905 905
 DBDIR = @DBDIR@
906
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
907
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
906 908
 DEFS = @DEFS@
907 909
 DEPDIR = @DEPDIR@
908 910
 DLLTOOL = @DLLTOOL@
... ...
@@ -917,6 +919,7 @@ FGREP = @FGREP@
917 917
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
918 918
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
919 919
 GCOV = @GCOV@
920
+GENERATE_WARNING = @GENERATE_WARNING@
920 921
 GENHTML = @GENHTML@
921 922
 GETENT = @GETENT@
922 923
 GPERF = @GPERF@
... ...
@@ -931,6 +934,11 @@ INSTALL_DATA = @INSTALL_DATA@
931 931
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
932 932
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
933 933
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
934
+INT16_DEF = @INT16_DEF@
935
+INT32_DEF = @INT32_DEF@
936
+INT64_DEF = @INT64_DEF@
937
+INT8_DEF = @INT8_DEF@
938
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
934 939
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
935 940
 JSON_LDFLAGS = @JSON_LDFLAGS@
936 941
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -1012,6 +1020,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
1012 1012
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
1013 1013
 THREAD_LIBS = @THREAD_LIBS@
1014 1014
 TH_SAFE = @TH_SAFE@
1015
+UINT16_DEF = @UINT16_DEF@
1016
+UINT32_DEF = @UINT32_DEF@
1017
+UINT64_DEF = @UINT64_DEF@
1018
+UINT8_DEF = @UINT8_DEF@
1015 1019
 VERSION = @VERSION@
1016 1020
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
1017 1021
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -1294,14 +1306,13 @@ libclamav_la_SOURCES = matcher-ac.c matcher-ac.h matcher-bm.c \
1294 1294
 	filetypes.h filetypes_int.h rtf.c rtf.h blob.c blob.h mbox.c \
1295 1295
 	mbox.h message.c message.h table.c table.h text.c text.h \
1296 1296
 	ole2_extract.c ole2_extract.h vba_extract.c vba_extract.h \
1297
-	cltypes.h msexpand.c msexpand.h pe.c pe.h pe_icons.c \
1298
-	pe_icons.h disasm.c disasm.h disasm-common.h disasmpriv.h \
1299
-	upx.c upx.h htmlnorm.c htmlnorm.h libmspack.c libmspack.h \
1300
-	rebuildpe.c rebuildpe.h petite.c petite.h wwunpack.c \
1301
-	wwunpack.h unsp.c unsp.h aspack.c aspack.h packlibs.c \
1302
-	packlibs.h fsg.c fsg.h mew.c mew.h upack.c upack.h line.c \
1303
-	line.h untar.c untar.h unzip.c unzip.h ooxml.c ooxml.h \
1304
-	inflate64.c inflate64.h inffixed64.h inflate64_priv.h \
1297
+	msexpand.c msexpand.h pe.c pe.h pe_icons.c pe_icons.h disasm.c \
1298
+	disasm.h disasm-common.h disasmpriv.h upx.c upx.h htmlnorm.c \
1299
+	htmlnorm.h libmspack.c libmspack.h rebuildpe.c rebuildpe.h \
1300
+	petite.c petite.h wwunpack.c wwunpack.h unsp.c unsp.h aspack.c \
1301
+	aspack.h packlibs.c packlibs.h fsg.c fsg.h mew.c mew.h upack.c \
1302
+	upack.h line.c line.h untar.c untar.h unzip.c unzip.h ooxml.c \
1303
+	ooxml.h inflate64.c inflate64.h inffixed64.h inflate64_priv.h \
1305 1304
 	special.c special.h binhex.c binhex.h is_tar.c is_tar.h tnef.c \
1306 1305
 	tnef.h autoit.c autoit.h unarj.c unarj.h nsis/bzlib.c \
1307 1306
 	nsis/bzlib_private.h nsis/nsis_bzlib.h nsis/nulsft.c \
... ...
@@ -30,7 +30,6 @@
30 30
 #endif
31 31
 
32 32
 #include "clamav.h"
33
-#include "cltypes.h"
34 33
 #include "others.h"
35 34
 #include "adc.h"
36 35
 
... ...
@@ -30,7 +30,7 @@
30 30
 #include <ctype.h>
31 31
 #include <fcntl.h>
32 32
 
33
-#include "cltypes.h"
33
+#include "clamav-types.h"
34 34
 #include "others.h"
35 35
 #include "apm.h"
36 36
 #include "prtn_intxn.h"
... ...
@@ -26,7 +26,7 @@
26 26
 #include "clamav-config.h"
27 27
 #endif
28 28
 
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 #include "others.h"
31 31
 
32 32
 #define APM_FALLBACK_SECTOR_SIZE 512
... ...
@@ -23,7 +23,7 @@
23 23
 #include "clamav-config.h"
24 24
 #endif
25 25
 
26
-#include "cltypes.h"
26
+#include "clamav-types.h"
27 27
 #include "arc4.h"
28 28
 #include <string.h>
29 29
 
... ...
@@ -19,7 +19,7 @@
19 19
  *  MA 02110-1301, USA.
20 20
  */
21 21
 
22
-#include "cltypes.h"
22
+#include "clamav-types.h"
23 23
 struct arc4_state {
24 24
     /* really just 8 bit, but it is faster if reads are aligned */
25 25
     uint32_t S[256];
... ...
@@ -22,7 +22,6 @@
22 22
 #include <string.h>
23 23
 
24 24
 #include "clamav.h"
25
-#include "cltypes.h"
26 25
 #include "execs.h"
27 26
 #include "others.h"
28 27
 #include "rebuildpe.h"
... ...
@@ -22,7 +22,7 @@
22 22
 #ifndef __ASPACK_H
23 23
 #define __ASPACK_H
24 24
 
25
-#include "cltypes.h"
25
+#include "clamav-types.h"
26 26
 #include "execs.h"
27 27
 
28 28
 #define ASPACK_EP_OFFSET_212    (58+0x70e)
... ...
@@ -27,7 +27,6 @@
27 27
 #include <string.h>
28 28
 
29 29
 #include "scanners.h"
30
-#include "cltypes.h"
31 30
 #include "others.h"
32 31
 #include "clamav.h"
33 32
 #include "fmap.h"
... ...
@@ -22,7 +22,7 @@
22 22
  */
23 23
 #ifndef BYTECODE_H
24 24
 #define BYTECODE_H
25
-#include "cltypes.h"
25
+#include "clamav-types.h"
26 26
 #include "clambc.h"
27 27
 #include <stdio.h>
28 28
 #include "fmap.h"
... ...
@@ -36,7 +36,6 @@
36 36
 #include <ctype.h>
37 37
 
38 38
 #include "clamav.h"
39
-#include "cltypes.h"
40 39
 #include "clambc.h"
41 40
 #include "bytecode.h"
42 41
 #include "bytecode_priv.h"
... ...
@@ -26,7 +26,7 @@
26 26
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 27
  * SUCH DAMAGE
28 28
  */
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 #include "type_desc.h"
31 31
 #include "bytecode_api.h"
32 32
 #include "bytecode_api_impl.h"
... ...
@@ -27,7 +27,6 @@
27 27
 
28 28
 #include "clamav.h"
29 29
 #include "target.h"
30
-#include "cltypes.h"
31 30
 
32 31
 #include "bytecode_detect.h"
33 32
 #include "others.h"
... ...
@@ -24,7 +24,6 @@
24 24
 #include <stdio.h>
25 25
 #include <stdlib.h>
26 26
 
27
-#include "cltypes.h"
28 27
 #include "bytecode.h"
29 28
 #include "bytecode_priv.h"
30 29
 #include "clamav.h"
... ...
@@ -65,7 +65,7 @@
65 65
 #include <sys/types.h>
66 66
 #include <sys/stat.h>
67 67
 
68
-#include "cltypes.h"
68
+#include "clamav-types.h"
69 69
 
70 70
 #ifdef __cplusplus
71 71
 extern "C"
72 72
deleted file mode 100644
... ...
@@ -1,121 +0,0 @@
1
-/*
2
- *  Copyright (C) 2015 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
3
- *  Copyright (C) 2007-2008 Sourcefire, Inc.
4
- *
5
- *  Authors: Tomasz Kojm
6
- *
7
- *  This program is free software; you can redistribute it and/or modify
8
- *  it under the terms of the GNU General Public License version 2 as
9
- *  published by the Free Software Foundation.
10
- *
11
- *  This program is distributed in the hope that it will be useful,
12
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
- *  GNU General Public License for more details.
15
- *
16
- *  You should have received a copy of the GNU General Public License
17
- *  along with this program; if not, write to the Free Software
18
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
- *  MA 02110-1301, USA.
20
- */
21
-
22
-#ifndef __CLTYPES_H
23
-#define __CLTYPES_H
24
-
25
-#if HAVE_CONFIG_H
26
-#include "clamav-config.h"
27
-#endif
28
-
29
-#ifdef HAVE_SYS_INT_TYPES_H
30
-/* First to give it higher priority on Solaris */
31
-#include <sys/int_types.h>
32
-#elif defined(HAVE_INTTYPES_H)
33
-/* C99: inttypes.h should include stdint.h; more universal because some
34
- * older platforms don't provide stdint.h
35
- */
36
-#include <inttypes.h>
37
-#elif defined(HAVE_STDINT_H)
38
-#include <stdint.h>
39
-#elif defined(_MSC_VER)
40
-#include <stdint.h>
41
-#else
42
-    typedef signed char int8_t;
43
-    typedef unsigned char uint8_t;
44
-
45
-#if SIZEOF_INT == 2
46
-    typedef signed int int16_t;
47
-    typedef unsigned int uint16_t;
48
-#elif SIZEOF_SHORT == 2
49
-    typedef signed short int16_t;
50
-    typedef unsigned short uint16_t;
51
-#endif
52
-
53
-#if SIZEOF_INT == 4
54
-    typedef signed int int32_t;
55
-    typedef unsigned int uint32_t;
56
-#elif SIZEOF_LONG == 4
57
-    typedef signed long int32_t;
58
-    typedef unsigned long uint32_t;
59
-#endif
60
-
61
-#if SIZEOF_LONG == 8
62
-    typedef signed long int64_t;
63
-    typedef unsigned long uint64_t;
64
-#elif SIZEOF_LONG_LONG == 8
65
-    typedef signed long long int64_t;
66
-    typedef unsigned long long uint64_t;
67
-#endif
68
-#endif
69
-
70
-/* Ensure we have print format types */
71
-/* PRIu64 should be in <inttypes.h> */
72
-#ifndef _SF64_PREFIX
73
-#if SIZEOF_LONG == 8
74
-#define _SF64_PREFIX "l"
75
-#elif SIZEOF_LONG_LONG == 8
76
-#define _SF64_PREFIX "ll"
77
-#endif
78
-#endif
79
-
80
-#ifndef PRIu64
81
-#define PRIu64 _SF64_PREFIX "u"
82
-#endif
83
-#ifndef PRIx64
84
-#define PRIx64 _SF64_PREFIX "i"
85
-#endif
86
-#ifndef PRIi64
87
-#define PRIi64 _SF64_PREFIX "x"
88
-#endif
89
-
90
-#ifndef STDu64
91
-#define STDu64 "%" PRIu64
92
-#define STDi64 "%" PRIi64
93
-#define STDx64 "%" PRIx64
94
-#endif
95
-
96
-/* PRIu32 should also be in <inttypes.h> */
97
-#ifndef PRIu32
98
-#ifndef _SF32_PREFIX
99
-#if SIZEOF_INT == 4
100
-#define _SF32_PREFIX ""
101
-#elif SIZEOF_LONG == 4
102
-#define _SF32_PREFIX "l"
103
-#endif
104
-#endif
105
-
106
-#define PRIu32 _SF32_PREFIX "u"
107
-#define PRIi32 _SF32_PREFIX "i"
108
-#define PRIx32 _SF32_PREFIX "x"
109
-#endif
110
-
111
-#ifndef STDu32
112
-#define STDu32 "%" PRIu32
113
-#define STDi32 "%" PRIi32
114
-#define STDx32 "%" PRIx32
115
-#endif
116
-
117
-#ifndef INT32_MAX
118
-#define INT32_MAX 2147483647
119
-#endif
120
-
121
-#endif
... ...
@@ -34,7 +34,6 @@
34 34
 #include <fcntl.h>
35 35
 
36 36
 #include "clamav.h"
37
-#include "cltypes.h"
38 37
 #include "others.h"
39 38
 #include "cpio.h"
40 39
 #include "scanners.h"
... ...
@@ -30,7 +30,6 @@
30 30
 #include <zlib.h>
31 31
 
32 32
 #include "clamav.h"
33
-#include "cltypes.h"
34 33
 #include "dconf.h"
35 34
 #include "readdb.h"
36 35
 #include "str.h"
... ...
@@ -26,7 +26,6 @@
26 26
 #include <zlib.h>
27 27
 
28 28
 #include "clamav.h"
29
-#include "cltypes.h"
30 29
 #include "cvd.h"
31 30
 
32 31
 #include "mpool.h"
... ...
@@ -51,7 +51,6 @@
51 51
 #endif
52 52
 
53 53
 #include "clamav.h"
54
-#include "cltypes.h"
55 54
 #include "others.h"
56 55
 #include "dmg.h"
57 56
 #include "scanners.h"
... ...
@@ -26,7 +26,7 @@
26 26
 #include "clamav-config.h"
27 27
 #endif
28 28
 
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 #include "others.h"
31 31
 
32 32
 /* Simple stripe types */
... ...
@@ -38,7 +38,6 @@
38 38
 #endif
39 39
 #include <time.h>
40 40
 
41
-#include "cltypes.h"
42 41
 #include "elf.h"
43 42
 #include "clamav.h"
44 43
 #include "execs.h"
... ...
@@ -26,7 +26,6 @@
26 26
 #ifndef __ELF_H
27 27
 #define __ELF_H
28 28
 
29
-#include "cltypes.h"
30 29
 #include "clamav.h"
31 30
 #include "execs.h"
32 31
 #include "others.h"
... ...
@@ -42,7 +42,6 @@
42 42
 #include "hashtab.h"
43 43
 #include "entconv.h"
44 44
 #include "entitylist.h"
45
-#include "cltypes.h"
46 45
 
47 46
 #ifdef HAVE_ICONV
48 47
 #include <iconv.h>
... ...
@@ -24,7 +24,7 @@
24 24
 #ifndef _ENTITIES_H
25 25
 #define _ENTITIES_H
26 26
 
27
-#include "cltypes.h"
27
+#include "clamav-types.h"
28 28
 
29 29
 #include "hashtab.h"
30 30
 
... ...
@@ -24,7 +24,7 @@
24 24
 #ifndef EVENTS_H
25 25
 #define EVENTS_H
26 26
 
27
-#include "cltypes.h"
27
+#include "clamav-types.h"
28 28
 
29 29
 struct cli_events;
30 30
 typedef struct cli_events cli_events_t;
... ...
@@ -22,7 +22,7 @@
22 22
 #ifndef __EXECS_H
23 23
 #define __EXECS_H
24 24
 
25
-#include "cltypes.h"
25
+#include "clamav-types.h"
26 26
 #include "hashtab.h"
27 27
 #include "bcfeatures.h"
28 28
 
... ...
@@ -25,7 +25,7 @@
25 25
 #ifndef __EXPLODE_H
26 26
 #define __EXPLODE_H
27 27
 
28
-#include "cltypes.h"
28
+#include "clamav-types.h"
29 29
 
30 30
 enum {
31 31
   EXPLODE_EBUFF,
... ...
@@ -25,7 +25,6 @@
25 25
 #include <sys/types.h>
26 26
 
27 27
 #include "clamav.h"
28
-#include "cltypes.h"
29 28
 #include "fmap.h"
30 29
 
31 30
 #define CL_FILE_MBUFF_SIZE 1024
... ...
@@ -22,7 +22,7 @@
22 22
  */
23 23
 #ifndef FILTER_H
24 24
 #define FILTER_H
25
-#include "cltypes.h"
25
+#include "clamav-types.h"
26 26
 struct filter {
27 27
 	uint8_t B[65536];
28 28
 	uint8_t end[65536];
... ...
@@ -46,7 +46,6 @@
46 46
 
47 47
 #include "clamav.h"
48 48
 #include "others.h"
49
-#include "cltypes.h"
50 49
 #include "str.h"
51 50
 
52 51
 static inline unsigned int fmap_align_items(unsigned int sz, unsigned int al);
... ...
@@ -33,7 +33,7 @@
33 33
 #include <limits.h>
34 34
 #include <time.h>
35 35
 #include <string.h>
36
-#include "cltypes.h"
36
+
37 37
 #include "clamav.h"
38 38
 
39 39
 struct cl_fmap;
... ...
@@ -42,7 +42,6 @@
42 42
 #include <stdlib.h>
43 43
 
44 44
 #include "clamav.h"
45
-#include "cltypes.h"
46 45
 #include "rebuildpe.h"
47 46
 #include "others.h"
48 47
 #include "packlibs.h"
... ...
@@ -22,7 +22,7 @@
22 22
 #ifndef __FSG_H
23 23
 #define __FSG_H
24 24
 
25
-#include "cltypes.h"
25
+#include "clamav-types.h"
26 26
 #include "execs.h"
27 27
 
28 28
 int unfsg_200(const char *, char *, int, int, uint32_t, uint32_t, uint32_t, int);
... ...
@@ -33,7 +33,6 @@
33 33
 #include <zlib.h>
34 34
 
35 35
 #include "clamav.h"
36
-#include "cltypes.h"
37 36
 #include "others.h"
38 37
 #include "gpt.h"
39 38
 #include "mbr.h"
... ...
@@ -26,7 +26,7 @@
26 26
 #include "clamav-config.h"
27 27
 #endif
28 28
 
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 #include "others.h"
31 31
 
32 32
 /* GPT sector size is normally 512 bytes be can be set to much larger 
... ...
@@ -30,7 +30,6 @@
30 30
 #include <stdio.h>
31 31
 #include <string.h>
32 32
 
33
-#include "cltypes.h"
34 33
 #include "clamav.h"
35 34
 #include "others.h"
36 35
 #include "hashtab.h"
... ...
@@ -30,7 +30,7 @@
30 30
 #include <stdio.h>
31 31
 #include <stddef.h>
32 32
 #include <sys/types.h>
33
-#include "cltypes.h"
33
+#include "clamav-types.h"
34 34
 #include "mpool.h"
35 35
 typedef long cli_element_data;
36 36
 
... ...
@@ -24,7 +24,6 @@
24 24
 #endif
25 25
 
26 26
 #include "clamav.h"
27
-#include "cltypes.h"
28 27
 #include "others.h"
29 28
 #include "hfsplus.h"
30 29
 #include "scanners.h"
... ...
@@ -26,7 +26,7 @@
26 26
 #include "clamav-config.h"
27 27
 #endif
28 28
 
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 
31 31
 /* Structures based on Apple Technote 1150 */
32 32
 
... ...
@@ -45,7 +45,6 @@
45 45
 
46 46
 #include "clamav.h"
47 47
 #include "scanners.h"
48
-#include "cltypes.h"
49 48
 #include "others.h"
50 49
 #include "fmap.h"
51 50
 #include "ishield.h"
... ...
@@ -34,7 +34,6 @@
34 34
 #endif
35 35
 #include <time.h>
36 36
 
37
-#include "cltypes.h"
38 37
 #include "jpeg.h"
39 38
 #include "clamav.h"
40 39
 
... ...
@@ -24,7 +24,6 @@
24 24
 #endif
25 25
 
26 26
 #include "clamav.h"
27
-#include "cltypes.h"
28 27
 #include "others.h"
29 28
 #include "json_api.h"
30 29
 
... ...
@@ -30,7 +30,7 @@
30 30
 #include "json.h"
31 31
 #endif
32 32
 
33
-#include "cltypes.h"
33
+#include "clamav-types.h"
34 34
 #include "others.h"
35 35
 
36 36
 #if HAVE_JSON
... ...
@@ -36,7 +36,6 @@
36 36
 #include <assert.h>
37 37
 
38 38
 #include "clamav.h"
39
-#include "cltypes.h"
40 39
 #include "jsparse/lexglobal.h"
41 40
 #include "hashtab.h"
42 41
 #include "others.h"
... ...
@@ -28,7 +28,7 @@
28 28
 #define __LZMA_IFACE_H
29 29
 
30 30
 #include "7z/LzmaDec.h"
31
-#include "cltypes.h"
31
+#include "clamav-types.h"
32 32
 #include "others.h"
33 33
 
34 34
 struct CLI_LZMA {
... ...
@@ -30,7 +30,6 @@
30 30
 #include <fcntl.h>
31 31
 
32 32
 #include "clamav.h"
33
-#include "cltypes.h"
34 33
 #include "others.h"
35 34
 #include "macho.h"
36 35
 #include "execs.h"
... ...
@@ -39,7 +39,6 @@
39 39
 #include "matcher.h"
40 40
 #include "matcher-ac.h"
41 41
 #include "filetypes.h"
42
-#include "cltypes.h"
43 42
 #include "str.h"
44 43
 #include "readdb.h"
45 44
 #include "default.h"
... ...
@@ -25,7 +25,7 @@
25 25
 #include <sys/types.h>
26 26
 
27 27
 #include "filetypes.h"
28
-#include "cltypes.h"
28
+#include "clamav-types.h"
29 29
 #include "fmap.h"
30 30
 #include "hashtab.h"
31 31
 
... ...
@@ -29,7 +29,6 @@
29 29
 #include "clamav.h"
30 30
 #include "memory.h"
31 31
 #include "others.h"
32
-#include "cltypes.h"
33 32
 #include "matcher.h"
34 33
 #include "matcher-bm.h"
35 34
 #include "filetypes.h"
... ...
@@ -24,7 +24,7 @@
24 24
 
25 25
 #include "matcher.h"
26 26
 #include "filetypes.h"
27
-#include "cltypes.h"
27
+#include "clamav-types.h"
28 28
 #include "fmap.h"
29 29
 #include "others.h"
30 30
 
... ...
@@ -28,7 +28,6 @@
28 28
 #include <errno.h>
29 29
 
30 30
 #include "clamav.h"
31
-#include "cltypes.h"
32 31
 #include "others.h"
33 32
 #include "matcher.h"
34 33
 #include "matcher-ac.h"
... ...
@@ -30,7 +30,7 @@
30 30
 
31 31
 #include <sys/types.h>
32 32
 
33
-#include "cltypes.h"
33
+#include "clamav-types.h"
34 34
 #include "dconf.h"
35 35
 #include "mpool.h"
36 36
 
... ...
@@ -26,7 +26,7 @@
26 26
 #include "clamav-config.h"
27 27
 #endif
28 28
 
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 #include "hashtab.h"
31 31
 
32 32
 enum CLI_HASH_TYPE {
... ...
@@ -27,7 +27,6 @@
27 27
 #endif
28 28
 
29 29
 #include "clamav.h"
30
-#include "cltypes.h"
31 30
 #include "dconf.h"
32 31
 #include "events.h"
33 32
 #include "others.h"
... ...
@@ -31,7 +31,7 @@
31 31
 
32 32
 #include <sys/types.h>
33 33
 
34
-#include "cltypes.h"
34
+#include "clamav-types.h"
35 35
 #include "dconf.h"
36 36
 #include "mpool.h"
37 37
 #include "regex_pcre.h"
... ...
@@ -45,7 +45,6 @@
45 45
 #include "special.h"
46 46
 #include "scanners.h"
47 47
 #include "str.h"
48
-#include "cltypes.h"
49 48
 #include "default.h"
50 49
 #include "macho.h"
51 50
 #include "fmap.h"
... ...
@@ -28,7 +28,6 @@
28 28
 #include "filetypes.h"
29 29
 #include "others.h"
30 30
 #include "execs.h"
31
-#include "cltypes.h"
32 31
 
33 32
 struct cli_target_info {
34 33
     off_t fsize;
... ...
@@ -33,7 +33,6 @@
33 33
 #include <zlib.h>
34 34
 
35 35
 #include "clamav.h"
36
-#include "cltypes.h"
37 36
 #include "others.h"
38 37
 #include "mbr.h"
39 38
 #include "prtn_intxn.h"
... ...
@@ -26,7 +26,7 @@
26 26
 #include "clamav-config.h"
27 27
 #endif
28 28
 
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 #include "others.h"
31 31
 
32 32
 #define MBR_SECTOR_SIZE 512
... ...
@@ -50,7 +50,6 @@
50 50
 #endif
51 51
 
52 52
 #include "clamav.h"
53
-#include "cltypes.h"
54 53
 #include "pe.h"
55 54
 #include "others.h"
56 55
 #include "mew.h"
... ...
@@ -26,7 +26,7 @@
26 26
 #include "clamav-config.h"
27 27
 #endif
28 28
 
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 
31 31
 struct lzmastate {
32 32
 	const char *p0;
... ...
@@ -23,7 +23,7 @@
23 23
 #define MPOOL_H
24 24
 
25 25
 #ifdef USE_MPOOL
26
-#include "cltypes.h"
26
+#include "clamav-types.h"
27 27
 typedef struct MP mpool_t;
28 28
 struct cl_engine;
29 29
 
... ...
@@ -42,7 +42,6 @@
42 42
 #endif
43 43
 
44 44
 #include "clamav.h"
45
-#include "cltypes.h"
46 45
 #include "others.h"
47 46
 #include "msdoc.h"
48 47
 #include "scanners.h"
... ...
@@ -33,7 +33,6 @@
33 33
 #include <string.h>
34 34
 
35 35
 #include "clamav.h"
36
-#include "cltypes.h"
37 36
 #include "others.h"
38 37
 #include "msexpand.h"
39 38
 #include "fmap.h"
... ...
@@ -33,7 +33,6 @@
33 33
 
34 34
 #include "clamav.h"
35 35
 #include "others.h"
36
-#include "cltypes.h"
37 36
 #include "nsis_bzlib.h"
38 37
 /* #include "zlib.h" */
39 38
 #include "nsis_zlib.h"
... ...
@@ -42,7 +42,6 @@
42 42
 #endif
43 43
 
44 44
 #include "clamav.h"
45
-#include "cltypes.h"
46 45
 #include "others.h"
47 46
 #include "hwp.h"
48 47
 #include "ole2_extract.h"
... ...
@@ -24,7 +24,6 @@
24 24
 #endif
25 25
 
26 26
 #include "clamav.h"
27
-#include "cltypes.h"
28 27
 #include "filetypes.h"
29 28
 #include "others.h"
30 29
 #include "unzip.h"
... ...
@@ -68,7 +68,6 @@
68 68
 
69 69
 #include "clamav.h"
70 70
 #include "others.h"
71
-#include "cltypes.h"
72 71
 #include "regex/regex.h"
73 72
 #include "ltdl.h"
74 73
 #include "matcher-ac.h"
... ...
@@ -38,7 +38,6 @@
38 38
 
39 39
 #include <stdio.h>
40 40
 #include <stdlib.h>
41
-#include "cltypes.h"
42 41
 
43 42
 #include "clamav.h"
44 43
 #include "dconf.h"
... ...
@@ -55,7 +55,6 @@
55 55
 
56 56
 #include "clamav.h"
57 57
 #include "others.h"
58
-#include "cltypes.h"
59 58
 #include "regex/regex.h"
60 59
 #include "ltdl.h"
61 60
 #include "matcher-ac.h"
... ...
@@ -26,7 +26,7 @@
26 26
 #include "clamav-config.h"
27 27
 #endif
28 28
 
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 #include "rebuildpe.h"
31 31
 
32 32
 int cli_unfsg(const char *, char *, int, int, const char **, char **);
... ...
@@ -62,7 +62,6 @@
62 62
 #include <time.h>
63 63
 #include <stdarg.h>
64 64
 
65
-#include "cltypes.h"
66 65
 #include "clamav.h"
67 66
 #include "others.h"
68 67
 #include "pe.h"
... ...
@@ -28,7 +28,6 @@
28 28
 #include "clamav.h"
29 29
 #include "execs.h"
30 30
 #include "others.h"
31
-#include "cltypes.h"
32 31
 #include "fmap.h"
33 32
 #include "bcfeatures.h"
34 33
 /** @file */
... ...
@@ -36,7 +36,7 @@
36 36
 /*TODO: maybe we need a GCC version check too here */
37 37
 #include <pthread.h>
38 38
 #include <assert.h>
39
-#include "cltypes.h"
39
+#include "clamav-types.h"
40 40
 
41 41
 enum perf_log_sumable {
42 42
 	RAW_BYTES_SCANNED,
... ...
@@ -54,7 +54,6 @@
54 54
 #include <string.h>
55 55
 
56 56
 #include "clamav.h"
57
-#include "cltypes.h"
58 57
 #include "rebuildpe.h"
59 58
 #include "execs.h"
60 59
 #include "others.h"
... ...
@@ -22,7 +22,7 @@
22 22
 #ifndef __PETITE_H
23 23
 #define __PETITE_H
24 24
 
25
-#include "cltypes.h"
25
+#include "clamav-types.h"
26 26
 #include "pe.h"
27 27
 
28 28
 int petite_inflate2x_1to9(char *buf, uint32_t minrva, uint32_t bufsz, struct cli_exe_section *sections, unsigned int sectcount, uint32_t Imagebase, uint32_t pep, int desc, int version, uint32_t ResRva, uint32_t ResSize);
... ...
@@ -36,7 +36,6 @@
36 36
 #include <ctype.h>
37 37
 
38 38
 #include "clamav.h"
39
-#include "cltypes.h"
40 39
 #include "others.h"
41 40
 #include "htmlnorm.h"
42 41
 #include "phishcheck.h"
... ...
@@ -24,7 +24,6 @@
24 24
 #endif
25 25
 
26 26
 #include "clamav.h"
27
-#include "cltypes.h"
28 27
 #include "others.h"
29 28
 #include "prtn_intxn.h"
30 29
 
... ...
@@ -26,7 +26,7 @@
26 26
 #include "clamav-config.h"
27 27
 #endif
28 28
 
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 #include "others.h"
31 31
 
32 32
 #define PRTN_INTXN_DETECTION "heuristic.partitionintersection"
... ...
@@ -34,7 +34,6 @@
34 34
 
35 35
 #include "clamav.h"
36 36
 #include "platform.h"
37
-#include "cltypes.h"
38 37
 #include "others.h"
39 38
 
40 39
 static inline char	*med3(char *, char *, char *, int (*)(const void *, const void *));
... ...
@@ -58,7 +58,6 @@
58 58
 #include "filetypes.h"
59 59
 #include "filetypes_int.h"
60 60
 #include "readdb.h"
61
-#include "cltypes.h"
62 61
 #include "default.h"
63 62
 #include "dsig.h"
64 63
 #include "asn1.h"
... ...
@@ -24,7 +24,6 @@
24 24
 #include "clamav.h"
25 25
 #include "matcher.h"
26 26
 #include "str.h"
27
-#include "cltypes.h"
28 27
 #include "cvd.h"
29 28
 
30 29
 #ifdef HAVE_YARA
... ...
@@ -22,7 +22,7 @@
22 22
 #ifndef __REBUILDPE_H
23 23
 #define __REBUILDPE_H
24 24
 
25
-#include "cltypes.h"
25
+#include "clamav-types.h"
26 26
 #include "execs.h"
27 27
 
28 28
 int cli_rebuildpe(char *, struct cli_exe_section *, int, uint32_t, uint32_t, uint32_t, uint32_t, int);
... ...
@@ -35,7 +35,6 @@
35 35
 #endif
36 36
 
37 37
 #include "clamav.h"
38
-#include "cltypes.h"
39 38
 #include "others.h"
40 39
 #include "regex_pcre.h"
41 40
 
... ...
@@ -37,7 +37,7 @@
37 37
 #include <pcre.h>
38 38
 #endif
39 39
 
40
-#include "cltypes.h"
40
+#include "clamav-types.h"
41 41
 #include "mpool.h"
42 42
 
43 43
 /* used for setting overrides */
... ...
@@ -25,7 +25,7 @@
25 25
 #define _SF_BASE64DECODE_H_
26 26
 
27 27
 #include <stdio.h>
28
-#include "cltypes.h"
28
+#include "clamav-types.h"
29 29
 
30 30
 int sf_base64decode(uint8_t*, size_t, uint8_t*, size_t, size_t*); 
31 31
 
... ...
@@ -37,7 +37,6 @@
37 37
 
38 38
 #include "clamav.h"
39 39
 #include "others.h"
40
-#include "cltypes.h"
41 40
 #include "special.h"
42 41
 #include "matcher.h"
43 42
 
... ...
@@ -55,7 +55,6 @@
55 55
 #include <string.h>
56 56
 
57 57
 #include "clamav.h"
58
-#include "cltypes.h"
59 58
 #include "pe.h"
60 59
 #include "rebuildpe.h"
61 60
 #include "execs.h"
... ...
@@ -22,7 +22,7 @@
22 22
 #ifndef __SPIN_H
23 23
 #define __SPIN_H
24 24
 
25
-#include "cltypes.h"
25
+#include "clamav-types.h"
26 26
 #include "rebuildpe.h"
27 27
 
28 28
 int unspin(char *, int, struct cli_exe_section *, int, uint32_t, int, cli_ctx *);
... ...
@@ -41,7 +41,6 @@
41 41
 #include "clamav.h"
42 42
 #include "others.h"
43 43
 #include "matcher.h"
44
-#include "cltypes.h"
45 44
 #include "jsparse/textbuf.h"
46 45
 #include "platform.h"
47 46
 
... ...
@@ -30,7 +30,6 @@
30 30
 #include <limits.h>
31 31
 
32 32
 #include "clamav.h"
33
-#include "cltypes.h"
34 33
 #include "clamav.h"
35 34
 
36 35
 #define SIZE_T_CHARLEN ( (sizeof(size_t) * CHAR_BIT + 2) / 3 + 1 )
... ...
@@ -45,7 +45,6 @@
45 45
 #include <time.h>
46 46
 #include <zlib.h>
47 47
 
48
-#include "cltypes.h"
49 48
 #include "swf.h"
50 49
 #include "clamav.h"
51 50
 #include "scanners.h"
... ...
@@ -33,7 +33,6 @@
33 33
 #include <unistd.h>
34 34
 #endif
35 35
 
36
-#include "cltypes.h"
37 36
 #include "clamav.h"
38 37
 #include "others.h"
39 38
 
... ...
@@ -34,11 +34,9 @@
34 34
 #include <sys/types.h>
35 35
 #include <sys/stat.h>
36 36
 #include <fcntl.h>
37
-#include <clamav.h>
38 37
 #include <ctype.h>
39 38
 
40 39
 #include "clamav.h"
41
-#include "cltypes.h"
42 40
 #include "others.h"
43 41
 #include "unarj.h"
44 42
 
... ...
@@ -24,7 +24,7 @@
24 24
 #ifndef _UNIQ_H
25 25
 #define _UNIQ_H
26 26
 
27
-#include "cltypes.h"
27
+#include "clamav-types.h"
28 28
 
29 29
 struct UNIQMD5 {
30 30
   struct UNIQMD5 *next;
... ...
@@ -112,7 +112,6 @@ nsp1:00435A5A                 push    8000h
112 112
 
113 113
 #include <stdlib.h>
114 114
 
115
-#include "cltypes.h"
116 115
 #include "clamav.h"
117 116
 #include "others.h"
118 117
 #include "rebuildpe.h"
... ...
@@ -22,7 +22,7 @@
22 22
 #ifndef __UNSP_H
23 23
 #define __UNSP_H
24 24
 
25
-#include "cltypes.h"
25
+#include "clamav-types.h"
26 26
 #include "others.h"
27 27
 
28 28
 struct UNSP {
... ...
@@ -41,7 +41,6 @@
41 41
 #endif
42 42
 
43 43
 #include "clamav.h"
44
-#include "cltypes.h"
45 44
 #include "pe.h"
46 45
 #include "rebuildpe.h"
47 46
 #include "others.h"
... ...
@@ -26,7 +26,7 @@
26 26
 #include "clamav-config.h"
27 27
 #endif
28 28
 
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 
31 31
 int unupack(int, char *, uint32_t, char *, uint32_t, uint32_t, uint32_t, uint32_t, int);
32 32
 
... ...
@@ -54,7 +54,6 @@
54 54
 #include <string.h>
55 55
 
56 56
 #include "clamav.h"
57
-#include "cltypes.h"
58 57
 #include "others.h"
59 58
 #include "upx.h"
60 59
 #include "str.h"
... ...
@@ -22,7 +22,7 @@
22 22
 #ifndef __UPX_H
23 23
 #define __UPX_H
24 24
 
25
-#include "cltypes.h"
25
+#include "clamav-types.h"
26 26
 
27 27
 int upx_inflate2b(const char *, uint32_t, char *, uint32_t *, uint32_t, uint32_t, uint32_t);
28 28
 int upx_inflate2d(const char *, uint32_t, char *, uint32_t *, uint32_t, uint32_t, uint32_t);
... ...
@@ -25,7 +25,7 @@
25 25
 #define __VBA_EXTRACT_H
26 26
 
27 27
 #include "others.h"
28
-#include "cltypes.h"
28
+#include "clamav-types.h"
29 29
 #include "uniq.h"
30 30
 
31 31
 typedef struct vba_project_tag {
... ...
@@ -24,7 +24,6 @@
24 24
 #endif
25 25
 
26 26
 #include "clamav.h"
27
-#include "cltypes.h"
28 27
 #include "others.h"
29 28
 #include "execs.h"
30 29
 #include "wwunpack.h"
... ...
@@ -22,7 +22,7 @@
22 22
 #ifndef __WWP32_H
23 23
 #define __WWP32_H
24 24
 
25
-#include "cltypes.h"
25
+#include "clamav-types.h"
26 26
 #include "execs.h"
27 27
 
28 28
 int wwunpack(uint8_t *, uint32_t, uint8_t *, struct cli_exe_section *, uint16_t, uint32_t, int);
... ...
@@ -26,7 +26,7 @@
26 26
 #include "clamav-config.h"
27 27
 #endif
28 28
 
29
-#include "cltypes.h"
29
+#include "clamav-types.h"
30 30
 #include "others.h"
31 31
 
32 32
 #ifndef HAVE_ATTRIB_PACKED
... ...
@@ -23,7 +23,7 @@
23 23
 #define __XZ_IFACE_H
24 24
 
25 25
 #include "7z/Xz.h"
26
-#include "cltypes.h"
26
+#include "clamav-types.h"
27 27
 #include "others.h"
28 28
 
29 29
 struct CLI_XZ {
... ...
@@ -33,7 +33,6 @@
33 33
 #endif
34 34
 
35 35
 #include "clamav.h"
36
-#include "cltypes.h"
37 36
 #include "pe.h"
38 37
 #include "others.h"
39 38
 #include "yc.h"
... ...
@@ -24,7 +24,7 @@
24 24
 
25 25
 #include "pe.h"
26 26
 #include "execs.h"
27
-#include "cltypes.h"
27
+#include "clamav-types.h"
28 28
 
29 29
 int yc_decrypt(cli_ctx *, char *, unsigned int, struct cli_exe_section *, unsigned int, uint32_t, int,uint32_t,int16_t);
30 30
 
... ...
@@ -175,6 +175,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
175 175
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
176 176
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
177 177
 	$(top_srcdir)/m4/reorganization/strni.m4 \
178
+	$(top_srcdir)/m4/reorganization/types.m4 \
178 179
 	$(top_srcdir)/configure.ac
179 180
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
180 181
 	$(ACLOCAL_M4)
... ...
@@ -328,6 +329,8 @@ CXXDEPMODE = @CXXDEPMODE@
328 328
 CXXFLAGS = @CXXFLAGS@
329 329
 CYGPATH_W = @CYGPATH_W@
330 330
 DBDIR = @DBDIR@
331
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
332
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
331 333
 DEFS = @DEFS@ -DCL_NOTHREADS
332 334
 DEPDIR = @DEPDIR@
333 335
 DLLTOOL = @DLLTOOL@
... ...
@@ -342,6 +345,7 @@ FGREP = @FGREP@
342 342
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
343 343
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
344 344
 GCOV = @GCOV@
345
+GENERATE_WARNING = @GENERATE_WARNING@
345 346
 GENHTML = @GENHTML@
346 347
 GETENT = @GETENT@
347 348
 GPERF = @GPERF@
... ...
@@ -356,6 +360,11 @@ INSTALL_DATA = @INSTALL_DATA@
356 356
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
357 357
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
358 358
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
359
+INT16_DEF = @INT16_DEF@
360
+INT32_DEF = @INT32_DEF@
361
+INT64_DEF = @INT64_DEF@
362
+INT8_DEF = @INT8_DEF@
363
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
359 364
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
360 365
 JSON_LDFLAGS = @JSON_LDFLAGS@
361 366
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -437,6 +446,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
437 437
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
438 438
 THREAD_LIBS = @THREAD_LIBS@
439 439
 TH_SAFE = @TH_SAFE@
440
+UINT16_DEF = @UINT16_DEF@
441
+UINT32_DEF = @UINT32_DEF@
442
+UINT64_DEF = @UINT64_DEF@
443
+UINT8_DEF = @UINT8_DEF@
440 444
 VERSION = @VERSION@
441 445
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
442 446
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -164,6 +164,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
164 164
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/strni.m4 \
167
+	$(top_srcdir)/m4/reorganization/types.m4 \
167 168
 	$(top_srcdir)/configure.ac
168 169
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
169 170
 	$(ACLOCAL_M4)
... ...
@@ -380,6 +381,8 @@ CXXDEPMODE = @CXXDEPMODE@
380 380
 CXXFLAGS = @CXXFLAGS@
381 381
 CYGPATH_W = @CYGPATH_W@
382 382
 DBDIR = @DBDIR@
383
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
384
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
383 385
 DEFS = @DEFS@
384 386
 DEPDIR = @DEPDIR@
385 387
 DLLTOOL = @DLLTOOL@
... ...
@@ -394,6 +397,7 @@ FGREP = @FGREP@
394 394
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
395 395
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
396 396
 GCOV = @GCOV@
397
+GENERATE_WARNING = @GENERATE_WARNING@
397 398
 GENHTML = @GENHTML@
398 399
 GETENT = @GETENT@
399 400
 GPERF = @GPERF@
... ...
@@ -408,6 +412,11 @@ INSTALL_DATA = @INSTALL_DATA@
408 408
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
409 409
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
410 410
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
411
+INT16_DEF = @INT16_DEF@
412
+INT32_DEF = @INT32_DEF@
413
+INT64_DEF = @INT64_DEF@
414
+INT8_DEF = @INT8_DEF@
415
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
411 416
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
412 417
 JSON_LDFLAGS = @JSON_LDFLAGS@
413 418
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -489,6 +498,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
489 489
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
490 490
 THREAD_LIBS = @THREAD_LIBS@
491 491
 TH_SAFE = @TH_SAFE@
492
+UINT16_DEF = @UINT16_DEF@
493
+UINT32_DEF = @UINT32_DEF@
494
+UINT64_DEF = @UINT64_DEF@
495
+UINT8_DEF = @UINT8_DEF@
492 496
 VERSION = @VERSION@
493 497
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
494 498
 WERR_CFLAGS = @WERR_CFLAGS@
495 499
new file mode 100644
... ...
@@ -0,0 +1,94 @@
0
+# Define a warning for the user, so they don't edit clamav-types.h
1
+AC_SUBST(GENERATE_WARNING, ["Warning: This file is generated with ./configure. Do not edit!"])
2
+
3
+# Initialize definitions to empty strings, in case they're not needed.
4
+AC_SUBST(INT8_DEF, [""])
5
+AC_SUBST(UINT8_DEF, [""])
6
+AC_SUBST(INT16_DEF, [""])
7
+AC_SUBST(UINT16_DEF, [""])
8
+AC_SUBST(INT32_DEF, [""])
9
+AC_SUBST(UINT32_DEF, [""])
10
+AC_SUBST(INT64_DEF, [""])
11
+AC_SUBST(UINT64_DEF, [""])
12
+
13
+# Check sys/int_types.h first, to give it higher priority on Solaris
14
+AC_CHECK_HEADER(
15
+    [sys/int_types.h], 
16
+    [ dnl Found
17
+        AC_SUBST(INT_TYPES_HEADER, ["#include <sys/int_types.h>"])
18
+    ], 
19
+    [ dnl Not-found
20
+        AC_CHECK_HEADER(
21
+            [inttypes.h], 
22
+            [ dnl Found; C99: inttypes.h should include stdint.h; more universal because some older platforms don't provide stdint.h
23
+                AC_SUBST(INT_TYPES_HEADER, ["#include <inttypes.h>"])
24
+            ], 
25
+            [ dnl Not-found
26
+                AC_CHECK_HEADER(
27
+                    [stdint.h], 
28
+                    [ dnl Found
29
+                        AC_SUBST(INT_TYPES_HEADER, ["#include <stdint.h>"])
30
+                    ], 
31
+                    [ dnl Not-found
32
+                        AC_COMPILE_IFELSE(
33
+                            [ dnl Check if Windows (Cygwin), using auto-defined _MSC_VER
34
+                                AC_LANG_PROGRAM([
35
+                                    [
36
+                                        #ifndef _MSC_VER
37
+                                            error: _MSC_VER not found!
38
+                                        #endif]
39
+                                    ]
40
+                                )
41
+                            ],
42
+                            [ dnl It's Windows, stdint.h should exist.
43
+                                AC_SUBST(INT_TYPES_HEADER, ["#include <stdint.h>"])
44
+                            ],
45
+                            [ dnl No int types header available. We'll define the types manually.
46
+                                AC_SUBST(INT8_DEF, ["typedef signed char int8_t;"])
47
+                                AC_SUBST(UINT8_DEF, ["typedef unsigned char uint8_t;"])
48
+
49
+                                if test $ac_cv_sizeof_int = 2; then 
50
+                                    AC_SUBST(INT16_DEF, ["typedef signed int int16_t;"])
51
+                                    AC_SUBST(UINT16_DEF, ["typedef unsigned int uint16_t;"])
52
+                                elif test $ac_cv_sizeof_short = 2; then 
53
+                                    AC_SUBST(INT16_DEF, ["typedef signed short int16_t;"])
54
+                                    AC_SUBST(UINT16_DEF, ["typedef unsigned short uint16_t;"])
55
+                                fi
56
+
57
+                                if test $ac_cv_sizeof_int = 4; then 
58
+                                    AC_SUBST(INT32_DEF, ["typedef signed int int32_t;"])
59
+                                    AC_SUBST(UINT32_DEF, ["typedef unsigned int uint32_t;"])
60
+                                elif test $ac_cv_sizeof_long = 4; then 
61
+                                    AC_SUBST(INT32_DEF, ["typedef signed long int32_t;"])
62
+                                    AC_SUBST(UINT32_DEF, ["typedef unsigned long uint32_t;"])
63
+                                fi
64
+
65
+                                if test $ac_cv_sizeof_long = 8; then 
66
+                                    AC_SUBST(INT64_DEF, ["typedef signed long int64_t;"])
67
+                                    AC_SUBST(UINT64_DEF, ["typedef unsigned long uint64_t;"])
68
+                                elif test $ac_cv_sizeof_long_long = 8; then 
69
+                                    AC_SUBST(INT64_DEF, ["typedef signed long long int64_t;"])
70
+                                    AC_SUBST(UINT64_DEF, ["typedef unsigned long long uint64_t;"])
71
+                                fi
72
+                            ]
73
+                        )
74
+                    ],
75
+                )
76
+            ],
77
+        )
78
+    ],
79
+)
80
+
81
+# If _SF64_PREFIX isn't defined, this may be used.
82
+if test $ac_cv_sizeof_int = 4; then 
83
+    AC_SUBST(DEFINE_SF32_PREFIX, ["#define _SF32_PREFIX \"\""])
84
+elif test $ac_cv_sizeof_long = 4; then 
85
+    AC_SUBST(DEFINE_SF32_PREFIX, ["#define _SF32_PREFIX \"l\""])
86
+fi
87
+
88
+# If _SF32_PREFIX isn't defined, this may be used.
89
+if test $ac_cv_sizeof_long = 8; then 
90
+    AC_SUBST(DEFINE_SF64_PREFIX, ["#define _SF64_PREFIX \"l\""])
91
+elif test $ac_cv_sizeof_long_long = 8; then 
92
+    AC_SUBST(DEFINE_SF64_PREFIX, ["#define _SF64_PREFIX \"ll\""])
93
+fi
... ...
@@ -176,6 +176,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
176 176
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
177 177
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
178 178
 	$(top_srcdir)/m4/reorganization/strni.m4 \
179
+	$(top_srcdir)/m4/reorganization/types.m4 \
179 180
 	$(top_srcdir)/configure.ac
180 181
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
181 182
 	$(ACLOCAL_M4)
... ...
@@ -302,6 +303,8 @@ CXXDEPMODE = @CXXDEPMODE@
302 302
 CXXFLAGS = @CXXFLAGS@
303 303
 CYGPATH_W = @CYGPATH_W@
304 304
 DBDIR = @DBDIR@
305
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
306
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
305 307
 DEFS = @DEFS@ -DCL_NOTHREADS
306 308
 DEPDIR = @DEPDIR@
307 309
 DLLTOOL = @DLLTOOL@
... ...
@@ -316,6 +319,7 @@ FGREP = @FGREP@
316 316
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
317 317
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
318 318
 GCOV = @GCOV@
319
+GENERATE_WARNING = @GENERATE_WARNING@
319 320
 GENHTML = @GENHTML@
320 321
 GETENT = @GETENT@
321 322
 GPERF = @GPERF@
... ...
@@ -330,6 +334,11 @@ INSTALL_DATA = @INSTALL_DATA@
330 330
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
331 331
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
332 332
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
333
+INT16_DEF = @INT16_DEF@
334
+INT32_DEF = @INT32_DEF@
335
+INT64_DEF = @INT64_DEF@
336
+INT8_DEF = @INT8_DEF@
337
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
333 338
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
334 339
 JSON_LDFLAGS = @JSON_LDFLAGS@
335 340
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -411,6 +420,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
411 411
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
412 412
 THREAD_LIBS = @THREAD_LIBS@
413 413
 TH_SAFE = @TH_SAFE@
414
+UINT16_DEF = @UINT16_DEF@
415
+UINT32_DEF = @UINT32_DEF@
416
+UINT64_DEF = @UINT64_DEF@
417
+UINT8_DEF = @UINT8_DEF@
414 418
 VERSION = @VERSION@
415 419
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
416 420
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -35,7 +35,6 @@
35 35
 
36 36
 #include "libclamav/clamav.h"
37 37
 #include "libclamav/vba_extract.h"
38
-#include "libclamav/cltypes.h"
39 38
 #include "libclamav/ole2_extract.h"
40 39
 #include "shared/output.h"
41 40
 
... ...
@@ -157,6 +157,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
157 157
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
158 158
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
159 159
 	$(top_srcdir)/m4/reorganization/strni.m4 \
160
+	$(top_srcdir)/m4/reorganization/types.m4 \
160 161
 	$(top_srcdir)/configure.ac
161 162
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
162 163
 	$(ACLOCAL_M4)
... ...
@@ -232,6 +233,8 @@ CXXDEPMODE = @CXXDEPMODE@
232 232
 CXXFLAGS = @CXXFLAGS@
233 233
 CYGPATH_W = @CYGPATH_W@
234 234
 DBDIR = @DBDIR@
235
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
236
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
235 237
 DEFS = @DEFS@
236 238
 DEPDIR = @DEPDIR@
237 239
 DLLTOOL = @DLLTOOL@
... ...
@@ -246,6 +249,7 @@ FGREP = @FGREP@
246 246
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
247 247
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
248 248
 GCOV = @GCOV@
249
+GENERATE_WARNING = @GENERATE_WARNING@
249 250
 GENHTML = @GENHTML@
250 251
 GETENT = @GETENT@
251 252
 GPERF = @GPERF@
... ...
@@ -260,6 +264,11 @@ INSTALL_DATA = @INSTALL_DATA@
260 260
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
261 261
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
262 262
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
263
+INT16_DEF = @INT16_DEF@
264
+INT32_DEF = @INT32_DEF@
265
+INT64_DEF = @INT64_DEF@
266
+INT8_DEF = @INT8_DEF@
267
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
263 268
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
264 269
 JSON_LDFLAGS = @JSON_LDFLAGS@
265 270
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -341,6 +350,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
341 341
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
342 342
 THREAD_LIBS = @THREAD_LIBS@
343 343
 TH_SAFE = @TH_SAFE@
344
+UINT16_DEF = @UINT16_DEF@
345
+UINT32_DEF = @UINT32_DEF@
346
+UINT64_DEF = @UINT64_DEF@
347
+UINT8_DEF = @UINT8_DEF@
344 348
 VERSION = @VERSION@
345 349
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
346 350
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -159,6 +159,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
159 159
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
160 160
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
161 161
 	$(top_srcdir)/m4/reorganization/strni.m4 \
162
+	$(top_srcdir)/m4/reorganization/types.m4 \
162 163
 	$(top_srcdir)/configure.ac
163 164
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
164 165
 	$(ACLOCAL_M4)
... ...
@@ -522,6 +523,8 @@ CXXDEPMODE = @CXXDEPMODE@
522 522
 CXXFLAGS = @CXXFLAGS@
523 523
 CYGPATH_W = @CYGPATH_W@
524 524
 DBDIR = @DBDIR@
525
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
526
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
525 527
 DEFS = @DEFS@
526 528
 DEPDIR = @DEPDIR@
527 529
 DLLTOOL = @DLLTOOL@
... ...
@@ -536,6 +539,7 @@ FGREP = @FGREP@
536 536
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
537 537
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
538 538
 GCOV = @GCOV@
539
+GENERATE_WARNING = @GENERATE_WARNING@
539 540
 GENHTML = @GENHTML@
540 541
 GETENT = @GETENT@
541 542
 GPERF = @GPERF@
... ...
@@ -550,6 +554,11 @@ INSTALL_DATA = @INSTALL_DATA@
550 550
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
551 551
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
552 552
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
553
+INT16_DEF = @INT16_DEF@
554
+INT32_DEF = @INT32_DEF@
555
+INT64_DEF = @INT64_DEF@
556
+INT8_DEF = @INT8_DEF@
557
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
553 558
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
554 559
 JSON_LDFLAGS = @JSON_LDFLAGS@
555 560
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -631,6 +640,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
631 631
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
632 632
 THREAD_LIBS = @THREAD_LIBS@
633 633
 TH_SAFE = @TH_SAFE@
634
+UINT16_DEF = @UINT16_DEF@
635
+UINT32_DEF = @UINT32_DEF@
636
+UINT64_DEF = @UINT64_DEF@
637
+UINT8_DEF = @UINT8_DEF@
634 638
 VERSION = @VERSION@
635 639
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
636 640
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -52,7 +52,6 @@
52 52
 #include "checks_common.h"
53 53
 #include "libclamav/clamav.h"
54 54
 #include "libclamav/version.h"
55
-#include "libclamav/cltypes.h"
56 55
 
57 56
 #ifdef CHECK_HAVE_LOOPS
58 57
 
... ...
@@ -1,36 +1,36 @@
1
-/*
2
- *  Copyright (C) 2015 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
3
- *  Copyright (C) 2009 Sourcefire, Inc.
4
- *
5
- *  Authors: aCaB <acab@clamav.net>
6
- *
7
- *  This program is free software; you can redistribute it and/or modify
8
- *  it under the terms of the GNU General Public License version 2 as
9
- *  published by the Free Software Foundation.
10
- *
11
- *  This program is distributed in the hope that it will be useful,
12
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
- *  GNU General Public License for more details.
15
- *
16
- *  You should have received a copy of the GNU General Public License
17
- *  along with this program; if not, write to the Free Software
18
- *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
- *  MA 02110-1301, USA.
20
- */
21
-
22
-#ifndef __RESOLV_H
23
-#define __RESOLV_H
24
-
25
-#if HAVE_CONFIG_H
26
-#include "clamav-config.h"
27
-#endif
28
-
29
-#include <Windns.h>
30
-#include "cltypes.h"
31
-
32
-#define C_IN 1
33
-
1
+/*
2
+ *  Copyright (C) 2015 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
3
+ *  Copyright (C) 2009 Sourcefire, Inc.
4
+ *
5
+ *  Authors: aCaB <acab@clamav.net>
6
+ *
7
+ *  This program is free software; you can redistribute it and/or modify
8
+ *  it under the terms of the GNU General Public License version 2 as
9
+ *  published by the Free Software Foundation.
10
+ *
11
+ *  This program is distributed in the hope that it will be useful,
12
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+ *  GNU General Public License for more details.
15
+ *
16
+ *  You should have received a copy of the GNU General Public License
17
+ *  along with this program; if not, write to the Free Software
18
+ *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
+ *  MA 02110-1301, USA.
20
+ */
21
+
22
+#ifndef __RESOLV_H
23
+#define __RESOLV_H
24
+
25
+#if HAVE_CONFIG_H
26
+#include "clamav-config.h"
27
+#endif
28
+
29
+#include <Windns.h>
30
+#include "clamav-types.h"
31
+
32
+#define C_IN 1
33
+
34 34
 #define T_A DNS_TYPE_A
35 35
 #define T_NS DNS_TYPE_NS
36 36
 #define T_MD DNS_TYPE_MD
... ...
@@ -93,31 +93,31 @@
93 93
 #define T_WINS DNS_TYPE_WINS
94 94
 #define T_WINSR DNS_TYPE_WINSR
95 95
 #define T_NBSTAT DNS_TYPE_NBSTAT
96
-
97
-#ifndef DNS_QUERY_NO_HOSTS_FILE
98
-#define DNS_QUERY_NO_HOSTS_FILE 0
99
-#endif
100
-
101
-typedef struct {
102
-	unsigned short	id; /* fake stuff */
103
-} HEADER;
104
-
105
-#define INT16SZ 2
106
-
107
-#define GETSHORT(var, ptr) do { \
108
-    var = ((uint16_t)(*(uint8_t *)ptr++)) << 8; \
109
-    var |= *(uint8_t *)ptr++; \
110
-    } while (0)
111
-
112
-#define GETLONG(var, ptr) do { \
113
-    var = ((uint32_t)(*(uint8_t *)ptr++)) << 24; \
114
-    var = ((uint32_t)(*(uint8_t *)ptr++)) << 16; \
115
-    var = ((uint32_t)(*(uint8_t *)ptr++)) << 8; \
116
-    var |= *(uint8_t *)ptr++; \
117
-    } while (0)
118
-
119
-int res_init(void);
120
-int res_query(const char *dname, int class, int type, unsigned char *answer, int anslen);
121
-int dn_expand(unsigned char *msg, unsigned char *eomorig, unsigned char *comp_dn, char *exp_dn, int length);
122
-
123
-#endif
96
+
97
+#ifndef DNS_QUERY_NO_HOSTS_FILE
98
+#define DNS_QUERY_NO_HOSTS_FILE 0
99
+#endif
100
+
101
+typedef struct {
102
+	unsigned short	id; /* fake stuff */
103
+} HEADER;
104
+
105
+#define INT16SZ 2
106
+
107
+#define GETSHORT(var, ptr) do { \
108
+    var = ((uint16_t)(*(uint8_t *)ptr++)) << 8; \
109
+    var |= *(uint8_t *)ptr++; \
110
+    } while (0)
111
+
112
+#define GETLONG(var, ptr) do { \
113
+    var = ((uint32_t)(*(uint8_t *)ptr++)) << 24; \
114
+    var = ((uint32_t)(*(uint8_t *)ptr++)) << 16; \
115
+    var = ((uint32_t)(*(uint8_t *)ptr++)) << 8; \
116
+    var |= *(uint8_t *)ptr++; \
117
+    } while (0)
118
+
119
+int res_init(void);
120
+int res_query(const char *dname, int class, int type, unsigned char *answer, int anslen);
121
+int dn_expand(unsigned char *msg, unsigned char *eomorig, unsigned char *comp_dn, char *exp_dn, int length);
122
+
123
+#endif