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
7fdeb14e
Commit
7fdeb14e
authored
16 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
add checks for strtok_r and getprotobyname_r
parent
8a323f83
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/reentrant.m4
+184
-0
184 additions, 0 deletions
ares/reentrant.m4
reentrant.m4
+184
-0
184 additions, 0 deletions
reentrant.m4
with
368 additions
and
0 deletions
ares/reentrant.m4
+
184
−
0
View file @
7fdeb14e
...
@@ -75,6 +75,81 @@ AC_DEFUN([CHECK_NEED_REENTRANT_STRERROR_R], [
...
@@ -75,6 +75,81 @@ AC_DEFUN([CHECK_NEED_REENTRANT_STRERROR_R], [
])
])
dnl CHECK_NEED_REENTRANT_STRTOK_R
dnl -------------------------------------------------
dnl Checks if the preprocessor _REENTRANT definition
dnl makes function strtok_r compiler visible.
AC_DEFUN([CHECK_NEED_REENTRANT_STRTOK_R], [
#
AC_MSG_NOTICE([DEBUG:])
AC_MSG_NOTICE([DEBUG:])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([strtok_r])
],[
AC_MSG_NOTICE([DEBUG: strtok_r links... yes])
tmp_strtok_r="yes"
],[
AC_MSG_NOTICE([DEBUG: strtok_r links... no])
tmp_strtok_r="no"
])
#
if test "$tmp_strtok_r" = "yes"; then
AC_EGREP_CPP([strtok_r],[
#include <sys/types.h>
#include <string.h>
],[
AC_MSG_NOTICE([DEBUG: strtok_r proto... without our definition])
tmp_strtok_r="proto_wout_def"
],[
AC_EGREP_CPP([strtok_r],[
#define _REENTRANT
#include <sys/types.h>
#include <string.h>
],[
AC_MSG_NOTICE([DEBUG: strtok_r proto... with our _reentrant])
tmp_strtok_r="proto_with_def"
],[
AC_MSG_NOTICE([DEBUG: strtok_r proto... not found])
])
])
fi
#
if test "$tmp_strtok_r" = "proto_wout_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <string.h>
]],[[
strtok_r(0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: strtok_r proto wout finds... 3 args])
tmp_strtok_r="done"
])
fi
#
if test "$tmp_strtok_r" = "proto_with_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#define _REENTRANT
#include <sys/types.h>
#include <string.h>
]],[[
strtok_r(0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: strtok_r proto with finds... 3 args])
tmp_strtok_r="needs_reentrant"
])
fi
#
if test "$tmp_strtok_r" = "needs_reentrant"; then
ac_cv_need_reentrant="yes"
fi
])
dnl CHECK_NEED_REENTRANT_LOCALTIME_R
dnl CHECK_NEED_REENTRANT_LOCALTIME_R
dnl -------------------------------------------------
dnl -------------------------------------------------
dnl Checks if the preprocessor _REENTRANT definition
dnl Checks if the preprocessor _REENTRANT definition
...
@@ -596,6 +671,107 @@ AC_DEFUN([CHECK_NEED_REENTRANT_GETHOSTBYNAME_R], [
...
@@ -596,6 +671,107 @@ AC_DEFUN([CHECK_NEED_REENTRANT_GETHOSTBYNAME_R], [
])
])
dnl CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
dnl -------------------------------------------------
dnl Checks if the preprocessor _REENTRANT definition
dnl makes function getprotobyname_r compiler visible.
AC_DEFUN([CHECK_NEED_REENTRANT_GETPROTOBYNAME_R], [
#
AC_MSG_NOTICE([DEBUG:])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([getprotobyname_r])
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r links... yes])
tmp_getprotobyname_r="yes"
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r links... no])
tmp_getprotobyname_r="no"
])
#
if test "$tmp_getprotobyname_r" = "yes"; then
AC_EGREP_CPP([getprotobyname_r],[
#include <sys/types.h>
#include <netdb.h>
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto... without our definition])
tmp_getprotobyname_r="proto_wout_def"
],[
AC_EGREP_CPP([getprotobyname_r],[
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto... with our _reentrant])
tmp_getprotobyname_r="proto_with_def"
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto... not found])
])
])
fi
#
if test "$tmp_getprotobyname_r" = "proto_wout_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <netdb.h>
]],[[
getprotobyname_r(0, 0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto wout finds... 4 args])
tmp_getprotobyname_r="done"
])
fi
if test "$tmp_getprotobyname_r" = "proto_wout_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <netdb.h>
]],[[
getprotobyname_r(0, 0, 0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto wout finds... 5 args])
tmp_getprotobyname_r="done"
])
fi
#
if test "$tmp_getprotobyname_r" = "proto_with_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
]],[[
getprotobyname_r(0, 0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto with finds... 4 args])
tmp_getprotobyname_r="needs_reentrant"
])
fi
if test "$tmp_getprotobyname_r" = "proto_with_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
]],[[
getprotobyname_r(0, 0, 0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto with finds... 5 args])
tmp_getprotobyname_r="needs_reentrant"
])
fi
#
if test "$tmp_getprotobyname_r" = "needs_reentrant"; then
ac_cv_need_reentrant="yes"
fi
])
dnl CHECK_NEED_REENTRANT_GETSERVBYPORT_R
dnl CHECK_NEED_REENTRANT_GETSERVBYPORT_R
dnl -------------------------------------------------
dnl -------------------------------------------------
dnl Checks if the preprocessor _REENTRANT definition
dnl Checks if the preprocessor _REENTRANT definition
...
@@ -734,6 +910,9 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
...
@@ -734,6 +910,9 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
if test "$ac_cv_need_reentrant" = "no"; then
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_STRERROR_R
CHECK_NEED_REENTRANT_STRERROR_R
fi
fi
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_STRTOK_R
fi
if test "$ac_cv_need_reentrant" = "no"; then
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_LOCALTIME_R
CHECK_NEED_REENTRANT_LOCALTIME_R
fi
fi
...
@@ -749,6 +928,9 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
...
@@ -749,6 +928,9 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
if test "$ac_cv_need_reentrant" = "no"; then
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
fi
fi
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
fi
if test "$ac_cv_need_reentrant" = "no"; then
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_GETSERVBYPORT_R
CHECK_NEED_REENTRANT_GETSERVBYPORT_R
fi
fi
...
@@ -756,11 +938,13 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
...
@@ -756,11 +938,13 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R_DEBUG], [
AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R_DEBUG], [
CHECK_NEED_REENTRANT_STRERROR_R
CHECK_NEED_REENTRANT_STRERROR_R
CHECK_NEED_REENTRANT_STRTOK_R
CHECK_NEED_REENTRANT_LOCALTIME_R
CHECK_NEED_REENTRANT_LOCALTIME_R
CHECK_NEED_REENTRANT_GMTIME_R
CHECK_NEED_REENTRANT_GMTIME_R
CHECK_NEED_REENTRANT_INET_NTOA_R
CHECK_NEED_REENTRANT_INET_NTOA_R
CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
CHECK_NEED_REENTRANT_GETSERVBYPORT_R
CHECK_NEED_REENTRANT_GETSERVBYPORT_R
])
])
...
...
This diff is collapsed.
Click to expand it.
reentrant.m4
+
184
−
0
View file @
7fdeb14e
...
@@ -97,6 +97,81 @@ AC_DEFUN([CHECK_NEED_REENTRANT_STRERROR_R], [
...
@@ -97,6 +97,81 @@ AC_DEFUN([CHECK_NEED_REENTRANT_STRERROR_R], [
])
])
dnl CHECK_NEED_REENTRANT_STRTOK_R
dnl -------------------------------------------------
dnl Checks if the preprocessor _REENTRANT definition
dnl makes function strtok_r compiler visible.
AC_DEFUN([CHECK_NEED_REENTRANT_STRTOK_R], [
#
AC_MSG_NOTICE([DEBUG:])
AC_MSG_NOTICE([DEBUG:])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([strtok_r])
],[
AC_MSG_NOTICE([DEBUG: strtok_r links... yes])
tmp_strtok_r="yes"
],[
AC_MSG_NOTICE([DEBUG: strtok_r links... no])
tmp_strtok_r="no"
])
#
if test "$tmp_strtok_r" = "yes"; then
AC_EGREP_CPP([strtok_r],[
#include <sys/types.h>
#include <string.h>
],[
AC_MSG_NOTICE([DEBUG: strtok_r proto... without our definition])
tmp_strtok_r="proto_wout_def"
],[
AC_EGREP_CPP([strtok_r],[
#define _REENTRANT
#include <sys/types.h>
#include <string.h>
],[
AC_MSG_NOTICE([DEBUG: strtok_r proto... with our _reentrant])
tmp_strtok_r="proto_with_def"
],[
AC_MSG_NOTICE([DEBUG: strtok_r proto... not found])
])
])
fi
#
if test "$tmp_strtok_r" = "proto_wout_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <string.h>
]],[[
strtok_r(0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: strtok_r proto wout finds... 3 args])
tmp_strtok_r="done"
])
fi
#
if test "$tmp_strtok_r" = "proto_with_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#define _REENTRANT
#include <sys/types.h>
#include <string.h>
]],[[
strtok_r(0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: strtok_r proto with finds... 3 args])
tmp_strtok_r="needs_reentrant"
])
fi
#
if test "$tmp_strtok_r" = "needs_reentrant"; then
ac_cv_need_reentrant="yes"
fi
])
dnl CHECK_NEED_REENTRANT_LOCALTIME_R
dnl CHECK_NEED_REENTRANT_LOCALTIME_R
dnl -------------------------------------------------
dnl -------------------------------------------------
dnl Checks if the preprocessor _REENTRANT definition
dnl Checks if the preprocessor _REENTRANT definition
...
@@ -618,6 +693,107 @@ AC_DEFUN([CHECK_NEED_REENTRANT_GETHOSTBYNAME_R], [
...
@@ -618,6 +693,107 @@ AC_DEFUN([CHECK_NEED_REENTRANT_GETHOSTBYNAME_R], [
])
])
dnl CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
dnl -------------------------------------------------
dnl Checks if the preprocessor _REENTRANT definition
dnl makes function getprotobyname_r compiler visible.
AC_DEFUN([CHECK_NEED_REENTRANT_GETPROTOBYNAME_R], [
#
AC_MSG_NOTICE([DEBUG:])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([getprotobyname_r])
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r links... yes])
tmp_getprotobyname_r="yes"
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r links... no])
tmp_getprotobyname_r="no"
])
#
if test "$tmp_getprotobyname_r" = "yes"; then
AC_EGREP_CPP([getprotobyname_r],[
#include <sys/types.h>
#include <netdb.h>
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto... without our definition])
tmp_getprotobyname_r="proto_wout_def"
],[
AC_EGREP_CPP([getprotobyname_r],[
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto... with our _reentrant])
tmp_getprotobyname_r="proto_with_def"
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto... not found])
])
])
fi
#
if test "$tmp_getprotobyname_r" = "proto_wout_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <netdb.h>
]],[[
getprotobyname_r(0, 0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto wout finds... 4 args])
tmp_getprotobyname_r="done"
])
fi
if test "$tmp_getprotobyname_r" = "proto_wout_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <netdb.h>
]],[[
getprotobyname_r(0, 0, 0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto wout finds... 5 args])
tmp_getprotobyname_r="done"
])
fi
#
if test "$tmp_getprotobyname_r" = "proto_with_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
]],[[
getprotobyname_r(0, 0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto with finds... 4 args])
tmp_getprotobyname_r="needs_reentrant"
])
fi
if test "$tmp_getprotobyname_r" = "proto_with_def"; then
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
#define _REENTRANT
#include <sys/types.h>
#include <netdb.h>
]],[[
getprotobyname_r(0, 0, 0, 0, 0);
]])
],[
AC_MSG_NOTICE([DEBUG: getprotobyname_r proto with finds... 5 args])
tmp_getprotobyname_r="needs_reentrant"
])
fi
#
if test "$tmp_getprotobyname_r" = "needs_reentrant"; then
ac_cv_need_reentrant="yes"
fi
])
dnl CHECK_NEED_REENTRANT_GETSERVBYPORT_R
dnl CHECK_NEED_REENTRANT_GETSERVBYPORT_R
dnl -------------------------------------------------
dnl -------------------------------------------------
dnl Checks if the preprocessor _REENTRANT definition
dnl Checks if the preprocessor _REENTRANT definition
...
@@ -756,6 +932,9 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
...
@@ -756,6 +932,9 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
if test "$ac_cv_need_reentrant" = "no"; then
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_STRERROR_R
CHECK_NEED_REENTRANT_STRERROR_R
fi
fi
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_STRTOK_R
fi
if test "$ac_cv_need_reentrant" = "no"; then
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_LOCALTIME_R
CHECK_NEED_REENTRANT_LOCALTIME_R
fi
fi
...
@@ -771,6 +950,9 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
...
@@ -771,6 +950,9 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
if test "$ac_cv_need_reentrant" = "no"; then
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
fi
fi
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
fi
if test "$ac_cv_need_reentrant" = "no"; then
if test "$ac_cv_need_reentrant" = "no"; then
CHECK_NEED_REENTRANT_GETSERVBYPORT_R
CHECK_NEED_REENTRANT_GETSERVBYPORT_R
fi
fi
...
@@ -778,11 +960,13 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
...
@@ -778,11 +960,13 @@ AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R], [
AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R_DEBUG], [
AC_DEFUN([CHECK_NEED_REENTRANT_FUNCTIONS_R_DEBUG], [
CHECK_NEED_REENTRANT_STRERROR_R
CHECK_NEED_REENTRANT_STRERROR_R
CHECK_NEED_REENTRANT_STRTOK_R
CHECK_NEED_REENTRANT_LOCALTIME_R
CHECK_NEED_REENTRANT_LOCALTIME_R
CHECK_NEED_REENTRANT_GMTIME_R
CHECK_NEED_REENTRANT_GMTIME_R
CHECK_NEED_REENTRANT_INET_NTOA_R
CHECK_NEED_REENTRANT_INET_NTOA_R
CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
CHECK_NEED_REENTRANT_GETHOSTBYADDR_R
CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
CHECK_NEED_REENTRANT_GETHOSTBYNAME_R
CHECK_NEED_REENTRANT_GETPROTOBYNAME_R
CHECK_NEED_REENTRANT_GETSERVBYPORT_R
CHECK_NEED_REENTRANT_GETSERVBYPORT_R
])
])
...
...
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