diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-28 03:18:23 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-28 03:18:23 +0000 |
| commit | 675d62ac876ffe4719580d45b8c9469934ccf6d7 (patch) | |
| tree | e666bd4a1d816842c070e4928715d66b82655fc2 /libc/sysdeps/linux/common/mmap.c | |
| parent | fd666fca933f7241ff75d06ff36c9282fd443335 (diff) | |
| download | uClibc-alpine-675d62ac876ffe4719580d45b8c9469934ccf6d7.tar.bz2 uClibc-alpine-675d62ac876ffe4719580d45b8c9469934ccf6d7.tar.xz | |
Merge from trunk.
Diffstat (limited to 'libc/sysdeps/linux/common/mmap.c')
| -rw-r--r-- | libc/sysdeps/linux/common/mmap.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/libc/sysdeps/linux/common/mmap.c b/libc/sysdeps/linux/common/mmap.c index 3cd3eee4d..6acb73980 100644 --- a/libc/sysdeps/linux/common/mmap.c +++ b/libc/sysdeps/linux/common/mmap.c @@ -1,10 +1,10 @@ /* vi: set sw=4 ts=4: */ /* - * _mmap() for uClibc + * mmap() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org> + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> * - * GNU Library General Public License (LGPL) version 2 or later. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ #include "syscalls.h" @@ -12,9 +12,19 @@ #include <sys/mman.h> #ifdef __NR_mmap -#define __NR__mmap __NR_mmap + +libc_hidden_proto(mmap) + +#ifdef __UCLIBC_MMAP_HAS_6_ARGS__ + +_syscall6(void *, mmap, void *, start, size_t, length, + int, prot, int, flags, int, fd, off_t, offset); + +#else + +# define __NR__mmap __NR_mmap static inline _syscall1(__ptr_t, _mmap, unsigned long *, buffer); -attribute_hidden __ptr_t __mmap(__ptr_t addr, size_t len, int prot, +__ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset) { unsigned long buffer[6]; @@ -27,5 +37,8 @@ attribute_hidden __ptr_t __mmap(__ptr_t addr, size_t len, int prot, buffer[5] = (unsigned long) offset; return (__ptr_t) _mmap(buffer); } -strong_alias(__mmap,mmap) + +#endif + +libc_hidden_def(mmap) #endif |
