Browse code

Better use of clamav-config.h

git-svn: trunk@2071

Nigel Horne authored on 2006/07/12 16:26:53
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Jul 12 08:26:11 BST 2006 (njh)
2
+----------------------------------
3
+  * clamav-milter:	Better use of clamav-config.h
4
+
1 5
 Tue Jul 11 18:45:22 BST 2006 (njh)
2 6
 ----------------------------------
3 7
   * clamav-milter:	Use tableUpdate() to maintain the blacklist
... ...
@@ -23,7 +23,7 @@
23 23
  *
24 24
  * For installation instructions see the file INSTALL that came with this file
25 25
  */
26
-static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.249 2006/07/11 17:46:30 njh Exp $";
26
+static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.250 2006/07/12 07:25:43 njh Exp $";
27 27
 
28 28
 #define	CM_VERSION	"devel-210606"
29 29
 
... ...
@@ -48,9 +48,15 @@ static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.249 2006/07/11 17:46:30 nj
48 48
 #include <sysexits.h>
49 49
 #include <sys/stat.h>
50 50
 #include <syslog.h>
51
+#if	HAVE_UNISTD_H
51 52
 #include <unistd.h>
53
+#endif
54
+#if	HAVE_STDINT_H
52 55
 #include <stdlib.h>
56
+#endif
57
+#if	HAVE_STRING_H
53 58
 #include <string.h>
59
+#endif
54 60
 #include <sys/wait.h>
55 61
 #include <assert.h>
56 62
 #include <sys/socket.h>
... ...
@@ -60,15 +66,21 @@ static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.249 2006/07/11 17:46:30 nj
60 60
 #include <sys/un.h>
61 61
 #include <stdarg.h>
62 62
 #include <errno.h>
63
+#if	HAVE_LIBMILTER_MFAPI_H
63 64
 #include <libmilter/mfapi.h>
65
+#endif
64 66
 #include <pthread.h>
65 67
 #include <sys/time.h>
66 68
 #include <signal.h>
69
+#if	HAVE_REGEX_H
67 70
 #include <regex.h>
71
+#endif
68 72
 #include <fcntl.h>
69 73
 #include <pwd.h>
70 74
 #include <grp.h>
75
+#if	HAVE_SYS_PARAM_H
71 76
 #include <sys/param.h>
77
+#endif
72 78
 
73 79
 #if HAVE_MMAP
74 80
 #if HAVE_SYS_MMAN_H
... ...
@@ -96,7 +108,9 @@ static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.249 2006/07/11 17:46:30 nj
96 96
 #endif
97 97
 
98 98
 #ifdef	WITH_TCPWRAP
99
+#if	HAVE_TCPD_H
99 100
 #include <tcpd.h>
101
+#endif
100 102
 
101 103
 int	allow_severity = LOG_DEBUG;
102 104
 int	deny_severity = LOG_NOTICE;