Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
510bb376
Commit
510bb376
authored
Sep 04, 2018
by
Ondřej Surý
Browse files
Define platform.h ISC_PLATFORM_USEBACKTRACE with config.h USE_BACKTRACE
parent
3949450f
Changes
8
Hide whitespace changes
Inline
Side-by-side
config.h.in
View file @
510bb376
...
...
@@ -272,7 +272,7 @@
/* Define to 1 if you have the <krb5/krb5.h> header file. */
#undef HAVE_KRB5_KRB5_H
/* if system have backtrace function */
/*
define
if system have backtrace function */
#undef HAVE_LIBCTRACE
/* Define if libidn2 was found */
...
...
@@ -539,6 +539,9 @@
/* Define to use large-system tuning. */
#undef TUNE_LARGE
/* define if we can use backtrace */
#undef USE_BACKTRACE
/* Enable DNS Response Policy Service API */
#undef USE_DNSRPS
...
...
config.h.win32
View file @
510bb376
...
...
@@ -367,6 +367,9 @@ typedef __int64 off_t;
/* Large system tuning */
@TUNE_LARGE@
/* define if we can use backtrace */
@USE_BACKTRACE@
/* the default value of dnssec-validation option */
@VALIDATION_DEFAULT@
...
...
configure
View file @
510bb376
...
...
@@ -734,7 +734,6 @@ A
O
ALWAYS_MAKE_SYMTABLE
MKSYMTBL_PROGRAM
ISC_PLATFORM_USEBACKTRACE
PURIFY
purify_path
MKDEPPROG
...
...
@@ -17511,38 +17510,37 @@ esac
#
# Check whether --enable-backtrace was given.
if test "${enable_backtrace+set}" = set; then :
enableval=$enable_backtrace;
want_backtrace="$enableval"
enableval=$enable_backtrace;
else
want
_backtrace="yes"
enable
_backtrace="yes"
fi
case $want_backtrace in
yes)
ISC_PLATFORM_USEBACKTRACE="#define ISC_PLATFORM_USEBACKTRACE 1"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
if test "$enable_backtrace" = "yes"; then :
$as_echo "#define USE_BACKTRACE 1" >>confdefs.h
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <execinfo.h>
int
main ()
{
return (backtrace((void **)0, 0));
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
$as_echo "#define HAVE_LIBCTRACE /**/" >>confdefs.h
$as_echo "#define HAVE_LIBCTRACE 1" >>confdefs.h
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
;;
*)
ISC_PLATFORM_USEBACKTRACE="#undef ISC_PLATFORM_USEBACKTRACE"
;;
esac
fi
# Check whether --enable-symtable was given.
if test "${enable_symtable+set}" = set; then :
...
...
configure.in
View file @
510bb376
...
...
@@ -1811,22 +1811,20 @@ esac
# enable/disable dumping stack backtrace. Also check if the system supports
# glibc-compatible backtrace() function.
#
AC_ARG_ENABLE(backtrace,
AS_HELP_STRING([--enable-backtrace],
[log stack backtrace on abort [default=yes]]),
want_backtrace="$enableval", want_backtrace="yes")
case $want_backtrace in
yes)
ISC_PLATFORM_USEBACKTRACE="#define ISC_PLATFORM_USEBACKTRACE 1"
AC_TRY_LINK([#include <execinfo.h>],
[return (backtrace((void **)0, 0));],
[AC_DEFINE([HAVE_LIBCTRACE], [], [if system have backtrace function])],)
;;
*)
ISC_PLATFORM_USEBACKTRACE="#undef ISC_PLATFORM_USEBACKTRACE"
;;
esac
AC_SUBST(ISC_PLATFORM_USEBACKTRACE)
AC_ARG_ENABLE([backtrace],
[AS_HELP_STRING([--enable-backtrace],
[log stack backtrace on abort [default=yes]])],
[], [enable_backtrace="yes"])
AS_IF([test "$enable_backtrace" = "yes"],
[AC_DEFINE([USE_BACKTRACE], [1], [define if we can use backtrace])
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <execinfo.h>]],
[[return (backtrace((void **)0, 0));]]
)],
[AC_DEFINE([HAVE_LIBCTRACE], [1], [define if system have backtrace function])]
)])
AC_ARG_ENABLE(symtable,
AS_HELP_STRING([--enable-symtable],
...
...
lib/isc/backtrace.c
View file @
510bb376
...
...
@@ -24,7 +24,7 @@
#include
<isc/result.h>
#include
<isc/util.h>
#ifdef
ISC_PLATFORM_
USEBACKTRACE
#ifdef USE
_
BACKTRACE
/*
* Getting a back trace of a running process is tricky and highly platform
* dependent. Our current approach is as follows:
...
...
@@ -52,9 +52,9 @@
#else
#define BACKTRACE_DISABLED
#endif
/* HAVE_LIBCTRACE */
#else
/*
!ISC_PLATFORM_
USEBACKTRACE */
#else
/* USE
_
BACKTRACE */
#define BACKTRACE_DISABLED
#endif
/*
ISC_PLATFORM_
USEBACKTRACE */
#endif
/* USE
_
BACKTRACE */
#ifdef BACKTRACE_LIBC
isc_result_t
...
...
lib/isc/include/isc/platform.h.in
View file @
510bb376
...
...
@@ -78,11 +78,6 @@
*/
@ISC_PLATFORM_HAVEDEVPOLL@
/*! \brief
* Define if we want to log backtrace
*/
@ISC_PLATFORM_USEBACKTRACE@
/*
*** Printing.
***/
...
...
lib/isc/win32/include/isc/platform.h.in
View file @
510bb376
...
...
@@ -67,11 +67,6 @@
*/
#undef ISC_PLATFORM_HAVESYSUNH
/*
* Define if we want to log backtrace
*/
@ISC_PLATFORM_USEBACKTRACE@
/*
* Defines for the noreturn attribute.
*/
...
...
win32utils/Configure
View file @
510bb376
...
...
@@ -207,6 +207,7 @@ my @substdefh = ("AES_CC",
"
HAVE_DSA_GET0_PQG
",
"
HAVE_ECDSA_SIG_GET0
",
"
HAVE_RSA_SET0_KEY
",
"
USE_BACKTRACE
",
"
USE_OPENSSL
",
"
USE_PKCS11
",
"
HAVE_PKCS11_ED25519
",
...
...
@@ -231,8 +232,7 @@ my @substdefp = ("ISC_PLATFORM_BUSYWAITNOP",
"
ISC_PLATFORM_HAVECMPXCHG
",
"
ISC_PLATFORM_HAVEXADD
",
"
ISC_PLATFORM_HAVEXADDQ
",
"
ISC_PLATFORM_NEEDSTRCASESTR
",
"
ISC_PLATFORM_USEBACKTRACE
");
"
ISC_PLATFORM_NEEDSTRCASESTR
");
# for conf.sh
...
...
@@ -1160,7 +1160,7 @@ if ($msc_ver < 1400) {
# backtrace for >= VS 2012
if
(
$msc_ver
>=
1700
)
{
$configdef
p
{"
ISC_PLATFORM_
USEBACKTRACE
"}
=
1
;
$configdef
h
{"
USE
_
BACKTRACE
"}
=
1
;
}
# no version of MSVS supports strcasestr() yet
...
...
@@ -1411,7 +1411,7 @@ if ($use_openssl eq "yes") {
die
"
find more than one OpenSSL libcrypto-*.dll DLL candidate
\n
";
}
$openssl_dll
=
File::
Spec
->
catdir
(
$openssl_path
,
"
@dirlist
[0]
");
}
}
$cryptolib
=
"
openssl
";
$configvar
{"
OPENSSL_PATH
"}
=
"
$openssl_path
";
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment