[Libreoffice-commits] core.git: sal/osl
Stephan Bergmann
sbergman at redhat.com
Thu Feb 9 12:44:25 UTC 2017
sal/osl/unx/backtrace.c | 14 +++++---------
sal/osl/unx/backtrace.h | 14 +++++++++-----
2 files changed, 14 insertions(+), 14 deletions(-)
New commits:
commit 3f46caf7af7c10a64bff57cfdf9856e19ae25fba
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Feb 9 13:44:00 2017 +0100
Dummy implementations of backtrace/backtrace_symbols on Android, too
Change-Id: Ibbab23a9332c3475ab6ce5654999f040e936acfb
diff --git a/sal/osl/unx/backtrace.c b/sal/osl/unx/backtrace.c
index 4741f36..35bea16 100644
--- a/sal/osl/unx/backtrace.c
+++ b/sal/osl/unx/backtrace.c
@@ -134,9 +134,8 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
}
}
-#endif /* defined __sun */
+#elif defined FREEBSD || defined NETBSD || defined OPENBSD || defined(DRAGONFLY)
-#if defined FREEBSD || defined NETBSD || defined OPENBSD || defined(DRAGONFLY)
#include <dlfcn.h>
#include <pthread.h>
#include <setjmp.h>
@@ -214,17 +213,14 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
fclose( fp );
}
}
-#endif /* defined FREEBSD */
-#ifdef LINUX
+#elif defined LINUX
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
-#endif /* defined LINUX */
-
-#if defined( MACOSX )
+#elif defined( MACOSX )
#include <dlfcn.h>
#include <stdio.h>
@@ -292,9 +288,8 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
}
}
-#endif /* defined MACOSX */
+#else
-#if defined(AIX)
int backtrace( void **buffer, int max_frames )
{
return 0;
@@ -309,6 +304,7 @@ char ** backtrace_symbols(void * const * buffer, int size)
void backtrace_symbols_fd( void **buffer, int size, int fd )
{
}
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/unx/backtrace.h b/sal/osl/unx/backtrace.h
index 4695fd2..5fafc1c 100644
--- a/sal/osl/unx/backtrace.h
+++ b/sal/osl/unx/backtrace.h
@@ -17,8 +17,14 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#if defined (__sun) || defined (FREEBSD) || defined (NETBSD) || \
- defined (OPENBSD) || defined (DRAGONFLY) || defined (MACOSX)
+#ifndef INCLUDED_SAL_OSL_UNX_BACKTRACE_H
+#define INCLUDED_SAL_OSL_UNX_BACKTRACE_H
+
+#if defined (LINUX)
+
+#include <execinfo.h>
+
+#else
#ifdef __cplusplus
extern "C" {
@@ -45,10 +51,8 @@ struct frame {
} /* extern "C" */
#endif
-#endif /* defined __sun || FREEBSD || NETBSD || OPENBSD */
+#endif
-#if defined (LINUX)
-#include <execinfo.h>
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list