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

Unified Diff: lib/Support/Unix/Program.inc

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 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 | « lib/Support/Unix/Process.inc ('k') | lib/Support/Unix/Signals.inc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Support/Unix/Program.inc
diff --git a/lib/Support/Unix/Program.inc b/lib/Support/Unix/Program.inc
index 0f45df1a0da0e20fd9bd12dfbeed03c0a979f070..0ec69c7f45323daf089acddcf8fef6625670ba1a 100644
--- a/lib/Support/Unix/Program.inc
+++ b/lib/Support/Unix/Program.inc
@@ -310,7 +310,9 @@ namespace llvm {
ProcessInfo sys::Wait(const ProcessInfo &PI, unsigned SecondsToWait,
bool WaitUntilTerminates, std::string *ErrMsg) {
-#ifdef HAVE_SYS_WAIT_H
+ // @LOCALMOD-BEGIN
+#if defined(HAVE_SYS_WAIT_H) && !defined(PNACL_BROWSER_TRANSLATOR)
+ // @LOCALMOD-END
struct sigaction Act, Old;
assert(PI.Pid && "invalid pid to wait on, process not started?");
@@ -441,7 +443,11 @@ llvm::sys::writeFileWithEncoding(StringRef FileName, StringRef Contents,
}
bool llvm::sys::argumentsFitWithinSystemLimits(ArrayRef<const char*> Args) {
+#if defined(__native_client__)
+ static long ArgMax = -1;
+#else // !__native_client__
static long ArgMax = sysconf(_SC_ARG_MAX);
+#endif // __native_client__
// System says no practical limit.
if (ArgMax == -1)
« no previous file with comments | « lib/Support/Unix/Process.inc ('k') | lib/Support/Unix/Signals.inc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698