diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-09-05 20:23:27 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2022-09-08 23:01:07 +0900 |
commit | e2ccb316b437104cd1734c378970d34f5305966d (patch) | |
tree | e6544bb77416690a8e79d9ca925aaa877bfa60a7 /win32/win32.c | |
parent | 55fef084dac843caf155f03077773704b36e139e (diff) |
[Bug #5317] Use `rb_off_t` instead of `off_t`
Get rid of the conflict with system-provided small `off_t`.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6329
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/win32/win32.c b/win32/win32.c index edf89be4b1..480b7a6797 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -5899,8 +5899,8 @@ rb_w32_lstati128(const char *path, struct stati128 *st) } /* License: Ruby's */ -off_t -rb_w32_lseek(int fd, off_t ofs, int whence) +rb_off_t +rb_w32_lseek(int fd, rb_off_t ofs, int whence) { SOCKET sock = TO_SOCKET(fd); if (is_socket(sock) || is_pipe(sock)) { @@ -5941,7 +5941,7 @@ rb_w32_uaccess(const char *path, int mode) /* License: Ruby's */ static int -rb_chsize(HANDLE h, off_t size) +rb_chsize(HANDLE h, rb_off_t size) { long upos, lpos, usize, lsize; int ret = -1; @@ -5970,7 +5970,7 @@ rb_chsize(HANDLE h, off_t size) /* License: Ruby's */ static int -w32_truncate(const char *path, off_t length, UINT cp) +w32_truncate(const char *path, rb_off_t length, UINT cp) { HANDLE h; int ret; @@ -5992,21 +5992,21 @@ w32_truncate(const char *path, off_t length, UINT cp) /* License: Ruby's */ int -rb_w32_utruncate(const char *path, off_t length) +rb_w32_utruncate(const char *path, rb_off_t length) { return w32_truncate(path, length, CP_UTF8); } /* License: Ruby's */ int -rb_w32_truncate(const char *path, off_t length) +rb_w32_truncate(const char *path, rb_off_t length) { return w32_truncate(path, length, filecp()); } /* License: Ruby's */ int -rb_w32_ftruncate(int fd, off_t length) +rb_w32_ftruncate(int fd, rb_off_t length) { HANDLE h; @@ -8214,7 +8214,7 @@ VALUE (*const rb_f_notimplement_)(int, const VALUE *, VALUE, VALUE) = rb_f_notim #endif void * -rb_w32_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t offset) +rb_w32_mmap(void *addr, size_t len, int prot, int flags, int fd, rb_off_t offset) { void *ptr; //DWORD protect = 0; |