Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
c1f9440a
Commit
c1f9440a
authored
15 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
Check if getaddrinfo is threadsafe when function check allows it to be used
parent
011a2818
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ares/m4/cares-functions.m4
+45
-2
45 additions, 2 deletions
ares/m4/cares-functions.m4
m4/curl-functions.m4
+45
-2
45 additions, 2 deletions
m4/curl-functions.m4
with
90 additions
and
4 deletions
ares/m4/cares-functions.m4
+
45
−
2
View file @
c1f9440a
...
...
@@ -16,7 +16,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
# serial 3
2
# serial 3
3
dnl CARES_INCLUDES_ARPA_INET
...
...
@@ -873,7 +873,10 @@ dnl Verify if getaddrinfo is available, prototyped, can
dnl be compiled and seems to work. If all of these are
dnl true, and usage has not been previously disallowed
dnl with shell variable cares_disallow_getaddrinfo, then
dnl HAVE_GETADDRINFO will be defined.
dnl HAVE_GETADDRINFO will be defined. Additionally when
dnl HAVE_GETADDRINFO gets defined this will also attempt
dnl to find out if getaddrinfo happens to be threadsafe,
dnl defining HAVE_GETADDRINFO_THREADSAFE when true.
AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
AC_REQUIRE([CARES_INCLUDES_WS2TCPIP])dnl
...
...
@@ -887,6 +890,7 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
tst_compi_getaddrinfo="unknown"
tst_works_getaddrinfo="unknown"
tst_allow_getaddrinfo="unknown"
tst_tsafe_getaddrinfo="unknown"
#
AC_MSG_CHECKING([if getaddrinfo can be linked])
AC_LINK_IFELSE([
...
...
@@ -1001,6 +1005,45 @@ AC_DEFUN([CARES_CHECK_FUNC_GETADDRINFO], [
else
AC_MSG_RESULT([no])
ac_cv_func_getaddrinfo="no"
ac_cv_func_getaddrinfo_threadsafe="no"
fi
#
if test "$ac_cv_func_getaddrinfo" = "yes"; then
AC_MSG_CHECKING([if getaddrinfo is threadsafe])
case $host_os in
darwin[[12354678]].*)
tst_tsafe_getaddrinfo="no"
;;
darwin*)
tst_tsafe_getaddrinfo="yes"
;;
dragonflybsd*)
tst_tsafe_getaddrinfo="yes"
;;
freebsd[[1234]].* | freebsd5.[[1234]]*)
tst_tsafe_getaddrinfo="no"
;;
freebsd*)
tst_tsafe_getaddrinfo="yes"
;;
linux*)
tst_tsafe_getaddrinfo="yes"
;;
netbsd[[123]].*)
tst_tsafe_getaddrinfo="no"
;;
netbsd*)
tst_tsafe_getaddrinfo="yes"
;;
esac
AC_MSG_RESULT([$tst_tsafe_getaddrinfo])
if test "$tst_tsafe_getaddrinfo" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO_THREADSAFE, 1,
[Define to 1 if the getaddrinfo function is threadsafe.])
ac_cv_func_getaddrinfo_threadsafe="yes"
else
ac_cv_func_getaddrinfo_threadsafe="no"
fi
fi
])
...
...
This diff is collapsed.
Click to expand it.
m4/curl-functions.m4
+
45
−
2
View file @
c1f9440a
...
...
@@ -22,7 +22,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
# serial 5
4
# serial 5
5
dnl CURL_INCLUDES_ARPA_INET
...
...
@@ -1497,7 +1497,10 @@ dnl Verify if getaddrinfo is available, prototyped, can
dnl be compiled and seems to work. If all of these are
dnl true, and usage has not been previously disallowed
dnl with shell variable curl_disallow_getaddrinfo, then
dnl HAVE_GETADDRINFO will be defined.
dnl HAVE_GETADDRINFO will be defined. Additionally when
dnl HAVE_GETADDRINFO gets defined this will also attempt
dnl to find out if getaddrinfo happens to be threadsafe,
dnl defining HAVE_GETADDRINFO_THREADSAFE when true.
AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
AC_REQUIRE([CURL_INCLUDES_WS2TCPIP])dnl
...
...
@@ -1511,6 +1514,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
tst_compi_getaddrinfo="unknown"
tst_works_getaddrinfo="unknown"
tst_allow_getaddrinfo="unknown"
tst_tsafe_getaddrinfo="unknown"
#
AC_MSG_CHECKING([if getaddrinfo can be linked])
AC_LINK_IFELSE([
...
...
@@ -1625,6 +1629,45 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [
else
AC_MSG_RESULT([no])
ac_cv_func_getaddrinfo="no"
ac_cv_func_getaddrinfo_threadsafe="no"
fi
#
if test "$ac_cv_func_getaddrinfo" = "yes"; then
AC_MSG_CHECKING([if getaddrinfo is threadsafe])
case $host_os in
darwin[[12354678]].*)
tst_tsafe_getaddrinfo="no"
;;
darwin*)
tst_tsafe_getaddrinfo="yes"
;;
dragonflybsd*)
tst_tsafe_getaddrinfo="yes"
;;
freebsd[[1234]].* | freebsd5.[[1234]]*)
tst_tsafe_getaddrinfo="no"
;;
freebsd*)
tst_tsafe_getaddrinfo="yes"
;;
linux*)
tst_tsafe_getaddrinfo="yes"
;;
netbsd[[123]].*)
tst_tsafe_getaddrinfo="no"
;;
netbsd*)
tst_tsafe_getaddrinfo="yes"
;;
esac
AC_MSG_RESULT([$tst_tsafe_getaddrinfo])
if test "$tst_tsafe_getaddrinfo" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_GETADDRINFO_THREADSAFE, 1,
[Define to 1 if the getaddrinfo function is threadsafe.])
ac_cv_func_getaddrinfo_threadsafe="yes"
else
ac_cv_func_getaddrinfo_threadsafe="no"
fi
fi
])
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment