distrib-dirs: invert logic
[dragonfly.git] / crypto / heimdal-0.6.3 / cf / broken-getaddrinfo.m4
bloba97e438932f5a789fe9581250aac4f60529315e3
1 dnl $Id: broken-getaddrinfo.m4,v 1.3.6.1 2004/04/01 07:27:32 joda Exp $
2 dnl
3 dnl test if getaddrinfo can handle numeric services
5 AC_DEFUN([rk_BROKEN_GETADDRINFO],[
6 AC_CACHE_CHECK([if getaddrinfo handles numeric services], ac_cv_func_getaddrinfo_numserv,
7 AC_TRY_RUN([[#include <stdio.h>
8 #include <sys/types.h>
9 #include <sys/socket.h>
10 #include <netdb.h>
12 int
13 main(int argc, char **argv)
15         struct addrinfo hints, *ai;
16         memset(&hints, 0, sizeof(hints));
17         hints.ai_flags = AI_PASSIVE;
18         hints.ai_socktype = SOCK_STREAM;
19         hints.ai_family = PF_UNSPEC;
20         if(getaddrinfo(NULL, "17", &hints, &ai) != 0)
21                 return 1;
22         return 0;
24 ]], ac_cv_func_getaddrinfo_numserv=yes, ac_cv_func_getaddrinfo_numserv=no))])