Support for MaxOS/X.

This commit is contained in:
Guus Sliepen 2002-04-19 14:06:40 +00:00
parent 97d492d9e2
commit 40c2e36a96
5 changed files with 31 additions and 4 deletions

View file

@ -75,3 +75,6 @@
/* 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

View file

@ -1,6 +1,6 @@
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)
@ -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 ]
;;
*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 ]
@ -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_MSG_ERROR("Unknown operating system.")
;;
esac
AC_CACHE_SAVE
@ -72,6 +79,18 @@ AC_TYPE_SIZE_T
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
@ -83,7 +102,6 @@ jm_FUNC_REALLOC
AM_GNU_GETTEXT
dnl Support for SunOS
AC_CHECK_FUNC(socket, [], [

View 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.
$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"
@ -27,6 +27,7 @@
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <signal.h>
#include <sys/socket.h>

View 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.
$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"
@ -40,6 +40,7 @@
#include <xalloc.h>
#include <syslog.h>
#include <string.h>
#include <stdint.h>
#include <avl_tree.h>

View file

@ -48,5 +48,9 @@
/* Other functions */
#include <dropin.h>
#ifndef HAVE_SOCKLEN_T
typedef int socklen_t;
#endif
#endif /* __TINC_SYSTEM_H__ */