summaryrefslogtreecommitdiffstats
path: root/3rdparty/libbacktrace/libbacktrace/backtrace.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/libbacktrace/libbacktrace/backtrace.h')
-rw-r--r--3rdparty/libbacktrace/libbacktrace/backtrace.h35
1 files changed, 12 insertions, 23 deletions
diff --git a/3rdparty/libbacktrace/libbacktrace/backtrace.h b/3rdparty/libbacktrace/libbacktrace/backtrace.h
index d209219d..0631f265 100644
--- a/3rdparty/libbacktrace/libbacktrace/backtrace.h
+++ b/3rdparty/libbacktrace/libbacktrace/backtrace.h
@@ -1,5 +1,5 @@
/* backtrace.h -- Public header file for stack backtrace library.
- Copyright (C) 2012-2016 Free Software Foundation, Inc.
+ Copyright (C) 2012-2019 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Google.
Redistribution and use in source and binary forms, with or without
@@ -7,13 +7,13 @@ modification, are permitted provided that the following conditions are
met:
(1) Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
+ notice, this list of conditions and the following disclaimer.
(2) Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
- distribution.
-
+ distribution.
+
(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
@@ -34,25 +34,8 @@ POSSIBILITY OF SUCH DAMAGE. */
#define BACKTRACE_H
#include <stddef.h>
-#include <stdio.h>
-
-/* We want to get a definition for uintptr_t, but we still care about
- systems that don't have <stdint.h>. */
-#if defined(__GLIBC__) && __GLIBC__ >= 2
-
-#include <stdint.h>
-
-#elif defined(HAVE_STDINT_H)
-
#include <stdint.h>
-
-#else
-
-/* Systems that don't have <stdint.h> must provide gstdint.h, e.g.,
- from GCC_HEADER_STDINT in configure.ac. */
-#include "gstdint.h"
-
-#endif
+#include <stdio.h>
#ifdef __cplusplus
extern "C" {
@@ -92,7 +75,13 @@ typedef void (*backtrace_error_callback) (void *data, const char *msg,
use appropriate atomic operations. If THREADED is zero the state
may only be accessed by one thread at a time. This returns a state
pointer on success, NULL on error. If an error occurs, this will
- call the ERROR_CALLBACK routine. */
+ call the ERROR_CALLBACK routine.
+
+ Calling this function allocates resources that cannot be freed.
+ There is no backtrace_free_state function. The state is used to
+ cache information that is expensive to recompute. Programs are
+ expected to call this function at most once and to save the return
+ value for all later calls to backtrace functions. */
extern struct backtrace_state *backtrace_create_state (
const char *filename, int threaded,