darwin getaddrinfo

itojun at iijlab.net itojun at iijlab.net
Wed Aug 21 07:19:19 EST 2002


>>> 	in configure.ac, we AC_DEFINE(BROKEN_GETADDRINFO) for *-darwin-*
>>> 	platforms.  recent Darwin fixed getaddrinfo to work as specified in
>>> 	RFC2553, so the case clause is not needed for recent Darwin.
>>> 	still not sure when it was corrected.  anyone has a clue?
>>Can you think of any run-time tests which doesn't require an online DNS
>>which can detect broken getaddrinfo implementations? 
>>I'd much rather a runtime test than hardcoded workarounds in configure.
>	i'll try to work on it this weekend.

	apple guy suggeseted this.

itojun

Index: configure.ac
===================================================================
RCS file: /cvs/openssh/configure.ac,v
retrieving revision 1.85
diff -u -r1.85 configure.ac
--- configure.ac	14 Aug 2002 01:52:11 -0000	1.85
+++ configure.ac	20 Aug 2002 21:18:22 -0000
@@ -98,7 +98,16 @@
 	AC_DEFINE(IP_TOS_IS_BROKEN)
 	;;
 *-*-darwin*)
-	AC_DEFINE(BROKEN_GETADDRINFO)
+	AC_MSG_CHECKING(if we have working getaddrinfo)
+	AC_TRY_RUN([#include <mach-o/dyld.h>
+main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
+		exit(0);
+	else
+		exit(1);
+}], [AC_MSG_RESULT(working)],
+	[AC_MSG_RESULT(buggy)
+	AC_DEFINE(BROKEN_GETADDRINFO)],
+	[AC_MSG_RESULT(assume it is working)])
 	;;
 *-*-hpux10.26)
 	if test -z "$GCC"; then



More information about the openssh-unix-dev mailing list