summaryrefslogtreecommitdiff
path: root/src/node_os.cc
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2011-01-05 03:30:27 +0100
committerRyan Dahl <ry@tinyclouds.org>2011-01-04 18:38:58 -0800
commit9e31e0837ec3c5a88ed477bec3980dd4608046be (patch)
treec7deae9d7dad846fba1d74fcaf01e4b5c73923c9 /src/node_os.cc
parent468042fc84e80d2ceb94a8d4be09cd1b5ce66ffd (diff)
downloadnode-9e31e0837ec3c5a88ed477bec3980dd4608046be.tar.gz
Implement os.isWindows
Diffstat (limited to 'src/node_os.cc')
-rw-r--r--src/node_os.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/node_os.cc b/src/node_os.cc
index 758648835..fd6395e94 100644
--- a/src/node_os.cc
+++ b/src/node_os.cc
@@ -145,6 +145,12 @@ void OS::Initialize(v8::Handle<v8::Object> target) {
NODE_SET_METHOD(target, "getCPUs", GetCPUInfo);
NODE_SET_METHOD(target, "getOSType", GetOSType);
NODE_SET_METHOD(target, "getOSRelease", GetOSRelease);
+
+#ifdef __POSIX__
+ target->Set(String::New("isWindows"), False());
+#else // __MINGW32__
+ target->Set(String::New("isWindows"), True());
+#endif
}