Modify OS/os.c-Linux so that Exim compiles on kfreebsd-gnu (sic).
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Wed, 6 Apr 2005 14:09:17 +0000 (14:09 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Wed, 6 Apr 2005 14:09:17 +0000 (14:09 +0000)
doc/doc-txt/ChangeLog
src/OS/os.c-Linux

index 8f648575b6c0064d44eff0e06102eeaf6bcdf123..2d4044efcbc3a2570f2bbcf56402a2179e51c545 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.114 2005/04/06 14:03:53 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.115 2005/04/06 14:09:17 ph10 Exp $
 
 Change log file for Exim from version 4.21
 -------------------------------------------
 
 Change log file for Exim from version 4.21
 -------------------------------------------
@@ -168,6 +168,15 @@ PH/27 $acl_verify_message is now set immediately after the failure of a
       Previously, $acl_verify_message was set only while expanding "message"
       and "log_message" when a very denied access.
 
       Previously, $acl_verify_message was set only while expanding "message"
       and "log_message" when a very denied access.
 
+PH/28 Modified OS/os.c-Linux with
+
+        -#ifndef OS_LOAD_AVERAGE
+        +#if !defined(OS_LOAD_AVERAGE) && defined(__linux__)
+
+      to make Exim compile on kfreebsd-gnu. (I'm totally confused about the
+      nomenclature these days.)
+
+
 
 A note about Exim versions 4.44 and 4.50
 ----------------------------------------
 
 A note about Exim versions 4.44 and 4.50
 ----------------------------------------
index 5589a015bc1177cd450c286b8bff9c90aeb64712..88b78993d1992a35f0a8ffb6c4fa81caf08fc67d 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/OS/os.c-Linux,v 1.1 2004/10/06 15:07:39 ph10 Exp $ */
+/* $Cambridge: exim/src/OS/os.c-Linux,v 1.2 2005/04/06 14:09:17 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -20,7 +20,7 @@ a unique function here, and define OS_LOAD_AVERAGE to stop src/os.c trying to
 provide the function. However, when compiling os.c for utilities, we may not
 want this at all, so check that it isn't set first. */
 
 provide the function. However, when compiling os.c for utilities, we may not
 want this at all, so check that it isn't set first. */
 
-#ifndef OS_LOAD_AVERAGE
+#if !defined(OS_LOAD_AVERAGE) && defined(__linux__)
 #define OS_LOAD_AVERAGE
 
 /* Linux has 2 ways of returning load average:
 #define OS_LOAD_AVERAGE
 
 /* Linux has 2 ways of returning load average:
@@ -114,9 +114,9 @@ last = yield;
 if (last != NULL) while (last->next != NULL) last = last->next;
 
 while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n",
 if (last != NULL) while (last->next != NULL) last = last->next;
 
 while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n",
-            addr6p[0], addr6p[1], addr6p[2], addr6p[3],
-            addr6p[4], addr6p[5], addr6p[6], addr6p[7],
-            &if_idx, &plen, &scope, &dad_status, devname) != EOF)
+             addr6p[0], addr6p[1], addr6p[2], addr6p[3],
+             addr6p[4], addr6p[5], addr6p[6], addr6p[7],
+             &if_idx, &plen, &scope, &dad_status, devname) != EOF)
   {
   struct sockaddr_in6 addr;
 
   {
   struct sockaddr_in6 addr;
 
@@ -126,8 +126,8 @@ while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n",
   next->next = NULL;
   next->port = 0;
   sprintf(CS next->address, "%s:%s:%s:%s:%s:%s:%s:%s",
   next->next = NULL;
   next->port = 0;
   sprintf(CS next->address, "%s:%s:%s:%s:%s:%s:%s:%s",
-        addr6p[0], addr6p[1], addr6p[2], addr6p[3],
-        addr6p[4], addr6p[5], addr6p[6], addr6p[7]);
+         addr6p[0], addr6p[1], addr6p[2], addr6p[3],
+         addr6p[4], addr6p[5], addr6p[6], addr6p[7]);
 
   /* Normalize the representation */
 
 
   /* Normalize the representation */