summaryrefslogtreecommitdiff
path: root/libexec/ld.so/powerpc
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-07-06 20:04:01 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-07-06 20:04:01 +0000
commitfb77cb0f007d25ab8a99b64eb77a2c87f0f2716b (patch)
tree1ca0d8d9ec13024a0568af5622c3aad9598e5f3f /libexec/ld.so/powerpc
parentb3bbcf5fcb95fdeddc3df57ff9537e59f900a405 (diff)
various proto, ansi, and knf repair. tested on all architectures that
use it. (build may require make cleandir because of .depend balony)
Diffstat (limited to 'libexec/ld.so/powerpc')
-rw-r--r--libexec/ld.so/powerpc/rtld_machine.c10
-rw-r--r--libexec/ld.so/powerpc/syscall.h30
2 files changed, 20 insertions, 20 deletions
diff --git a/libexec/ld.so/powerpc/rtld_machine.c b/libexec/ld.so/powerpc/rtld_machine.c
index 11fc9730a35..e8129f58b11 100644
--- a/libexec/ld.so/powerpc/rtld_machine.c
+++ b/libexec/ld.so/powerpc/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.26 2003/06/09 16:10:04 deraadt Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.27 2003/07/06 20:04:00 deraadt Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -72,9 +72,10 @@ void _dl_syncicache(char *from, size_t len);
void _dl_bind_start(void); /* XXX */
void
-_dl_bcopy(void *src, void *dest, int size)
+_dl_bcopy(const void *src, void *dest, int size)
{
- unsigned char *psrc = src, *pdest = dest;
+ unsigned const char *psrc = src;
+ unsigned char *pdest = dest;
int i;
for (i = 0; i < size; i++)
@@ -502,8 +503,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
object->plt_size += plt_addr - object->plt_start;
object->plt_size = ELF_ROUND(object->plt_size, _dl_pagesz);
}
-
-
+
if (!lazy) {
_dl_md_reloc(object, DT_JMPREL, DT_PLTRELSZ);
return;
diff --git a/libexec/ld.so/powerpc/syscall.h b/libexec/ld.so/powerpc/syscall.h
index e6104be9cf4..654b5be4da4 100644
--- a/libexec/ld.so/powerpc/syscall.h
+++ b/libexec/ld.so/powerpc/syscall.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: syscall.h,v 1.16 2003/06/09 16:10:04 deraadt Exp $ */
+/* $OpenBSD: syscall.h,v 1.17 2003/07/06 20:04:00 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -48,7 +48,7 @@ static off_t _dl_lseek(int, off_t, int);
*/
static inline int
-_dl_exit (int status)
+_dl_exit(int status)
{
register int __status __asm__ ("3");
@@ -63,7 +63,7 @@ _dl_exit (int status)
}
static inline int
-_dl_open (const char* addr, int flags)
+_dl_open(const char* addr, int flags)
{
register int status __asm__ ("3");
@@ -82,7 +82,7 @@ _dl_open (const char* addr, int flags)
}
static inline int
-_dl_close (int fd)
+_dl_close(int fd)
{
register int status __asm__ ("3");
@@ -100,7 +100,7 @@ _dl_close (int fd)
}
static inline ssize_t
-_dl_write (int fd, const char* buf, size_t len)
+_dl_write(int fd, const char* buf, size_t len)
{
register ssize_t status __asm__ ("3");
@@ -120,7 +120,7 @@ _dl_write (int fd, const char* buf, size_t len)
}
static inline ssize_t
-_dl_read (int fd, const char* buf, size_t len)
+_dl_read(int fd, const char* buf, size_t len)
{
register ssize_t status __asm__ ("3");
@@ -154,14 +154,14 @@ __asm__(".align 2\n\t"
"blr");
static inline void *
-_dl_mmap (void *addr, size_t len, int prot, int flags, int fd, off_t offset)
+_dl_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset)
{
return((void *)_dl__syscall((quad_t)SYS_mmap, addr, len, prot,
flags, fd, 0, offset));
}
static inline int
-_dl_munmap (const void* addr, size_t len)
+_dl_munmap(const void* addr, size_t len)
{
register int status __asm__ ("3");
@@ -180,7 +180,7 @@ _dl_munmap (const void* addr, size_t len)
}
static inline int
-_dl_mprotect (const void *addr, size_t size, int prot)
+_dl_mprotect(const void *addr, size_t size, int prot)
{
register int status __asm__ ("3");
@@ -200,7 +200,7 @@ _dl_mprotect (const void *addr, size_t size, int prot)
}
static inline int
-_dl_stat (const char *addr, struct stat *sb)
+_dl_stat(const char *addr, struct stat *sb)
{
register int status __asm__ ("3");
@@ -219,7 +219,7 @@ _dl_stat (const char *addr, struct stat *sb)
}
static inline int
-_dl_fstat (int fd, struct stat *sb)
+_dl_fstat(int fd, struct stat *sb)
{
register int status __asm__ ("3");
@@ -238,7 +238,7 @@ _dl_fstat (int fd, struct stat *sb)
}
static inline int
-_dl_fcntl (int fd, int cmd, int flag)
+_dl_fcntl(int fd, int cmd, int flag)
{
register int status __asm__ ("3");
@@ -280,7 +280,7 @@ _dl_getdirentries(int fd, char *buf, int nbytes, long *basep)
}
static inline int
-_dl_issetugid()
+_dl_issetugid(void)
{
register int status __asm__ ("3");
@@ -303,10 +303,11 @@ _dl_lseek(int fildes, off_t offset, int whence)
}
static inline int
-_dl_sigprocmask (int how, const sigset_t *set, sigset_t *oset)
+_dl_sigprocmask(int how, const sigset_t *set, sigset_t *oset)
{
sigset_t sig_store;
sigset_t sig_store1;
+
if (set != NULL) {
sig_store1 = *set;
} else {
@@ -349,7 +350,6 @@ _dl_sysctl(int *name, u_int namelen, void *oldp, size_t *oldplen, void *newp,
"r" (oldplen), "r" (newp), "r" (newlen)
: "0", "3", "4", "5", "6", "7", "8");
return status;
-
}
#endif /*__DL_SYSCALL_H__*/