Better ifdef for futimes
authorRyan Dahl <ry@tinyclouds.org>
Tue, 22 Mar 2011 20:18:57 +0000 (13:18 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Tue, 22 Mar 2011 20:19:42 +0000 (20:19 +0000)
src/node_file.cc

index 7889597f0f4139e4f9d4cc477e6cbecdda57fcb2..8b7f374195a5a8b3cad86b69863c92409acbf71f 100644 (file)
@@ -910,8 +910,8 @@ static Handle<Value> FUTimes(const Arguments& args) {
   if (args[3]->IsFunction()) {
     ASYNC_CALL(futime, args[3], fd, atime, mtime);
   } else {
-#ifdef __sun
-    // Solaris does not have futimes
+#ifndef futimes
+    // Some systems do not have futimes
     return ThrowException(ErrnoException(ENOSYS, "futimes", "", 0));
 #else
     timeval times[2];
@@ -920,7 +920,7 @@ static Handle<Value> FUTimes(const Arguments& args) {
     if (futimes(fd, times) == -1) {
       return ThrowException(ErrnoException(errno, "futimes", "", 0));
     }
-#endif  //__sun
+#endif  // futimes
   }
 
   return Undefined();