diff options
author | SUZUKI, Shinsuke <suz@kame.net> | 2006-12-04 15:18:39 +0000 |
---|---|---|
committer | Bjørn Mork <bjorn@mork.no> | 2010-08-06 15:37:36 +0200 |
commit | b73261b6f5f0dbb2c0fee2c52278dfbd0ee4aba3 (patch) | |
tree | 76254482d4374ed22b5785a9a70bd10045c390fd /configure | |
parent | 11a1e58f11dfef67d01aebf89232f93f12207bc0 (diff) |
introduced a HAVE_SA_LEN macro to support OSes (other than linux) without length field in sockaddr_*
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 68 |
1 files changed, 68 insertions, 0 deletions
@@ -5397,6 +5397,74 @@ fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext; fi +echo "$as_me:$LINENO: checking if you have a length field in struct sockaddr*" >&5 +echo $ECHO_N "checking if you have a length field in struct sockaddr*... $ECHO_C" >&6 +if test "${ts_cv_sa_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include <sys/types.h> + #include <sys/socket.h> + +int +main () +{ + + struct sockaddr a; + a.sa_len = 1; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ts_cv_sa_len="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ts_cv_sa_len="no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +echo "$as_me:$LINENO: result: $ts_cv_sa_len" >&5 +echo "${ECHO_T}$ts_cv_sa_len" >&6; +if test "$ts_cv_sa_len" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SA_LEN 1 +_ACEOF + +fi + for ac_header in stdarg.h do |