summaryrefslogtreecommitdiff
path: root/libexec/ld.so/powerpc/syscall.h
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-07-23 23:56:32 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-07-23 23:56:32 +0000
commita37ed2515fa5180dd7f67a2791ef3f0ce9d0ef79 (patch)
tree8a53340d610b6e65d8d422ffbd2e680a4c5290f3 /libexec/ld.so/powerpc/syscall.h
parent507e4043abea27ec72a6e1bea821a2e248d74d7b (diff)
match _dl_ syscall prototypes w/ the real syscalls prototypes, including args and return values; art@ ok
Diffstat (limited to 'libexec/ld.so/powerpc/syscall.h')
-rw-r--r--libexec/ld.so/powerpc/syscall.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/libexec/ld.so/powerpc/syscall.h b/libexec/ld.so/powerpc/syscall.h
index fd5f5b2ae73..25b47f947db 100644
--- a/libexec/ld.so/powerpc/syscall.h
+++ b/libexec/ld.so/powerpc/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.9 2002/07/12 20:18:30 drahn Exp $ */
+/* $OpenBSD: syscall.h,v 1.10 2002/07/23 23:56:31 mickey Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -68,7 +68,7 @@ _dl_exit (int status)
}
static inline int
-_dl_open (const char* addr, unsigned int flags)
+_dl_open (const char* addr, int flags)
{
register int status __asm__ ("3");
@@ -104,10 +104,10 @@ _dl_close (int fd)
return status;
}
-static inline int
-_dl_write (int fd, const char* buf, int len)
+static inline ssize_t
+_dl_write (int fd, const char* buf, size_t len)
{
- register int status __asm__ ("3");
+ register ssize_t status __asm__ ("3");
__asm__ volatile ("mr 0,%1\n\t"
"mr 3,%2\n\t"
@@ -124,10 +124,10 @@ _dl_write (int fd, const char* buf, int len)
return status;
}
-static inline int
-_dl_read (int fd, const char* buf, int len)
+static inline ssize_t
+_dl_read (int fd, const char* buf, size_t len)
{
- register int status __asm__ ("3");
+ register ssize_t status __asm__ ("3");
__asm__ volatile ("mr 0,%1\n\t"
"mr 3,%2\n\t"
@@ -158,16 +158,15 @@ __asm__(".align 2\n\t"
"1:\n\t"
"blr");
-static inline int
-_dl_mmap (void *addr, unsigned int len, unsigned int prot,
- unsigned int flags, int fd, off_t offset)
+static inline void *
+_dl_mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
{
- return((int)_dl__syscall((quad_t)SYS_mmap, addr, len, prot,
+ return((void *)_dl__syscall((quad_t)SYS_mmap, addr, len, prot,
flags, fd, 0, offset));
}
static inline int
-_dl_munmap (const void* addr, unsigned int len)
+_dl_munmap (const void* addr, size_t len)
{
register int status __asm__ ("3");
@@ -186,7 +185,7 @@ _dl_munmap (const void* addr, unsigned int len)
}
static inline int
-_dl_mprotect (const void *addr, int size, int prot)
+_dl_mprotect (const void *addr, size_t size, int prot)
{
register int status __asm__ ("3");