[uClibc-cvs] uClibc/libc/sysdeps/linux/common Makefile, 1.82, 1.83 syscalls.c, 1.107, 1.108
Erik Andersen
andersen at uclibc.org
Fri Aug 8 10:07:33 UTC 2003
Update of /var/cvs/uClibc/libc/sysdeps/linux/common
In directory winder:/tmp/cvs-serv19219/libc/sysdeps/linux/common
Modified Files:
Makefile syscalls.c
Log Message:
Add support for personality(), prctl(), ustat(), and ulimit()
syscalls, which had managed to stay unimplemented thus far.
-Erik
Index: Makefile
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/common/Makefile,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -d -r1.82 -r1.83
--- Makefile 15 Jul 2003 07:44:34 -0000 1.82
+++ Makefile 8 Aug 2003 10:07:29 -0000 1.83
@@ -25,7 +25,8 @@
cmsg_nxthdr.c longjmp.c open64.c ftruncate64.c mmap64.c \
truncate64.c getrlimit64.c setrlimit64.c creat64.c \
llseek.c pread_write.c _exit.c sync.c getdirname.c \
- sendfile64.c xstatconv.c getdents.c getdents64.c vfork.c
+ sendfile64.c xstatconv.c getdents.c getdents64.c vfork.c \
+ ulimit.c
ifneq ($(strip $(EXCLUDE_BRK)),y)
CSRC+=sbrk.c
endif
Index: syscalls.c
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/common/syscalls.c,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- syscalls.c 5 Aug 2003 08:08:46 -0000 1.107
+++ syscalls.c 8 Aug 2003 10:07:29 -0000 1.108
@@ -2,8 +2,7 @@
/*
* Syscalls for uClibc
*
- * Copyright (C) 2000 by Lineo, inc
- * Copyright (C) 2001, 2002 by Erik Andersen
+ * Copyright (C) 2001-2003 by Erik Andersen
* Written by Erik Andersen <andersen at codpoet.org>
*
* This program is free software; you can redistribute it and/or modify it
@@ -630,6 +629,7 @@
#endif
//#define __NR_ulimit 58
+//See ulimit.c
//#define __NR_oldolduname 59
@@ -652,6 +652,20 @@
#endif
//#define __NR_ustat 62
+#ifdef L___syscall_ustat
+#define __NR___syscall_ustat __NR_ustat
+#include <sys/stat.h>
+static inline
+_syscall2(int, __syscall_ustat, unsigned short int, kdev_t, struct ustat *, ubuf);
+int ustat(dev_t dev, struct ustat *ubuf)
+{
+ __kernel_dev_t k_dev;
+ /* We must convert the dev_t value to a __kernel_dev_t */
+ k_dev = ((major(dev) & 0xff) << 8) | (minor(dev) & 0xff);
+ return __syscall_ustat(k_dev, ubuf);
+}
+#endif
+
//#define __NR_dup2 63
#ifdef L_dup2
@@ -1345,6 +1359,12 @@
//#define __NR_sysfs 135
//#define __NR_personality 136
+#ifdef __NR_personality
+#ifdef L_personality
+#include <sys/personality.h>
+_syscall1(int, personality, unsigned long int, __persona);
+#endif
+#endif
//#define __NR_afs_syscall 137
@@ -1703,6 +1723,13 @@
#endif
//#define __NR_prctl 172
+#ifdef __NR_prctl
+#ifdef L_prctl
+#include <stdarg.h>
+//#include <sys/prctl.h>
+_syscall5(int, prctl, int, a, int, b, int, c, int, d, int, e);
+#endif
+#endif
//#define __NR_rt_sigreturn 173
//#define __NR_rt_sigaction 174
More information about the uClibc-cvs
mailing list