aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace/backtrace.h
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2012-09-19 13:41:33 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2012-09-19 13:41:33 +0000
commit768505569c3634f2e726599a7532a7badf74f38c (patch)
tree7eb53bd9949cc41b470853ad54dbf4ddda0c39c1 /libbacktrace/backtrace.h
parentfb522d96cc3cd7192f92f6b7fe3ff8d659fe4d1b (diff)
downloadgcc-768505569c3634f2e726599a7532a7badf74f38c.zip
gcc-768505569c3634f2e726599a7532a7badf74f38c.tar.gz
gcc-768505569c3634f2e726599a7532a7badf74f38c.tar.bz2
configure.ac (GCC_HEADER_STDINT): Invoke.
* configure.ac (GCC_HEADER_STDINT): Invoke. * backtrace.h: If we can't find <stdint.h>, use "gstdint.h". * btest.c: Don't include <stdint.h>. * dwarf.c: Likewise. * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild. Co-Authored-By: Ian Lance Taylor <iant@google.com> From-SVN: r191474
Diffstat (limited to 'libbacktrace/backtrace.h')
-rw-r--r--libbacktrace/backtrace.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/libbacktrace/backtrace.h b/libbacktrace/backtrace.h
index a8d1ffc..b8404ea 100644
--- a/libbacktrace/backtrace.h
+++ b/libbacktrace/backtrace.h
@@ -34,9 +34,26 @@ POSSIBILITY OF SUCH DAMAGE. */
#define BACKTRACE_H
#include <stddef.h>
-#include <stdint.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
+
#ifdef __cplusplus
extern "C" {
#endif