Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 500382
Collapse All | Expand All

(-)uClibc-0.9.33.2.orig/libc/sysdeps/linux/common/pread_write.c (-8 / +8 lines)
Lines 29-41 Link Here
29
#include <bits/kernel_types.h>
29
#include <bits/kernel_types.h>
30
30
31
# define __NR___syscall_pread __NR_pread64
31
# define __NR___syscall_pread __NR_pread64
32
static __inline__ _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
32
static __inline__ _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf,
33
		size_t, count, off_t, offset_hi, off_t, offset_lo)
33
		size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
34
34
35
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
35
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
36
{
36
{
37
	int oldtype = LIBC_CANCEL_ASYNC ();
37
	int oldtype = LIBC_CANCEL_ASYNC ();
38
	int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
38
	int result = __syscall_pread(fd, buf, count, 0,  __LONG_LONG_PAIR(offset >> 31, offset));
39
	LIBC_CANCEL_RESET (oldtype);
39
	LIBC_CANCEL_RESET (oldtype);
40
	return result;
40
	return result;
41
41
Lines 48-54 Link Here
48
	uint32_t low = offset & 0xffffffff;
48
	uint32_t low = offset & 0xffffffff;
49
	uint32_t high = offset >> 32;
49
	uint32_t high = offset >> 32;
50
	int oldtype = LIBC_CANCEL_ASYNC ();
50
	int oldtype = LIBC_CANCEL_ASYNC ();
51
	int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low));
51
	int result = __syscall_pread(fd, buf, count, 0,  __LONG_LONG_PAIR(high, low));
52
	LIBC_CANCEL_RESET (oldtype);
52
	LIBC_CANCEL_RESET (oldtype);
53
	return result;
53
	return result;
54
}
54
}
Lines 56-68 Link Here
56
# endif /* __UCLIBC_HAS_LFS__  */
56
# endif /* __UCLIBC_HAS_LFS__  */
57
57
58
# define __NR___syscall_pwrite __NR_pwrite64
58
# define __NR___syscall_pwrite __NR_pwrite64
59
static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
59
static __inline__ _syscall6(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
60
		size_t, count, off_t, offset_hi, off_t, offset_lo)
60
		size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo)
61
61
62
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
62
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
63
{
63
{
64
	int oldtype = LIBC_CANCEL_ASYNC ();
64
	int oldtype = LIBC_CANCEL_ASYNC ();
65
	int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
65
	int result = __syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(offset >> 31, offset));
66
	LIBC_CANCEL_RESET (oldtype);
66
	LIBC_CANCEL_RESET (oldtype);
67
	return result;
67
	return result;
68
}
68
}
Lines 74-80 Link Here
74
	uint32_t low = offset & 0xffffffff;
74
	uint32_t low = offset & 0xffffffff;
75
	uint32_t high = offset >> 32;
75
	uint32_t high = offset >> 32;
76
	int oldtype = LIBC_CANCEL_ASYNC ();
76
	int oldtype = LIBC_CANCEL_ASYNC ();
77
	int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low));
77
	int result = __syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR(high, low));
78
	LIBC_CANCEL_RESET (oldtype);
78
	LIBC_CANCEL_RESET (oldtype);
79
	return result;
79
	return result;
80
}
80
}

Return to bug 500382