• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

修訂423e49023eeb9b93dcf335d7b03e86a44e584dc8 (tree)
時間2019-05-13 16:11:02
作者Max Filippov <jcmvbkbc@gmai...>
CommiterWaldemar Brodkorb

Log Message

preadv/pwritev: fix offset argument type

preadv/pwritev don't provide separate version for 64-bit wide off_t,
and default to 32-bit wide off_t, which results in a mismatch between
declaration and definition for user programs built with
-D_FILE_OFFSET_BITS=64.
Make offset argument of both functions off64_t.
This fixes test misc/tst-preadvwritev on xtensa.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

Change Summary

差異

--- a/include/sys/uio.h
+++ b/include/sys/uio.h
@@ -59,7 +59,7 @@ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count);
5959 This function is a cancellation point and therefore not marked with
6060 __THROW. */
6161 extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
62- off_t __offset) __wur;
62+ __off64_t __offset) __wur;
6363
6464 /* Write data pointed by the buffers described by IOVEC, which is a
6565 vector of COUNT 'struct iovec's, to file descriptor FD at the given
@@ -71,7 +71,7 @@ extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count,
7171 This function is a cancellation point and therefore not marked with
7272 __THROW. */
7373 extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count,
74- off_t __offset) __wur;
74+ __off64_t __offset) __wur;
7575 #endif /* Use misc. */
7676
7777 __END_DECLS
--- a/libc/sysdeps/linux/common/preadv.c
+++ b/libc/sysdeps/linux/common/preadv.c
@@ -21,7 +21,7 @@
2121
2222 #ifdef __NR_preadv
2323 ssize_t
24-preadv (int fd, const struct iovec *vector, int count, off_t offset)
24+preadv (int fd, const struct iovec *vector, int count, __off64_t offset)
2525 {
2626 unsigned long pos_l, pos_h;
2727
--- a/libc/sysdeps/linux/common/pwritev.c
+++ b/libc/sysdeps/linux/common/pwritev.c
@@ -21,7 +21,7 @@
2121
2222 #ifdef __NR_pwritev
2323 ssize_t
24-pwritev (int fd, const struct iovec *vector, int count, off_t offset)
24+pwritev (int fd, const struct iovec *vector, int count, __off64_t offset)
2525 {
2626 unsigned long pos_l, pos_h;
2727