Browse code

Needs libcurl >= 7.11

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@983 77e5149b-7576-45b1-b177-96237e5ba77b

Nigel Horne authored on 2004/10/09 17:04:58
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Sat Oct  9 09:03:21 BST 2004 (njh)
2
+----------------------------------
3
+  * libclamav/mbox.c:	Only use libcurl if the version is >= 7.11
4
+
1 5
 Sat Oct  9 03:07:35 CEST 2004 (tk)
2 6
 ----------------------------------
3 7
   * libclamav/readdb.c: make signature parser more elastic
... ...
@@ -17,6 +17,9 @@
17 17
  *
18 18
  * Change History:
19 19
  * $Log: mbox.c,v $
20
+ * Revision 1.150  2004/10/09 08:01:37  nigelhorne
21
+ * Needs libcurl >= 7.11
22
+ *
20 23
  * Revision 1.149  2004/10/06 17:21:30  nigelhorne
21 24
  * Fix RFC2298 handling broken by RFC1341 code
22 25
  *
... ...
@@ -435,7 +438,7 @@
435 435
  * Compilable under SCO; removed duplicate code with message.c
436 436
  *
437 437
  */
438
-static	char	const	rcsid[] = "$Id: mbox.c,v 1.149 2004/10/06 17:21:30 nigelhorne Exp $";
438
+static	char	const	rcsid[] = "$Id: mbox.c,v 1.150 2004/10/09 08:01:37 nigelhorne Exp $";
439 439
 
440 440
 #if HAVE_CONFIG_H
441 441
 #include "clamav-config.h"
... ...
@@ -539,18 +542,31 @@ typedef enum	{ FALSE = 0, TRUE = 1 } bool;
539 539
  * LDFLAGS=`curl-config --libs` ./configure ...
540 540
  */
541 541
 #include <curl/curl.h>
542
+
543
+/*
544
+ * Needs curl >= 7.11 (I've heard that 7.9 can cause crashes and 7.10 is
545
+ * untested)
546
+ */
547
+#if	(LIBCURL_VERSION_MAJOR < 7)
548
+#undef	WITH_CURL	/* also undef FOLLOWURLS? */
542 549
 #endif
543 550
 
551
+#if	(LIBCURL_VERSION_MAJOR == 7) && (LIBCURL_VERSION_MINOR < 11)
552
+#undef	WITH_CURL	/* also undef FOLLOWURLS? */
553
+#endif
554
+
555
+#endif	/*WITH_CURL*/
556
+
544 557
 #else	/*!FOLLOWURLS*/
545 558
 #undef	WITH_CURL
546
-#endif
559
+#endif	/*FOLLOWURLS*/
547 560
 
548 561
 /*
549 562
  * Define this to handle RFC1341 messages.
550 563
  *	This is experimental code so it is up to YOU to (1) ensure it's secure
551 564
  * (2) peridically trim the directory of old files
552 565
  */
553
-#define	PARTIAL_DIR	"/tmp/partial"	/* FIXME: should be config based on TMPDIR */
566
+/*#define	PARTIAL_DIR	"/tmp/partial"	/* FIXME: should be config based on TMPDIR */
554 567
 
555 568
 static	message	*parseEmailHeaders(const message *m, const table_t *rfc821Table);
556 569
 static	int	parseEmailHeader(message *m, const char *line, const table_t *rfc821Table);