solv.i: new perl includes <stdbool.h> and the custom typedefs cause gcc errors.
authorAles Kozumplik <ales@redhat.com>
Mon, 23 Jul 2012 08:44:24 +0000 (10:44 +0200)
committerMichael Schroeder <mls@suse.de>
Fri, 10 Aug 2012 11:54:07 +0000 (13:54 +0200)
Use <stdbool.h> as the default instead. Additionally this also causes all
functions with return type 'bool' in solv.i having their return value
converted into 1 or 0[1].

[1] C99 Draft, 6.3.1.2

bindings/solv.i

index a5b9552..618401c 100644 (file)
@@ -331,6 +331,7 @@ typedef VALUE AppObjectPtr;
 %include "typemaps.i"
 
 %{
+#include <stdbool.h>
 #include <stdio.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -378,9 +379,6 @@ typedef VALUE AppObjectPtr;
 #define RARRAY_LEN(ary) (RARRAY(ary)->len)
 #endif
 
-#define true 1
-#define false 1
-
 #define SOLVER_SOLUTION_ERASE                   -100
 #define SOLVER_SOLUTION_REPLACE                 -101
 #define SOLVER_SOLUTION_REPLACE_DOWNGRADE       -102
@@ -388,7 +386,6 @@ typedef VALUE AppObjectPtr;
 #define SOLVER_SOLUTION_REPLACE_VENDORCHANGE    -104
 
 typedef struct chksum Chksum;
-typedef int bool;
 typedef void *AppObjectPtr;
 
 typedef struct {