diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-02 00:21:56 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-12-02 00:21:56 +0000 |
commit | b505ecce3956d6be1ab0554257d7ce9ead09ff89 (patch) | |
tree | f3fb355188472d17ff0826c27fc73d4b50e523ba /mandocdb.c | |
parent | ba6b743ba088a1ee889f6315c05711d3e4505d61 (diff) | |
download | mandoc-b505ecce3956d6be1ab0554257d7ce9ead09ff89.tar.gz mandoc-b505ecce3956d6be1ab0554257d7ce9ead09ff89.tar.zst mandoc-b505ecce3956d6be1ab0554257d7ce9ead09ff89.zip |
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.
Diffstat (limited to 'mandocdb.c')
-rw-r--r-- | mandocdb.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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 <kristaps@bsd.lv> * Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -33,8 +33,12 @@ #include <string.h> #include <unistd.h> -#ifdef __linux__ +#if defined(__linux__) +# include <endian.h> # include <db_185.h> +#elif defined(__APPLE__) +# include <libkern/OSByteOrder.h> +# include <db.h> #else # include <db.h> #endif |