X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/80244c48e0ba678ad998cda0739a4d5dc399ac10..90b416207a9708302ecc3333c3f3aa4c660122b1:/apropos_db.c diff --git a/apropos_db.c b/apropos_db.c index 4d9ae874..d618174a 100644 --- a/apropos_db.c +++ b/apropos_db.c @@ -1,4 +1,4 @@ -/* $Id: apropos_db.c,v 1.17 2011/12/01 23:46:26 kristaps Exp $ */ +/* $Id: apropos_db.c,v 1.21 2011/12/03 18:47:09 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * Copyright (c) 2011 Ingo Schwarze @@ -15,6 +15,10 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include @@ -24,10 +28,12 @@ #include #include -#include - -#ifdef __linux__ +#if defined(__linux__) +# include # include +#elif defined(__APPLE__) +# include +# include #else # include #endif @@ -177,8 +183,8 @@ btree_read(const DBT *k, const DBT *v, vp = v->data; norm_string((const char *)k->data, mc, buf); - dbv->rec = ntohl(vp->rec); - dbv->mask = vp->mask; + dbv->rec = betoh32(vp->rec); + dbv->mask = betoh64(vp->mask); return(1); }