summaryrefslogtreecommitdiffstats
path: root/read.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-16 19:00:01 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-16 19:00:01 +0000
commit2aa53e65cd397640a44a8f3489f93ee15a536c54 (patch)
tree004861e8817a1141dee31b9e1e64ffba81f451f4 /read.c
parentb910bc285b99278f25295489ecd0cef5e7339f23 (diff)
downloadmandoc-2aa53e65cd397640a44a8f3489f93ee15a536c54.tar.gz
Improve build system and autodetection.
* Make ./configure standalone, that's what people expect. * Let people write a ./configure.local from scratch, not edit existing files. * Autodetect wchar, sqlite3, and manpath and act accordingly. * Autodetect the need for -L/usr/local/lib and -lutil. * Get rid of config.h.p{re,ost}, let ./configure only write what's needed. * Let ./configure write a Makefile.local snippet, that's quite flexible.
Diffstat (limited to 'read.c')
-rw-r--r--read.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/read.c b/read.c
index d80a02ac..4b614b6f 100644
--- a/read.c
+++ b/read.c
@@ -19,7 +19,7 @@
#include "config.h"
#include <sys/types.h>
-#ifdef HAVE_MMAP
+#if HAVE_MMAP
#include <sys/stat.h>
#include <sys/mman.h>
#endif
@@ -590,7 +590,7 @@ read_whole_file(struct mparse *curp, const char *file, int fd,
size_t off;
ssize_t ssz;
-#ifdef HAVE_MMAP
+#if HAVE_MMAP
struct stat st;
if (-1 == fstat(fd, &st)) {
curp->file_status = MANDOCLEVEL_SYSERR;
@@ -763,7 +763,7 @@ mparse_readfd(struct mparse *curp, int fd, const char *file)
mparse_parse_buffer(curp, blk, file);
-#ifdef HAVE_MMAP
+#if HAVE_MMAP
if (with_mmap)
munmap(blk.buf, blk.sz);
else