From: Michael Matz Date: Fri, 12 Oct 2007 15:44:30 +0000 (+0000) Subject: Make the satsolver header usable with C++ (only pool.h and source_solv.h X-Git-Tag: BASE-SuSE-Code-12_1-Branch~308^2~930 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fb02a1903352827ac86985465703fcf383e2a32;p=thirdparty%2Flibsolv.git 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). --- diff --git a/src/pool.h b/src/pool.h index 28ce71f0..776be175 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 33f40c19..c7f61b0c 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 */