diff options
-rw-r--r-- | acinclude.m4 | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 1074e9221..2fd22bf36 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1663,7 +1663,7 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [ for recvfrom_arg2 in 'char *' 'void *'; do for recvfrom_arg3 in 'size_t' 'int' 'socklen_t' 'unsigned int'; do for recvfrom_arg4 in 'int' 'unsigned int'; do - for recvfrom_arg5 in 'const struct sockaddr *' 'struct sockaddr *' 'void *'; do + for recvfrom_arg5 in 'struct sockaddr *' 'void *' 'const struct sockaddr *'; do for recvfrom_arg6 in 'socklen_t *' 'int *' 'unsigned int *' 'size_t *' 'void *'; do if test "$curl_cv_func_recvfrom_args" = "unknown"; then AC_COMPILE_IFELSE([ @@ -1731,7 +1731,7 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [ shift # recvfrom_ptrt_arg2=$[2] - recvfrom_ptrt_arg5=$[5] + recvfrom_qual_type_arg5=$[5] recvfrom_ptrt_arg6=$[6] # AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG1, $[1], @@ -1753,12 +1753,25 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [ ;; esac # + case "$recvfrom_qual_type_arg5" in + const*) + recvfrom_qual_arg5=const + recvfrom_ptrt_arg5=`echo $recvfrom_qual_type_arg5 | sed 's/^const //'` + ;; + *) + recvfrom_qual_arg5= + recvfrom_ptrt_arg5=$recvfrom_qual_type_arg5 + ;; + esac + # recvfrom_type_arg2=`echo $recvfrom_ptrt_arg2 | sed 's/ \*//'` recvfrom_type_arg5=`echo $recvfrom_ptrt_arg5 | sed 's/ \*//'` recvfrom_type_arg6=`echo $recvfrom_ptrt_arg6 | sed 's/ \*//'` # AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2, $recvfrom_type_arg2, [Define to the type pointed by arg 2 for recvfrom.]) + AC_DEFINE_UNQUOTED(RECVFROM_QUAL_ARG5, $recvfrom_qual_arg5, + [Define to the type qualifier pointed by arg 5 for recvfrom.]) AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5, $recvfrom_type_arg5, [Define to the type pointed by arg 5 for recvfrom.]) AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6, $recvfrom_type_arg6, |