summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/dl-sysdep.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-04-08 02:16:43 +0000
committerRoland McGrath <roland@gnu.org>2002-04-08 02:16:43 +0000
commit7ce93726fb9f02c45e45df15d923faabaa8951d3 (patch)
tree8a3c8ca67f54134b2de37cf6d135042e717288db /sysdeps/mach/hurd/dl-sysdep.c
parent14906e37fed856d51451b5bc2ac3c68d1e29e1a6 (diff)
* mach/setup-thread.c (__mach_setup_thread): int -> natural_t
* sysdeps/mach/hurd/dl-sysdep.c: Use ElfW(TYPE) in place of Elf32_TYPE. (__mmap): Use MAP_FAILED instead of widening __hurd_fail value. * sysdeps/mach/hurd/bind.c: Use prototype definition. * sysdeps/mach/hurd/connect.c: Likewise. * sysdeps/mach/hurd/getsockopt.c: Likewise. * sysdeps/mach/hurd/setsockopt.c: Likewise. * sysdeps/mach/hurd/alpha/sigreturn.c: Pass missing argument to __msg_sig_post RPC. * hurd/catch-exc.c: Use integer_t instead of int. * hurd/hurdfault.c: Likewise. * sysdeps/mach/hurd/alpha/exc2signal.c (_hurd_exception2signal): Rewritten. * sysdeps/mach/hurd/alpha/longjmp-ts.c (_hurd_longjmp_thread_state): Rewritten.
Diffstat (limited to 'sysdeps/mach/hurd/dl-sysdep.c')
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 883c959bee..b2e7412ea1 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -104,10 +104,10 @@ static void fmh(void) {
#endif
-Elf32_Addr
+ElfW(Addr)
_dl_sysdep_start (void **start_argptr,
- void (*dl_main) (const Elf32_Phdr *phdr, Elf32_Word phent,
- Elf32_Addr *user_entry))
+ void (*dl_main) (const ElfW(Phdr) *phdr, ElfW(Word) phent,
+ ElfW(Addr) *user_entry))
{
void go (int *argdata)
{
@@ -186,8 +186,8 @@ unfmh(); /* XXX */
/* Call elf/rtld.c's main program. It will set everything
up and leave us to transfer control to USER_ENTRY. */
- (*dl_main) ((const Elf32_Phdr *) _dl_hurd_data->phdr,
- _dl_hurd_data->phdrsz / sizeof (Elf32_Phdr),
+ (*dl_main) ((const ElfW(Phdr) *) _dl_hurd_data->phdr,
+ _dl_hurd_data->phdrsz / sizeof (ElfW(Phdr)),
&_dl_hurd_data->user_entry);
/* The call above might screw a few things up.
@@ -481,7 +481,9 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
if ((flags & MAP_ANON) == 0)
__mach_port_deallocate (__mach_task_self (), memobj_rd);
- return err ? (__ptr_t) __hurd_fail (err) : (__ptr_t) mapaddr;
+ if (err)
+ return __hurd_fail (err), MAP_FAILED;
+ return (__ptr_t) mapaddr;
}
int weak_function