svn commit: trunk/uClibc/libc/sysdeps/linux/common
vapier at uclibc.org
vapier at uclibc.org
Tue Jan 17 01:01:13 UTC 2006
Author: vapier
Date: 2006-01-16 17:01:08 -0800 (Mon, 16 Jan 2006)
New Revision: 13377
Log:
use the 6-arg version of mmap where available
Modified:
trunk/uClibc/libc/sysdeps/linux/common/mmap.c
Changeset:
Modified: trunk/uClibc/libc/sysdeps/linux/common/mmap.c
===================================================================
--- trunk/uClibc/libc/sysdeps/linux/common/mmap.c 2006-01-17 01:00:04 UTC (rev 13376)
+++ trunk/uClibc/libc/sysdeps/linux/common/mmap.c 2006-01-17 01:01:08 UTC (rev 13377)
@@ -15,7 +15,14 @@
libc_hidden_proto(mmap)
-#define __NR__mmap __NR_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);
__ptr_t mmap(__ptr_t addr, size_t len, int prot,
int flags, int fd, __off_t offset)
@@ -30,5 +37,8 @@
buffer[5] = (unsigned long) offset;
return (__ptr_t) _mmap(buffer);
}
+
+#endif
+
libc_hidden_def(mmap)
#endif
More information about the uClibc-cvs
mailing list