diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-03-21 04:49:44 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-03-21 04:49:44 +0100 |
commit | 868df0f9e99de0faf1d72cb623834437ebf6f615 (patch) | |
tree | 25bb170e1830f2d5189b103d9e3ac7b86226e2fa /sysdeps/mach | |
parent | d583531a9e15bc6d2b21a4cc3460682bc16b4892 (diff) | |
download | glibc-868df0f9e99de0faf1d72cb623834437ebf6f615.tar.gz glibc-868df0f9e99de0faf1d72cb623834437ebf6f615.tar.xz glibc-868df0f9e99de0faf1d72cb623834437ebf6f615.zip |
Fix warnings
* sysdeps/mach/hurd/Makefile ($(common-objpfx)errnos.d): Depend on libc-modules.h * sysdeps/mach/hurd/i386/trampoline.c (_hurd_setup_sighandler): Remove unused declaration of _hurd_intr_rpc_msg_in_trap. * mach/mach_init.c (__mach_init): Test whether HAVE_HOST_PAGE_SIZE is defined instead of whether it is non-zero. * sysdeps/mach/hurd/i386/intr-msg.h (INTR_MSG_TRAP): Use "+m" input constraint instead of both input and output constraint. Use ecx clobber instead of %ecx. * sysdeps/mach/hurd/malloc-machine.h (mutex_init, mutex_lock, mutex_unlock): Use a statement expression instead of an expression list. * sysdeps/mach/hurd/setitimer.c (_hurd_itimer_thread_stack_size): Set type to vm_size_t instead of vm_address_t. * sysdeps/mach/hurd/fork.c (__fork): Test whether STACK_GROWTH_UP is defined instead of whether it is non-zero. * hurd/hurd/ioctl.h (_hurd_locked_install_cttyid): New declaration. * sysdeps/mach/hurd/setsid.c: Include <hurd/ioctl.h>. * sysdeps/mach/hurd/mmap.c (__mmap): Use 0 instead of NULL for comparisons with mapaddr. * nscd/nscd-client.h: Include <time.h>. * sysdeps/mach/hurd/dl-sysdep.c (fmh): Pass vm_offset_t dummy 9th parameter to __vm_region instead of int.
Diffstat (limited to 'sysdeps/mach')
-rw-r--r-- | sysdeps/mach/hurd/dl-sysdep.c | 4 | ||||
-rw-r--r-- | sysdeps/mach/hurd/fork.c | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/intr-msg.h | 6 | ||||
-rw-r--r-- | sysdeps/mach/hurd/i386/trampoline.c | 1 | ||||
-rw-r--r-- | sysdeps/mach/hurd/malloc-machine.h | 6 | ||||
-rw-r--r-- | sysdeps/mach/hurd/mmap.c | 9 | ||||
-rw-r--r-- | sysdeps/mach/hurd/setitimer.c | 2 | ||||
-rw-r--r-- | sysdeps/mach/hurd/setsid.c | 1 |
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 |