From dd436c5bf86cd6866e104b28d0d01cb720d361a0 Mon Sep 17 00:00:00 2001 From: leitner Date: Wed, 2 Apr 2014 13:59:03 +0000 Subject: [PATCH] map mmap_read return a const char* --- mmap.h | 2 +- mmap/mmap_read.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mmap.h b/mmap.h index 53ea10e..aaab28c 100644 --- a/mmap.h +++ b/mmap.h @@ -10,7 +10,7 @@ extern "C" { /* open file for reading, mmap whole file, close file, write length of * map in filesize and return pointer to map. */ -char* mmap_read(const char *filename,size_t* filesize); +const char* mmap_read(const char *filename,size_t* filesize); /* open file for writing, mmap whole file privately (copy on write), * close file, write length of map in filesize and return pointer to diff --git a/mmap/mmap_read.c b/mmap/mmap_read.c index 61ddb37..14dd6d9 100644 --- a/mmap/mmap_read.c +++ b/mmap/mmap_read.c @@ -8,7 +8,7 @@ #include "open.h" #include "mmap.h" -extern char* mmap_read(const char* filename,size_t * filesize) { +extern const char* mmap_read(const char* filename,size_t * filesize) { #ifdef __MINGW32__ HANDLE fd,m; char* map;