]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: coverage analysis header file bijou
authorPetr Machata <pmachata@redhat.com>
Mon, 5 Oct 2009 16:11:48 +0000 (18:11 +0200)
committerPetr Machata <pmachata@redhat.com>
Wed, 18 Aug 2010 12:55:10 +0000 (14:55 +0200)
src/dwarflint-coverage.h
src/dwarflint.h

index bb79f9599fb2cdc2d1f6fa5593c5554827392dcb..9f86020e84a1b309526576772a9a717f8d13e8d2 100644 (file)
@@ -24,6 +24,9 @@
    Network licensing program, please visit www.openinventionnetwork.com
    <http://www.openinventionnetwork.com>.  */
 
+#ifndef DWARFLINT_COVERAGE_H
+#define DWARFLINT_COVERAGE_H
+
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdlib.h>
 
 #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
index b41c1bd53e4751af4740a96fc3eca55237d69474..c018141a8bd0db4c44a27987e25fa77507603203 100644 (file)
@@ -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