aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-09-10 21:09:44 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-09-10 21:09:44 +0000
commit8a38805e82e8bc8facf7fbd5f9ff10efd059de55 (patch)
treed65f2294b15bff53ac4edbef4a3fa59f887a149f
parent836d88a4b894c138969cd17570f6d4ee2ab3614f (diff)
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.
-rw-r--r--ares/acinclude.m420
-rw-r--r--ares/configure.ac7
2 files changed, 4 insertions, 23 deletions
diff --git a/ares/acinclude.m4 b/ares/acinclude.m4
index 2f6256ae4..f4f317eae 100644
--- a/ares/acinclude.m4
+++ b/ares/acinclude.m4
@@ -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])
diff --git a/ares/configure.ac b/ares/configure.ac
index 73901394a..271dfeb4f 100644
--- a/ares/configure.ac
+++ b/ares/configure.ac
@@ -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