Skip to content

Commit

Permalink
v0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fd00 committed Mar 20, 2016
1 parent 61be4c8 commit 79da14c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
AC_PREREQ(2.59)
AC_INIT([libexecinfo-stub], [0.0.1])
AC_INIT([libexecinfo-stub], [0.0.2])
AC_PROG_CC
AC_CANONICAL_SYSTEM
AC_CONFIG_MACRO_DIRS([m4])
AM_INIT_AUTOMAKE([foreign])
AM_PROG_CC_C_O
AC_PROG_CXX
LT_INIT
AC_CONFIG_FILES(libexecinfo.pc
Makefile
Expand Down
8 changes: 8 additions & 0 deletions include/execinfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#pragma once

#ifdef __cplusplus
extern "C" {
#endif

int backtrace(void**,int);
char** backtrace_symbols(void* const*,int);
void backtrace_symbols_fd(void* const*,int,int);

#ifdef __cplusplus
}
#endif
6 changes: 5 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
check_PROGRAMS = test
check_PROGRAMS = test test_cpp
test_SOURCES = test.c
test_CPPFLAGS = -I$(top_srcdir)/include
test_LDADD = libexecinfo.la
test_cpp_SOURCES = test_cpp.cpp
test_cpp_CPPFLAGS = -I$(top_srcdir)/include
test_cpp_LDADD = libexecinfo.la
TESTS = $(check_PROGRAMS)

lib_LTLIBRARIES = libexecinfo.la
Expand Down
10 changes: 10 additions & 0 deletions src/test_cpp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <assert.h>
#include <stdio.h>
#include "execinfo.h"

int
main (int argc, char** argv)
{
assert(0 == backtrace (NULL, 0));
assert(NULL == backtrace_symbols(NULL, 0));
}

0 comments on commit 79da14c

Please sign in to comment.