r4094 - in glibc-package/branches/eglibc-2.11/debian: . patches/kfreebsd
Author: ps-guest
Date: 2010-01-18 10:25:22 +0000 (Mon, 18 Jan 2010)
New Revision: 4094
Modified:
glibc-package/branches/eglibc-2.11/debian/changelog
glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-sysdeps.diff
Log:
kfreebsd/local-sysdeps.diff: update to revision 2941 (from glibc-bsd)
Modified: glibc-package/branches/eglibc-2.11/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.11/debian/changelog 2010-01-18 10:20:43 UTC (rev 4093)
+++ glibc-package/branches/eglibc-2.11/debian/changelog 2010-01-18 10:25:22 UTC (rev 4094)
@@ -36,7 +36,12 @@
* debian/patches/hurd-i386/local-longjmp_chk.diff: New patch to fix
debug/____longjmp_chk.S build on hurd-i386.
- -- Aurelien Jarno <aurel32@debian.org> Tue, 29 Dec 2009 01:10:49 +0100
+ [ Petr Salinger]
+ * kfreebsd/local-sysdeps.diff: update to revision 2941 (from glibc-bsd).
+ * define __rtld_lock_initialize also in linuxthreads <bits/libc-lock.h>
+ variant (enhance local-linuxthreads-weak.diff).
+
+ -- Aurelien Jarno <aurel32@debian.org> Mon, 18 Jan 2010 01:10:49 +0100
eglibc (2.10.2-3) UNRELEASED; urgency=low
Modified: glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-sysdeps.diff
===================================================================
--- glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-sysdeps.diff 2010-01-18 10:20:43 UTC (rev 4093)
+++ glibc-package/branches/eglibc-2.11/debian/patches/kfreebsd/local-sysdeps.diff 2010-01-18 10:25:22 UTC (rev 4094)
@@ -1,6 +1,6 @@
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/Dist
-@@ -0,0 +1,30 @@
+@@ -0,0 +1,29 @@
+bits/mcontext.h
+bits/stat16.h
+fpu.h
@@ -14,7 +14,6 @@
+regdef.h
+sa_len.c
+stat16conv.c
-+statconv.c
+statfsconv.c
+sys/acl.h
+sys/extattr.h
@@ -47,7 +46,7 @@
+gnu
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/Makefile
-@@ -0,0 +1,136 @@
+@@ -0,0 +1,134 @@
+# Use bash, not /bin/sh, for executing scripts, because the native
+# FreeBSD /bin/sh does not interpret the IFS="<tab>" read ... command
+# in localedata/tst-fmon.sh correctly.
@@ -123,8 +122,6 @@
+sysdep_routines += minherit sys_mmap sys_freebsd6_mmap sys_munmap
+# For <sys/mount.h>.
+sysdep_routines += fhopen sys_fhstat sys_fhstatfs fhstat fhstat64 fhstatfs fhstatfs64 getfh getfsstat getfsstat64 sys_getfsstat getmntinfo getmntinfo64 mount nmount unmount
-+# For <sys/ptrace.h>.
-+sysdep_routines += sys_ptrace
+# For <sys/rfork.h>.
+sysdep_routines += rfork
+# For <sys/rtprio.h>.
@@ -5853,7 +5850,7 @@
+#endif /* bits/socket.h */
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/stat.h
-@@ -0,0 +1,203 @@
+@@ -0,0 +1,207 @@
+/* Copyright (C) 1992, 1996-1997, 2000, 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -5899,15 +5896,17 @@
+ __ino64_t st_ino; /* File serial number. */
+#endif
+
-+ __uint32_t st_mode; /* File mode. */
-+ __uint32_t st_nlink; /* Link count. */
++ __mode_t st_mode; /* File mode. */
++ __mode_t __pad_mode; /* __mode_t is 16 bit, fill to 32 bit to retain previous ABI */
++ __nlink_t st_nlink; /* Link count. */
++ __nlink_t __pad_nlink; /* __nlink_t is 16 bit, fill to 32 bit to retain previous ABI */
+
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group. */
+
+ __dev_t st_rdev; /* Device number, if device. */
+
-+#ifdef __USE_MISC
++#if defined __USE_MISC || defined __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
@@ -5949,15 +5948,17 @@
+ __dev_t st_dev; /* Device containing the file. */
+ __ino64_t st_ino; /* File serial number. */
+
-+ __uint32_t st_mode; /* File mode. */
-+ __uint32_t st_nlink; /* Link count. */
++ __mode_t st_mode; /* File mode. */
++ __mode_t __pad_mode; /* __mode_t is 16 bit, fill to 32 bit to retain previous ABI */
++ __nlink_t st_nlink; /* Link count. */
++ __nlink_t __pad_nlink; /* __nlink_t is 16 bit, fill to 32 bit to retain previous ABI */
+
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group. */
+
+ __dev_t st_rdev; /* Device number, if device. */
+
-+#ifdef __USE_MISC
++#if defined __USE_MISC || defined __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
@@ -6051,8 +6052,8 @@
+extern int fchflags (int __fd, unsigned long int __flags) __THROW;
+
+
-+extern char *devname_r(dev_t dev, mode_t type, char *buf, int len) __THROW;
-+extern char *devname(dev_t dev, mode_t type) __THROW;
++extern char *devname_r(__dev_t dev, __mode_t type, char *buf, int len) __THROW;
++extern char *devname(__dev_t dev, __mode_t type) __THROW;
+
+__END_DECLS
+
@@ -6790,7 +6791,7 @@
+#define __TIME_T_TYPE __SLONGWORD_TYPE
+#define __USECONDS_T_TYPE __U32_TYPE
+#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
-+#define __DADDR_T_TYPE __S32_TYPE
++#define __DADDR_T_TYPE __SQUAD_TYPE
+#define __SWBLK_T_TYPE __S32_TYPE
+#define __KEY_T_TYPE __SLONGWORD_TYPE
+#define __CLOCKID_T_TYPE __S32_TYPE
@@ -8901,8 +8902,76 @@
+stub_warning(fchownat)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fcntl.c
-@@ -0,0 +1 @@
-+#include <sysdeps/unix/sysv/linux/fcntl.c>
+@@ -0,0 +1,69 @@
++/* Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
++ This file is part of the GNU C Library.
++
++ The GNU C Library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Lesser General Public
++ License as published by the Free Software Foundation; either
++ version 2.1 of the License, or (at your option) any later version.
++
++ The GNU C Library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Lesser General Public License for more details.
++
++ You should have received a copy of the GNU Lesser General Public
++ License along with the GNU C Library; if not, write to the Free
++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
++ 02111-1307 USA. */
++
++#include <assert.h>
++#include <errno.h>
++#include <sysdep-cancel.h> /* Must come before <fcntl.h>. */
++#include <fcntl.h>
++#include <stdarg.h>
++
++#include <sys/syscall.h>
++
++
++#ifndef NO_CANCELLATION
++int
++__fcntl_nocancel (int fd, int cmd, ...)
++{
++ va_list ap;
++ void *arg;
++
++ va_start (ap, cmd);
++ arg = va_arg (ap, void *);
++ va_end (ap);
++
++ return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
++}
++#endif
++
++
++int
++__libc_fcntl (int fd, int cmd, ...)
++{
++ va_list ap;
++ void *arg;
++
++ va_start (ap, cmd);
++ arg = va_arg (ap, void *);
++ va_end (ap);
++
++ if (SINGLE_THREAD_P || cmd != F_SETLKW)
++ return INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
++
++ int oldtype = LIBC_CANCEL_ASYNC ();
++
++ int result = INLINE_SYSCALL (fcntl, 3, fd, cmd, arg);
++
++ LIBC_CANCEL_RESET (oldtype);
++
++ return result;
++}
++libc_hidden_def (__libc_fcntl)
++
++weak_alias (__libc_fcntl, __fcntl)
++libc_hidden_weak (__fcntl)
++weak_alias (__libc_fcntl, fcntl)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/fexecve.c
@@ -0,0 +1,104 @@
@@ -11164,6 +11233,16 @@
+ }
+}
--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/____longjmp_chk.S
+@@ -0,0 +1,7 @@
++/* Jump to the position specified by ENV, causing the
++ setjmp call there to return VAL, or 1 if VAL is 0.
++ void __longjmp (__jmp_buf env, int val). */
++
++#warning longjmp_chk unimplemented
++#define __longjmp ____longjmp_chk
++#include<__longjmp.S>
+--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/bits/mcontext.h
@@ -0,0 +1,111 @@
+/* Machine-dependent processor state structure for FreeBSD.
@@ -13312,7 +13391,7 @@
+#endif /* !PIC */
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/i386/sysdep.h
-@@ -0,0 +1,235 @@
+@@ -0,0 +1,240 @@
+/* Copyright (C) 1992,1993,1995-2000,2002,2003,2004
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
@@ -13344,6 +13423,11 @@
+#include <dl-sysdep.h>
+#include <tls.h>
+
++#if defined __i686 && defined __ASSEMBLER__
++#undef __i686
++#define __i686 __i686
++#endif
++
+#ifdef __ASSEMBLER__
+
+/* We don't want the label for the error handle to be global when we define
@@ -18848,77 +18932,6 @@
+}
+libc_hidden_def (__profile_frequency)
--- /dev/null
-+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ptrace.c
-@@ -0,0 +1,68 @@
-+/* Copyright (C) 1995-1998, 2000, 2002 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if 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 <stdarg.h>
-+
-+#include <sysdep.h>
-+#include <sys/syscall.h>
-+
-+extern int __syscall_ptrace (enum __ptrace_request request, pid_t pid,
-+ void *addr, void *data);
-+
-+int
-+ptrace (enum __ptrace_request request, ...)
-+{
-+ int res, ret;
-+ va_list ap;
-+ pid_t pid;
-+ void *addr, *data;
-+
-+ /* Usually 4 arguments are given, except when request == PTRACE_TRACEME.
-+ But it doesn't harm to peek at the stack in this case as well. */
-+ va_start (ap, request);
-+ pid = va_arg (ap, pid_t);
-+ addr = va_arg (ap, void *);
-+ data = va_arg (ap, void *);
-+ va_end (ap);
-+
-+ switch (request)
-+ {
-+ case PTRACE_PEEKTEXT:
-+ case PTRACE_PEEKDATA:
-+#ifdef PTRACE_PEEKUSER
-+ case PTRACE_PEEKUSER:
-+#endif
-+ res = INLINE_SYSCALL (ptrace, 4, request, pid, addr, &ret);
-+ if (res >= 0)
-+ {
-+ /* ret can be -1 even for successful operation. */
-+ __set_errno (0);
-+ return ret;
-+ }
-+ break;
-+
-+ default:
-+ res = INLINE_SYSCALL (ptrace, 4, request, pid, addr, data);
-+ break;
-+ }
-+
-+ return res;
-+}
---- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/ptsname.c
@@ -0,0 +1,104 @@
+/* Copyright (C) 1998, 2002 Free Software Foundation, Inc.
@@ -20704,7 +20717,7 @@
+weak_alias (__sleep, sleep)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/stat16conv.c
-@@ -0,0 +1,80 @@
+@@ -0,0 +1,84 @@
+/* Convert between different 'struct stat' formats.
+ Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
@@ -20745,7 +20758,9 @@
+ q->st_dev = p16->st_dev;
+ q->st_ino = p16->st_ino;
+ q->st_mode = p16->st_mode;
++ q->__pad_mode = 0;
+ q->st_nlink = p16->st_nlink;
++ q->__pad_nlink = 0;
+ q->st_uid = p16->st_uid;
+ q->st_gid = p16->st_gid;
+ q->st_rdev = p16->st_rdev;
@@ -20769,7 +20784,9 @@
+ q->st_dev = p16->st_dev;
+ q->st_ino = p16->st_ino;
+ q->st_mode = p16->st_mode;
++ q->__pad_mode = 0;
+ q->st_nlink = p16->st_nlink;
++ q->__pad_nlink = 0;
+ q->st_uid = p16->st_uid;
+ q->st_gid = p16->st_gid;
+ q->st_rdev = p16->st_rdev;
@@ -20786,55 +20803,6 @@
+#endif
+}
--- /dev/null
-+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/statconv.c
-@@ -0,0 +1,46 @@
-+/* Convert between different 'struct stat' formats.
-+ Copyright (C) 2002 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+ Contributed by Bruno Haible <bruno@clisp.org>, 2002.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+#include <string.h>
-+
-+/* Convert a 'struct stat' to 'struct stat64'. */
-+static inline void
-+stat_to_stat64 (const struct stat *p32, struct stat64 *p64)
-+{
-+ p64->st_dev = p32->st_dev;
-+ p64->st_ino = p32->st_ino;
-+ p64->st_mode = p32->st_mode;
-+ p64->st_nlink = p32->st_nlink;
-+ p64->st_uid = p32->st_uid;
-+ p64->st_gid = p32->st_gid;
-+ p64->st_rdev = p32->st_rdev;
-+ p64->st_atime = p32->st_atime;
-+ p64->st_atimensec = p32->st_atimensec;
-+ p64->st_mtime = p32->st_mtime;
-+ p64->st_mtimensec = p32->st_mtimensec;
-+ p64->st_ctime = p32->st_ctime;
-+ p64->st_ctimensec = p32->st_ctimensec;
-+ p64->st_size = p32->st_size;
-+ p64->st_blocks = p32->st_blocks;
-+ p64->st_blksize = p32->st_blksize;
-+ p64->st_flags = p32->st_flags;
-+ p64->st_gen = p32->st_gen;
-+ memcpy (p64->__unused1, p32->__unused1, sizeof (p32->__unused1));
-+}
---- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/statfs.c
@@ -0,0 +1,40 @@
+/* Return information about the filesystem on which FILE resides.
@@ -22055,136 +22023,117 @@
+
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/ptrace.h
-@@ -0,0 +1,132 @@
-+/* `ptrace' debugger support interface. FreeBSD version.
-+ Copyright (C) 1996-1999, 2000, 2002 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+
-+ The GNU C Library is free software; you can redistribute it and/or
-+ modify it under the terms of the GNU Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 of the License, or (at your option) any later version.
-+
-+ The GNU C Library is distributed in the hope that it will be useful,
-+ but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
+@@ -0,0 +1,113 @@
++/*-
++ * Copyright (c) 1984, 1993
++ * The Regents of the University of California. All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ * @(#)ptrace.h 8.2 (Berkeley) 1/4/94
++ * $FreeBSD: src/sys/sys/ptrace.h,v 1.28.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $
++ */
++
+#ifndef _SYS_PTRACE_H
+#define _SYS_PTRACE_H 1
+
+#include <features.h>
++#include <sys/types.h>
+
+__BEGIN_DECLS
+
-+/* Type of the REQUEST argument to `ptrace.' */
-+enum __ptrace_request
-+{
-+ /* Indicate that the process making this request should be traced.
-+ All signals received by this process can be intercepted by its
-+ parent, and its parent can use the other `ptrace' requests. */
-+ PTRACE_TRACEME = 0,
-+#define PT_TRACE_ME PTRACE_TRACEME
++#define PT_TRACE_ME 0 /* child declares it's being traced */
++#define PT_READ_I 1 /* read word in child's I space */
++#define PT_READ_D 2 /* read word in child's D space */
++/* was PT_READ_U 3 * read word in child's user structure */
++#define PT_WRITE_I 4 /* write word in child's I space */
++#define PT_WRITE_D 5 /* write word in child's D space */
++/* was PT_WRITE_U 6 * write word in child's user structure */
++#define PT_CONTINUE 7 /* continue the child */
++#define PT_KILL 8 /* kill the child process */
++#define PT_STEP 9 /* single step the child */
+
-+ /* Return the word in the process's text space at address ADDR. */
-+ PTRACE_PEEKTEXT = 1,
-+#define PT_READ_I PTRACE_PEEKTEXT
++#define PT_ATTACH 10 /* trace some running process */
++#define PT_DETACH 11 /* stop tracing a process */
++#define PT_IO 12 /* do I/O to/from stopped process. */
+
-+ /* Return the word in the process's data space at address ADDR. */
-+ PTRACE_PEEKDATA = 2,
-+#define PT_READ_D PTRACE_PEEKDATA
-+
-+#if 1 /* NB: removed in FreeBSD 4.6 */
-+ /* Return the word in the process's user area at offset ADDR. */
-+ PTRACE_PEEKUSER = 3,
-+#define PT_READ_U PTRACE_PEEKUSER
++#if 0 /* our threading libray is different */
++#define PT_LWPINFO 13 /* Info about the LWP that stopped. */
++#define PT_GETNUMLWPS 14 /* get total number of threads */
++#define PT_GETLWPLIST 15 /* get thread list */
+#endif
+
-+ /* Write the word DATA into the process's text space at address ADDR. */
-+ PTRACE_POKETEXT = 4,
-+#define PT_WRITE_I PTRACE_POKETEXT
++#define PT_CLEARSTEP 16 /* turn off single step */
++#define PT_SETSTEP 17 /* turn on single step */
++#define PT_SUSPEND 18 /* suspend a thread */
++#define PT_RESUME 19 /* resume a thread */
+
-+ /* Write the word DATA into the process's data space at address ADDR. */
-+ PTRACE_POKEDATA = 5,
-+#define PT_WRITE_D PTRACE_POKEDATA
++#define PT_TO_SCE 20
++#define PT_TO_SCX 21
++#define PT_SYSCALL 22
+
-+#if 1 /* NB: removed in FreeBSD 4.6 */
-+ /* Write the word DATA into the process's user area at offset ADDR. */
-+ PTRACE_POKEUSER = 6,
-+#define PT_WRITE_U PTRACE_POKEUSER
-+#endif
++#define PT_GETREGS 33 /* get general-purpose registers */
++#define PT_SETREGS 34 /* set general-purpose registers */
++#define PT_GETFPREGS 35 /* get floating-point registers */
++#define PT_SETFPREGS 36 /* set floating-point registers */
++#define PT_GETDBREGS 37 /* get debugging registers */
++#define PT_SETDBREGS 38 /* set debugging registers */
++#define PT_FIRSTMACH 64 /* for machine-specific requests */
+
-+ /* Continue the process. */
-+ PTRACE_CONT = 7,
-+#define PT_CONTINUE PTRACE_CONT
++struct ptrace_io_desc {
++ int piod_op; /* I/O operation */
++ void *piod_offs; /* child offset */
++ void *piod_addr; /* parent offset */
++ size_t piod_len; /* request length */
++};
+
-+ /* Kill the process. */
-+ PTRACE_KILL = 8,
-+#define PT_KILL PTRACE_KILL
++/*
++ * Operations in piod_op.
++ */
++#define PIOD_READ_D 1 /* Read from D space */
++#define PIOD_WRITE_D 2 /* Write to D space */
++#define PIOD_READ_I 3 /* Read from I space */
++#define PIOD_WRITE_I 4 /* Write to I space */
+
-+ /* Single step the process.
-+ This is not supported on all machines. */
-+ PTRACE_SINGLESTEP = 9,
-+#define PT_STEP PTRACE_SINGLESTEP
-+
-+ /* Attach to a process that is already running. */
-+ PTRACE_ATTACH = 10,
-+#define PT_ATTACH PTRACE_ATTACH
-+
-+ /* Detach from a process attached to with PTRACE_ATTACH. */
-+ PTRACE_DETACH = 11,
-+#define PT_DETACH PTRACE_DETACH
-+
-+ /* CPU specific requests start here. */
-+ __PTRACE_FIRSTMACH = 32,
-+
-+ /* Get all general purpose registers used by a processes.
-+ This is not supported on all machines. */
-+ PTRACE_GETREGS,
-+#define PT_GETREGS PTRACE_GETREGS
-+
-+ /* Set all general purpose registers used by a processes.
-+ This is not supported on all machines. */
-+ PTRACE_SETREGS,
-+#define PT_SETREGS PTRACE_SETREGS
-+
-+ /* Get all floating point registers used by a processes.
-+ This is not supported on all machines. */
-+ PTRACE_GETFPREGS,
-+#define PT_GETFPREGS PTRACE_GETFPREGS
-+
-+ /* Set all floating point registers used by a processes.
-+ This is not supported on all machines. */
-+ PTRACE_SETFPREGS,
-+#define PT_SETFPREGS PTRACE_SETFPREGS
-+
-+ /* Get all debug registers used by a processes.
-+ This is not supported on all machines. */
-+ PTRACE_GETDBREGS,
-+#define PT_GETDBREGS PTRACE_GETDBREGS
-+
-+ /* Set all debug registers used by a processes.
-+ This is not supported on all machines. */
-+ PTRACE_SETDBREGS
-+#define PT_SETDBREGS PTRACE_SETDBREGS
++#if 0
++/* Argument structure for PT_LWPINFO. */
++struct ptrace_lwpinfo {
++ lwpid_t pl_lwpid; /* LWP described. */
++ int pl_event; /* Event that stopped the LWP. */
++#define PL_EVENT_NONE 0
++#define PL_EVENT_SIGNAL 1
++ int pl_flags; /* LWP flags. */
++#define PL_FLAG_SA 0x01 /* M:N thread */
++#define PL_FLAG_BOUND 0x02 /* M:N bound thread */
++ sigset_t pl_sigmask; /* LWP signal mask */
++ sigset_t pl_siglist; /* LWP pending signal */
+};
++#endif
+
-+/* Perform process tracing functions. REQUEST is one of the values
-+ above, and determines the action to be taken.
-+ For all requests except PTRACE_TRACEME, PID specifies the process to be
-+ traced.
++extern int ptrace(int _request, pid_t _pid, caddr_t _addr, int _data) __THROW;
+
-+ PID and the other arguments described above for the various requests should
-+ appear (those that are used for the particular request) as:
-+ pid_t PID, void *ADDR, int DATA, void *ADDR2
-+ after REQUEST. */
-+extern int ptrace (enum __ptrace_request __request, ...) __THROW;
-+
+__END_DECLS
+
+#endif /* _SYS_PTRACE_H */
@@ -23301,7 +23250,7 @@
+#endif
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/syscalls.list
-@@ -0,0 +1,184 @@
+@@ -0,0 +1,183 @@
+# File name Caller Syscall name # args Strong name Weak names
+sys_access - access i:si __syscall_access
+acl_aclcheck_fd - acl_aclcheck_fd i:iip __acl_aclcheck_fd
@@ -23400,7 +23349,6 @@
+poll - poll Ci:pii __poll poll
+sys_pread - pread i:ibni __syscall_pread
+sys_freebsd6_pread - freebsd6_pread i:ibnii __syscall_freebsd6_pread
-+sys_ptrace - ptrace i:iipi __syscall_ptrace
+sys_pwrite - pwrite i:ibni __syscall_pwrite
+sys_freebsd6_pwrite - freebsd6_pwrite i:ibnii __syscall_freebsd6_pwrite
+quotactl - quotactl i:siip quotactl
@@ -25040,6 +24988,16 @@
+ }
+}
--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/____longjmp_chk.S
+@@ -0,0 +1,7 @@
++/* Jump to the position specified by ENV, causing the
++ setjmp call there to return VAL, or 1 if VAL is 0.
++ void __longjmp (__jmp_buf env, int val). */
++
++#warning longjmp_chk unimplemented
++#define __longjmp ____longjmp_chk
++#include<__longjmp.S>
+--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/x86_64/bits/mcontext.h
@@ -0,0 +1,167 @@
+/* Machine-dependent processor state structure for FreeBSD.
Reply to: