summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-06-08 13:37:35 +0200
committerYang Tse <yangsita@gmail.com>2011-06-08 13:37:35 +0200
commit8a3c0fe56ce233454690450cde4e8c67080e457e (patch)
treeda4db43147ef904e59ed0e62c61372b2a7df1d44 /acinclude.m4
parentf551aa5c1676a8a7d9b0683f047cd6f3fa1b4676 (diff)
downloadcurl-8a3c0fe56ce233454690450cde4e8c67080e457e.tar.gz
configure: fix recvfrom 5th arg type qualifier detection
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m417
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,