Browse code

NAME_MAX was not defined (closes bug#60)

git-svn: trunk@2451

Tomasz Kojm authored on 2006/10/29 22:41:24
Showing 4 changed files
... ...
@@ -1,3 +1,7 @@
1
+Sun Oct 29 14:40:14 CET 2006 (tk)
2
+---------------------------------
3
+  * clamd/session.c: NAME_MAX was not defined (closes bug#60)
4
+
1 5
 Sun Oct 29 14:34:01 CET 2006 (tk)
2 6
 ---------------------------------
3 7
   * libclamav/unzip.c: improve error handling
... ...
@@ -57,6 +57,7 @@
57 57
 #include "shared/cfgparser.h"
58 58
 #include "shared/memory.h"
59 59
 #include "shared/output.h"
60
+#include "shared/misc.h"
60 61
 
61 62
 #include "others.h"
62 63
 #include "scanner.h"
... ...
@@ -71,17 +72,6 @@ dev_t procdev; /* /proc device */
71 71
 #define	closesocket(s)	close(s)
72 72
 #endif
73 73
 
74
-/* Maximum filenames under various systems - njh */
75
-#ifndef	NAME_MAX	/* e.g. Linux */
76
-# ifdef	MAXNAMELEN	/* e.g. Solaris */
77
-#   define	NAME_MAX	MAXNAMELEN
78
-# else
79
-#   ifdef	FILENAME_MAX	/* e.g. SCO */
80
-#     define	NAME_MAX	FILENAME_MAX
81
-#   endif
82
-# endif
83
-#endif
84
-
85 74
 int checksymlink(const char *path)
86 75
 {
87 76
 	struct stat statbuf;
... ...
@@ -49,6 +49,7 @@
49 49
 #include "shared/cfgparser.h"
50 50
 #include "shared/memory.h"
51 51
 #include "shared/output.h"
52
+#include "shared/misc.h"
52 53
 
53 54
 #include "others.h"
54 55
 #include "scanner.h"
... ...
@@ -20,6 +20,17 @@
20 20
 #ifndef __MISC_H
21 21
 #define __MISC_H
22 22
 
23
+/* Maximum filenames under various systems - njh */
24
+#ifndef	NAME_MAX	/* e.g. Linux */
25
+# ifdef	MAXNAMELEN	/* e.g. Solaris */
26
+#   define	NAME_MAX	MAXNAMELEN
27
+# else
28
+#   ifdef	FILENAME_MAX	/* e.g. SCO */
29
+#     define	NAME_MAX	FILENAME_MAX
30
+#   endif
31
+# endif
32
+#endif
33
+
23 34
 #include "cfgparser.h"
24 35
 
25 36
 char *freshdbdir(void);