[git commit ldso-future] dl-syscall.h: use system headers as much as possible, cleanup a bit
Peter S. Mazinger
ps.m at gmx.net
Mon Apr 11 11:27:03 UTC 2011
commit: http://git.uclibc.org/uClibc/commit/?id=a698a25a8f0b0faad1117fc6f27bac463bda28d6
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/ldso-future
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
ldso/include/dl-syscall.h | 18 +++++-------------
1 files changed, 5 insertions(+), 13 deletions(-)
diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
index f002e8b..2cf58ff 100644
--- a/ldso/include/dl-syscall.h
+++ b/ldso/include/dl-syscall.h
@@ -15,8 +15,10 @@
#include <sys/syscall.h>
#include <sys/mman.h> /* MAP_ANONYMOUS -- differs between platforms */
-#define _FCNTL_H
-#include <bits/fcntl.h>
+#define stat __hide_stat
+#include <fcntl.h>
+#include <sys/stat.h>
+#undef stat
/* Pull in whatever this particular arch's kernel thinks the kernel version of
* struct stat should look like. It turns out that each arch has a different
@@ -29,10 +31,6 @@
#include <bits/kernel_stat.h>
#include <bits/kernel_types.h>
-/* Protection bits. -- instead of including sys/stat.h */
-#define S_ISUID 04000 /* Set user ID on execution. */
-#define S_ISGID 02000 /* Set group ID on execution. */
-
/* Pull in the arch specific syscall implementation */
#ifdef HAVE_DL_SYSCALLS_H
# include <dl-syscalls.h>
@@ -114,12 +112,7 @@ static __always_inline _syscall3(int, _dl_readlink, const char *, path, char *,
# include <sys/time.h>
# define __NR__dl_gettimeofday __NR_gettimeofday
static __always_inline _syscall2(int, _dl_gettimeofday, struct timeval *, tv,
-# ifdef __USE_BSD
- struct timezone *
-# else
- void *
-# endif
- , tz)
+ __timezone_ptr_t, tz)
#endif
/* Some architectures always use 12 as page shift for mmap2() eventhough the
@@ -130,7 +123,6 @@ static __always_inline _syscall2(int, _dl_gettimeofday, struct timeval *, tv,
# define MMAP2_PAGE_SHIFT 12
#endif
-#define MAP_FAILED ((void *) -1)
static __always_inline
void *_dl_mmap(void *addr, unsigned long size, int prot,
int flags, int fd, unsigned long offset)
--
1.7.3.4
More information about the uClibc-cvs
mailing list