From b505ecce3956d6be1ab0554257d7ce9ead09ff89 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 2 Dec 2011 00:21:56 +0000 Subject: This is a little gross: Linux and Apple need lots some cajoling to work with byte-swapping. Tested on Mac. Any Linux machines somebody can test on? Anybody? While here, note the correct byte-size in mandocdb(8) and also note field widths and endianness. The btree is now endian-neutral. --- mandocdb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'mandocdb.c') diff --git a/mandocdb.c b/mandocdb.c index bea93986..b81867c5 100644 --- a/mandocdb.c +++ b/mandocdb.c @@ -1,4 +1,4 @@ -/* $Id: mandocdb.c,v 1.20 2011/12/01 23:55:58 kristaps Exp $ */ +/* $Id: mandocdb.c,v 1.21 2011/12/02 00:21:56 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * Copyright (c) 2011 Ingo Schwarze @@ -33,8 +33,12 @@ #include #include -#ifdef __linux__ +#if defined(__linux__) +# include # include +#elif defined(__APPLE__) +# include +# include #else # include #endif -- cgit v1.2.3-56-ge451