From 939d368d5ff2a777e7d1b69f0c6f57287762e024 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Sat, 17 Dec 2005 17:33:14 +0000 Subject: Check first arg of getnameinfo with and without const qualifier. --- ares/acinclude.m4 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'ares') diff --git a/ares/acinclude.m4 b/ares/acinclude.m4 index 191d8a794..713a5b5a1 100644 --- a/ares/acinclude.m4 +++ b/ares/acinclude.m4 @@ -202,7 +202,7 @@ AC_DEFUN([CURL_FUNC_GETNAMEINFO_ARGTYPES], [ AC_CACHE_CHECK([types of arguments for getnameinfo], [curl_cv_func_getnameinfo_args], [ curl_cv_func_getnameinfo_args="unknown" - for gni_arg1 in 'struct sockaddr *' 'void *'; do + for gni_arg1 in 'const struct sockaddr *' 'struct sockaddr *' 'void *' 'char *'; do for gni_arg2 in 'socklen_t' 'size_t' 'int'; do for gni_arg46 in 'size_t' 'int' 'socklen_t'; do for gni_arg7 in 'int' 'unsigned int'; do @@ -229,19 +229,16 @@ AC_DEFUN([CURL_FUNC_GETNAMEINFO_ARGTYPES], [ #include #endif #endif - extern int getnameinfo(const $gni_arg1, $gni_arg2, + extern int getnameinfo($gni_arg1, $gni_arg2, char *, $gni_arg46, char *, $gni_arg46, $gni_arg7); ],[ - $gni_arg1 sa=0; $gni_arg2 salen=0; - char *host=0; $gni_arg46 hostlen=0; - char *serv=0; $gni_arg46 servlen=0; $gni_arg7 flags=0; - int res = getnameinfo(sa, salen, host, hostlen, serv, servlen, flags); + int res = getnameinfo(0, salen, 0, hostlen, 0, servlen, flags); ]) ],[ curl_cv_func_getnameinfo_args="$gni_arg1,$gni_arg2,$gni_arg46,$gni_arg7" -- cgit v1.2.3