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
83c199bb
Commit
83c199bb
authored
16 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
siginterrupt, signal and sigsetjmp checks
parent
2ec6d086
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
configure.ac
+3
-22
3 additions, 22 deletions
configure.ac
m4/curl-functions.m4
+299
-1
299 additions, 1 deletion
m4/curl-functions.m4
with
302 additions
and
23 deletions
configure.ac
+
3
−
22
View file @
83c199bb
...
...
@@ -2080,6 +2080,9 @@ CURL_CHECK_FUNC_INET_NTOP
CURL_CHECK_FUNC_INET_PTON
CURL_CHECK_FUNC_LOCALTIME_R
CURL_CHECK_FUNC_SIGACTION
CURL_CHECK_FUNC_SIGINTERRUPT
CURL_CHECK_FUNC_SIGNAL
CURL_CHECK_FUNC_SIGSETJMP
CURL_CHECK_FUNC_STRCASECMP
CURL_CHECK_FUNC_STRCASESTR
CURL_CHECK_FUNC_STRCMPI
...
...
@@ -2125,9 +2128,6 @@ AC_CHECK_FUNCS([basename \
setlocale \
setmode \
setrlimit \
siginterrupt \
signal \
sigsetjmp \
socket \
uname \
utime
...
...
@@ -2154,25 +2154,6 @@ AC_CHECK_FUNCS([basename \
])
dnl sigsetjmp() might be a macro and no function so if it isn't found already
dnl we make an extra check here!
if test "$ac_cv_func_sigsetjmp" != "yes"; then
AC_MSG_CHECKING([for sigsetjmp defined as macro])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
#include <setjmp.h>
]],[[
sigjmp_buf jmpenv;
sigsetjmp(jmpenv, 1);
]])
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_SIGSETJMP, 1, [If you have sigsetjmp])
],[
AC_MSG_RESULT([no])
])
fi
AC_CHECK_DECL(basename, ,
AC_DEFINE(NEED_BASENAME_PROTO, 1, [If you lack a fine basename() prototype]),
#ifdef HAVE_STRING_H
...
...
This diff is collapsed.
Click to expand it.
m4/curl-functions.m4
+
299
−
1
View file @
83c199bb
...
...
@@ -22,7 +22,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
# serial 2
2
# serial 2
4
dnl CURL_INCLUDES_ARPA_INET
...
...
@@ -73,6 +73,27 @@ curl_includes_netdb="\
])
dnl CURL_INCLUDES_SETJMP
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
dnl included when setjmp.h is to be included.
AC_DEFUN([CURL_INCLUDES_SETJMP], [
curl_includes_setjmp="\
/* includes start */
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#ifdef HAVE_SETJMP_H
# include <setjmp.h>
#endif
/* includes end */"
AC_CHECK_HEADERS(
sys/types.h setjmp.h,
[], [], [$curl_includes_setjmp])
])
dnl CURL_INCLUDES_SIGNAL
dnl -------------------------------------------------
dnl Set up variable with list of headers that must be
...
...
@@ -1787,6 +1808,283 @@ AC_DEFUN([CURL_CHECK_FUNC_SIGACTION], [
])
dnl CURL_CHECK_FUNC_SIGINTERRUPT
dnl -------------------------------------------------
dnl Verify if siginterrupt is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_siginterrupt, then
dnl HAVE_SIGINTERRUPT will be defined.
AC_DEFUN([CURL_CHECK_FUNC_SIGINTERRUPT], [
AC_REQUIRE([CURL_INCLUDES_SIGNAL])dnl
#
tst_links_siginterrupt="unknown"
tst_proto_siginterrupt="unknown"
tst_compi_siginterrupt="unknown"
tst_allow_siginterrupt="unknown"
#
AC_MSG_CHECKING([if siginterrupt can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([siginterrupt])
],[
AC_MSG_RESULT([yes])
tst_links_siginterrupt="yes"
],[
AC_MSG_RESULT([no])
tst_links_siginterrupt="no"
])
#
if test "$tst_links_siginterrupt" = "yes"; then
AC_MSG_CHECKING([if siginterrupt is prototyped])
AC_EGREP_CPP([siginterrupt],[
$curl_includes_signal
],[
AC_MSG_RESULT([yes])
tst_proto_siginterrupt="yes"
],[
AC_MSG_RESULT([no])
tst_proto_siginterrupt="no"
])
fi
#
if test "$tst_proto_siginterrupt" = "yes"; then
AC_MSG_CHECKING([if siginterrupt is compilable])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_signal
]],[[
if(0 != siginterrupt(0, 0))
return 1;
]])
],[
AC_MSG_RESULT([yes])
tst_compi_siginterrupt="yes"
],[
AC_MSG_RESULT([no])
tst_compi_siginterrupt="no"
])
fi
#
if test "$tst_compi_siginterrupt" = "yes"; then
AC_MSG_CHECKING([if siginterrupt usage allowed])
if test "x$curl_disallow_siginterrupt" != "xyes"; then
AC_MSG_RESULT([yes])
tst_allow_siginterrupt="yes"
else
AC_MSG_RESULT([no])
tst_allow_siginterrupt="no"
fi
fi
#
AC_MSG_CHECKING([if siginterrupt might be used])
if test "$tst_links_siginterrupt" = "yes" &&
test "$tst_proto_siginterrupt" = "yes" &&
test "$tst_compi_siginterrupt" = "yes" &&
test "$tst_allow_siginterrupt" = "yes"; then
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(HAVE_SIGINTERRUPT, 1,
[Define to 1 if you have the siginterrupt function.])
ac_cv_func_siginterrupt="yes"
else
AC_MSG_RESULT([no])
ac_cv_func_siginterrupt="no"
fi
])
dnl CURL_CHECK_FUNC_SIGNAL
dnl -------------------------------------------------
dnl Verify if signal is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_signal, then
dnl HAVE_SIGNAL will be defined.
AC_DEFUN([CURL_CHECK_FUNC_SIGNAL], [
AC_REQUIRE([CURL_INCLUDES_SIGNAL])dnl
#
tst_links_signal="unknown"
tst_proto_signal="unknown"
tst_compi_signal="unknown"
tst_allow_signal="unknown"
#
AC_MSG_CHECKING([if signal can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([signal])
],[
AC_MSG_RESULT([yes])
tst_links_signal="yes"
],[
AC_MSG_RESULT([no])
tst_links_signal="no"
])
#
if test "$tst_links_signal" = "yes"; then
AC_MSG_CHECKING([if signal is prototyped])
AC_EGREP_CPP([signal],[
$curl_includes_signal
],[
AC_MSG_RESULT([yes])
tst_proto_signal="yes"
],[
AC_MSG_RESULT([no])
tst_proto_signal="no"
])
fi
#
if test "$tst_proto_signal" = "yes"; then
AC_MSG_CHECKING([if signal is compilable])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_signal
]],[[
if(0 != signal(0, 0))
return 1;
]])
],[
AC_MSG_RESULT([yes])
tst_compi_signal="yes"
],[
AC_MSG_RESULT([no])
tst_compi_signal="no"
])
fi
#
if test "$tst_compi_signal" = "yes"; then
AC_MSG_CHECKING([if signal usage allowed])
if test "x$curl_disallow_signal" != "xyes"; then
AC_MSG_RESULT([yes])
tst_allow_signal="yes"
else
AC_MSG_RESULT([no])
tst_allow_signal="no"
fi
fi
#
AC_MSG_CHECKING([if signal might be used])
if test "$tst_links_signal" = "yes" &&
test "$tst_proto_signal" = "yes" &&
test "$tst_compi_signal" = "yes" &&
test "$tst_allow_signal" = "yes"; then
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(HAVE_SIGNAL, 1,
[Define to 1 if you have the signal function.])
ac_cv_func_signal="yes"
else
AC_MSG_RESULT([no])
ac_cv_func_signal="no"
fi
])
dnl CURL_CHECK_FUNC_SIGSETJMP
dnl -------------------------------------------------
dnl Verify if sigsetjmp is available, prototyped, and
dnl can be compiled. If all of these are true, and
dnl usage has not been previously disallowed with
dnl shell variable curl_disallow_sigsetjmp, then
dnl HAVE_SIGSETJMP will be defined.
AC_DEFUN([CURL_CHECK_FUNC_SIGSETJMP], [
AC_REQUIRE([CURL_INCLUDES_SETJMP])dnl
#
tst_links_sigsetjmp="unknown"
tst_macro_sigsetjmp="unknown"
tst_proto_sigsetjmp="unknown"
tst_compi_sigsetjmp="unknown"
tst_allow_sigsetjmp="unknown"
#
AC_MSG_CHECKING([if sigsetjmp can be linked])
AC_LINK_IFELSE([
AC_LANG_FUNC_LINK_TRY([sigsetjmp])
],[
AC_MSG_RESULT([yes])
tst_links_sigsetjmp="yes"
],[
AC_MSG_RESULT([no])
tst_links_sigsetjmp="no"
])
#
if test "$tst_links_sigsetjmp" = "no"; then
AC_MSG_CHECKING([if sigsetjmp seems a macro])
AC_LINK_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_setjmp
]],[[
sigjmp_buf env;
if(0 != sigsetjmp(env, 0))
return 1;
]])
],[
AC_MSG_RESULT([yes])
tst_macro_sigsetjmp="yes"
],[
AC_MSG_RESULT([no])
tst_macro_sigsetjmp="no"
])
fi
#
if test "$tst_links_sigsetjmp" = "yes"; then
AC_MSG_CHECKING([if sigsetjmp is prototyped])
AC_EGREP_CPP([sigsetjmp],[
$curl_includes_setjmp
],[
AC_MSG_RESULT([yes])
tst_proto_sigsetjmp="yes"
],[
AC_MSG_RESULT([no])
tst_proto_sigsetjmp="no"
])
fi
#
if test "$tst_proto_sigsetjmp" = "yes" ||
test "$tst_macro_sigsetjmp" = "yes"; then
AC_MSG_CHECKING([if sigsetjmp is compilable])
AC_COMPILE_IFELSE([
AC_LANG_PROGRAM([[
$curl_includes_setjmp
]],[[
sigjmp_buf env;
if(0 != sigsetjmp(env, 0))
return 1;
]])
],[
AC_MSG_RESULT([yes])
tst_compi_sigsetjmp="yes"
],[
AC_MSG_RESULT([no])
tst_compi_sigsetjmp="no"
])
fi
#
if test "$tst_compi_sigsetjmp" = "yes"; then
AC_MSG_CHECKING([if sigsetjmp usage allowed])
if test "x$curl_disallow_sigsetjmp" != "xyes"; then
AC_MSG_RESULT([yes])
tst_allow_sigsetjmp="yes"
else
AC_MSG_RESULT([no])
tst_allow_sigsetjmp="no"
fi
fi
#
AC_MSG_CHECKING([if sigsetjmp might be used])
if (test "$tst_proto_sigsetjmp" = "yes" ||
test "$tst_macro_sigsetjmp" = "yes") &&
test "$tst_compi_sigsetjmp" = "yes" &&
test "$tst_allow_sigsetjmp" = "yes"; then
AC_MSG_RESULT([yes])
AC_DEFINE_UNQUOTED(HAVE_SIGSETJMP, 1,
[Define to 1 if you have the sigsetjmp function or macro.])
ac_cv_func_sigsetjmp="yes"
else
AC_MSG_RESULT([no])
ac_cv_func_sigsetjmp="no"
fi
])
dnl CURL_CHECK_FUNC_STRCASECMP
dnl -------------------------------------------------
dnl Verify if strcasecmp is available, prototyped, and
...
...
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