summaryrefslogtreecommitdiff
path: root/include/ruby/win32.h
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-22 15:45:00 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-22 15:45:00 +0000
commit86dc863bd84ce79d48e5ada9f57bbe24b97db948 (patch)
tree0f09d8edf917936b230dc8855bed33d0dc3ecc17 /include/ruby/win32.h
parent900ede40532640376f7a2ee359e70df2a546e060 (diff)
* win32/win32.c, include/ruby/win32.h (ustatfs): implementation of
statfs(2) clone. [EXPERIMENTAL] * file.c (rb_io_statfs): use above function. * configure.in, win32/Makefile.sub (struct statfs): available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/win32.h')
-rw-r--r--include/ruby/win32.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/ruby/win32.h b/include/ruby/win32.h
index a6996bc..825b9b1 100644
--- a/include/ruby/win32.h
+++ b/include/ruby/win32.h
@@ -262,6 +262,20 @@ struct ifaddrs {
#define IFF_POINTOPOINT IFF_POINTTOPOINT
#endif
+/* for ustatfs() */
+typedef uint32_t fsid_t;
+struct statfs {
+ uint32_t f_type;
+ uint64_t f_bsize;
+ uint64_t f_blocks;
+ uint64_t f_bfree;
+ int64_t f_bavail;
+ uint64_t f_files;
+ uint64_t f_ffree;
+ fsid_t f_fsid;
+ char f_fstypename[MAX_PATH];
+};
+
extern DWORD rb_w32_osid(void);
extern rb_pid_t rb_w32_pipe_exec(const char *, const char *, int, int *, int *);
extern int flock(int fd, int oper);
@@ -347,6 +361,7 @@ extern int rb_w32_uaccess(const char *, int);
extern char rb_w32_fd_is_text(int);
extern int rb_w32_fstati64(int, struct stati64 *);
extern int rb_w32_dup2(int, int);
+extern int ustatfs(const char *, struct statfs *);
#ifdef __BORLANDC__
extern off_t _lseeki64(int, off_t, int);