1dnl @synopsis TYPE_SOCKLEN_T 2dnl 3dnl Check whether sys/socket.h defines type socklen_t. Please note 4dnl that some systems require sys/types.h to be included before 5dnl sys/socket.h can be compiled. 6dnl 7dnl @version $\Id: type_socklen_t.m4,v 1.2 2000/07/19 13:03:32 simons Exp $ 8dnl @author Lars Brinkhoff <lars@nocrew.org> 9dnl 10AC_DEFUN([TYPE_SOCKLEN_T], 11[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, 12[ 13 AC_TRY_COMPILE( 14 [#include <sys/types.h> 15 #include <sys/socket.h>], 16 [socklen_t len = 42; return 0;], 17 ac_cv_type_socklen_t=yes, 18 ac_cv_type_socklen_t=no) 19]) 20 if test $ac_cv_type_socklen_t != yes; then 21 AC_DEFINE(socklen_t, int, [have socklen_t type]) 22 fi 23]) 24