| 107 | } |
| 108 | |
| 109 | static void test(const char *name, int use_acl) |
| 110 | { |
| 111 | ACL_DNS_DB *res = NULL; |
| 112 | |
| 113 | if (use_acl) { |
| 114 | printf("acl_gethostbyname name: %s\n", name); |
| 115 | res = acl_gethostbyname(name, NULL); |
| 116 | if (res == NULL) { |
| 117 | printf("acl_gethostbyname %s error\n", name); |
| 118 | return; |
| 119 | } |
| 120 | } |
| 121 | #if !defined(MACOSX) && !defined(ACL_SUNOS5) && !defined(MINGW) |
| 122 | else { |
| 123 | res = resolve_name(name); |
| 124 | } |
| 125 | #endif |
| 126 | |
| 127 | if (res) { |
| 128 | show(res); |
| 129 | acl_netdb_free(res); |
| 130 | } |
| 131 | |
| 132 | printf("-------------------------------------------------------\r\n"); |
| 133 | |
| 134 | res = resolve_addr(name); |
| 135 | if (res) { |
| 136 | show(res); |
| 137 | acl_netdb_free(res); |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | static void usage(const char *procname) |
| 142 | { |
no test coverage detected
searching dependent graphs…