Make the satsolver header usable with C++ (only pool.h and source_solv.h
authorMichael Matz <matz@suse.de>
Fri, 12 Oct 2007 15:44:30 +0000 (15:44 +0000)
committerMichael Matz <matz@suse.de>
Fri, 12 Oct 2007 15:44:30 +0000 (15:44 +0000)
for now, they drag in most of the usefull stuff anyway).

src/pool.h
src/source_solv.h

index 28ce71f..776be17 100644 (file)
@@ -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 */
index 33f40c1..c7f61b0 100644 (file)
@@ -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 */