git-svn: trunk@1810
Nigel Horne authored on 2006/01/11 18:49:03... | ... |
@@ -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.273 2006/01/10 14:55:26 nigelhorne Exp $"; |
|
18 |
+static char const rcsid[] = "$Id: mbox.c,v 1.274 2006/01/11 09:49:03 nigelhorne Exp $"; |
|
19 | 19 |
|
20 | 20 |
#if HAVE_CONFIG_H |
21 | 21 |
#include "clamav-config.h" |
... | ... |
@@ -305,8 +305,12 @@ static pthread_mutex_t tables_mutex = PTHREAD_MUTEX_INITIALIZER; |
305 | 305 |
#else /* HAVE_SYS_MMAN_H */ |
306 | 306 |
#undef HAVE_MMAP |
307 | 307 |
#endif |
308 |
+#else /*HAVE_MMAP*/ |
|
309 |
+#undef NEW_WORLD |
|
310 |
+#endif |
|
308 | 311 |
#endif |
309 | 312 |
|
313 |
+#ifdef NEW_WORLD |
|
310 | 314 |
/* |
311 | 315 |
* Files larger than this are scanned with the old method, should be |
312 | 316 |
* StreamMaxLength, I guess |
... | ... |
@@ -357,15 +361,15 @@ static void free_map(void); |
357 | 357 |
* |
358 | 358 |
* TODO: Fall through to cli_parse_mbox() too often |
359 | 359 |
* |
360 |
- * FIXME: Fall through on systems without mmap() |
|
360 |
+ * TODO: Add support for systems without mmap() |
|
361 | 361 |
* |
362 | 362 |
* TODO: partial_dir fall through |
363 | 363 |
*/ |
364 | 364 |
int |
365 | 365 |
cli_mbox(const char *dir, int desc, unsigned int options) |
366 | 366 |
{ |
367 |
- char *start, *ptr, *line, *p, *q; |
|
368 |
- const char *last; |
|
367 |
+ char *start, *ptr, *line; |
|
368 |
+ const char *last, *p, *q; |
|
369 | 369 |
size_t size; |
370 | 370 |
struct stat statb; |
371 | 371 |
message *m; |