diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-24 04:11:11 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-24 04:11:11 +0000 |
commit | f4836b6d05c454ec22dcd8656f58b151a3970047 (patch) | |
tree | 8d7df3890632232ec5b42601e7c334f120773cc1 /libexec/ld.so/powerpc | |
parent | 2647b624657fb649232b187356361551c6b5af11 (diff) |
ok i found it
Diffstat (limited to 'libexec/ld.so/powerpc')
-rw-r--r-- | libexec/ld.so/powerpc/syscall.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/libexec/ld.so/powerpc/syscall.h b/libexec/ld.so/powerpc/syscall.h index 0ed17c6e198..55bcb55b36f 100644 --- a/libexec/ld.so/powerpc/syscall.h +++ b/libexec/ld.so/powerpc/syscall.h @@ -1,4 +1,4 @@ -/* $OpenBSD: syscall.h,v 1.12 2002/07/24 04:00:44 deraadt Exp $ */ +/* $OpenBSD: syscall.h,v 1.13 2002/07/24 04:11:10 deraadt 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"); @@ -280,7 +279,7 @@ _dl_getdirentries(int fd, char *buf, int nbytes, long *basep) "1:" : "=r" (status) : "r" (SYS_getdirentries), "r" (fd), "r" (buf), "r"(nbytes), - "r" (basep) + "r" (basep) : "0", "3", "4", "5", "6"); return status; } @@ -305,6 +304,6 @@ _dl_issetugid() static inline off_t _dl_lseek(int fildes, off_t offset, int whence) { - return _dl__syscall((quad_t)SYS_lseek, fildes, 0, offset, whence); + return _dl__syscall((quad_t)SYS_lseek, fildes, 0, offset, whence); } #endif /*__DL_SYSCALL_H__*/ |