2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

3681. [port] Update the Windows build system to support feature

selection and WIN64 builds.  This is a work in
                        progress. [RT #34160]
This commit is contained in:
Mark Andrews
2013-12-04 12:47:23 +11:00
parent 2c2be89824
commit c3c8823fed
448 changed files with 28872 additions and 4749 deletions

View File

@@ -51,6 +51,8 @@
#define BACKTRACE_LIBC
#elif defined(__GNUC__) && (defined(__x86_64__) || defined(__ia64__))
#define BACKTRACE_GCC
#elif defined(WIN32)
#define BACKTRACE_WIN32
#elif defined(__x86_64__) || defined(__i386__)
#define BACKTRACE_X86STACK
#else
@@ -127,6 +129,14 @@ isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes) {
return (ISC_R_SUCCESS);
}
#elif defined(BACKTRACE_WIN32)
isc_result_t
isc_backtrace_gettrace(void **addrs, int maxaddrs, int *nframes) {
unsigned long ftc = (unsigned long)maxaddrs;
*nframes = (int)CaptureStackBackTrace(1, ftc, addrs, NULL);
return ISC_R_SUCCESS;
}
#elif defined(BACKTRACE_X86STACK)
#ifdef __x86_64__
static unsigned long
@@ -278,7 +288,8 @@ isc_backtrace_getsymbol(const void *addr, const char **symbolp,
result = ISC_R_NOTFOUND;
else {
*symbolp = found->symbol;
*offsetp = (const char *)addr - (char *)found->addr;
*offsetp = (unsigned long) ((const char *)addr -
(char *)found->addr);
}
return (result);