From f596fc98eae2d6f6c706084a48f2c3cfc1654af0 Mon Sep 17 00:00:00 2001 From: "Aaron W. LaFramboise" Date: Sat, 18 Sep 2004 17:55:22 -0600 Subject: config.h.in: Regenerate. 2004-09-15 Aaron W. LaFramboise * config.h.in: Regenerate. * configure: Regenerate. * configure.ac (AC_CHECK_HEADERS): Check for sys/mman.h. * unix.c: Include stdio.h. (HAVE_SYS_MMAN_H): Check. (PROT_READ, PROT_WRITE): Provide default definitions. From-SVN: r87714 --- libgfortran/io/unix.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libgfortran/io/unix.c') diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index 377cadd..e55966b 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -28,7 +28,9 @@ Boston, MA 02111-1307, USA. */ #include #include +#ifdef HAVE_SYS_MMAN_H #include +#endif #include #include @@ -43,6 +45,14 @@ Boston, MA 02111-1307, USA. */ #define MAP_FAILED ((void *) -1) #endif +#ifndef PROT_READ +#define PROT_READ 1 +#endif + +#ifndef PROT_WRITE +#define PROT_WRITE 2 +#endif + /* This implementation of stream I/O is based on the paper: * * "Exploiting the advantages of mapped files for stream I/O", -- cgit v1.1