1 /* Tests initialization of the resolver library. 2 * Adapted from none/tests/resolv for Solaris. 3 */ 4 5 #include <resolv.h> 6 #include <stdio.h> 7 #include <strings.h> 8 main(int argc,char * argv[])9int main(int argc, char *argv[]) 10 { 11 struct __res_state stats; 12 bzero(&stats, sizeof(stats)); 13 14 printf("PRE stats->nscount = %d\n", stats.nscount ); 15 fflush(stdout); 16 res_ninit(&stats); 17 printf("POST stats->nscount = %d\n", ( int ) stats.nscount > 0 ); 18 fflush(stdout); 19 return 0; 20 } 21