git-svn: trunk@1412
Nigel Horne authored on 2005/03/20 18:09:25... | ... |
@@ -15,7 +15,7 @@ |
15 | 15 |
* along with this program; if not, write to the Free Software |
16 | 16 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | 17 |
*/ |
18 |
-static char const rcsid[] = "$Id: blob.c,v 1.38 2005/03/18 08:34:35 nigelhorne Exp $"; |
|
18 |
+static char const rcsid[] = "$Id: blob.c,v 1.39 2005/03/20 09:09:25 nigelhorne Exp $"; |
|
19 | 19 |
|
20 | 20 |
#if HAVE_CONFIG_H |
21 | 21 |
#include "clamav-config.h" |
... | ... |
@@ -41,21 +41,6 @@ static char const rcsid[] = "$Id: blob.c,v 1.38 2005/03/18 08:34:35 nigelhorne E |
41 | 41 |
#define NDEBUG /* map CLAMAV debug onto standard */ |
42 | 42 |
#endif |
43 | 43 |
|
44 |
-/* Maximum filenames under various systems */ |
|
45 |
-#ifndef NAME_MAX /* e.g. Linux */ |
|
46 |
- |
|
47 |
-#ifdef MAXNAMELEN /* e.g. Solaris */ |
|
48 |
-#define NAME_MAX MAXNAMELEN |
|
49 |
-#else |
|
50 |
- |
|
51 |
-#ifdef FILENAME_MAX /* e.g. SCO */ |
|
52 |
-#define NAME_MAX FILENAME_MAX |
|
53 |
-#endif |
|
54 |
- |
|
55 |
-#endif |
|
56 |
- |
|
57 |
-#endif |
|
58 |
- |
|
59 | 44 |
#ifndef O_BINARY |
60 | 45 |
#define O_BINARY 0 |
61 | 46 |
#endif |
... | ... |
@@ -63,4 +63,17 @@ const char *fileblobGetFilename(const fileblob *fb); |
63 | 63 |
void fileblobAddData(fileblob *fb, const unsigned char *data, size_t len); |
64 | 64 |
void sanitiseName(char *name); |
65 | 65 |
|
66 |
+/* Maximum filenames under various systems */ |
|
67 |
+#ifndef NAME_MAX /* e.g. Linux */ |
|
68 |
+# ifdef MAXNAMELEN /* e.g. Solaris */ |
|
69 |
+# define NAME_MAX MAXNAMELEN |
|
70 |
+# else |
|
71 |
+# ifdef FILENAME_MAX /* e.g. SCO */ |
|
72 |
+# define NAME_MAX FILENAME_MAX |
|
73 |
+# else |
|
74 |
+# define NAME_MAX 256 |
|
75 |
+# endif |
|
76 |
+# endif |
|
77 |
+#endif |
|
78 |
+ |
|
66 | 79 |
#endif /*_BLOB_H*/ |
... | ... |
@@ -15,7 +15,7 @@ |
15 | 15 |
* along with this program; if not, write to the Free Software |
16 | 16 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | 17 |
*/ |
18 |
-static char const rcsid[] = "$Id: mbox.c,v 1.229 2005/03/18 18:12:25 nigelhorne Exp $"; |
|
18 |
+static char const rcsid[] = "$Id: mbox.c,v 1.230 2005/03/20 09:09:25 nigelhorne Exp $"; |
|
19 | 19 |
|
20 | 20 |
#if HAVE_CONFIG_H |
21 | 21 |
#include "clamav-config.h" |
... | ... |
@@ -291,21 +291,6 @@ static const struct tableinit { |
291 | 291 |
static pthread_mutex_t tables_mutex = PTHREAD_MUTEX_INITIALIZER; |
292 | 292 |
#endif |
293 | 293 |
|
294 |
-/* Maximum filenames under various systems */ |
|
295 |
-#ifndef NAME_MAX /* e.g. Linux */ |
|
296 |
- |
|
297 |
-#ifdef MAXNAMELEN /* e.g. Solaris */ |
|
298 |
-#define NAME_MAX MAXNAMELEN |
|
299 |
-#else |
|
300 |
- |
|
301 |
-#ifdef FILENAME_MAX /* e.g. SCO */ |
|
302 |
-#define NAME_MAX FILENAME_MAX |
|
303 |
-#endif |
|
304 |
- |
|
305 |
-#endif |
|
306 |
- |
|
307 |
-#endif |
|
308 |
- |
|
309 | 294 |
#ifndef O_BINARY |
310 | 295 |
#define O_BINARY 0 |
311 | 296 |
#endif |
... | ... |
@@ -21,6 +21,9 @@ |
21 | 21 |
* |
22 | 22 |
* Change History: |
23 | 23 |
* $Log: untar.c,v $ |
24 |
+ * Revision 1.23 2005/03/20 09:09:25 nigelhorne |
|
25 |
+ * Consolidate NAME_MAX |
|
26 |
+ * |
|
24 | 27 |
* Revision 1.22 2005/03/10 08:52:10 nigelhorne |
25 | 28 |
* Tidy |
26 | 29 |
* |
... | ... |
@@ -88,7 +91,7 @@ |
88 | 88 |
* First draft |
89 | 89 |
* |
90 | 90 |
*/ |
91 |
-static char const rcsid[] = "$Id: untar.c,v 1.22 2005/03/10 08:52:10 nigelhorne Exp $"; |
|
91 |
+static char const rcsid[] = "$Id: untar.c,v 1.23 2005/03/20 09:09:25 nigelhorne Exp $"; |
|
92 | 92 |
|
93 | 93 |
#include <stdio.h> |
94 | 94 |
#include <errno.h> |
... | ... |
@@ -106,21 +109,6 @@ static char const rcsid[] = "$Id: untar.c,v 1.22 2005/03/10 08:52:10 nigelhorne |
106 | 106 |
|
107 | 107 |
#define BLOCKSIZE 512 |
108 | 108 |
|
109 |
-/* Maximum filenames under various systems */ |
|
110 |
-#ifndef NAME_MAX /* e.g. Linux */ |
|
111 |
- |
|
112 |
-#ifdef MAXNAMELEN /* e.g. Solaris */ |
|
113 |
-#define NAME_MAX MAXNAMELEN |
|
114 |
-#else |
|
115 |
- |
|
116 |
-#ifdef FILENAME_MAX /* e.g. SCO */ |
|
117 |
-#define NAME_MAX FILENAME_MAX |
|
118 |
-#endif |
|
119 |
- |
|
120 |
-#endif |
|
121 |
- |
|
122 |
-#endif |
|
123 |
- |
|
124 | 109 |
#ifndef O_BINARY |
125 | 110 |
#define O_BINARY 0 |
126 | 111 |
#endif |