changed configure.ac to check the offset of sa_family in struct sockaddr

This commit is contained in:
2018-02-01 09:34:12 +00:00
parent b7e540d6cf
commit 46cd39cabb
5 changed files with 65 additions and 2 deletions

36
qse/configure vendored
View File

@ -22344,6 +22344,25 @@ $as_echo "#define QSE_SA_FAMILY_T_IS_SIGNED 1" >>confdefs.h
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking offset of sa_family in struct sockaddr" >&5
$as_echo_n "checking offset of sa_family in struct sockaddr... " >&6; }
if ac_fn_c_compute_int "$LINENO" "offsetof(struct sockaddr, sa_family)" "ac_cv_offsetof_sa_family" "#include <stddef.h>
#include <winsock2.h>
#include <ws2tcpip.h>"; then :
else
ac_cv_offsteof_sa_family=0
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_offsetof_sa_family" >&5
$as_echo "$ac_cv_offsetof_sa_family" >&6; }
cat >>confdefs.h <<_ACEOF
#define QSE_OFFSETOF_SA_FAMILY ${ac_cv_offsetof_sa_family}
_ACEOF
else
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
@ -22690,6 +22709,23 @@ $as_echo "#define QSE_SA_FAMILY_T_IS_SIGNED 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking offset of sa_family in struct sockaddr" >&5
$as_echo_n "checking offset of sa_family in struct sockaddr... " >&6; }
if ac_fn_c_compute_int "$LINENO" "offsetof(struct sockaddr, sa_family)" "ac_cv_offsetof_sa_family" "#include <stddef.h>
#include <sys/types.h>
#include <sys/socket.h>"; then :
else
ac_cv_offsteof_sa_family=0
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_offsetof_sa_family" >&5
$as_echo "$ac_cv_offsetof_sa_family" >&6; }
cat >>confdefs.h <<_ACEOF
#define QSE_OFFSETOF_SA_FAMILY ${ac_cv_offsetof_sa_family}
_ACEOF
fi