From 3ab9898587c71feb3974b767af38c66d9f89aaba Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Mon, 5 Oct 2009 18:11:48 +0200 Subject: [PATCH] dwarflint: coverage analysis header file bijou --- src/dwarflint-coverage.h | 20 ++++++++++++++++++-- src/dwarflint.h | 3 +-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/dwarflint-coverage.h b/src/dwarflint-coverage.h index bb79f9599..9f86020e8 100644 --- a/src/dwarflint-coverage.h +++ b/src/dwarflint-coverage.h @@ -24,6 +24,9 @@ Network licensing program, please visit www.openinventionnetwork.com . */ +#ifndef DWARFLINT_COVERAGE_H +#define DWARFLINT_COVERAGE_H + #include #include #include @@ -45,9 +48,15 @@ #define WIPE(OBJ) memset (&OBJ, 0, sizeof (OBJ)) +#ifdef __cplusplus +# define IF_CPLUSPLUS(X) X +extern "C" +{ +#endif + /* Functions and data structures for handling of address range - coverage. We use that to find holes of unused bytes in DWARF - string table. */ + coverage. We use that to find holes of unused bytes in DWARF + string table. */ struct cov_range { @@ -90,3 +99,10 @@ bool coverage_find_holes (struct coverage *cov, uint64_t start, uint64_t length, bool coverage_find_ranges (struct coverage *cov, bool (*cb)(uint64_t start, uint64_t length, void *data), void *data); + +#ifdef __cplusplus +# define IF_CPLUSPLUS(X) X +} +#endif + +#endif//DWARFLINT_COVERAGE_H diff --git a/src/dwarflint.h b/src/dwarflint.h index b41c1bd53..c018141a8 100644 --- a/src/dwarflint.h +++ b/src/dwarflint.h @@ -28,6 +28,7 @@ #include "../libdw/libdw.h" #include "../libebl/libebl.h" +#include "dwarflint-coverage.h" #ifdef __cplusplus extern "C" @@ -188,8 +189,6 @@ extern "C" struct where *wh, uint64_t start, uint64_t end); -# include "dwarflint-coverage.h" - extern char *range_fmt (char *buf, size_t buf_size, uint64_t start, uint64_t end); struct relocation -- 2.47.3