diff options
author | Roland McGrath <roland@gnu.org> | 1996-01-19 10:00:23 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-01-19 10:00:23 +0000 |
commit | 97aa195cf78ad62825df0e381f20df1ea227ec18 (patch) | |
tree | d30cfc243e151bfd34c5e0786a7f92407469375a /sysdeps/unix | |
parent | 9b29e6f7a31d9ae5534d420137454e086b9980fc (diff) | |
download | glibc-97aa195cf78ad62825df0e381f20df1ea227ec18.tar.gz glibc-97aa195cf78ad62825df0e381f20df1ea227ec18.tar.xz glibc-97aa195cf78ad62825df0e381f20df1ea227ec18.zip |
* io/Makefile (routines): Add mknod, xstat fxstat lxstat xmknod. cvs/libc-960119
* sysdeps/unix/sysv/linux/ptrace.c: Use ... decl, and stdarg.h to get args. * posix/glob.c (_GNU_SOURCE): Define if undefined, so glob.h defines GNU extensions. * posix/fnmatch.c: Likewise.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/ptrace.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/ptrace.c b/sysdeps/unix/sysv/linux/ptrace.c index 2c04830c42..32cc990119 100644 --- a/sysdeps/unix/sysv/linux/ptrace.c +++ b/sysdeps/unix/sysv/linux/ptrace.c @@ -17,16 +17,28 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <errno.h> +#include <sys/types.h> #include <sys/ptrace.h> -#include <sys/syscall.h> +#include <stdarg.h> + +extern int __syscall_ptrace (int, pid_t, void *, void *); int -ptrace (int request, int pid, int addr, int data) +ptrace (enum __ptrace_request request, ...) { - long int ret; - long int res; + int res, ret; + va_list ap; + pid_t pid; + void *addr, *data; + + va_start (ap, request); + pid = va_arg (ap, pid_t); + addr = va_arg (ap, void *); + data = va_arg (ap, void *); + va_end (ap); + if (request > 0 && request < 4) - (long int *) data = &ret; + data = &ret; res = __syscall_ptrace (request, pid, addr, data); @@ -35,9 +47,9 @@ ptrace (int request, int pid, int addr, int data) if (request > 0 && request < 4) { errno = 0; - return (ret); + return ret; } - return (int) res; + return res; } errno = -res; |