Skip to content

Commit a3d7782

Browse files
Igor Zinkovskyry
Igor Zinkovsky
authored andcommitted
enable missing fs functions on windows
1 parent ee048aa commit a3d7782

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/node_file.cc

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ static Handle<Value> Stat(const Arguments& args) {
339339
}
340340
}
341341

342-
#ifdef __POSIX__
343342
static Handle<Value> LStat(const Arguments& args) {
344343
HandleScope scope;
345344

@@ -356,7 +355,6 @@ static Handle<Value> LStat(const Arguments& args) {
356355
return scope.Close(BuildStatsObject((NODE_STAT_STRUCT*)SYNC_REQ.ptr));
357356
}
358357
}
359-
#endif // __POSIX__
360358

361359
static Handle<Value> FStat(const Arguments& args) {
362360
HandleScope scope;
@@ -807,7 +805,6 @@ static Handle<Value> Chmod(const Arguments& args) {
807805
}
808806

809807

810-
#ifdef __POSIX__
811808
/* fs.fchmod(fd, mode);
812809
* Wrapper for fchmod(1) / EIO_FCHMOD
813810
*/
@@ -827,10 +824,8 @@ static Handle<Value> FChmod(const Arguments& args) {
827824
return Undefined();
828825
}
829826
}
830-
#endif // __POSIX__
831827

832828

833-
#ifdef __POSIX__
834829
/* fs.chown(path, uid, gid);
835830
* Wrapper for chown(1) / EIO_CHOWN
836831
*/
@@ -856,10 +851,8 @@ static Handle<Value> Chown(const Arguments& args) {
856851
return Undefined();
857852
}
858853
}
859-
#endif // __POSIX__
860854

861855

862-
#ifdef __POSIX__
863856
/* fs.fchown(fd, uid, gid);
864857
* Wrapper for fchown(1) / EIO_FCHOWN
865858
*/
@@ -885,7 +878,7 @@ static Handle<Value> FChown(const Arguments& args) {
885878
return Undefined();
886879
}
887880
}
888-
#endif // __POSIX__
881+
889882

890883
static Handle<Value> UTimes(const Arguments& args) {
891884
HandleScope scope;
@@ -949,9 +942,7 @@ void File::Initialize(Handle<Object> target) {
949942
NODE_SET_METHOD(target, "sendfile", SendFile);
950943
NODE_SET_METHOD(target, "readdir", ReadDir);
951944
NODE_SET_METHOD(target, "stat", Stat);
952-
#ifdef __POSIX__
953945
NODE_SET_METHOD(target, "lstat", LStat);
954-
#endif // __POSIX__
955946
NODE_SET_METHOD(target, "fstat", FStat);
956947
#ifdef __POSIX__
957948
NODE_SET_METHOD(target, "link", Link);
@@ -962,15 +953,13 @@ void File::Initialize(Handle<Object> target) {
962953
NODE_SET_METHOD(target, "write", Write);
963954

964955
NODE_SET_METHOD(target, "chmod", Chmod);
965-
#ifdef __POSIX__
966956
NODE_SET_METHOD(target, "fchmod", FChmod);
967957
//NODE_SET_METHOD(target, "lchmod", LChmod);
968958

969959
NODE_SET_METHOD(target, "chown", Chown);
970960
NODE_SET_METHOD(target, "fchown", FChown);
971961
//NODE_SET_METHOD(target, "lchown", LChown);
972962

973-
#endif // __POSIX__
974963
NODE_SET_METHOD(target, "utimes", UTimes);
975964
NODE_SET_METHOD(target, "futimes", FUTimes);
976965

0 commit comments

Comments
 (0)