diff options
Diffstat (limited to 'libc/sysdeps/linux/sh')
| -rw-r--r-- | libc/sysdeps/linux/sh/__init_brk.c | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh/bits/fcntl.h | 8 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh/bits/mathdef.h | 6 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh/bits/syscalls.h | 15 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh/brk.c | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh/mmap.c | 4 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh/pipe.c | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh/pread_write.c | 4 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh/sbrk.c | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh/sys/io.h | 1 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh/vfork.S | 16 |
11 files changed, 27 insertions, 35 deletions
diff --git a/libc/sysdeps/linux/sh/__init_brk.c b/libc/sysdeps/linux/sh/__init_brk.c index bb0692448..8a41eb3c4 100644 --- a/libc/sysdeps/linux/sh/__init_brk.c +++ b/libc/sysdeps/linux/sh/__init_brk.c @@ -7,7 +7,7 @@ void * __curbrk attribute_hidden = 0; #define __NR__brk __NR_brk -attribute_hidden _syscall1(void *, _brk, void *, ptr); +attribute_hidden _syscall1(void *, _brk, void *, ptr) extern int __init_brk (void) attribute_hidden; int diff --git a/libc/sysdeps/linux/sh/bits/fcntl.h b/libc/sysdeps/linux/sh/bits/fcntl.h index 0fc129405..570484c2f 100644 --- a/libc/sysdeps/linux/sh/bits/fcntl.h +++ b/libc/sysdeps/linux/sh/bits/fcntl.h @@ -189,8 +189,7 @@ struct flock64 #endif -#ifdef __USE_GNU -#if 0 +#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__ /* Flags for SYNC_FILE_RANGE. */ # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages in the range before performing the @@ -201,7 +200,6 @@ struct flock64 # define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in the range after performing the write. */ -#endif /* Flags for SPLICE and VMSPLICE. */ # define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ @@ -214,18 +212,16 @@ struct flock64 __BEGIN_DECLS -#ifdef __USE_GNU +#if defined __USE_GNU && defined __UCLIBC_LINUX_SPECIFIC__ /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; -#if 0 /* Selective file content synch'ing. */ extern int sync_file_range (int __fd, __off64_t __from, __off64_t __to, unsigned int __flags); -#endif /* Splice address range into a pipe. */ extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, diff --git a/libc/sysdeps/linux/sh/bits/mathdef.h b/libc/sysdeps/linux/sh/bits/mathdef.h index 2b8caf194..c419fcd4a 100644 --- a/libc/sysdeps/linux/sh/bits/mathdef.h +++ b/libc/sysdeps/linux/sh/bits/mathdef.h @@ -61,9 +61,3 @@ typedef double double_t; # define FP_ILOGBNAN 0x7fffffff #endif /* ISO C99 */ - -#ifndef __NO_LONG_DOUBLE_MATH -/* Signal that we do not really have a `long double'. The disables the - declaration of all the `long double' function variants. */ -# define __NO_LONG_DOUBLE_MATH 1 -#endif diff --git a/libc/sysdeps/linux/sh/bits/syscalls.h b/libc/sysdeps/linux/sh/bits/syscalls.h index e0ab65b82..bcd73eb43 100644 --- a/libc/sysdeps/linux/sh/bits/syscalls.h +++ b/libc/sysdeps/linux/sh/bits/syscalls.h @@ -140,13 +140,14 @@ __asm__ __volatile__ ("trapa %1" \ __syscall_return(type,__sc0); \ } -#define SYSCALL_INST_STR0 "trapa #0x10\n\t" -#define SYSCALL_INST_STR1 "trapa #0x11\n\t" -#define SYSCALL_INST_STR2 "trapa #0x12\n\t" -#define SYSCALL_INST_STR3 "trapa #0x13\n\t" -#define SYSCALL_INST_STR4 "trapa #0x14\n\t" -#define SYSCALL_INST_STR5 "trapa #0x15\n\t" -#define SYSCALL_INST_STR6 "trapa #0x16\n\t" +#define SYSCALL_INST_STR(x) "trapa #"__stringify(__SH_SYSCALL_TRAP_BASE + x)"\n\t" +#define SYSCALL_INST_STR0 SYSCALL_INST_STR(0) +#define SYSCALL_INST_STR1 SYSCALL_INST_STR(1) +#define SYSCALL_INST_STR2 SYSCALL_INST_STR(2) +#define SYSCALL_INST_STR3 SYSCALL_INST_STR(3) +#define SYSCALL_INST_STR4 SYSCALL_INST_STR(4) +#define SYSCALL_INST_STR5 SYSCALL_INST_STR(5) +#define SYSCALL_INST_STR6 SYSCALL_INST_STR(6) # ifdef NEED_SYSCALL_INST_PAD # define SYSCALL_INST_PAD "\ diff --git a/libc/sysdeps/linux/sh/brk.c b/libc/sysdeps/linux/sh/brk.c index c69c97ad6..cac45bae2 100644 --- a/libc/sysdeps/linux/sh/brk.c +++ b/libc/sysdeps/linux/sh/brk.c @@ -13,7 +13,7 @@ extern void * __curbrk attribute_hidden; extern int __init_brk (void) attribute_hidden; extern void *_brk(void *ptr) attribute_hidden; -libc_hidden_proto(brk) +/* libc_hidden_proto(brk) */ int brk(void * end_data_seg) { if (__init_brk () == 0) diff --git a/libc/sysdeps/linux/sh/mmap.c b/libc/sysdeps/linux/sh/mmap.c index e711b0ff8..2d77a5d98 100644 --- a/libc/sysdeps/linux/sh/mmap.c +++ b/libc/sysdeps/linux/sh/mmap.c @@ -23,7 +23,7 @@ #include <errno.h> #include <sys/mman.h> -libc_hidden_proto(mmap) +/* libc_hidden_proto(mmap) */ #ifdef HIOS # define __SH_SYSCALL6_TRAPA 0x2E @@ -31,5 +31,5 @@ libc_hidden_proto(mmap) #include <sys/syscall.h> -_syscall6(__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset); +_syscall6(__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset) libc_hidden_def(mmap) diff --git a/libc/sysdeps/linux/sh/pipe.c b/libc/sysdeps/linux/sh/pipe.c index 432a5bc03..56ae46c00 100644 --- a/libc/sysdeps/linux/sh/pipe.c +++ b/libc/sysdeps/linux/sh/pipe.c @@ -12,7 +12,7 @@ #include <unistd.h> #include <syscall.h> -libc_hidden_proto(pipe) +/* libc_hidden_proto(pipe) */ int pipe(int *fd) { diff --git a/libc/sysdeps/linux/sh/pread_write.c b/libc/sysdeps/linux/sh/pread_write.c index 16c9c6d8a..76c750ad6 100644 --- a/libc/sysdeps/linux/sh/pread_write.c +++ b/libc/sysdeps/linux/sh/pread_write.c @@ -36,7 +36,7 @@ extern __typeof(pread) __libc_pread; # define __NR___syscall_pread __NR_pread static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf, - size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo); + size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo) ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset) { @@ -86,7 +86,7 @@ weak_alias(__libc_pread64,pread64) extern __typeof(pwrite) __libc_pwrite; # define __NR___syscall_pwrite __NR_pwrite static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf, - size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo); + size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo) ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset) { diff --git a/libc/sysdeps/linux/sh/sbrk.c b/libc/sysdeps/linux/sh/sbrk.c index a1ff2a148..616b81318 100644 --- a/libc/sysdeps/linux/sh/sbrk.c +++ b/libc/sysdeps/linux/sh/sbrk.c @@ -8,7 +8,7 @@ extern void * __curbrk attribute_hidden; extern int __init_brk (void) attribute_hidden; extern void *_brk(void *ptr) attribute_hidden; -libc_hidden_proto(sbrk) +/* libc_hidden_proto(sbrk) */ void * sbrk(intptr_t increment) { diff --git a/libc/sysdeps/linux/sh/sys/io.h b/libc/sysdeps/linux/sh/sys/io.h index 6fdc44ff8..f833c4e8b 100644 --- a/libc/sysdeps/linux/sh/sys/io.h +++ b/libc/sysdeps/linux/sh/sys/io.h @@ -28,6 +28,7 @@ __BEGIN_DECLS permission off for that range. This call requires root privileges. */ extern int ioperm (unsigned long int __from, unsigned long int __num, int __turn_on) __THROW; +libc_hidden_proto(ioperm) /* Set the I/O privilege level to LEVEL. If LEVEL is nonzero, permission to access any I/O port is granted. This call requires diff --git a/libc/sysdeps/linux/sh/vfork.S b/libc/sysdeps/linux/sh/vfork.S index a9b440d8f..060a36b33 100644 --- a/libc/sysdeps/linux/sh/vfork.S +++ b/libc/sysdeps/linux/sh/vfork.S @@ -42,7 +42,7 @@ __vfork: trapa #__SH_SYSCALL_TRAP_BASE mov r0, r1 #ifdef __CONFIG_SH2__ -// 12 arithmetic shifts for the crappy sh2, because shad doesn't exist! +/* 12 arithmetic shifts for the crappy sh2, because shad doesn't exist! */ shar r1 shar r1 shar r1 @@ -55,13 +55,13 @@ __vfork: shar r1 shar r1 shar r1 -#else +#else mov #-12, r2 shad r2, r1 #endif - not r1, r1 // r1=0 means r0 = -1 to -4095 - tst r1, r1 // i.e. error in linux + not r1, r1 /* r1=0 means r0 = -1 to -4095 */ + tst r1, r1 /* i.e. error in linux */ bf 2f mov.w .L1, r1 cmp/eq r1, r0 @@ -73,7 +73,7 @@ __vfork: trapa #__SH_SYSCALL_TRAP_BASE mov r0, r1 #ifdef __CONFIG_SH2__ -// 12 arithmetic shifts for the crappy sh2, because shad doesn't exist! +/* 12 arithmetic shifts for the crappy sh2, because shad doesn't exist! */ shar r1 shar r1 shar r1 @@ -86,13 +86,13 @@ __vfork: shar r1 shar r1 shar r1 -#else +#else mov #-12, r2 shad r2, r1 #endif - not r1, r1 // r1=0 means r0 = -1 to -4095 - tst r1, r1 // i.e. error in linux + not r1, r1 /* r1=0 means r0 = -1 to -4095 */ + tst r1, r1 /* i.e. error in linux */ bt/s __syscall_error mov r0, r4 2: |
