git-svn: trunk@3084
Nigel Horne authored on 2007/05/30 20:10:331 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,85 @@ |
0 |
+/* |
|
1 |
+ * Copyright (C) 2007 aCaB <acab@clamav.net> |
|
2 |
+ * |
|
3 |
+ * This program is free software; you can redistribute it and/or modify |
|
4 |
+ * it under the terms of the GNU General Public License as published by |
|
5 |
+ * the Free Software Foundation; either version 2 of the License, or |
|
6 |
+ * (at your option) any later version. |
|
7 |
+ * |
|
8 |
+ * This program is distributed in the hope that it will be useful, |
|
9 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 |
+ * GNU General Public License for more details. |
|
12 |
+ * |
|
13 |
+ * You should have received a copy of the GNU General Public License |
|
14 |
+ * along with this program; if not, write to the Free Software |
|
15 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
16 |
+ * MA 02110-1301, USA. |
|
17 |
+ */ |
|
18 |
+#ifdef _MSC_VER |
|
19 |
+#include <winsock.h> |
|
20 |
+#endif |
|
21 |
+ |
|
22 |
+#if HAVE_CONFIG_H |
|
23 |
+#include "clamav-config.h" |
|
24 |
+#endif |
|
25 |
+ |
|
26 |
+#ifndef C_WINDOWS |
|
27 |
+#error You seem to lack the OS, the environment or the tools to build this file. |
|
28 |
+#endif |
|
29 |
+ |
|
30 |
+#include <windows.h> |
|
31 |
+#include <winreg.h> |
|
32 |
+#include "clamav.h" |
|
33 |
+#include "others.h" |
|
34 |
+ |
|
35 |
+#undef CONFDIR |
|
36 |
+ |
|
37 |
+#ifdef LATER |
|
38 |
+/* These are exported in the .def file */ |
|
39 |
+static char _CONFDIR[MAX_PATH]; |
|
40 |
+static char _CONFFRESHCLAM[MAX_PATH]; |
|
41 |
+static char _CONFCLAMD[MAX_PATH]; |
|
42 |
+ |
|
43 |
+char *CONFDIR=_CONFDIR; |
|
44 |
+char *CONFFRESHCLAM=_CONFFRESHCLAM; |
|
45 |
+char *CONFCLAMD=_CONFCLAMD; |
|
46 |
+ |
|
47 |
+#else |
|
48 |
+const char *CONFDIR = NULL; |
|
49 |
+const char *CONFFRESHCLAM = NULL; |
|
50 |
+const char *CONFCLAMD = NULL; |
|
51 |
+#endif |
|
52 |
+ |
|
53 |
+#ifdef _MANAGED |
|
54 |
+#pragma managed(push, off) |
|
55 |
+#endif |
|
56 |
+#include <winerror.h> |
|
57 |
+BOOL APIENTRY DllMain(HMODULE m, DWORD wassup, LPVOID r) |
|
58 |
+{ |
|
59 |
+#ifdef LATER |
|
60 |
+ HKEY key; |
|
61 |
+ unsigned int cs=0; |
|
62 |
+ if (wassup!=DLL_PROCESS_ATTACH) return TRUE; |
|
63 |
+ |
|
64 |
+ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\ClamAV", 0, KEY_QUERY_VALUE, &key) || RegQueryValueExA(key, "confdir", 0, 0, NULL, &cs)) { |
|
65 |
+ strcpy(CONFDIR, COPYDIR); |
|
66 |
+ strcpy(CONFFRESHCLAM, COPYDIR"\\freshclam.conf"); |
|
67 |
+ strcpy(CONFCLAMD, COPYDIR"\\clamd.conf"); |
|
68 |
+ return TRUE; |
|
69 |
+ } |
|
70 |
+ if (!cs || cs>=MAX_PATH || RegQueryValueExA(key, "confdir", 0, 0, CONFDIR, &cs)) { |
|
71 |
+ cli_errmsg("Unable to load libclamav: check your registry settings"); |
|
72 |
+ return FALSE; |
|
73 |
+ RegCloseKey(key); |
|
74 |
+ } |
|
75 |
+ RegCloseKey(key); |
|
76 |
+ _snprintf(CONFFRESHCLAM, MAX_PATH, "%s\\freshclam.conf", CONFDIR); |
|
77 |
+ _snprintf(CONFCLAMD, MAX_PATH, "%s\\clamd.conf", CONFDIR); |
|
78 |
+#endif |
|
79 |
+ return TRUE; |
|
80 |
+} |
|
81 |
+ |
|
82 |
+#ifdef _MANAGED |
|
83 |
+#pragma managed(pop) |
|
84 |
+#endif |
0 | 85 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,71 @@ |
0 |
+LIBRARY libClamAV |
|
1 |
+VERSION 0.90 |
|
2 |
+EXPORTS cl_scandesc @1 |
|
3 |
+EXPORTS cl_scanfile @2 |
|
4 |
+EXPORTS cl_load @3 |
|
5 |
+EXPORTS cl_build @4 |
|
6 |
+EXPORTS cl_dup @5 |
|
7 |
+EXPORTS cl_free @6 |
|
8 |
+EXPORTS cl_cvdhead @7 |
|
9 |
+EXPORTS cl_cvdparse @8 |
|
10 |
+EXPORTS cl_cvdverify @9 |
|
11 |
+EXPORTS cl_cvdfree @10 |
|
12 |
+EXPORTS cl_statinidir @11 |
|
13 |
+EXPORTS cl_statchkdir @12 |
|
14 |
+EXPORTS cl_statfree @13 |
|
15 |
+EXPORTS cl_debug @14 |
|
16 |
+EXPORTS cl_retflevel @15 |
|
17 |
+EXPORTS cl_settempdir @1000 NONAME |
|
18 |
+EXPORTS cl_retver @1001 NONAME |
|
19 |
+EXPORTS cl_strerror @1002 NONAME |
|
20 |
+EXPORTS cl_retdbdir @1003 NONAME |
|
21 |
+EXPORTS cli_rmdirs @1004 NONAME |
|
22 |
+EXPORTS cli_strtok @1005 NONAME |
|
23 |
+EXPORTS cli_gentemp @1006 NONAME |
|
24 |
+EXPORTS cli_strbcasestr @1007 NONAME |
|
25 |
+EXPORTS cli_strrcpy @1008 NONAME |
|
26 |
+EXPORTS cli_errmsg @1009 NONAME |
|
27 |
+EXPORTS cli_warnmsg @1010 NONAME |
|
28 |
+EXPORTS cli_calloc @1011 NONAME |
|
29 |
+EXPORTS cli_malloc @1012 NONAME |
|
30 |
+EXPORTS cli_untgz @1013 NONAME |
|
31 |
+EXPORTS cli_chomp @1014 NONAME |
|
32 |
+EXPORTS cli_gentempdesc @1015 NONAME |
|
33 |
+EXPORTS cli_rndnum @1016 NONAME |
|
34 |
+EXPORTS cli_unlockdb @1017 NONAME |
|
35 |
+EXPORTS cli_writelockdb @1018 NONAME |
|
36 |
+EXPORTS snprintf @1019 NONAME |
|
37 |
+EXPORTS closedir @1020 NONAME |
|
38 |
+EXPORTS readdir @1021 NONAME |
|
39 |
+EXPORTS opendir @1022 NONAME |
|
40 |
+EXPORTS pthread_win32_process_detach_np @1023 NONAME |
|
41 |
+EXPORTS gettimeofday @1024 NONAME |
|
42 |
+EXPORTS pthread_win32_process_attach_np @1025 NONAME |
|
43 |
+EXPORTS geteuid @1026 NONAME |
|
44 |
+EXPORTS chown @1027 NONAME |
|
45 |
+EXPORTS regfree @1028 NONAME |
|
46 |
+EXPORTS regexec @1029 NONAME |
|
47 |
+EXPORTS regcomp @1030 NONAME |
|
48 |
+EXPORTS pthread_mutex_unlock @1031 NONAME |
|
49 |
+EXPORTS pthread_mutex_lock @1032 NONAME |
|
50 |
+EXPORTS pthread_mutex_init @1033 NONAME |
|
51 |
+EXPORTS readdir_r @1034 NONAME |
|
52 |
+EXPORTS pthread_attr_destroy @1035 NONAME |
|
53 |
+EXPORTS pthread_cond_destroy @1036 NONAME |
|
54 |
+EXPORTS pthread_mutex_destroy @1037 NONAME |
|
55 |
+EXPORTS pthread_cond_wait @1038 NONAME |
|
56 |
+EXPORTS pthread_cond_broadcast @1039 NONAME |
|
57 |
+EXPORTS pthread_attr_setdetachstate @1040 NONAME |
|
58 |
+EXPORTS pthread_attr_init @1041 NONAME |
|
59 |
+EXPORTS pthread_cond_init @1042 NONAME |
|
60 |
+EXPORTS pthread_cond_signal @1043 NONAME |
|
61 |
+EXPORTS pthread_create @1044 NONAME |
|
62 |
+EXPORTS pthread_cond_timedwait @1045 NONAME |
|
63 |
+EXPORTS gzclose @1046 NONAME |
|
64 |
+EXPORTS gzgets @1047 NONAME |
|
65 |
+EXPORTS gzdopen @1048 NONAME |
|
66 |
+EXPORTS getuid @1049 NONAME |
|
67 |
+EXPORTS getgid @1050 NONAME |
|
68 |
+EXPORTS CONFDIR DATA |
|
69 |
+EXPORTS CONFFRESHCLAM DATA |
|
70 |
+EXPORTS CONFCLAMD DATA |