diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2016-08-05 23:15:08 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2016-08-05 23:15:08 +0000 |
commit | 83a44904f7c78e291160d641ce52aff6713689bf (patch) | |
tree | 42720b1d97ceb35bd04f4202bcd2393fa7f4440e /dba.c | |
parent | d300e64bd3801d0e4ea69e807c86fd1aa2e743b2 (diff) | |
download | mandoc-83a44904f7c78e291160d641ce52aff6713689bf.tar.gz mandoc-83a44904f7c78e291160d641ce52aff6713689bf.tar.zst mandoc-83a44904f7c78e291160d641ce52aff6713689bf.zip |
The concept of endianness seems to be somewhat newfangled, so the
respective conversion functions are not yet properly standardized.
Rumour has it that POSIX is working on it, though.
For now, sprinkle some configuration glue.
Diffstat (limited to 'dba.c')
-rw-r--r-- | dba.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: dba.c,v 1.4 2016/08/05 21:38:11 schwarze Exp $ */ +/* $Id: dba.c,v 1.5 2016/08/05 23:15:08 schwarze Exp $ */ /* * Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> * @@ -17,8 +17,16 @@ * Allocation-based version of the mandoc database, for read-write access. * The interface is defined in "dba.h". */ +#include "config.h" + #include <sys/types.h> +#if HAVE_ENDIAN #include <endian.h> +#elif HAVE_SYS_ENDIAN +#include <sys/endian.h> +#elif HAVE_NTOHL +#include <arpa/inet.h> +#endif #include <errno.h> #include <stdint.h> #include <stdlib.h> |