diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-09-05 20:23:27 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2022-09-08 23:01:07 +0900 |
commit | e2ccb316b437104cd1734c378970d34f5305966d (patch) | |
tree | e6544bb77416690a8e79d9ca925aaa877bfa60a7 /include/ruby/win32.h | |
parent | 55fef084dac843caf155f03077773704b36e139e (diff) | |
download | ruby-e2ccb316b437104cd1734c378970d34f5305966d.tar.gz |
[Bug #5317] Use `rb_off_t` instead of `off_t`
Get rid of the conflict with system-provided small `off_t`.
Diffstat (limited to 'include/ruby/win32.h')
-rw-r--r-- | include/ruby/win32.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h index ea460a5e46..93e6183ed9 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -195,7 +195,6 @@ struct stati128 { long st_ctimensec; }; -#define off_t __int64 #define stat stati128 #undef SIZEOF_STRUCT_STAT_ST_INO #define SIZEOF_STRUCT_STAT_ST_INO sizeof(unsigned __int64) @@ -401,9 +400,9 @@ scalb(double a, long b) #define SUFFIX -extern int rb_w32_ftruncate(int fd, off_t length); -extern int rb_w32_truncate(const char *path, off_t length); -extern int rb_w32_utruncate(const char *path, off_t length); +extern int rb_w32_ftruncate(int fd, rb_off_t length); +extern int rb_w32_truncate(const char *path, rb_off_t length); +extern int rb_w32_utruncate(const char *path, rb_off_t length); #undef HAVE_FTRUNCATE #define HAVE_FTRUNCATE 1 @@ -722,7 +721,7 @@ int rb_w32_fclose(FILE*); int rb_w32_pipe(int[2]); ssize_t rb_w32_read(int, void *, size_t); ssize_t rb_w32_write(int, const void *, size_t); -off_t rb_w32_lseek(int, off_t, int); +rb_off_t rb_w32_lseek(int, rb_off_t, int); int rb_w32_uutime(const char *, const struct utimbuf *); int rb_w32_uutimes(const char *, const struct timeval *); int rb_w32_uutimensat(int /* must be AT_FDCWD */, const char *, const struct timespec *, int /* must be 0 */); @@ -815,7 +814,7 @@ double rb_w32_pow(double x, double y); #define MAP_ANON 0x1000 #define MAP_ANONYMOUS MAP_ANON -extern void *rb_w32_mmap(void *, size_t, int, int, int, off_t); +extern void *rb_w32_mmap(void *, size_t, int, int, int, rb_off_t); extern int rb_w32_munmap(void *, size_t); extern int rb_w32_mprotect(void *, size_t, int); |