aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/preconv.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-06-02 03:52:21 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-06-02 03:52:21 +0000
commite8e61026ee843cd18956b5932414c606fa85390c (patch)
tree0f8ac032ad659fe8cdbd0394a22387f7c37b8fff /preconv.c
parenta9b16812c6c127416d84f1714ec937066b0a77fb (diff)
downloadmandoc-e8e61026ee843cd18956b5932414c606fa85390c.tar.gz
mandoc-e8e61026ee843cd18956b5932414c606fa85390c.tar.zst
mandoc-e8e61026ee843cd18956b5932414c606fa85390c.zip
Sync to OpenBSD, no functional change:
* Add the missing mparse_parse_buffer prototype. * Drop the useless MAP_FILE constant: It's not specified in POSIX, so it's not required, it's the default anyway, and it's 0 anyway.
Diffstat (limited to 'preconv.c')
-rw-r--r--preconv.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/preconv.c b/preconv.c
index a0b2d641..7595887d 100644
--- a/preconv.c
+++ b/preconv.c
@@ -1,4 +1,4 @@
-/* $Id: preconv.c,v 1.5 2011/07/24 18:15:14 kristaps Exp $ */
+/* $Id: preconv.c,v 1.6 2013/06/02 03:52:21 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -32,13 +32,9 @@
/*
* The read_whole_file() and resize_buf() functions are copied from
- * read.c, including all dependency code (MAP_FILE, etc.).
+ * read.c, including all dependency code.
*/
-#ifndef MAP_FILE
-#define MAP_FILE 0
-#endif
-
enum enc {
ENC_UTF_8, /* UTF-8 */
ENC_US_ASCII, /* US-ASCII */
@@ -271,8 +267,7 @@ read_whole_file(const char *f, int fd,
if (S_ISREG(st.st_mode)) {
*with_mmap = 1;
fb->sz = (size_t)st.st_size;
- fb->buf = mmap(NULL, fb->sz, PROT_READ,
- MAP_FILE|MAP_SHARED, fd, 0);
+ fb->buf = mmap(NULL, fb->sz, PROT_READ, MAP_SHARED, fd, 0);
if (fb->buf != MAP_FAILED)
return(1);
}