summaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-01-02 10:52:59 +0000
committerJakub Jelinek <jakub@redhat.com>2006-01-02 10:52:59 +0000
commit0db2497936950725ae71e997091ef276a3ec43ee (patch)
tree7d66db137accea00fe402dfabf8e5de3a4af58c6 /sysdeps/mach
parentb9ea6c38033d6ab0bda9dddb34cc7a4c6ff82084 (diff)
Updated to fedora-glibc-20060102T1045
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/errno.c1
-rw-r--r--sysdeps/mach/hurd/ioctl.c13
-rw-r--r--sysdeps/mach/hurd/jmp-unwind.c16
3 files changed, 25 insertions, 5 deletions
diff --git a/sysdeps/mach/hurd/errno.c b/sysdeps/mach/hurd/errno.c
new file mode 100644
index 0000000000..a29091b5e2
--- /dev/null
+++ b/sysdeps/mach/hurd/errno.c
@@ -0,0 +1 @@
+/* No definition of `errno' variable on the Hurd. */
diff --git a/sysdeps/mach/hurd/ioctl.c b/sysdeps/mach/hurd/ioctl.c
index 6a540241a4..bcc78bc84e 100644
--- a/sysdeps/mach/hurd/ioctl.c
+++ b/sysdeps/mach/hurd/ioctl.c
@@ -58,7 +58,16 @@ __ioctl (int fd, unsigned long int request, ...)
struct
{
#ifdef MACH_MSG_TYPE_BIT
- mig_reply_header_t header;
+ union
+ {
+ mig_reply_header_t header;
+ struct
+ {
+ mach_msg_header_t Head;
+ int RetCodeType;
+ kern_return_t RetCode;
+ } header_typecheck;
+ };
char data[3 * sizeof (mach_msg_type_t) +
msg_align (_IOT_COUNT0 (type) * typesize (_IOT_TYPE0 (type))) +
msg_align (_IOT_COUNT1 (type) * typesize (_IOT_TYPE1 (type))) +
@@ -192,7 +201,7 @@ __ioctl (int fd, unsigned long int request, ...)
return MIG_TYPE_ERROR;
#ifdef MACH_MSG_TYPE_BIT
- if (*(int *) &msg.header.RetCodeType !=
+ if (msg.header_typecheck.RetCodeType !=
((union { mach_msg_type_t t; int i; })
{ t: io2mach_type (1, _IOTS (msg.header.RetCode)) }).i)
return MIG_TYPE_ERROR;
diff --git a/sysdeps/mach/hurd/jmp-unwind.c b/sysdeps/mach/hurd/jmp-unwind.c
index 4624ad9e26..a522aa715a 100644
--- a/sysdeps/mach/hurd/jmp-unwind.c
+++ b/sysdeps/mach/hurd/jmp-unwind.c
@@ -1,5 +1,5 @@
/* _longjmp_unwind -- Clean up stack frames unwound by longjmp. Hurd version.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 2005 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
@@ -22,12 +22,22 @@
#include <hurd/signal.h>
#include <hurd/sigpreempt.h>
#include <assert.h>
+#include <stdint.h>
#ifndef _JMPBUF_UNWINDS
#error "<bits/setjmp.h> fails to define _JMPBUF_UNWINDS"
#endif
+static inline uintptr_t
+demangle_ptr (uintptr_t x)
+{
+# ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (x);
+# endif
+ return x;
+}
+
/* This function is called by `longjmp' (with its arguments) to restore
active resources to a sane state before the frames code using them are
jumped out of. */
@@ -46,7 +56,7 @@ _longjmp_unwind (jmp_buf env, int val)
/* Remove local signal preemptors being unwound past. */
while (ss->preemptors &&
- _JMPBUF_UNWINDS (env[0].__jmpbuf, ss->preemptors))
+ _JMPBUF_UNWINDS (env[0].__jmpbuf, ss->preemptors, demangle_ptr))
ss->preemptors = ss->preemptors->next;
__spin_unlock (&ss->lock);
@@ -56,7 +66,7 @@ _longjmp_unwind (jmp_buf env, int val)
in stack frames being unwound by this jump. */
for (link = ss->active_resources;
- link && _JMPBUF_UNWINDS (env[0].__jmpbuf, link);
+ link && _JMPBUF_UNWINDS (env[0].__jmpbuf, link, demangle_ptr);
link = link->thread.next)
/* Remove this link from the resource's users list,
since the frame using the resource is being unwound.