mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Use the AC_CHECK_MEMBER() function for check struct members instead of
inventing and providing our own. Hopefully this solves a HP-UX 11.00 problem.
This commit is contained in:
parent
836d88a4b8
commit
8a38805e82
@ -242,26 +242,6 @@ AC_DEFUN([CARES_CHECK_STRUCT], [
|
||||
fi
|
||||
])
|
||||
|
||||
dnl This macro determins if the specified struct contains a specific member.
|
||||
dnl Syntax:
|
||||
dnl CARES_CHECK_STRUCT_MEMBER(headers, struct name, member name, if found, [if not found])
|
||||
|
||||
AC_DEFUN([CARES_CHECK_STRUCT_MEMBER], [
|
||||
AC_MSG_CHECKING([if struct $2 has member $3])
|
||||
AC_TRY_COMPILE([$1],
|
||||
[
|
||||
struct $2 struct_instance;
|
||||
struct_instance.$3 = 0;
|
||||
], ac_struct="yes", ac_found="no")
|
||||
if test "$ac_struct" = "yes" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
$4
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
$5
|
||||
fi
|
||||
])
|
||||
|
||||
dnl This macro determines if the specified constant exists in the specified file
|
||||
dnl Syntax:
|
||||
dnl CARES_CHECK_CONSTANT(headers, constant name, if found, [if not found])
|
||||
|
@ -176,7 +176,10 @@ CARES_CHECK_STRUCT(
|
||||
)
|
||||
|
||||
if test "$ac_have_sockaddr_in6" = "yes" ; then
|
||||
CARES_CHECK_STRUCT_MEMBER(
|
||||
AC_CHECK_MEMBER(struct sockaddr_in6.sin6_scope_id,
|
||||
AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID,1,
|
||||
[Define to 1 if your struct sockaddr_in6 has sin6_scope_id.])
|
||||
, ,
|
||||
[
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
@ -188,8 +191,6 @@ CARES_CHECK_STRUCT_MEMBER(
|
||||
#include <netinet/in.h>
|
||||
#endif
|
||||
], [sockaddr_in6], [sin6_scope_id],
|
||||
AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID,1,
|
||||
[Define to 1 if your struct sockaddr_in6 has sin6_scope_id.])
|
||||
)
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user