Forgot T_SOA when adding the backup T_xxx definitions. Also, T_SOA was
[exim.git] / src / src / exim.h
index 42f7980c2ec0b23223022d66e7bc04359976f317..85571f62ffaf927148c253d98edbfffdbe390db5 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/exim.h,v 1.9 2005/03/15 14:09:12 ph10 Exp $ */
+/* $Cambridge: exim/src/src/exim.h,v 1.17 2005/06/29 10:56:35 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -49,6 +49,7 @@ making unique names. */
 
 #include <ctype.h>
 #include <locale.h>
+#include <math.h>
 #include <signal.h>
 #include <stdarg.h>
 #include <stddef.h>
@@ -60,7 +61,7 @@ making unique names. */
 /* Unix includes */
 
 #include <errno.h>
-#if    defined(__svr4__) && defined(__sparc) && ! defined(__EXTENSIONS__)
+#if defined(__svr4__) && defined(__sparc) && ! defined(__EXTENSIONS__)
 #define __EXTENSIONS__  /* so that SunOS 5 gets NGROUPS_MAX */
 #include <limits.h>
 #undef  __EXTENSIONS__
@@ -92,6 +93,9 @@ making unique names. */
 #include <sys/file.h>
 #include <dirent.h>
 #include <netdb.h>
+#ifndef NO_POLL_H
+#include <poll.h>
+#endif
 #include <pwd.h>
 #include <grp.h>
 #include <syslog.h>
@@ -207,7 +211,7 @@ or a macro with entries f_frsize and f_bsize. */
 #endif
 
 
-#ifndef  SIOCGIFCONF    /* HACK for SunOS 5 */
+#ifndef  SIOCGIFCONF   /* HACK for SunOS 5 */
 #include <sys/sockio.h>
 #endif
 
@@ -217,23 +221,19 @@ or a macro with entries f_frsize and f_bsize. */
 #include <fcntl.h>
 
 /* There's a shambles in IRIX6 - it defines EX_OK in unistd.h which conflicts
-with the definition in sysexits.h. Arrange to preserve it, even though at
-present Exim doesn't actually use it. */
+with the definition in sysexits.h. Exim does not actually use this macro, so we
+just undefine it. It would be nice to be able to re-instate the definition from
+sysexits.h if there is no definition in unistd.h, but I do not think there is a
+way to do this in C because macro definitions are not scanned for other macros
+at definition time. [The code here used to assume they were, until I was
+disabused of the notion. Luckily, since EX_OK is not used, it didn't matter.] */
 
 #ifdef EX_OK
-#define SAVE_EX_OK EX_OK
 #undef EX_OK
 #endif
 
 #include <unistd.h>
 
-#ifdef SAVE_EX_OK
-#ifdef EX_OK
-#undef EX_OK
-#endif
-#define EX_OK SAVE_EX_OK
-#endif
-
 #include <utime.h>
 #ifndef NO_NET_IF_H
 #include <net/if.h>
@@ -279,12 +279,48 @@ header files. I don't suppose they have T_SRV either. */
 #define T_SRV 33
 #endif
 
-/* We use the private type T_ZNS for retrieving the nameservers for the
-enclosing zone of a domain, and the private type T_MXH for retrieving
-the MX hostnames only (without their priorities). */
+/* It seems that some versions of arpa/nameser.h don't define *any* of the
+T_xxx macros, which seem to be non-standard nowadays. Just to be on the safe
+side, put in definitions for all the ones that Exim uses. */
+
+#ifndef T_A
+#define T_A 1
+#endif
+
+#ifndef T_CNAME
+#define T_CNAME 5
+#endif
+
+#ifndef T_SOA
+#define T_SOA 6
+#endif
+
+#ifndef T_MX
+#define T_MX 15
+#endif
+
+#ifndef T_NS
+#define T_NS 2
+#endif
+
+#ifndef T_PTR
+#define T_PTR 12
+#endif
+
+
+/* We define a few private types for special DNS lookups:
+
+ . T_ZNS gets the nameservers of the enclosing zone of a domain
+
+ . T_MXH gets the MX hostnames only (without their priorities)
+
+ . T_CSA gets the domain's Client SMTP Authorization SRV record
+
+*/
 
 #define T_ZNS (-1)
 #define T_MXH (-2)
+#define T_CSA (-3)
 
 /* The resolv.h header defines __P(x) on some Solaris 2.5.1 systems (without
 checking that it is already defined, in fact). This conflicts with other
@@ -414,7 +450,7 @@ requires various things that are set therein. */
 #include <iconv.h>
 #endif
 
-#ifdef USE_READLINE
+#if defined(USE_READLINE) || defined(EXPAND_DLFUNC)
 #include <dlfcn.h>
 #endif