summaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c4
-rw-r--r--sysdeps/mach/hurd/fork.c2
-rw-r--r--sysdeps/mach/hurd/i386/intr-msg.h6
-rw-r--r--sysdeps/mach/hurd/i386/trampoline.c1
-rw-r--r--sysdeps/mach/hurd/malloc-machine.h6
-rw-r--r--sysdeps/mach/hurd/mmap.c9
-rw-r--r--sysdeps/mach/hurd/setitimer.c2
-rw-r--r--sysdeps/mach/hurd/setsid.c1
8 files changed, 15 insertions, 16 deletions
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 084624a7ef..8bb9fad090 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -96,9 +96,9 @@ static vm_size_t fmhs;
static void unfmh(void){
__vm_deallocate(__mach_task_self(),fmha,fmhs);}
static void fmh(void) {
- error_t err;int x;mach_port_t p;
+ error_t err;int x;vm_offset_t o;mach_port_t p;
vm_address_t a=0x08000000U,max=VM_MAX_ADDRESS;
- while (!(err=__vm_region(__mach_task_self(),&a,&fmhs,&x,&x,&x,&x,&p,&x))){
+ while (!(err=__vm_region(__mach_task_self(),&a,&fmhs,&x,&x,&x,&x,&p,&o))){
__mach_port_deallocate(__mach_task_self(),p);
if (a+fmhs>=0x80000000U){
max=a; break;}
diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c
index f3c26150c2..04d81e1d1d 100644
--- a/sysdeps/mach/hurd/fork.c
+++ b/sysdeps/mach/hurd/fork.c
@@ -507,7 +507,7 @@ __fork (void)
MACHINE_THREAD_STATE_FLAVOR,
(natural_t *) &state, &statecount))
LOSE;
-#if STACK_GROWTH_UP
+#ifdef STACK_GROWTH_UP
#define THREADVAR_SPACE (__hurd_threadvar_max \
* sizeof *__hurd_sightread_variables)
if (__hurd_sigthread_stack_base == 0)
diff --git a/sysdeps/mach/hurd/i386/intr-msg.h b/sysdeps/mach/hurd/i386/intr-msg.h
index a0268c1b39..0be995c53b 100644
--- a/sysdeps/mach/hurd/i386/intr-msg.h
+++ b/sysdeps/mach/hurd/i386/intr-msg.h
@@ -33,9 +33,9 @@
"_hurd_intr_rpc_msg_do_trap: lcall $7, $0 # status in %0\n" \
"_hurd_intr_rpc_msg_in_trap: movl %%ecx, %%esp\n" \
"_hurd_intr_rpc_msg_sp_restored:" \
- : "=a" (err), "=m" (option), "=m" (timeout) \
- : "m" ((&msg)[-1]), "1" (option), "2" (timeout) \
- : "%ecx"); \
+ : "=a" (err), "+m" (option), "+m" (timeout) \
+ : "m" ((&msg)[-1]) \
+ : "ecx"); \
err; \
})
diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c
index 89041cc7f6..2dffd1382c 100644
--- a/sysdeps/mach/hurd/i386/trampoline.c
+++ b/sysdeps/mach/hurd/i386/trampoline.c
@@ -35,7 +35,6 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
void trampoline (void);
void rpc_wait_trampoline (void);
void firewall (void);
- extern const void _hurd_intr_rpc_msg_in_trap;
extern const void _hurd_intr_rpc_msg_cx_sp;
extern const void _hurd_intr_rpc_msg_sp_restored;
void *volatile sigsp;
diff --git a/sysdeps/mach/hurd/malloc-machine.h b/sysdeps/mach/hurd/malloc-machine.h
index f7fb96e9b9..d69d82be8e 100644
--- a/sysdeps/mach/hurd/malloc-machine.h
+++ b/sysdeps/mach/hurd/malloc-machine.h
@@ -33,13 +33,13 @@
#define mutex_t struct mutex
#undef mutex_init
-#define mutex_init(m) (__mutex_init(m), 0)
+#define mutex_init(m) ({ __mutex_init(m); 0; })
#undef mutex_lock
-#define mutex_lock(m) (__mutex_lock(m), 0)
+#define mutex_lock(m) ({ __mutex_lock(m); 0; })
#undef mutex_unlock
-#define mutex_unlock(m) (__mutex_unlock(m), 0)
+#define mutex_unlock(m) ({ __mutex_unlock(m); 0; })
#define mutex_trylock(m) (!__mutex_trylock(m))
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index 393008f2fe..139f27ad30 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -48,8 +48,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
&& prot == (PROT_READ|PROT_WRITE)) /* cf VM_PROT_DEFAULT */
{
/* vm_allocate has (a little) less overhead in the kernel too. */
- err = __vm_allocate (__mach_task_self (), &mapaddr, len,
- mapaddr == NULL);
+ err = __vm_allocate (__mach_task_self (), &mapaddr, len, mapaddr == 0);
if (err == KERN_NO_SPACE)
{
@@ -61,7 +60,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
if (!err)
err = __vm_allocate (__mach_task_self (), &mapaddr, len, 0);
}
- else if (mapaddr != NULL)
+ else if (mapaddr != 0)
err = __vm_allocate (__mach_task_self (), &mapaddr, len, 1);
}
@@ -145,7 +144,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
err = __vm_map (__mach_task_self (),
&mapaddr, (vm_size_t) len, (vm_address_t) 0,
- mapaddr == NULL,
+ mapaddr == 0,
memobj, (vm_offset_t) offset,
! (flags & MAP_SHARED),
vmprot, VM_PROT_ALL,
@@ -167,7 +166,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
(flags & MAP_SHARED) ? VM_INHERIT_SHARE
: VM_INHERIT_COPY);
}
- else if (mapaddr != NULL)
+ else if (mapaddr != 0)
err = __vm_map (__mach_task_self (),
&mapaddr, (vm_size_t) len, (vm_address_t) 0,
1, memobj, (vm_offset_t) offset,
diff --git a/sysdeps/mach/hurd/setitimer.c b/sysdeps/mach/hurd/setitimer.c
index f88c939dba..aeaf3d7c4d 100644
--- a/sysdeps/mach/hurd/setitimer.c
+++ b/sysdeps/mach/hurd/setitimer.c
@@ -33,7 +33,7 @@ mach_port_t _hurd_itimer_port; /* Port the timer thread blocks on. */
thread_t _hurd_itimer_thread; /* Thread waiting for timeout. */
int _hurd_itimer_thread_suspended; /* Nonzero if that thread is suspended. */
vm_address_t _hurd_itimer_thread_stack_base; /* Base of its stack. */
-vm_address_t _hurd_itimer_thread_stack_size; /* Size of its stack. */
+vm_size_t _hurd_itimer_thread_stack_size; /* Size of its stack. */
struct timeval _hurd_itimer_started; /* Time the thread started waiting. */
static void
diff --git a/sysdeps/mach/hurd/setsid.c b/sysdeps/mach/hurd/setsid.c
index be17ca2604..2b792fcf93 100644
--- a/sysdeps/mach/hurd/setsid.c
+++ b/sysdeps/mach/hurd/setsid.c
@@ -20,6 +20,7 @@
#include <hurd.h>
#include <hurd/port.h>
#include <hurd/fd.h>
+#include <hurd/ioctl.h>
/* Create a new session with the calling process as its leader.
The process group IDs of the session and the calling process