diff --git a/src/Makefile.am b/src/Makefile.am index bfb3307..0a3e5d2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -66,8 +66,8 @@ flenser_SOURCES = \ list.h \ url.cc \ url.hh \ - bitvec.c \ - bitvec.h \ + bitvec.cc \ + bitvec.hh \ klist.c \ klist.h \ chain.cc \ diff --git a/src/bitvec.c b/src/bitvec.cc similarity index 97% rename from src/bitvec.c rename to src/bitvec.cc index 2333925..02b6458 100644 --- a/src/bitvec.c +++ b/src/bitvec.cc @@ -14,8 +14,9 @@ */ #include "../dlib/dlib.h" -#include "bitvec.h" +#include "bitvec.hh" +extern "C" { /** * Create a new bitvec with 'num_bits' size @@ -65,3 +66,4 @@ void a_Bitvec_set_bit(bitvec_t *bvec, int pos) dReturn_if_fail (pos < bvec->len); bvec->vec[pos/BVEC_SIZE] |= 1 << (pos % BVEC_SIZE); } +} diff --git a/src/bitvec.h b/src/bitvec.hh similarity index 98% rename from src/bitvec.h rename to src/bitvec.hh index 35aebcc..8a75331 100644 --- a/src/bitvec.h +++ b/src/bitvec.hh @@ -12,6 +12,7 @@ typedef struct { } bitvec_t; +extern "C" { /* * Function prototypes */ @@ -31,5 +32,6 @@ void a_Bitvec_clear(bitvec_t *bvec); #define a_Bitvec_clear_bit(bvec,pos) \ ((bvec)->vec[(pos)/BVEC_SIZE] &= ~(1 << (pos) % BVEC_SIZE)) +} #endif /* __BITVEC_H__ */ diff --git a/src/dicache.hh b/src/dicache.hh index bcc03c2..f4ec7cf 100644 --- a/src/dicache.hh +++ b/src/dicache.hh @@ -6,7 +6,7 @@ extern "C" { #endif /* __cplusplus */ -#include "bitvec.h" +#include "bitvec.hh" #include "image.hh" #include "cache.hh" diff --git a/src/image.hh b/src/image.hh index baf974b..b6a5827 100644 --- a/src/image.hh +++ b/src/image.hh @@ -24,7 +24,7 @@ extern "C" { #endif /* __cplusplus */ -#include "bitvec.h" +#include "bitvec.hh" #include "url.hh" /*