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 \
... ...
@@ -204,6 +206,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
204 204
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
205 205
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
206 206
 	$(top_srcdir)/m4/reorganization/strni.m4 \
207
+	$(top_srcdir)/m4/reorganization/types.m4 \
207 208
 	$(top_srcdir)/configure.ac
208 209
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
209 210
 	$(ACLOCAL_M4)
... ...
@@ -216,7 +219,8 @@ CONFIG_CLEAN_FILES = clamav-config libclamav.pc platform.h \
216 216
 	docs/man/clambc.1 docs/man/clamconf.1 docs/man/clamd.8 \
217 217
 	docs/man/clamd.conf.5 docs/man/clamdscan.1 docs/man/clamscan.1 \
218 218
 	docs/man/freshclam.1 docs/man/freshclam.conf.5 \
219
-	docs/man/sigtool.1 docs/man/clamdtop.1 docs/man/clamsubmit.1
219
+	docs/man/sigtool.1 docs/man/clamdtop.1 docs/man/clamsubmit.1 \
220
+	clamav-types.h
220 221
 CONFIG_CLEAN_VPATH_FILES =
221 222
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
222 223
 am__vpath_adj = case $$p in \
... ...
@@ -245,7 +249,8 @@ am__uninstall_files_from_dir = { \
245 245
     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
246 246
          $(am__cd) "$$dir" && rm -f $$files; }; \
247 247
   }
248
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"
248
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" \
249
+	"$(DESTDIR)$(includedir)"
249 250
 SCRIPTS = $(bin_SCRIPTS)
250 251
 AM_V_P = $(am__v_P_@AM_V@)
251 252
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
... ...
@@ -275,6 +280,7 @@ am__can_run_installinfo = \
275 275
     *) (install-info --version) >/dev/null 2>&1;; \
276 276
   esac
277 277
 DATA = $(pkgconfig_DATA)
278
+HEADERS = $(nodist_include_HEADERS)
278 279
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
279 280
   distclean-recursive maintainer-clean-recursive
280 281
 am__recursive_targets = \
... ...
@@ -394,6 +400,8 @@ CXXDEPMODE = @CXXDEPMODE@
394 394
 CXXFLAGS = @CXXFLAGS@
395 395
 CYGPATH_W = @CYGPATH_W@
396 396
 DBDIR = @DBDIR@
397
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
398
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
397 399
 DEFS = @DEFS@
398 400
 DEPDIR = @DEPDIR@
399 401
 DLLTOOL = @DLLTOOL@
... ...
@@ -408,6 +416,7 @@ FGREP = @FGREP@
408 408
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
409 409
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
410 410
 GCOV = @GCOV@
411
+GENERATE_WARNING = @GENERATE_WARNING@
411 412
 GENHTML = @GENHTML@
412 413
 GETENT = @GETENT@
413 414
 GPERF = @GPERF@
... ...
@@ -422,6 +431,11 @@ INSTALL_DATA = @INSTALL_DATA@
422 422
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
423 423
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
424 424
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
425
+INT16_DEF = @INT16_DEF@
426
+INT32_DEF = @INT32_DEF@
427
+INT64_DEF = @INT64_DEF@
428
+INT8_DEF = @INT8_DEF@
429
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
425 430
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
426 431
 JSON_LDFLAGS = @JSON_LDFLAGS@
427 432
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -503,6 +517,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
503 503
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
504 504
 THREAD_LIBS = @THREAD_LIBS@
505 505
 TH_SAFE = @TH_SAFE@
506
+UINT16_DEF = @UINT16_DEF@
507
+UINT32_DEF = @UINT32_DEF@
508
+UINT64_DEF = @UINT64_DEF@
509
+UINT8_DEF = @UINT8_DEF@
506 510
 VERSION = @VERSION@
507 511
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
508 512
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -583,6 +601,7 @@ EXTRA_DIST = examples shared libclamav.pc.in COPYING.bzip2 COPYING.lzma COPYING.
583 583
 bin_SCRIPTS = clamav-config
584 584
 pkgconfigdir = $(libdir)/pkgconfig
585 585
 pkgconfig_DATA = libclamav.pc
586
+nodist_include_HEADERS = clamav-types.h
586 587
 
587 588
 # don't complain that configuration files and databases are not removed, this is intended
588 589
 distuninstallcheck_listfiles = find . -type f ! -name clamd.conf ! -name freshclam.conf ! -name daily.cvd ! -name main.cvd -print
... ...
@@ -681,6 +700,8 @@ docs/man/clamdtop.1: $(top_builddir)/config.status $(top_srcdir)/docs/man/clamdt
681 681
 	cd $(top_builddir) && $(SHELL) ./config.status $@
682 682
 docs/man/clamsubmit.1: $(top_builddir)/config.status $(top_srcdir)/docs/man/clamsubmit.1.in
683 683
 	cd $(top_builddir) && $(SHELL) ./config.status $@
684
+clamav-types.h: $(top_builddir)/config.status $(srcdir)/clamav-types.h.in
685
+	cd $(top_builddir) && $(SHELL) ./config.status $@
684 686
 install-binSCRIPTS: $(bin_SCRIPTS)
685 687
 	@$(NORMAL_INSTALL)
686 688
 	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
... ...
@@ -761,6 +782,27 @@ uninstall-pkgconfigDATA:
761 761
 	@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
762 762
 	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
763 763
 	dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
764
+install-nodist_includeHEADERS: $(nodist_include_HEADERS)
765
+	@$(NORMAL_INSTALL)
766
+	@list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \
767
+	if test -n "$$list"; then \
768
+	  echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
769
+	  $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
770
+	fi; \
771
+	for p in $$list; do \
772
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
773
+	  echo "$$d$$p"; \
774
+	done | $(am__base_list) | \
775
+	while read files; do \
776
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
777
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
778
+	done
779
+
780
+uninstall-nodist_includeHEADERS:
781
+	@$(NORMAL_UNINSTALL)
782
+	@list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \
783
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
784
+	dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
764 785
 
765 786
 # This directory's subdirectories are mostly independent; you can cd
766 787
 # into them and run 'make' without going through this Makefile.
... ...
@@ -1060,10 +1102,10 @@ distcleancheck: distclean
1060 1060
 	       exit 1; } >&2
1061 1061
 check-am: all-am
1062 1062
 check: check-recursive
1063
-all-am: Makefile $(SCRIPTS) $(DATA) clamav-config.h
1063
+all-am: Makefile $(SCRIPTS) $(DATA) $(HEADERS) clamav-config.h
1064 1064
 installdirs: installdirs-recursive
1065 1065
 installdirs-am:
1066
-	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)"; do \
1066
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \
1067 1067
 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
1068 1068
 	done
1069 1069
 install: install-recursive
... ...
@@ -1119,7 +1161,7 @@ info: info-recursive
1119 1119
 
1120 1120
 info-am:
1121 1121
 
1122
-install-data-am: install-pkgconfigDATA
1122
+install-data-am: install-nodist_includeHEADERS install-pkgconfigDATA
1123 1123
 
1124 1124
 install-dvi: install-dvi-recursive
1125 1125
 
... ...
@@ -1165,7 +1207,8 @@ ps: ps-recursive
1165 1165
 
1166 1166
 ps-am:
1167 1167
 
1168
-uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA
1168
+uninstall-am: uninstall-binSCRIPTS uninstall-nodist_includeHEADERS \
1169
+	uninstall-pkgconfigDATA
1169 1170
 
1170 1171
 .MAKE: $(am__recursive_targets) all install-am install-strip
1171 1172
 
... ...
@@ -1180,13 +1223,14 @@ uninstall-am: uninstall-binSCRIPTS uninstall-pkgconfigDATA
1180 1180
 	install-binSCRIPTS install-data install-data-am install-dvi \
1181 1181
 	install-dvi-am install-exec install-exec-am install-html \
1182 1182
 	install-html-am install-info install-info-am install-man \
1183
-	install-pdf install-pdf-am install-pkgconfigDATA install-ps \
1184
-	install-ps-am install-strip installcheck installcheck-am \
1185
-	installcheck-binSCRIPTS installdirs installdirs-am \
1186
-	maintainer-clean maintainer-clean-generic mostlyclean \
1187
-	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
1188
-	tags tags-am uninstall uninstall-am uninstall-binSCRIPTS \
1189
-	uninstall-pkgconfigDATA
1183
+	install-nodist_includeHEADERS install-pdf install-pdf-am \
1184
+	install-pkgconfigDATA install-ps install-ps-am install-strip \
1185
+	installcheck installcheck-am installcheck-binSCRIPTS \
1186
+	installdirs installdirs-am maintainer-clean \
1187
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
1188
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
1189
+	uninstall-am uninstall-binSCRIPTS \
1190
+	uninstall-nodist_includeHEADERS uninstall-pkgconfigDATA
1190 1191
 
1191 1192
 lcov:
1192 1193
 	($(MAKE); cd unit_tests; $(MAKE) lcov)
... ...
@@ -178,6 +178,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
178 178
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
179 179
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
180 180
 	$(top_srcdir)/m4/reorganization/strni.m4 \
181
+	$(top_srcdir)/m4/reorganization/types.m4 \
181 182
 	$(top_srcdir)/configure.ac
182 183
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
183 184
 	$(ACLOCAL_M4)
... ...
@@ -348,6 +349,8 @@ CXXDEPMODE = @CXXDEPMODE@
348 348
 CXXFLAGS = @CXXFLAGS@
349 349
 CYGPATH_W = @CYGPATH_W@
350 350
 DBDIR = @DBDIR@
351
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
352
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
351 353
 DEFS = @DEFS@ -DCL_NOLIBCLAMAV
352 354
 DEPDIR = @DEPDIR@
353 355
 DLLTOOL = @DLLTOOL@
... ...
@@ -362,6 +365,7 @@ FGREP = @FGREP@
362 362
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
363 363
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
364 364
 GCOV = @GCOV@
365
+GENERATE_WARNING = @GENERATE_WARNING@
365 366
 GENHTML = @GENHTML@
366 367
 GETENT = @GETENT@
367 368
 GPERF = @GPERF@
... ...
@@ -376,6 +380,11 @@ INSTALL_DATA = @INSTALL_DATA@
376 376
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
377 377
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
378 378
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
379
+INT16_DEF = @INT16_DEF@
380
+INT32_DEF = @INT32_DEF@
381
+INT64_DEF = @INT64_DEF@
382
+INT8_DEF = @INT8_DEF@
383
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
379 384
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
380 385
 JSON_LDFLAGS = @JSON_LDFLAGS@
381 386
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -457,6 +466,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
457 457
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
458 458
 THREAD_LIBS = @THREAD_LIBS@
459 459
 TH_SAFE = @TH_SAFE@
460
+UINT16_DEF = @UINT16_DEF@
461
+UINT32_DEF = @UINT32_DEF@
462
+UINT64_DEF = @UINT64_DEF@
463
+UINT8_DEF = @UINT8_DEF@
460 464
 VERSION = @VERSION@
461 465
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
462 466
 WERR_CFLAGS = @WERR_CFLAGS@
463 467
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
... ...
@@ -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)
... ...
@@ -284,6 +285,8 @@ CXXDEPMODE = @CXXDEPMODE@
284 284
 CXXFLAGS = @CXXFLAGS@
285 285
 CYGPATH_W = @CYGPATH_W@
286 286
 DBDIR = @DBDIR@
287
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
288
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
287 289
 DEFS = @DEFS@
288 290
 DEPDIR = @DEPDIR@
289 291
 DLLTOOL = @DLLTOOL@
... ...
@@ -298,6 +301,7 @@ FGREP = @FGREP@
298 298
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
299 299
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
300 300
 GCOV = @GCOV@
301
+GENERATE_WARNING = @GENERATE_WARNING@
301 302
 GENHTML = @GENHTML@
302 303
 GETENT = @GETENT@
303 304
 GPERF = @GPERF@
... ...
@@ -312,6 +316,11 @@ INSTALL_DATA = @INSTALL_DATA@
312 312
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
313 313
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
314 314
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
315
+INT16_DEF = @INT16_DEF@
316
+INT32_DEF = @INT32_DEF@
317
+INT64_DEF = @INT64_DEF@
318
+INT8_DEF = @INT8_DEF@
319
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
315 320
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
316 321
 JSON_LDFLAGS = @JSON_LDFLAGS@
317 322
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -393,6 +402,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
393 393
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
394 394
 THREAD_LIBS = @THREAD_LIBS@
395 395
 TH_SAFE = @TH_SAFE@
396
+UINT16_DEF = @UINT16_DEF@
397
+UINT32_DEF = @UINT32_DEF@
398
+UINT64_DEF = @UINT64_DEF@
399
+UINT8_DEF = @UINT8_DEF@
396 400
 VERSION = @VERSION@
397 401
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
398 402
 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
... ...
@@ -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)
... ...
@@ -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@
... ...
@@ -180,6 +180,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
180 180
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
181 181
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
182 182
 	$(top_srcdir)/m4/reorganization/strni.m4 \
183
+	$(top_srcdir)/m4/reorganization/types.m4 \
183 184
 	$(top_srcdir)/configure.ac
184 185
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
185 186
 	$(ACLOCAL_M4)
... ...
@@ -359,6 +360,8 @@ CXXDEPMODE = @CXXDEPMODE@
359 359
 CXXFLAGS = @CXXFLAGS@
360 360
 CYGPATH_W = @CYGPATH_W@
361 361
 DBDIR = @DBDIR@
362
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
363
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
362 364
 DEFS = @DEFS@
363 365
 DEPDIR = @DEPDIR@
364 366
 DLLTOOL = @DLLTOOL@
... ...
@@ -373,6 +376,7 @@ FGREP = @FGREP@
373 373
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
374 374
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
375 375
 GCOV = @GCOV@
376
+GENERATE_WARNING = @GENERATE_WARNING@
376 377
 GENHTML = @GENHTML@
377 378
 GETENT = @GETENT@
378 379
 GPERF = @GPERF@
... ...
@@ -387,6 +391,11 @@ INSTALL_DATA = @INSTALL_DATA@
387 387
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
388 388
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
389 389
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
390
+INT16_DEF = @INT16_DEF@
391
+INT32_DEF = @INT32_DEF@
392
+INT64_DEF = @INT64_DEF@
393
+INT8_DEF = @INT8_DEF@
394
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
390 395
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
391 396
 JSON_LDFLAGS = @JSON_LDFLAGS@
392 397
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -468,6 +477,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
468 468
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
469 469
 THREAD_LIBS = @THREAD_LIBS@
470 470
 TH_SAFE = @TH_SAFE@
471
+UINT16_DEF = @UINT16_DEF@
472
+UINT32_DEF = @UINT32_DEF@
473
+UINT64_DEF = @UINT64_DEF@
474
+UINT8_DEF = @UINT8_DEF@
471 475
 VERSION = @VERSION@
472 476
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
473 477
 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
 
... ...
@@ -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)
... ...
@@ -313,6 +314,8 @@ CXXDEPMODE = @CXXDEPMODE@
313 313
 CXXFLAGS = @CXXFLAGS@
314 314
 CYGPATH_W = @CYGPATH_W@
315 315
 DBDIR = @DBDIR@
316
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
317
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
316 318
 DEFS = @DEFS@ -DCL_NOTHREADS -DCL_NOLIBCLAMAV
317 319
 DEPDIR = @DEPDIR@
318 320
 DLLTOOL = @DLLTOOL@
... ...
@@ -327,6 +330,7 @@ FGREP = @FGREP@
327 327
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
328 328
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
329 329
 GCOV = @GCOV@
330
+GENERATE_WARNING = @GENERATE_WARNING@
330 331
 GENHTML = @GENHTML@
331 332
 GETENT = @GETENT@
332 333
 GPERF = @GPERF@
... ...
@@ -341,6 +345,11 @@ INSTALL_DATA = @INSTALL_DATA@
341 341
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
342 342
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
343 343
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
344
+INT16_DEF = @INT16_DEF@
345
+INT32_DEF = @INT32_DEF@
346
+INT64_DEF = @INT64_DEF@
347
+INT8_DEF = @INT8_DEF@
348
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
344 349
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
345 350
 JSON_LDFLAGS = @JSON_LDFLAGS@
346 351
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -422,6 +431,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
422 422
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
423 423
 THREAD_LIBS = @THREAD_LIBS@
424 424
 TH_SAFE = @TH_SAFE@
425
+UINT16_DEF = @UINT16_DEF@
426
+UINT32_DEF = @UINT32_DEF@
427
+UINT64_DEF = @UINT64_DEF@
428
+UINT8_DEF = @UINT8_DEF@
425 429
 VERSION = @VERSION@
426 430
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
427 431
 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)
... ...
@@ -319,6 +320,8 @@ CXXDEPMODE = @CXXDEPMODE@
319 319
 CXXFLAGS = @CXXFLAGS@
320 320
 CYGPATH_W = @CYGPATH_W@
321 321
 DBDIR = @DBDIR@
322
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
323
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
322 324
 DEFS = @DEFS@ -DCL_NOTHREADS -DCL_NOLIBCLAMAV
323 325
 DEPDIR = @DEPDIR@
324 326
 DLLTOOL = @DLLTOOL@
... ...
@@ -333,6 +336,7 @@ FGREP = @FGREP@
333 333
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
334 334
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
335 335
 GCOV = @GCOV@
336
+GENERATE_WARNING = @GENERATE_WARNING@
336 337
 GENHTML = @GENHTML@
337 338
 GETENT = @GETENT@
338 339
 GPERF = @GPERF@
... ...
@@ -347,6 +351,11 @@ INSTALL_DATA = @INSTALL_DATA@
347 347
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
348 348
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
349 349
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
350
+INT16_DEF = @INT16_DEF@
351
+INT32_DEF = @INT32_DEF@
352
+INT64_DEF = @INT64_DEF@
353
+INT8_DEF = @INT8_DEF@
354
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
350 355
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
351 356
 JSON_LDFLAGS = @JSON_LDFLAGS@
352 357
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -428,6 +437,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
428 428
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
429 429
 THREAD_LIBS = @THREAD_LIBS@
430 430
 TH_SAFE = @TH_SAFE@
431
+UINT16_DEF = @UINT16_DEF@
432
+UINT32_DEF = @UINT32_DEF@
433
+UINT64_DEF = @UINT64_DEF@
434
+UINT8_DEF = @UINT8_DEF@
431 435
 VERSION = @VERSION@
432 436
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
433 437
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -178,6 +178,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
178 178
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
179 179
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
180 180
 	$(top_srcdir)/m4/reorganization/strni.m4 \
181
+	$(top_srcdir)/m4/reorganization/types.m4 \
181 182
 	$(top_srcdir)/configure.ac
182 183
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
183 184
 	$(ACLOCAL_M4)
... ...
@@ -304,6 +305,8 @@ CXXDEPMODE = @CXXDEPMODE@
304 304
 CXXFLAGS = @CXXFLAGS@
305 305
 CYGPATH_W = @CYGPATH_W@
306 306
 DBDIR = @DBDIR@
307
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
308
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
307 309
 DEFS = @DEFS@ -DCL_NOTHREADS
308 310
 DEPDIR = @DEPDIR@
309 311
 DLLTOOL = @DLLTOOL@
... ...
@@ -318,6 +321,7 @@ FGREP = @FGREP@
318 318
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
319 319
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
320 320
 GCOV = @GCOV@
321
+GENERATE_WARNING = @GENERATE_WARNING@
321 322
 GENHTML = @GENHTML@
322 323
 GETENT = @GETENT@
323 324
 GPERF = @GPERF@
... ...
@@ -332,6 +336,11 @@ INSTALL_DATA = @INSTALL_DATA@
332 332
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
333 333
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
334 334
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
335
+INT16_DEF = @INT16_DEF@
336
+INT32_DEF = @INT32_DEF@
337
+INT64_DEF = @INT64_DEF@
338
+INT8_DEF = @INT8_DEF@
339
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
335 340
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
336 341
 JSON_LDFLAGS = @JSON_LDFLAGS@
337 342
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -413,6 +422,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
413 413
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
414 414
 THREAD_LIBS = @THREAD_LIBS@
415 415
 TH_SAFE = @TH_SAFE@
416
+UINT16_DEF = @UINT16_DEF@
417
+UINT32_DEF = @UINT32_DEF@
418
+UINT64_DEF = @UINT64_DEF@
419
+UINT8_DEF = @UINT8_DEF@
416 420
 VERSION = @VERSION@
417 421
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
418 422
 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;
... ...
@@ -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)
... ...
@@ -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@
... ...
@@ -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
... ...
@@ -29181,7 +29193,148 @@ else
29181 29181
     mspack_msg="External, $LIBMSPACK_CFLAGS $LIBMSPACK_LIBS"
29182 29182
 fi
29183 29183
 
29184
-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 fuzz/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"
29184
+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 fuzz/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"
29185
+
29186
+
29187
+# Define variables needed to generate clamav-types.h.
29188
+# Define a warning for the user, so they don't edit clamav-types.h
29189
+GENERATE_WARNING="Warning: This file is generated with ./configure. Do not edit!"
29190
+
29191
+
29192
+# Initialize definitions to empty strings, in case they're not needed.
29193
+INT8_DEF=""
29194
+
29195
+UINT8_DEF=""
29196
+
29197
+INT16_DEF=""
29198
+
29199
+UINT16_DEF=""
29200
+
29201
+INT32_DEF=""
29202
+
29203
+UINT32_DEF=""
29204
+
29205
+INT64_DEF=""
29206
+
29207
+UINT64_DEF=""
29208
+
29209
+
29210
+# Check sys/int_types.h first, to give it higher priority on Solaris
29211
+ac_fn_c_check_header_mongrel "$LINENO" "sys/int_types.h" "ac_cv_header_sys_int_types_h" "$ac_includes_default"
29212
+if test "x$ac_cv_header_sys_int_types_h" = xyes; then :
29213
+           INT_TYPES_HEADER="#include <sys/int_types.h>"
29214
+
29215
+
29216
+else
29217
+           ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
29218
+if test "x$ac_cv_header_inttypes_h" = xyes; then :
29219
+                   INT_TYPES_HEADER="#include <inttypes.h>"
29220
+
29221
+
29222
+else
29223
+                   ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
29224
+if test "x$ac_cv_header_stdint_h" = xyes; then :
29225
+                           INT_TYPES_HEADER="#include <stdint.h>"
29226
+
29227
+
29228
+else
29229
+                           cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29230
+/* end confdefs.h.  */
29231
+
29232
+
29233
+                                        #ifndef _MSC_VER
29234
+                                            error: _MSC_VER not found!
29235
+                                        #endif
29236
+
29237
+
29238
+int
29239
+main ()
29240
+{
29241
+
29242
+  ;
29243
+  return 0;
29244
+}
29245
+
29246
+_ACEOF
29247
+if ac_fn_c_try_compile "$LINENO"; then :
29248
+                                   INT_TYPES_HEADER="#include <stdint.h>"
29249
+
29250
+
29251
+else
29252
+                                   INT8_DEF="typedef signed char int8_t;"
29253
+
29254
+                                UINT8_DEF="typedef unsigned char uint8_t;"
29255
+
29256
+
29257
+                                if test $ac_cv_sizeof_int = 2; then
29258
+                                    INT16_DEF="typedef signed int int16_t;"
29259
+
29260
+                                    UINT16_DEF="typedef unsigned int uint16_t;"
29261
+
29262
+                                elif test $ac_cv_sizeof_short = 2; then
29263
+                                    INT16_DEF="typedef signed short int16_t;"
29264
+
29265
+                                    UINT16_DEF="typedef unsigned short uint16_t;"
29266
+
29267
+                                fi
29268
+
29269
+                                if test $ac_cv_sizeof_int = 4; then
29270
+                                    INT32_DEF="typedef signed int int32_t;"
29271
+
29272
+                                    UINT32_DEF="typedef unsigned int uint32_t;"
29273
+
29274
+                                elif test $ac_cv_sizeof_long = 4; then
29275
+                                    INT32_DEF="typedef signed long int32_t;"
29276
+
29277
+                                    UINT32_DEF="typedef unsigned long uint32_t;"
29278
+
29279
+                                fi
29280
+
29281
+                                if test $ac_cv_sizeof_long = 8; then
29282
+                                    INT64_DEF="typedef signed long int64_t;"
29283
+
29284
+                                    UINT64_DEF="typedef unsigned long uint64_t;"
29285
+
29286
+                                elif test $ac_cv_sizeof_long_long = 8; then
29287
+                                    INT64_DEF="typedef signed long long int64_t;"
29288
+
29289
+                                    UINT64_DEF="typedef unsigned long long uint64_t;"
29290
+
29291
+                                fi
29292
+
29293
+
29294
+fi
29295
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29296
+
29297
+fi
29298
+
29299
+
29300
+
29301
+fi
29302
+
29303
+
29304
+
29305
+fi
29306
+
29307
+
29308
+
29309
+# If _SF64_PREFIX isn't defined, this may be used.
29310
+if test $ac_cv_sizeof_int = 4; then
29311
+    DEFINE_SF32_PREFIX="#define _SF32_PREFIX \"\""
29312
+
29313
+elif test $ac_cv_sizeof_long = 4; then
29314
+    DEFINE_SF32_PREFIX="#define _SF32_PREFIX \"l\""
29315
+
29316
+fi
29317
+
29318
+# If _SF32_PREFIX isn't defined, this may be used.
29319
+if test $ac_cv_sizeof_long = 8; then
29320
+    DEFINE_SF64_PREFIX="#define _SF64_PREFIX \"l\""
29321
+
29322
+elif test $ac_cv_sizeof_long_long = 8; then
29323
+    DEFINE_SF64_PREFIX="#define _SF64_PREFIX \"ll\""
29324
+
29325
+fi
29185 29326
 
29186 29327
 
29187 29328
 cat >confcache <<\_ACEOF
... ...
@@ -30435,6 +30588,7 @@ do
30435 30435
     "docs/man/sigtool.1") CONFIG_FILES="$CONFIG_FILES docs/man/sigtool.1" ;;
30436 30436
     "docs/man/clamdtop.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamdtop.1" ;;
30437 30437
     "docs/man/clamsubmit.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamsubmit.1" ;;
30438
+    "clamav-types.h") CONFIG_FILES="$CONFIG_FILES clamav-types.h" ;;
30438 30439
 
30439 30440
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
30440 30441
   esac
... ...
@@ -33324,6 +33478,7 @@ do
33324 33324
     "docs/man/sigtool.1") CONFIG_FILES="$CONFIG_FILES docs/man/sigtool.1" ;;
33325 33325
     "docs/man/clamdtop.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamdtop.1" ;;
33326 33326
     "docs/man/clamsubmit.1") CONFIG_FILES="$CONFIG_FILES docs/man/clamsubmit.1" ;;
33327
+    "clamav-types.h") CONFIG_FILES="$CONFIG_FILES clamav-types.h" ;;
33327 33328
     "libclamav/Makefile") CONFIG_FILES="$CONFIG_FILES libclamav/Makefile" ;;
33328 33329
 
33329 33330
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
... ...
@@ -192,8 +192,12 @@ docs/man/freshclam.conf.5
192 192
 docs/man/sigtool.1
193 193
 docs/man/clamdtop.1
194 194
 docs/man/clamsubmit.1
195
+clamav-types.h
195 196
 ])
196 197
 
198
+# Define variables needed to generate clamav-types.h.
199
+m4_include([m4/reorganization/types.m4])
200
+
197 201
 AC_OUTPUT
198 202
 
199 203
 if test "$enable_llvm" = "yes" && test "$subdirfailed" != "no"; then
... ...
@@ -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)
... ...
@@ -250,6 +251,8 @@ CXXDEPMODE = @CXXDEPMODE@
250 250
 CXXFLAGS = @CXXFLAGS@
251 251
 CYGPATH_W = @CYGPATH_W@
252 252
 DBDIR = @DBDIR@
253
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
254
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
253 255
 DEFS = @DEFS@
254 256
 DEPDIR = @DEPDIR@
255 257
 DLLTOOL = @DLLTOOL@
... ...
@@ -264,6 +267,7 @@ FGREP = @FGREP@
264 264
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
265 265
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
266 266
 GCOV = @GCOV@
267
+GENERATE_WARNING = @GENERATE_WARNING@
267 268
 GENHTML = @GENHTML@
268 269
 GETENT = @GETENT@
269 270
 GPERF = @GPERF@
... ...
@@ -278,6 +282,11 @@ INSTALL_DATA = @INSTALL_DATA@
278 278
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
279 279
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
280 280
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
281
+INT16_DEF = @INT16_DEF@
282
+INT32_DEF = @INT32_DEF@
283
+INT64_DEF = @INT64_DEF@
284
+INT8_DEF = @INT8_DEF@
285
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
281 286
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
282 287
 JSON_LDFLAGS = @JSON_LDFLAGS@
283 288
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -359,6 +368,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
359 359
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
360 360
 THREAD_LIBS = @THREAD_LIBS@
361 361
 TH_SAFE = @TH_SAFE@
362
+UINT16_DEF = @UINT16_DEF@
363
+UINT32_DEF = @UINT32_DEF@
364
+UINT64_DEF = @UINT64_DEF@
365
+UINT8_DEF = @UINT8_DEF@
362 366
 VERSION = @VERSION@
363 367
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
364 368
 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)
... ...
@@ -284,6 +285,8 @@ CXXDEPMODE = @CXXDEPMODE@
284 284
 CXXFLAGS = @CXXFLAGS@
285 285
 CYGPATH_W = @CYGPATH_W@
286 286
 DBDIR = @DBDIR@
287
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
288
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
287 289
 DEFS = @DEFS@
288 290
 DEPDIR = @DEPDIR@
289 291
 DLLTOOL = @DLLTOOL@
... ...
@@ -298,6 +301,7 @@ FGREP = @FGREP@
298 298
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
299 299
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
300 300
 GCOV = @GCOV@
301
+GENERATE_WARNING = @GENERATE_WARNING@
301 302
 GENHTML = @GENHTML@
302 303
 GETENT = @GETENT@
303 304
 GPERF = @GPERF@
... ...
@@ -312,6 +316,11 @@ INSTALL_DATA = @INSTALL_DATA@
312 312
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
313 313
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
314 314
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
315
+INT16_DEF = @INT16_DEF@
316
+INT32_DEF = @INT32_DEF@
317
+INT64_DEF = @INT64_DEF@
318
+INT8_DEF = @INT8_DEF@
319
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
315 320
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
316 321
 JSON_LDFLAGS = @JSON_LDFLAGS@
317 322
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -393,6 +402,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
393 393
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
394 394
 THREAD_LIBS = @THREAD_LIBS@
395 395
 TH_SAFE = @TH_SAFE@
396
+UINT16_DEF = @UINT16_DEF@
397
+UINT32_DEF = @UINT32_DEF@
398
+UINT64_DEF = @UINT64_DEF@
399
+UINT8_DEF = @UINT8_DEF@
396 400
 VERSION = @VERSION@
397 401
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
398 402
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -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)
... ...
@@ -280,6 +281,8 @@ CXXDEPMODE = @CXXDEPMODE@
280 280
 CXXFLAGS = @CXXFLAGS@
281 281
 CYGPATH_W = @CYGPATH_W@
282 282
 DBDIR = @DBDIR@
283
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
284
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
283 285
 DEFS = @DEFS@
284 286
 DEPDIR = @DEPDIR@
285 287
 DLLTOOL = @DLLTOOL@
... ...
@@ -294,6 +297,7 @@ FGREP = @FGREP@
294 294
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
295 295
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
296 296
 GCOV = @GCOV@
297
+GENERATE_WARNING = @GENERATE_WARNING@
297 298
 GENHTML = @GENHTML@
298 299
 GETENT = @GETENT@
299 300
 GPERF = @GPERF@
... ...
@@ -308,6 +312,11 @@ INSTALL_DATA = @INSTALL_DATA@
308 308
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
309 309
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
310 310
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
311
+INT16_DEF = @INT16_DEF@
312
+INT32_DEF = @INT32_DEF@
313
+INT64_DEF = @INT64_DEF@
314
+INT8_DEF = @INT8_DEF@
315
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
311 316
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
312 317
 JSON_LDFLAGS = @JSON_LDFLAGS@
313 318
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -389,6 +398,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
389 389
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
390 390
 THREAD_LIBS = @THREAD_LIBS@
391 391
 TH_SAFE = @TH_SAFE@
392
+UINT16_DEF = @UINT16_DEF@
393
+UINT32_DEF = @UINT32_DEF@
394
+UINT64_DEF = @UINT64_DEF@
395
+UINT8_DEF = @UINT8_DEF@
392 396
 VERSION = @VERSION@
393 397
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
394 398
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -180,6 +180,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
180 180
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
181 181
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
182 182
 	$(top_srcdir)/m4/reorganization/strni.m4 \
183
+	$(top_srcdir)/m4/reorganization/types.m4 \
183 184
 	$(top_srcdir)/configure.ac
184 185
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
185 186
 	$(ACLOCAL_M4)
... ...
@@ -337,6 +338,8 @@ CXXDEPMODE = @CXXDEPMODE@
337 337
 CXXFLAGS = @CXXFLAGS@
338 338
 CYGPATH_W = @CYGPATH_W@
339 339
 DBDIR = @DBDIR@
340
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
341
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
340 342
 DEFS = @DEFS@ -DCL_NOTHREADS
341 343
 DEPDIR = @DEPDIR@
342 344
 DLLTOOL = @DLLTOOL@
... ...
@@ -351,6 +354,7 @@ FGREP = @FGREP@
351 351
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
352 352
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
353 353
 GCOV = @GCOV@
354
+GENERATE_WARNING = @GENERATE_WARNING@
354 355
 GENHTML = @GENHTML@
355 356
 GETENT = @GETENT@
356 357
 GPERF = @GPERF@
... ...
@@ -365,6 +369,11 @@ INSTALL_DATA = @INSTALL_DATA@
365 365
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
366 366
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
367 367
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
368
+INT16_DEF = @INT16_DEF@
369
+INT32_DEF = @INT32_DEF@
370
+INT64_DEF = @INT64_DEF@
371
+INT8_DEF = @INT8_DEF@
372
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
368 373
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
369 374
 JSON_LDFLAGS = @JSON_LDFLAGS@
370 375
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -446,6 +455,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
446 446
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
447 447
 THREAD_LIBS = @THREAD_LIBS@
448 448
 TH_SAFE = @TH_SAFE@
449
+UINT16_DEF = @UINT16_DEF@
450
+UINT32_DEF = @UINT32_DEF@
451
+UINT64_DEF = @UINT64_DEF@
452
+UINT8_DEF = @UINT8_DEF@
449 453
 VERSION = @VERSION@
450 454
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
451 455
 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 \
... ...
@@ -206,6 +206,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
206 206
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
207 207
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
208 208
 	$(top_srcdir)/m4/reorganization/strni.m4 \
209
+	$(top_srcdir)/m4/reorganization/types.m4 \
209 210
 	$(top_srcdir)/configure.ac
210 211
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
211 212
 	$(ACLOCAL_M4)
... ...
@@ -255,14 +256,13 @@ am__libclamav_la_SOURCES_DIST = matcher-ac.c matcher-ac.h matcher-bm.c \
255 255
 	filetypes.h filetypes_int.h rtf.c rtf.h blob.c blob.h mbox.c \
256 256
 	mbox.h message.c message.h table.c table.h text.c text.h \
257 257
 	ole2_extract.c ole2_extract.h vba_extract.c vba_extract.h \
258
-	cltypes.h msexpand.c msexpand.h pe.c pe.h pe_icons.c \
259
-	pe_icons.h disasm.c disasm.h disasm-common.h disasmpriv.h \
260
-	upx.c upx.h htmlnorm.c htmlnorm.h libmspack.c libmspack.h \
261
-	rebuildpe.c rebuildpe.h petite.c petite.h wwunpack.c \
262
-	wwunpack.h unsp.c unsp.h aspack.c aspack.h packlibs.c \
263
-	packlibs.h fsg.c fsg.h mew.c mew.h upack.c upack.h line.c \
264
-	line.h untar.c untar.h unzip.c unzip.h ooxml.c ooxml.h \
265
-	inflate64.c inflate64.h inffixed64.h inflate64_priv.h \
258
+	msexpand.c msexpand.h pe.c pe.h pe_icons.c pe_icons.h disasm.c \
259
+	disasm.h disasm-common.h disasmpriv.h upx.c upx.h htmlnorm.c \
260
+	htmlnorm.h libmspack.c libmspack.h rebuildpe.c rebuildpe.h \
261
+	petite.c petite.h wwunpack.c wwunpack.h unsp.c unsp.h aspack.c \
262
+	aspack.h packlibs.c packlibs.h fsg.c fsg.h mew.c mew.h upack.c \
263
+	upack.h line.c line.h untar.c untar.h unzip.c unzip.h ooxml.c \
264
+	ooxml.h inflate64.c inflate64.h inffixed64.h inflate64_priv.h \
266 265
 	special.c special.h binhex.c binhex.h is_tar.c is_tar.h tnef.c \
267 266
 	tnef.h autoit.c autoit.h unarj.c unarj.h nsis/bzlib.c \
268 267
 	nsis/bzlib_private.h nsis/nsis_bzlib.h nsis/nulsft.c \
... ...
@@ -904,6 +904,8 @@ CXXDEPMODE = @CXXDEPMODE@
904 904
 CXXFLAGS = @CXXFLAGS@
905 905
 CYGPATH_W = @CYGPATH_W@
906 906
 DBDIR = @DBDIR@
907
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
908
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
907 909
 DEFS = @DEFS@
908 910
 DEPDIR = @DEPDIR@
909 911
 DLLTOOL = @DLLTOOL@
... ...
@@ -918,6 +920,7 @@ FGREP = @FGREP@
918 918
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
919 919
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
920 920
 GCOV = @GCOV@
921
+GENERATE_WARNING = @GENERATE_WARNING@
921 922
 GENHTML = @GENHTML@
922 923
 GETENT = @GETENT@
923 924
 GPERF = @GPERF@
... ...
@@ -932,6 +935,11 @@ INSTALL_DATA = @INSTALL_DATA@
932 932
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
933 933
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
934 934
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
935
+INT16_DEF = @INT16_DEF@
936
+INT32_DEF = @INT32_DEF@
937
+INT64_DEF = @INT64_DEF@
938
+INT8_DEF = @INT8_DEF@
939
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
935 940
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
936 941
 JSON_LDFLAGS = @JSON_LDFLAGS@
937 942
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -1013,6 +1021,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
1013 1013
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
1014 1014
 THREAD_LIBS = @THREAD_LIBS@
1015 1015
 TH_SAFE = @TH_SAFE@
1016
+UINT16_DEF = @UINT16_DEF@
1017
+UINT32_DEF = @UINT32_DEF@
1018
+UINT64_DEF = @UINT64_DEF@
1019
+UINT8_DEF = @UINT8_DEF@
1016 1020
 VERSION = @VERSION@
1017 1021
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
1018 1022
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -1295,14 +1307,13 @@ libclamav_la_SOURCES = matcher-ac.c matcher-ac.h matcher-bm.c \
1295 1295
 	filetypes.h filetypes_int.h rtf.c rtf.h blob.c blob.h mbox.c \
1296 1296
 	mbox.h message.c message.h table.c table.h text.c text.h \
1297 1297
 	ole2_extract.c ole2_extract.h vba_extract.c vba_extract.h \
1298
-	cltypes.h msexpand.c msexpand.h pe.c pe.h pe_icons.c \
1299
-	pe_icons.h disasm.c disasm.h disasm-common.h disasmpriv.h \
1300
-	upx.c upx.h htmlnorm.c htmlnorm.h libmspack.c libmspack.h \
1301
-	rebuildpe.c rebuildpe.h petite.c petite.h wwunpack.c \
1302
-	wwunpack.h unsp.c unsp.h aspack.c aspack.h packlibs.c \
1303
-	packlibs.h fsg.c fsg.h mew.c mew.h upack.c upack.h line.c \
1304
-	line.h untar.c untar.h unzip.c unzip.h ooxml.c ooxml.h \
1305
-	inflate64.c inflate64.h inffixed64.h inflate64_priv.h \
1298
+	msexpand.c msexpand.h pe.c pe.h pe_icons.c pe_icons.h disasm.c \
1299
+	disasm.h disasm-common.h disasmpriv.h upx.c upx.h htmlnorm.c \
1300
+	htmlnorm.h libmspack.c libmspack.h rebuildpe.c rebuildpe.h \
1301
+	petite.c petite.h wwunpack.c wwunpack.h unsp.c unsp.h aspack.c \
1302
+	aspack.h packlibs.c packlibs.h fsg.c fsg.h mew.c mew.h upack.c \
1303
+	upack.h line.c line.h untar.c untar.h unzip.c unzip.h ooxml.c \
1304
+	ooxml.h inflate64.c inflate64.h inffixed64.h inflate64_priv.h \
1306 1305
 	special.c special.h binhex.c binhex.h is_tar.c is_tar.h tnef.c \
1307 1306
 	tnef.h autoit.c autoit.h unarj.c unarj.h nsis/bzlib.c \
1308 1307
 	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"
... ...
@@ -40,7 +40,6 @@
40 40
 #include "hashtab.h"
41 41
 #include "entconv.h"
42 42
 #include "entitylist.h"
43
-#include "cltypes.h"
44 43
 
45 44
 #ifdef HAVE_ICONV
46 45
 #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,
... ...
@@ -53,7 +53,6 @@
53 53
 #include <string.h>
54 54
 
55 55
 #include "clamav.h"
56
-#include "cltypes.h"
57 56
 #include "rebuildpe.h"
58 57
 #include "execs.h"
59 58
 #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
 
... ...
@@ -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)
... ...
@@ -329,6 +330,8 @@ CXXDEPMODE = @CXXDEPMODE@
329 329
 CXXFLAGS = @CXXFLAGS@
330 330
 CYGPATH_W = @CYGPATH_W@
331 331
 DBDIR = @DBDIR@
332
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
333
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
332 334
 DEFS = @DEFS@ -DCL_NOTHREADS
333 335
 DEPDIR = @DEPDIR@
334 336
 DLLTOOL = @DLLTOOL@
... ...
@@ -343,6 +346,7 @@ FGREP = @FGREP@
343 343
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
344 344
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
345 345
 GCOV = @GCOV@
346
+GENERATE_WARNING = @GENERATE_WARNING@
346 347
 GENHTML = @GENHTML@
347 348
 GETENT = @GETENT@
348 349
 GPERF = @GPERF@
... ...
@@ -357,6 +361,11 @@ INSTALL_DATA = @INSTALL_DATA@
357 357
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
358 358
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
359 359
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
360
+INT16_DEF = @INT16_DEF@
361
+INT32_DEF = @INT32_DEF@
362
+INT64_DEF = @INT64_DEF@
363
+INT8_DEF = @INT8_DEF@
364
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
360 365
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
361 366
 JSON_LDFLAGS = @JSON_LDFLAGS@
362 367
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -438,6 +447,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
438 438
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
439 439
 THREAD_LIBS = @THREAD_LIBS@
440 440
 TH_SAFE = @TH_SAFE@
441
+UINT16_DEF = @UINT16_DEF@
442
+UINT32_DEF = @UINT32_DEF@
443
+UINT64_DEF = @UINT64_DEF@
444
+UINT8_DEF = @UINT8_DEF@
441 445
 VERSION = @VERSION@
442 446
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
443 447
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -165,6 +165,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
165 165
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
166 166
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
167 167
 	$(top_srcdir)/m4/reorganization/strni.m4 \
168
+	$(top_srcdir)/m4/reorganization/types.m4 \
168 169
 	$(top_srcdir)/configure.ac
169 170
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
170 171
 	$(ACLOCAL_M4)
... ...
@@ -381,6 +382,8 @@ CXXDEPMODE = @CXXDEPMODE@
381 381
 CXXFLAGS = @CXXFLAGS@
382 382
 CYGPATH_W = @CYGPATH_W@
383 383
 DBDIR = @DBDIR@
384
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
385
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
384 386
 DEFS = @DEFS@
385 387
 DEPDIR = @DEPDIR@
386 388
 DLLTOOL = @DLLTOOL@
... ...
@@ -395,6 +398,7 @@ FGREP = @FGREP@
395 395
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
396 396
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
397 397
 GCOV = @GCOV@
398
+GENERATE_WARNING = @GENERATE_WARNING@
398 399
 GENHTML = @GENHTML@
399 400
 GETENT = @GETENT@
400 401
 GPERF = @GPERF@
... ...
@@ -409,6 +413,11 @@ INSTALL_DATA = @INSTALL_DATA@
409 409
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
410 410
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
411 411
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
412
+INT16_DEF = @INT16_DEF@
413
+INT32_DEF = @INT32_DEF@
414
+INT64_DEF = @INT64_DEF@
415
+INT8_DEF = @INT8_DEF@
416
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
412 417
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
413 418
 JSON_LDFLAGS = @JSON_LDFLAGS@
414 419
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -490,6 +499,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
490 490
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
491 491
 THREAD_LIBS = @THREAD_LIBS@
492 492
 TH_SAFE = @TH_SAFE@
493
+UINT16_DEF = @UINT16_DEF@
494
+UINT32_DEF = @UINT32_DEF@
495
+UINT64_DEF = @UINT64_DEF@
496
+UINT8_DEF = @UINT8_DEF@
493 497
 VERSION = @VERSION@
494 498
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
495 499
 WERR_CFLAGS = @WERR_CFLAGS@
496 500
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
... ...
@@ -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@
... ...
@@ -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
 
... ...
@@ -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)
... ...
@@ -233,6 +234,8 @@ CXXDEPMODE = @CXXDEPMODE@
233 233
 CXXFLAGS = @CXXFLAGS@
234 234
 CYGPATH_W = @CYGPATH_W@
235 235
 DBDIR = @DBDIR@
236
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
237
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
236 238
 DEFS = @DEFS@
237 239
 DEPDIR = @DEPDIR@
238 240
 DLLTOOL = @DLLTOOL@
... ...
@@ -247,6 +250,7 @@ FGREP = @FGREP@
247 247
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
248 248
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
249 249
 GCOV = @GCOV@
250
+GENERATE_WARNING = @GENERATE_WARNING@
250 251
 GENHTML = @GENHTML@
251 252
 GETENT = @GETENT@
252 253
 GPERF = @GPERF@
... ...
@@ -261,6 +265,11 @@ INSTALL_DATA = @INSTALL_DATA@
261 261
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
262 262
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
263 263
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
264
+INT16_DEF = @INT16_DEF@
265
+INT32_DEF = @INT32_DEF@
266
+INT64_DEF = @INT64_DEF@
267
+INT8_DEF = @INT8_DEF@
268
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
264 269
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
265 270
 JSON_LDFLAGS = @JSON_LDFLAGS@
266 271
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -342,6 +351,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
342 342
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
343 343
 THREAD_LIBS = @THREAD_LIBS@
344 344
 TH_SAFE = @TH_SAFE@
345
+UINT16_DEF = @UINT16_DEF@
346
+UINT32_DEF = @UINT32_DEF@
347
+UINT64_DEF = @UINT64_DEF@
348
+UINT8_DEF = @UINT8_DEF@
345 349
 VERSION = @VERSION@
346 350
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
347 351
 WERR_CFLAGS = @WERR_CFLAGS@
... ...
@@ -160,6 +160,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
160 160
 	$(top_srcdir)/m4/reorganization/libs/curl.m4 \
161 161
 	$(top_srcdir)/m4/reorganization/substitutions.m4 \
162 162
 	$(top_srcdir)/m4/reorganization/strni.m4 \
163
+	$(top_srcdir)/m4/reorganization/types.m4 \
163 164
 	$(top_srcdir)/configure.ac
164 165
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
165 166
 	$(ACLOCAL_M4)
... ...
@@ -523,6 +524,8 @@ CXXDEPMODE = @CXXDEPMODE@
523 523
 CXXFLAGS = @CXXFLAGS@
524 524
 CYGPATH_W = @CYGPATH_W@
525 525
 DBDIR = @DBDIR@
526
+DEFINE_SF32_PREFIX = @DEFINE_SF32_PREFIX@
527
+DEFINE_SF64_PREFIX = @DEFINE_SF64_PREFIX@
526 528
 DEFS = @DEFS@
527 529
 DEPDIR = @DEPDIR@
528 530
 DLLTOOL = @DLLTOOL@
... ...
@@ -537,6 +540,7 @@ FGREP = @FGREP@
537 537
 FRESHCLAM_CPPFLAGS = @FRESHCLAM_CPPFLAGS@
538 538
 FRESHCLAM_LIBS = @FRESHCLAM_LIBS@
539 539
 GCOV = @GCOV@
540
+GENERATE_WARNING = @GENERATE_WARNING@
540 541
 GENHTML = @GENHTML@
541 542
 GETENT = @GETENT@
542 543
 GPERF = @GPERF@
... ...
@@ -551,6 +555,11 @@ INSTALL_DATA = @INSTALL_DATA@
551 551
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
552 552
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
553 553
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
554
+INT16_DEF = @INT16_DEF@
555
+INT32_DEF = @INT32_DEF@
556
+INT64_DEF = @INT64_DEF@
557
+INT8_DEF = @INT8_DEF@
558
+INT_TYPES_HEADER = @INT_TYPES_HEADER@
554 559
 JSON_CPPFLAGS = @JSON_CPPFLAGS@
555 560
 JSON_LDFLAGS = @JSON_LDFLAGS@
556 561
 JSON_LIBS = @JSON_LIBS@
... ...
@@ -632,6 +641,10 @@ SYSTEMD_CFLAGS = @SYSTEMD_CFLAGS@
632 632
 SYSTEMD_LIBS = @SYSTEMD_LIBS@
633 633
 THREAD_LIBS = @THREAD_LIBS@
634 634
 TH_SAFE = @TH_SAFE@
635
+UINT16_DEF = @UINT16_DEF@
636
+UINT32_DEF = @UINT32_DEF@
637
+UINT64_DEF = @UINT64_DEF@
638
+UINT8_DEF = @UINT8_DEF@
635 639
 VERSION = @VERSION@
636 640
 VERSIONSCRIPTFLAG = @VERSIONSCRIPTFLAG@
637 641
 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,22 +1,22 @@
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.
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 20
  */
21 21
 
22 22
 #ifndef __RESOLV_H
... ...
@@ -27,7 +27,7 @@
27 27
 #endif
28 28
 
29 29
 #include <Windns.h>
30
-#include "cltypes.h"
30
+#include "clamav-types.h"
31 31
 
32 32
 #define C_IN 1
33 33