(1) Setting WITH_OLD_DEMIME without WITH_CONTENT_SCAN caused eximon not
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Wed, 29 Dec 2004 16:24:03 +0000 (16:24 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Wed, 29 Dec 2004 16:24:03 +0000 (16:24 +0000)
to compile; WITH_CONTENT_SCAN was forced in exim.h in this case, but was
not forced for eximon. I have updated buildconfig so that it gets set in
config.h and thus applies everywhere. (2) Fixed some compiler warnings
in the demime.c module. (3) Moved the inclusion of config.h above the
inclusion of mytypes.h and macros.h for eximon, to be the same as for
exim itself.

src/exim_monitor/em_hdr.h
src/src/buildconfig.c
src/src/demime.c
src/src/exim.h

index 02cc2fd2254cd1ea979b731e002d15a7796802d9..9fd8a18a68a7dfbd0908aead328583b1344eac89 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/exim_monitor/em_hdr.h,v 1.2 2004/10/07 10:48:02 ph10 Exp $ */
+/* $Cambridge: exim/src/exim_monitor/em_hdr.h,v 1.3 2004/12/29 16:24:03 ph10 Exp $ */
 
 /*************************************************
 *                 Exim Monitor                   *
 
 /*************************************************
 *                 Exim Monitor                   *
@@ -95,9 +95,9 @@ that this kind of kludge isn't needed. */
 
 #define MAXPACKET 1024
 
 
 #define MAXPACKET 1024
 
+#include "config.h"
 #include "mytypes.h"
 #include "macros.h"
 #include "mytypes.h"
 #include "macros.h"
-#include "config.h"
 
 #include "local_scan.h"
 #include "structs.h"
 
 #include "local_scan.h"
 #include "structs.h"
index 6adb5d033fa014051258a97f5810b113205075f3..ce39a2c539b0c5906111d3ad0284db4c68a72d66 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/buildconfig.c,v 1.3 2004/11/05 12:33:59 ph10 Exp $ */
+/* $Cambridge: exim/src/src/buildconfig.c,v 1.4 2004/12/29 16:24:03 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -629,6 +629,19 @@ while (fgets(buffer, sizeof(buffer), base) != NULL)
     continue;
     }
 
     continue;
     }
 
+  /* WITH_CONTENT_SCAN is another special case: it must be set if either it or 
+  WITH_OLD_DEMIME is set. */  
+
+  if (strcmp(name, "WITH_CONTENT_SCAN") == 0)
+    {
+    char *wcs = getenv("WITH_CONTENT_SCAN");
+    char *wod = getenv("WITH_OLD_DEMIME");
+    if (wcs != NULL || wod != NULL)
+      fprintf(new, "#define WITH_CONTENT_SCAN     yes\n");
+    else fprintf(new, "/* WITH_CONTENT_SCAN not set */\n");
+    continue;
+    } 
+
   /* Otherwise, check whether a value exists in the environment. Remember if
   it is an AUTH setting or SUPPORT_CRYPTEQ. */
 
   /* Otherwise, check whether a value exists in the environment. Remember if
   it is an AUTH setting or SUPPORT_CRYPTEQ. */
 
index 724e47561a604a8ade4af5effc405b75b08e1a5d..17adf74f4ace3c8619c7eabbdb107fb90e1b0fc3 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/demime.c,v 1.2 2004/12/16 15:11:47 tom Exp $ */
+/* $Cambridge: exim/src/src/demime.c,v 1.3 2004/12/29 16:24:03 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -22,7 +22,7 @@ int demime(uschar **listptr) {
   uschar *list = *listptr;
   uschar *option;
   uschar option_buffer[64];
   uschar *list = *listptr;
   uschar *option;
   uschar option_buffer[64];
-  unsigned long long mbox_size;
+  unsigned long mbox_size;
   FILE *mbox_file;
   uschar defer_error_buffer[1024];
   int demime_rc = 0;
   FILE *mbox_file;
   uschar defer_error_buffer[1024];
   int demime_rc = 0;
index fa7acf8bade29c364f803c4b19634d4f9d3e44b9..53b70d9d4f894c2b00f1c1df58baf92aa7b55fd7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/exim.h,v 1.5 2004/12/21 09:40:01 ph10 Exp $ */
+/* $Cambridge: exim/src/src/exim.h,v 1.6 2004/12/29 16:24:03 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -384,13 +384,6 @@ mytypes.h and store.h, so we don't need to mention them explicitly. */
 
 #include "config.h"
 
 
 #include "config.h"
 
-/* Before including the rest of the Exim headers, let's clear up some content
-scanning dependencies. */
-
-#ifdef WITH_OLD_DEMIME
-#define WITH_CONTENT_SCAN
-#endif
-
 #include "local_scan.h"
 #include "macros.h"
 #include "dbstuff.h"
 #include "local_scan.h"
 #include "macros.h"
 #include "dbstuff.h"