Avoid a test failure on AIX 4 and AIX 5.
[pspp] / tests / test-getaddrinfo.c
index 7763f43f6c44c2b092cf875d39ab38dc1a0b7dc3..ca7c62cd23739b59f24b656c691b694f31fba500 100644 (file)
@@ -1,6 +1,6 @@
 /* Test the getaddrinfo module.
 
-   Copyright (C) 2006-2007 Free Software Foundation, Inc.
+   Copyright (C) 2006-2008 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
 
 /* Written by Simon Josefsson.  */
 
-#include "config.h"
+#include <config.h>
 #include "getaddrinfo.h"
 #include "inet_ntop.h"
 #include <stdio.h>
@@ -54,10 +54,18 @@ int simple (char *host, char *service)
 
   if (res != 0)
     {
+      /* IRIX reports EAI_NONAME for "https".  Don't fail the test
+        merely because of this.  */
+      if (res == EAI_NONAME)
+       return 0;
       /* Solaris reports EAI_SERVICE for "http" and "https".  Don't
          fail the test merely because of this.  */
       if (res == EAI_SERVICE)
        return 0;
+      /* AIX reports EAI_NODATA for "https".  Don't fail the test
+        merely because of this.  */
+      if (res == EAI_NODATA)
+       return 0;
 
       return 1;
     }