Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: src/d8-posix.cc

Issue 513923005: More PNaCL fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/base/sys-info.cc ('k') | src/sampler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8-posix.cc
diff --git a/src/d8-posix.cc b/src/d8-posix.cc
index 59c50b432fc238eb512c61761ee46c6bde17bef9..9a20b06643540a477549bfc0e04d4e5b1307e2c7 100644
--- a/src/d8-posix.cc
+++ b/src/d8-posix.cc
@@ -7,7 +7,6 @@
#include <signal.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/select.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
@@ -16,6 +15,9 @@
#include "src/d8.h"
+#if !V8_OS_NACL
+#include <sys/select.h>
+#endif
namespace v8 {
@@ -102,11 +104,16 @@ static bool WaitOnFD(int fd,
}
timeout.tv_usec = (read_timeout % 1000) * 1000;
timeout.tv_sec = read_timeout / 1000;
+#if V8_OS_NACL
+ // PNaCL has no support for select.
+ int number_of_fds_ready = -1;
+#else
int number_of_fds_ready = select(fd + 1,
&readfds,
&writefds,
&exceptfds,
read_timeout != -1 ? &timeout : NULL);
+#endif
return number_of_fds_ready == 1;
}
@@ -547,8 +554,12 @@ void Shell::SetUMask(const v8::FunctionCallbackInfo<v8::Value>& args) {
return;
}
if (args[0]->IsNumber()) {
- mode_t mask = args[0]->Int32Value();
- int previous = umask(mask);
+#if V8_OS_NACL
+ // PNaCL has no support for umask.
+ int previous = 0;
+#else
+ int previous = umask(args[0]->Int32Value());
+#endif
args.GetReturnValue().Set(previous);
return;
} else {
« no previous file with comments | « src/base/sys-info.cc ('k') | src/sampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698