INN commit: trunk (lib/getaddrinfo.c tests/lib/getaddrinfo-t.c)

INN Commit rra at isc.org
Mon May 25 10:03:20 UTC 2015


    Date: Monday, May 25, 2015 @ 03:03:20
  Author: iulius
Revision: 9883

Fix getaddrinfo test on Mac OS X

Mac OS X uses higher-value flags than other platforms, so adjust
the mask so that the portability test works properly there.

Modified:
  trunk/lib/getaddrinfo.c
  trunk/tests/lib/getaddrinfo-t.c

---------------------------+
 lib/getaddrinfo.c         |    5 +++--
 tests/lib/getaddrinfo-t.c |    2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

Modified: lib/getaddrinfo.c
===================================================================
--- lib/getaddrinfo.c	2015-05-25 10:02:28 UTC (rev 9882)
+++ lib/getaddrinfo.c	2015-05-25 10:03:20 UTC (rev 9883)
@@ -92,11 +92,12 @@
 
 /*
  * Value representing all of the hint flags set.  Linux uses flags up to
- * 0x0400, so be sure not to break when testing on that platform.
+ * 0x0400, and Mac OS X up to 0x1000, so be sure not to break when testing
+ * on these platforms.
  */
 #if TESTING
 # ifdef HAVE_GETADDRINFO
-#  define AI_INTERNAL_ALL 0x04ff
+#  define AI_INTERNAL_ALL 0x1fff
 # else
 #  define AI_INTERNAL_ALL 0x01ff
 # endif

Modified: tests/lib/getaddrinfo-t.c
===================================================================
--- tests/lib/getaddrinfo-t.c	2015-05-25 10:02:28 UTC (rev 9882)
+++ tests/lib/getaddrinfo-t.c	2015-05-25 10:03:20 UTC (rev 9883)
@@ -113,7 +113,7 @@
     test_freeaddrinfo(ai);
 
     ok(test_getaddrinfo(NULL, NULL, NULL, &ai) == EAI_NONAME, "EAI_NONAME");
-    hints.ai_flags = 2000;
+    hints.ai_flags = 0x2000;
     ok(test_getaddrinfo(NULL, "25", &hints, &ai) == EAI_BADFLAGS,
        "EAI_BADFLAGS");
     hints.ai_flags = 0;



More information about the inn-committers mailing list