summaryrefslogtreecommitdiff
path: root/sysdeps/mach
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach')
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c6
-rw-r--r--sysdeps/mach/hurd/mmap.c20
-rw-r--r--sysdeps/mach/hurd/mmap64.c4
-rw-r--r--sysdeps/mach/mprotect.c2
-rw-r--r--sysdeps/mach/msync.c2
-rw-r--r--sysdeps/mach/munmap.c2
6 files changed, 18 insertions, 18 deletions
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 4f274b4d65..3794aed521 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -453,8 +453,8 @@ __libc_lseek64 (int fd, off64_t offset, int whence)
return offset;
}
-__ptr_t weak_function
-__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+void *weak_function
+__mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
{
error_t err;
vm_prot_t vmprot;
@@ -512,7 +512,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
if (err)
return __hurd_fail (err), MAP_FAILED;
- return (__ptr_t) mapaddr;
+ return (void *) mapaddr;
}
int weak_function
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index dbd718a688..72706c3332 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -26,12 +26,12 @@
is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
set in FLAGS, the mapping will be at ADDR exactly (which must be
page-aligned); otherwise the system chooses a convenient nearby address.
- The return value is the actual mapping address chosen or (__ptr_t) -1
+ The return value is the actual mapping address chosen or (void *) -1
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-__ptr_t
-__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
+void *
+__mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
{
error_t err;
vm_prot_t vmprot;
@@ -42,7 +42,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
/* ADDR and OFFSET must be page-aligned. */
if ((mapaddr & (__vm_page_size - 1)) || (offset & (__vm_page_size - 1)))
- return (__ptr_t) (long int) __hurd_fail (EINVAL);
+ return (void *) (long int) __hurd_fail (EINVAL);
if ((flags & (MAP_TYPE|MAP_INHERIT)) == MAP_ANON
&& prot == (PROT_READ|PROT_WRITE)) /* cf VM_PROT_DEFAULT */
@@ -64,7 +64,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
err = __vm_allocate (__mach_task_self (), &mapaddr, len, 1);
}
- return err ? (__ptr_t) (long int) __hurd_fail (err) : (__ptr_t) mapaddr;
+ return err ? (void *) (long int) __hurd_fail (err) : (void *) mapaddr;
}
vmprot = VM_PROT_NONE;
@@ -78,7 +78,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
switch (flags & MAP_TYPE)
{
default:
- return (__ptr_t) (long int) __hurd_fail (EINVAL);
+ return (void *) (long int) __hurd_fail (EINVAL);
case MAP_ANON:
memobj = MACH_PORT_NULL;
@@ -92,7 +92,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
{
if (err == MIG_BAD_ID || err == EOPNOTSUPP || err == ENOSYS)
err = ENODEV; /* File descriptor doesn't support mmap. */
- return (__ptr_t) (long int) __hurd_dfail (fd, err);
+ return (void *) (long int) __hurd_dfail (fd, err);
}
switch (prot & (PROT_READ|PROT_WRITE))
{
@@ -129,7 +129,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
else
{
__mach_port_deallocate (__mach_task_self (), wobj);
- return (__ptr_t) (long int) __hurd_fail (EACCES);
+ return (void *) (long int) __hurd_fail (EACCES);
}
break;
default:
@@ -180,9 +180,9 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
__mach_port_deallocate (__mach_task_self (), memobj);
if (err)
- return (__ptr_t) (long int) __hurd_fail (err);
+ return (void *) (long int) __hurd_fail (err);
- return (__ptr_t) mapaddr;
+ return (void *) mapaddr;
}
weak_alias (__mmap, mmap)
diff --git a/sysdeps/mach/hurd/mmap64.c b/sysdeps/mach/hurd/mmap64.c
index ced469db18..282b7525c8 100644
--- a/sysdeps/mach/hurd/mmap64.c
+++ b/sysdeps/mach/hurd/mmap64.c
@@ -28,8 +28,8 @@
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
-__ptr_t
-__mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd,
+void *
+__mmap64 (void *addr, size_t len, int prot, int flags, int fd,
__off64_t offset)
{
vm_offset_t small_offset = (vm_offset_t) offset;
diff --git a/sysdeps/mach/mprotect.c b/sysdeps/mach/mprotect.c
index 477017da39..84a72850ac 100644
--- a/sysdeps/mach/mprotect.c
+++ b/sysdeps/mach/mprotect.c
@@ -25,7 +25,7 @@
(and sets errno). */
int
-__mprotect (__ptr_t addr, size_t len, int prot)
+__mprotect (void *addr, size_t len, int prot)
{
kern_return_t err;
vm_prot_t vmprot;
diff --git a/sysdeps/mach/msync.c b/sysdeps/mach/msync.c
index f84553269e..b908fed141 100644
--- a/sysdeps/mach/msync.c
+++ b/sysdeps/mach/msync.c
@@ -33,7 +33,7 @@
unpredictable before this is done. */
int
-msync (__ptr_t addr, size_t len, int flags)
+msync (void *addr, size_t len, int flags)
{
vm_sync_t sync_flags = 0;
kern_return_t err;
diff --git a/sysdeps/mach/munmap.c b/sysdeps/mach/munmap.c
index b5fdaeaf1b..4a98613baf 100644
--- a/sysdeps/mach/munmap.c
+++ b/sysdeps/mach/munmap.c
@@ -24,7 +24,7 @@
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
int
-__munmap (__ptr_t addr, size_t len)
+__munmap (void *addr, size_t len)
{
kern_return_t err;