... | ... |
@@ -96,7 +96,7 @@ changes. |
96 | 96 |
assurance test suites and enables automatic testing of all proposed changes |
97 | 97 |
to ClamAV, with customizable parameters to suit the testing needs of any |
98 | 98 |
given code change. |
99 |
-- Added a new `clamav-version.h` generated header to provide version number |
|
99 |
+- Added a new `clamav-version.h` generated header to provide version number |
|
100 | 100 |
macros in text and numerical format for ClamAV, libclamav, and libfreshclam. |
101 | 101 |
|
102 | 102 |
### Bug fixes |
... | ... |
@@ -70,6 +70,12 @@ int main(int argc, char **argv) |
70 | 70 |
return 2; |
71 | 71 |
} |
72 | 72 |
|
73 |
+ /* Example version macro usage to determine if new feature is available */ |
|
74 |
+#if defined(LIBCLAMAV_VERSION_NUM) && (LIBCLAMAV_VERSION_NUM >= 0x090400) |
|
75 |
+ /* Example feature usage lowering max scan time to 15 seconds. */ |
|
76 |
+ cl_engine_set_num(engine, CL_ENGINE_MAX_SCANTIME, 15000); |
|
77 |
+#endif |
|
78 |
+ |
|
73 | 79 |
/* load all available databases from default directory */ |
74 | 80 |
if ((ret = cl_load(cl_retdbdir(), engine, &sigs, CL_DB_STDOPT)) != CL_SUCCESS) { |
75 | 81 |
printf("cl_load: %s\n", cl_strerror(ret)); |