mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
socklen-t-check-20090316
LICENSE IPL10 verify we have socklen_t and if not, get it
This commit is contained in:
parent
3eec407510
commit
2d683a880b
@ -317,7 +317,6 @@ dnl AC_MINIX
|
|||||||
dnl Various compiler setup.
|
dnl Various compiler setup.
|
||||||
AC_TYPE_PID_T
|
AC_TYPE_PID_T
|
||||||
AC_TYPE_SIZE_T
|
AC_TYPE_SIZE_T
|
||||||
AC_TYPE_SIGNAL
|
|
||||||
COMPILER_HAS_FUNCTION_MACRO
|
COMPILER_HAS_FUNCTION_MACRO
|
||||||
|
|
||||||
dnl Checks for programs.
|
dnl Checks for programs.
|
||||||
@ -1556,6 +1555,7 @@ else
|
|||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_TYPE_SOCKLEN_T
|
||||||
AC_TYPE_SIGNAL
|
AC_TYPE_SIGNAL
|
||||||
AC_CHECK_TYPE(ssize_t, int)
|
AC_CHECK_TYPE(ssize_t, int)
|
||||||
AC_CHECK_TYPES(sig_t, , ,
|
AC_CHECK_TYPES(sig_t, , ,
|
||||||
|
18
src/cf/socklen.m4
Normal file
18
src/cf/socklen.m4
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
AC_DEFUN([AC_TYPE_SOCKLEN_T],
|
||||||
|
[
|
||||||
|
AC_CACHE_CHECK([for socklen_t],
|
||||||
|
ac_cv_type_socklen_t, [
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
],
|
||||||
|
[
|
||||||
|
socklen_t len = 42; return 0;
|
||||||
|
],
|
||||||
|
ac_cv_type_socklen_t="yes", ac_cv_type_socklen_t="no")
|
||||||
|
])
|
||||||
|
|
||||||
|
if test "x$ac_cv_type_socklen_t" = "xno"; then
|
||||||
|
AC_DEFINE(socklen_t, int, [the type of the last argument to getsockopt etc])
|
||||||
|
fi
|
||||||
|
])
|
Loading…
Reference in New Issue
Block a user