From db8f698c8a03bcc920b9453f8822fbbd8ec7ea66 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 14 Dec 2011 10:53:32 +0100 Subject: new configure option: NOT_FOR_DISTRIBUTION fix safemalloc to compile w/o libbfd. CMakeLists.txt: NOT_FOR_DISTRIBUTION option cmake/readline.cmake: simplify libedit/readline detection. never use bundled libedit. use system readline v6 only if NOT_FOR_DISTRIBUTION=1 configure.cmake: use libbfd only if NOT_FOR_DISTRIBUTION=1 include/my_stacktrace.h: link with libbfd even w/o safemalloc. --- include/my_stacktrace.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'include/my_stacktrace.h') diff --git a/include/my_stacktrace.h b/include/my_stacktrace.h index 30f0203a43e..a9590a76368 100644 --- a/include/my_stacktrace.h +++ b/include/my_stacktrace.h @@ -55,23 +55,22 @@ void my_set_exception_pointers(EXCEPTION_POINTERS *ep); #endif #endif -/* at the moment, safemalloc is the main user of libbfd */ -#ifndef SAFEMALLOC -#undef HAVE_BFD_H -#endif - #ifdef HAVE_BFD_H #define HAVE_MY_ADDR_RESOLVE 1 #endif -#ifdef HAVE_MY_ADDR_RESOLVE typedef struct { const char *file; const char *func; uint line; } my_addr_loc; + +#ifdef HAVE_MY_ADDR_RESOLVE int my_addr_resolve(void *ptr, my_addr_loc *loc); const char *my_addr_resolve_init(); +#else +#define my_addr_resolve_init() (0) +#define my_addr_resolve(A,B) (1) #endif #ifdef HAVE_WRITE_CORE -- cgit v1.2.1