aboutsummaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2006-12-24 00:45:37 -0500
committerJunio C Hamano <junkio@cox.net>2006-12-24 00:16:56 -0800
commitd6779124b90ef5c00697815b04c9f75fd3756586 (patch)
tree782ce9b9c475328ebf55dbca35bc6492fae56cc9 /compat
parent8dbc0fcef4912f7814b7822324b3c1943e55865b (diff)
downloadgit-d6779124b90ef5c00697815b04c9f75fd3756586.tar.gz
git-d6779124b90ef5c00697815b04c9f75fd3756586.tar.xz
Rename gitfakemmap to git_mmap.
This minor cleanup was suggested by Johannes Schindelin. The mmap is still fake in the sense that we don't support PROT_WRITE or MAP_SHARED with external modification at all, but that hasn't stopped us from using mmap() thoughout the Git code. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'compat')
-rw-r--r--compat/mmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compat/mmap.c b/compat/mmap.c
index 0fd46e793..bb34c7e95 100644
--- a/compat/mmap.c
+++ b/compat/mmap.c
@@ -1,12 +1,12 @@
#include "../git-compat-util.h"
-void *gitfakemmap(void *start, size_t length, int prot , int flags, int fd, off_t offset)
+void *git_mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset)
{
int n = 0;
off_t current_offset = lseek(fd, 0, SEEK_CUR);
if (start != NULL || !(flags & MAP_PRIVATE))
- die("Invalid usage of gitfakemmap.");
+ die("Invalid usage of mmap when built with NO_MMAP");
if (lseek(fd, offset, SEEK_SET) < 0) {
errno = EINVAL;
@@ -44,7 +44,7 @@ void *gitfakemmap(void *start, size_t length, int prot , int flags, int fd, off_
return start;
}
-int gitfakemunmap(void *start, size_t length)
+int git_munmap(void *start, size_t length)
{
free(start);
return 0;