Support for MaxOS/X.
authorGuus Sliepen <guus@tinc-vpn.org>
Fri, 19 Apr 2002 14:06:40 +0000 (14:06 +0000)
committerGuus Sliepen <guus@tinc-vpn.org>
Fri, 19 Apr 2002 14:06:40 +0000 (14:06 +0000)
acconfig.h
configure.in
src/netutl.c
src/route.c
system.h

index 41fdb99..f8e234f 100644 (file)
@@ -75,3 +75,6 @@
 
 /* Define to enable use of old SSLeay_add_all_algorithms() function */
 #undef HAVE_SSLEAY_ADD_ALL_ALGORITHMS
 
 /* Define to enable use of old SSLeay_add_all_algorithms() function */
 #undef HAVE_SSLEAY_ADD_ALL_ALGORITHMS
+
+/* Define if there a socklen_t */
+#undef HAVE_SOCKLEN_T
index 2c1fa70..d8b68e4 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
 dnl Process this file with autoconf to produce a configure script.
 
-dnl $Id: configure.in,v 1.13.2.43 2002/03/22 11:43:46 guus Exp $
+dnl $Id: configure.in,v 1.13.2.44 2002/04/19 14:06:40 guus Exp $
 
 AC_INIT(src/tincd.c)
 AM_INIT_AUTOMAKE(tinc, 1.0-cvs)
 
 AC_INIT(src/tincd.c)
 AM_INIT_AUTOMAKE(tinc, 1.0-cvs)
@@ -42,6 +42,10 @@ case $host_os in
     AC_DEFINE(HAVE_FREEBSD)
     [ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ]
   ;;
     AC_DEFINE(HAVE_FREEBSD)
     [ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ]
   ;;
+  *darwin*)
+    AC_DEFINE(HAVE_FREEBSD)
+    [ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ]
+  ;;
   *solaris*)
     AC_DEFINE(HAVE_SOLARIS)
     [ rm -f src/device.c; ln -sf solaris/device.c src/device.c ]
   *solaris*)
     AC_DEFINE(HAVE_SOLARIS)
     [ rm -f src/device.c; ln -sf solaris/device.c src/device.c ]
@@ -54,6 +58,9 @@ case $host_os in
     AC_DEFINE(HAVE_NETBSD)
     [ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ]
   ;;
     AC_DEFINE(HAVE_NETBSD)
     [ rm -f src/device.c; ln -sf netbsd/device.c src/device.c ]
   ;;
+  *)
+    AC_MSG_ERROR("Unknown operating system.")
+  ;;
 esac
 
 AC_CACHE_SAVE
 esac
 
 AC_CACHE_SAVE
@@ -72,6 +79,18 @@ AC_TYPE_SIZE_T
 AC_HEADER_TIME
 AC_STRUCT_TM
 
 AC_HEADER_TIME
 AC_STRUCT_TM
 
+AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
+[
+  AC_TRY_COMPILE(
+  [#include <sys/socket.h>],
+  [socklen_t len = 42; return len;],
+  ac_cv_type_socklen_t=yes,
+  ac_cv_type_socklen_t=no)
+])
+if test $ac_cv_type_socklen_t == yes; then
+  AC_DEFINE(HAVE_SOCKLEN_T)
+fi
+
 dnl Checks for library functions.
 AC_FUNC_MEMCMP
 AC_FUNC_ALLOCA
 dnl Checks for library functions.
 AC_FUNC_MEMCMP
 AC_FUNC_ALLOCA
@@ -83,7 +102,6 @@ jm_FUNC_REALLOC
 
 AM_GNU_GETTEXT
 
 
 AM_GNU_GETTEXT
 
-
 dnl Support for SunOS
 
 AC_CHECK_FUNC(socket, [], [
 dnl Support for SunOS
 
 AC_CHECK_FUNC(socket, [], [
index 20d3809..1e08a9e 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id: netutl.c,v 1.12.4.34 2002/04/05 09:11:38 guus Exp $
+    $Id: netutl.c,v 1.12.4.35 2002/04/19 14:06:40 guus Exp $
 */
 
 #include "config.h"
 */
 
 #include "config.h"
@@ -27,6 +27,7 @@
 #include <netinet/in.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <netinet/in.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <stdint.h>
 #include <string.h>
 #include <signal.h>
 #include <sys/socket.h>
 #include <string.h>
 #include <signal.h>
 #include <sys/socket.h>
index dcf43e4..94c3d57 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id: route.c,v 1.1.2.37 2002/03/19 00:08:23 guus Exp $
+    $Id: route.c,v 1.1.2.38 2002/04/19 14:06:40 guus Exp $
 */
 
 #include "config.h"
 */
 
 #include "config.h"
@@ -40,6 +40,7 @@
 #include <xalloc.h>
 #include <syslog.h>
 #include <string.h>
 #include <xalloc.h>
 #include <syslog.h>
 #include <string.h>
+#include <stdint.h>
 
 #include <avl_tree.h>
 
 
 #include <avl_tree.h>
 
index 51adca0..8006d1a 100644 (file)
--- a/system.h
+++ b/system.h
@@ -48,5 +48,9 @@
 /* Other functions */
 #include <dropin.h>
 
 /* Other functions */
 #include <dropin.h>
 
+#ifndef HAVE_SOCKLEN_T
+typedef int socklen_t;
+#endif
+
 #endif /* __TINC_SYSTEM_H__ */
 
 #endif /* __TINC_SYSTEM_H__ */