Fix build on Solaris 10.
authorMichael Poole <mdpoole@troilus.org>
Wed, 14 Dec 2005 03:01:38 +0000 (03:01 +0000)
committerMichael Poole <mdpoole@troilus.org>
Wed, 14 Dec 2005 03:01:38 +0000 (03:01 +0000)
git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1577 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ChangeLog
configure.in
ircd/ircd_crypt_native.c
ircd/os_generic.c

index e1738f0cbc0965db997d91ba07fc41752b44e8ca..b9fc05ac93cc824bf48e747fcc0b07d2fb84e98a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-12-13  Michael Poole <mdpoole@troilus.org>
+
+       * configure.in: Define a macro when compiling on Solaris.
+
+       * ircd/ircd_crypt_native.c (_XOPEN_SOURCE): Turn down to 500 so
+       that Solaris doesn't complain that SUSv3 requires C99.
+
+       * ircd/os_generic.c (_XOPEN_SOURCE): Likewise, but leave it at 600
+       on non-Solaris platforms so that IPv6 stays supported.
+
 2005-12-13  Michael Poole <mdpoole@troilus.org>
 
        * ircd/m_join.c (ms_join): Prevent net rides allowed by moving the
index e893d33279e731b78c2bdc3c1dd08d0b6b464a81..1ddff77486384c6134bdc6522afb8b6bd81b85a5 100644 (file)
@@ -171,6 +171,7 @@ case "$host" in
        else
            unet_poll_syscall=no
        fi
+        AC_DEFINE([IRCU_SOLARIS], 1, [Define if building on Solaris])
        ;;
 
     *-sunos*)
index fe267c5b19866ab0127ec9d514049268d62565e2..c6b1c585d9abc45e0c086486db3904aeb01e261d 100644 (file)
@@ -25,7 +25,7 @@
  * function (typically a DES encryption routine, but can be anything nowadays).
  * 
  */
-#define _XOPEN_SOURCE 600
+#define _XOPEN_SOURCE 500
 
 #include "config.h"
 #include "ircd_crypt.h"
index 42817a72b1ab0335a67be603c5c173292deb4a0e..ff56fce7f263bddbdfa06d62ca44e109a2b388d1 100644 (file)
  */
 #include "config.h"
 
-#define _XOPEN_SOURCE  600 /**< make limits.h #define IOV_MAX */
-#define __EXTENSIONS__  1   /**< make Solaris netinet/in.h know IPv6 */
+#ifdef IRCU_SOLARIS
+/* Solaris requires C99 support for SUSv3, but C99 support breaks other
+ * parts of the build.  So fall back to SUSv2, but request IPv6 support
+ * by defining __EXTENSIONS__.
+ */
+#define _XOPEN_SOURCE   500
+#define __EXTENSIONS__  1
+#else
+/* FreeBSD 6.0 requires SUSv3 to support IPv6.  Apparently some other
+ * OS requires SUSv3 to define IOV_MAX, but its identity is lost for
+ * the time being.
+ */
+#define _XOPEN_SOURCE   600
+#endif
 
 #include "ircd_osdep.h"
 #include "msgq.h"