Permalink
Browse files

Use _stati64 and _fstati64 for windows stat

  • Loading branch information...
1 parent 5f75d59 commit b18afe848db6776843da241e78217bbce2d6378b Wayne Meissner committed Oct 8, 2009
@@ -10,12 +10,8 @@
public final Signed32 st_rdev = new Signed32();
public final Signed64 st_size = new Signed64();
public final Signed32 st_atime = new Signed32();
- public final Signed32 spare1 = new Signed32();
public final Signed32 st_mtime = new Signed32();
- public final Signed32 spare2 = new Signed32();
public final Signed32 st_ctime = new Signed32();
- public final Signed64 st_blksize = new Signed64();
- public final Signed64 st_blocks = new Signed64();
public WindowsFileStat(POSIX posix) {
super(posix);
@@ -26,11 +22,11 @@ public long atime() {
}
public long blockSize() {
- return st_blksize.get();
+ return 512;
}
public long blocks() {
- return st_blocks.get();
+ return st_size.get() / blockSize();
}
public long ctime() {
@@ -16,8 +16,8 @@ public WindowsLibCFunctionMapper() {
methodNameMap.put("getpid", "_getpid");
methodNameMap.put("chmod", "_chmod");
- methodNameMap.put("fstat", "_fstat");
- methodNameMap.put("stat", "_stat64");
+ methodNameMap.put("fstat", "_fstati64");
+ methodNameMap.put("stat", "_stati64");
methodNameMap.put("mkdir", "_mkdir");
methodNameMap.put("umask", "_umask");
methodNameMap.put("isatty", "_isatty");

0 comments on commit b18afe8

Please sign in to comment.