From 0fb02a1903352827ac86985465703fcf383e2a32 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Fri, 12 Oct 2007 15:44:30 +0000 Subject: [PATCH] Make the satsolver header usable with C++ (only pool.h and source_solv.h for now, they drag in most of the usefull stuff anyway). --- src/pool.h | 12 +++++++++++- src/source_solv.h | 8 ++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/pool.h b/src/pool.h index 28ce71f..776be17 100644 --- a/src/pool.h +++ b/src/pool.h @@ -6,6 +6,10 @@ #ifndef POOL_H #define POOL_H +#ifdef __cplusplus +extern "C" { +#endif + #include "pooltypes.h" #include "poolid.h" #include "source.h" @@ -13,7 +17,9 @@ #include "queue.h" // bool -typedef int bool; +#ifndef __cplusplus +typedef _Bool bool; +#endif // see initpool_data[] in pool.c @@ -131,4 +137,8 @@ extern Id *addrelproviders(Pool *pool, Id d); extern Source *pool_source(Pool *pool, Solvable *s); +#ifdef __cplusplus +} +#endif + #endif /* POOL_H */ diff --git a/src/source_solv.h b/src/source_solv.h index 33f40c1..c7f61b0 100644 --- a/src/source_solv.h +++ b/src/source_solv.h @@ -6,9 +6,17 @@ #ifndef SOURCE_SOLVE_H #define SOURCE_SOLVE_H +#ifdef __cplusplus +extern "C" { +#endif + #include "pool.h" #include "source.h" extern Source *pool_addsource_solv(Pool *pool, FILE *fp, const char *name); +#ifdef __cplusplus +} +#endif + #endif /* SOURCE_SOLVE_H */ -- 2.7.4