---
ChangeLog | 5 +++++
configure.ac | 7 ++++---
tests/ChangeLog | 6 ++++++
tests/backtrace-dwarf.c | 9 +++++++--
4 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f81b302..5c8e1c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-13 Mark Wielaard <mjw(a)redhat.com>
+
+ * configure.ac (ac_cv_c99): Add explicit return.
+ (ac_cv_tls): Add stdlib.h include.
+
2014-12-18 Mark Wielaard <mjw(a)redhat.com>
* configure.ac: Set version to 0.161.
diff --git a/configure.ac b/configure.ac
index 0e67a79..c4b818d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script.
dnl Configure input file for elfutils. -*-autoconf-*-
dnl
-dnl Copyright (C) 1996-2014 Red Hat, Inc.
+dnl Copyright (C) 1996-2015 Red Hat, Inc.
dnl
dnl This file is part of elfutils.
dnl
@@ -83,7 +83,7 @@ AC_CACHE_CHECK([for gcc with C99 support], ac_cv_c99, [dnl
old_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -std=gnu99"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl
-int foo (int a) { for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; }])],
+int foo (int a) { for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return
s;}])],
ac_cv_c99=yes, ac_cv_c99=no)
CFLAGS="$old_CFLAGS"])
AS_IF([test "x$ac_cv_c99" != xyes],
@@ -97,7 +97,8 @@ save_LDFLAGS="$LDFLAGS"
CFLAGS="-fpic $CFLAGS"
LDFLAGS="-shared -Wl,-z,defs,-z,relro $LDFLAGS"
AC_LINK_IFELSE([dnl
-AC_LANG_PROGRAM([[#undef __thread
+AC_LANG_PROGRAM([[#include <stdlib.h>
+#undef __thread
static __thread int a; int foo (int b) { return a + b; }]],
[[exit (foo (0));]])],
ac_cv_tls=yes, ac_cv_tls=no)
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 0162b85..82c30e0 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-13 Mark Wielaard <mjw(a)redhat.com>
+
+ * backtrace-dwarf.c: Add explicit includes.
+ (cleanup_13_abort): Remove unused static declaration.
+ (thread_callback): Add explicit return.
+
2015-03-13 H.J. Lu <hjl.tools(a)gmail.com>
* backtrace.c (prepare_thread): Use PTRACE_GETREGS/PTRACE_SETREGS
diff --git a/tests/backtrace-dwarf.c b/tests/backtrace-dwarf.c
index 87d088a..fbcb22e 100644
--- a/tests/backtrace-dwarf.c
+++ b/tests/backtrace-dwarf.c
@@ -1,5 +1,5 @@
/* Test program for unwinding of complicated DWARF expressions.
- Copyright (C) 2013 Red Hat, Inc.
+ Copyright (C) 2013, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -22,7 +22,11 @@
#include <stdio_ext.h>
#include <locale.h>
#include <errno.h>
+#include <error.h>
+#include <unistd.h>
#include <sys/ptrace.h>
+#include <sys/types.h>
+#include <sys/wait.h>
#include ELFUTILS_HEADER(dwfl)
#ifndef __linux__
@@ -37,7 +41,6 @@ main (int argc __attribute__ ((unused)), char **argv)
#else /* __linux__ */
-static void cleanup_13_abort (void);
#define main cleanup_13_main
#include "cleanup-13.c"
#undef main
@@ -115,7 +118,9 @@ static int
thread_callback (Dwfl_Thread *thread, void *thread_arg)
{
dwfl_thread_getframes (thread, frame_callback, NULL);
+ /* frame_callback shall exit (0) on success. */
error (1, 0, "dwfl_thread_getframes: %s", dwfl_errmsg (-1));
+ return DWARF_CB_ABORT;
}
int
--
1.8.3.1