No empty .Rs/.Re
[netbsd-mini2440.git] / crypto / dist / heimdal / cf / broken-getaddrinfo.m4
blob37f7c6a55ca327e2eb62f3840dfe6a040f2081ad
1 dnl $Heimdal: broken-getaddrinfo.m4 15401 2005-06-16 16:10:50Z lha $
2 dnl $NetBSD$
3 dnl
4 dnl test if getaddrinfo can handle numeric services
6 AC_DEFUN([rk_BROKEN_GETADDRINFO],[
7 AC_CACHE_CHECK([if getaddrinfo handles numeric services], ac_cv_func_getaddrinfo_numserv,
8 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
9 #include <sys/types.h>
10 #include <sys/socket.h>
11 #include <netdb.h>
13 int
14 main(int argc, char **argv)
16         struct addrinfo hints, *ai;
17         memset(&hints, 0, sizeof(hints));
18         hints.ai_flags = AI_PASSIVE;
19         hints.ai_socktype = SOCK_STREAM;
20         hints.ai_family = PF_UNSPEC;
21         if(getaddrinfo(NULL, "17", &hints, &ai) != 0)
22                 return 1;
23         if(getaddrinfo(NULL, "0", &hints, &ai) != 0)
24                 return 1;
25         return 0;
27 ]])],[ac_cv_func_getaddrinfo_numserv=yes],[ac_cv_func_getaddrinfo_numserv=no]))])