summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/powerpc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2009-08-30 01:07:37 -0700
committerKhem Raj <raj.khem@gmail.com>2009-08-30 01:07:37 -0700
commit150d2d2188535b8b9ad504cee80da7b502fd2722 (patch)
treeef7cf15d7109363c952329e3e2f0df7d173d53de /libc/sysdeps/linux/powerpc
parent4882fad17edf8e7f2c13877bdcc04c4068b91d35 (diff)
downloaduClibc-alpine-150d2d2188535b8b9ad504cee80da7b502fd2722.tar.bz2
uClibc-alpine-150d2d2188535b8b9ad504cee80da7b502fd2722.tar.xz
Add posix_fadvise{64}.c routines to Makefile.arch
Fix the argument types to operate on long and correct a typo. Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/powerpc')
-rw-r--r--libc/sysdeps/linux/powerpc/Makefile.arch2
-rw-r--r--libc/sysdeps/linux/powerpc/posix_fadvise64.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/libc/sysdeps/linux/powerpc/Makefile.arch b/libc/sysdeps/linux/powerpc/Makefile.arch
index b476c4e21..2034f5393 100644
--- a/libc/sysdeps/linux/powerpc/Makefile.arch
+++ b/libc/sysdeps/linux/powerpc/Makefile.arch
@@ -5,7 +5,7 @@
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#
-CSRC := __syscall_error.c pread_write.c ioctl.c
+CSRC := __syscall_error.c pread_write.c ioctl.c posix_fadvise.c posix_fadvise64.c
SSRC := \
__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
diff --git a/libc/sysdeps/linux/powerpc/posix_fadvise64.c b/libc/sysdeps/linux/powerpc/posix_fadvise64.c
index 30b9bec6e..159bdfad1 100644
--- a/libc/sysdeps/linux/powerpc/posix_fadvise64.c
+++ b/libc/sysdeps/linux/powerpc/posix_fadvise64.c
@@ -25,7 +25,7 @@
#define __NR_posix_fadvise64 __NR_fadvise64_64
-int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
+int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
{
if (len != (off_t) len)
return EOVERFLOW;
@@ -33,7 +33,7 @@ int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
int ret = INTERNAL_SYSCALL (posix_fadvise64, err, 6, fd, 0,
__LONG_LONG_PAIR ((long) (offset >> 32),
(long) offset),
- (off_t) len, advice);
+ (off_t) len, advise);
if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
return 0;
return INTERNAL_SYSCALL_ERRNO (ret, err);
@@ -42,12 +42,12 @@ int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
/* 32 bit implementation is kind of a pita */
#elif __WORDSIZE == 32
-int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
+int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
{
INTERNAL_SYSCALL_DECL (err);
int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, advise,
- __LONG_LONG_PAIR(offset >> 32, offset & 0xffffffff),
- __LONG_LONG_PAIR(len >> 32, len & 0xffffffff));
+ __LONG_LONG_PAIR((long) (offset >> 32), (long) offset ),
+ __LONG_LONG_PAIR((long) (len >> 32), (long) len));
if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
return 0;
return INTERNAL_SYSCALL_ERRNO (ret, err);
@@ -61,7 +61,7 @@ int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
/* This is declared as a strong alias in posix_fadvise.c if __NR_fadvise64
* is defined.
*/
-int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advice)
+int posix_fadvise64(int fd, __off64_t offset, __off64_t len, int advise)
{
#warning This is not correct as far as SUSv3 is concerned.
return ENOSYS;