summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-07-17 03:07:54 +0000
committerYang Tse <yangsita@gmail.com>2008-07-17 03:07:54 +0000
commit2aeb0314f57e299089e90122ca9c375c91bd56af (patch)
treef32b8dcff866082643d9efdeda33f9f472b06e39 /acinclude.m4
parent7dd6d7cbe13a7b55a52be0bdf6499ca809ea8523 (diff)
downloadc-ares-2aeb0314f57e299089e90122ca9c375c91bd56af.tar.gz
c-ares-2aeb0314f57e299089e90122ca9c375c91bd56af.tar.bz2
c-ares-2aeb0314f57e299089e90122ca9c375c91bd56af.zip
RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined
to the data type pointed by its respective argument and not the pointer type.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m441
1 files changed, 35 insertions, 6 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 95ab7a3..cb6c51a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1058,6 +1058,8 @@ dnl will be defined, defining the types of the arguments
dnl in RECVFROM_TYPE_ARG1, RECVFROM_TYPE_ARG2, and so on
dnl to RECVFROM_TYPE_ARG6, defining also the type of the
dnl function return value in RECVFROM_TYPE_RETV.
+dnl Notice that the types returned for pointer arguments
+dnl will actually be the type pointed by the pointer.
AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
AC_REQUIRE([CURL_CHECK_HEADER_WINSOCK])dnl
@@ -1170,21 +1172,48 @@ AC_DEFUN([CURL_CHECK_FUNC_RECVFROM], [
IFS=$recvfrom_prev_IFS
shift
#
+ recvfrom_ptrt_arg2=$[2]
+ recvfrom_ptrt_arg5=$[5]
+ recvfrom_ptrt_arg6=$[6]
+ #
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG1, $[1],
[Define to the type of arg 1 for recvfrom.])
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG2, $[2],
- [Define to the type of arg 2 for recvfrom.])
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG3, $[3],
[Define to the type of arg 3 for recvfrom.])
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG4, $[4],
[Define to the type of arg 4 for recvfrom.])
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG5, $[5],
- [Define to the type of arg 5 for recvfrom.])
- AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6, $[6],
- [Define to the type of arg 6 for recvfrom.])
AC_DEFINE_UNQUOTED(RECVFROM_TYPE_RETV, $[7],
[Define to the function return type for recvfrom.])
#
+ prev_sh_opts=$-
+ #
+ case $prev_sh_opts in
+ *f*)
+ ;;
+ *)
+ set -f
+ ;;
+ 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_TYPE_ARG5, $recvfrom_type_arg5,
+ [Define to the type pointed by arg 5 for recvfrom.])
+ AC_DEFINE_UNQUOTED(RECVFROM_TYPE_ARG6, $recvfrom_type_arg6,
+ [Define to the type pointed by arg 6 for recvfrom.])
+ #
+ case $prev_sh_opts in
+ *f*)
+ ;;
+ *)
+ set +f
+ ;;
+ esac
+ #
AC_DEFINE_UNQUOTED(HAVE_RECVFROM, 1,
[Define to 1 if you have the recvfrom function.])
ac_cv_func_recvfrom="yes"