Bug 1269501: Part 2 - Add additional libc constants to OS.Constants.libc. r=aswan
☠☠ backed out by 199230f44725 ☠ ☠
authorKris Maglione <maglione.k@gmail.com>
Sun, 08 May 2016 20:34:48 -0700
changeset 338307 1cbbf940ec35031f3ac435dcef16a0ca5f5a7fc7
parent 338306 ed35c5f4d756aa5b073832e21c103ce4faf282bd
child 338308 6438b11898cf5775f446ac0ddcf13f9e8506b26a
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan
bugs1269501
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1269501: Part 2 - Add additional libc constants to OS.Constants.libc. r=aswan MozReview-Commit-ID: H7t3lUvKfY
dom/system/OSFileConstants.cpp
--- a/dom/system/OSFileConstants.cpp
+++ b/dom/system/OSFileConstants.cpp
@@ -9,22 +9,24 @@
 #include "fcntl.h"
 #include "errno.h"
 
 #include "prsystem.h"
 
 #if defined(XP_UNIX)
 #include "unistd.h"
 #include "dirent.h"
+#include "poll.h"
 #include "sys/stat.h"
 #if defined(ANDROID)
 #include <sys/vfs.h>
 #define statvfs statfs
 #else
 #include "sys/statvfs.h"
+#include "sys/wait.h"
 #include <spawn.h>
 #endif // defined(ANDROID)
 #endif // defined(XP_UNIX)
 
 #if defined(XP_LINUX)
 #include <linux/fadvise.h>
 #endif // defined(XP_LINUX)
 
@@ -399,16 +401,19 @@ void CleanupOSFileConstants()
  * separate categories ("errors", "open", etc.),
  * keep properties organized by alphabetical order
  * and #ifdef-away properties that are not portable.
  */
 static const dom::ConstantSpec gLibcProperties[] =
 {
   // Arguments for open
   INT_CONSTANT(O_APPEND),
+#if defined(O_CLOEXEC)
+  INT_CONSTANT(O_CLOEXEC),
+#endif // defined(O_CLOEXEC)
   INT_CONSTANT(O_CREAT),
 #if defined(O_DIRECTORY)
   INT_CONSTANT(O_DIRECTORY),
 #endif // defined(O_DIRECTORY)
 #if defined(O_EVTONLY)
   INT_CONSTANT(O_EVTONLY),
 #endif // defined(O_EVTONLY)
   INT_CONSTANT(O_EXCL),
@@ -436,16 +441,20 @@ static const dom::ConstantSpec gLibcProp
   INT_CONSTANT(O_SYMLINK),
 #endif // defined(O_SYMLINK)
 #if defined(O_SYNC)
   INT_CONSTANT(O_SYNC),
 #endif // defined(O_SYNC)
   INT_CONSTANT(O_TRUNC),
   INT_CONSTANT(O_WRONLY),
 
+#if defined(FD_CLOEXEC)
+  INT_CONSTANT(FD_CLOEXEC),
+#endif // defined(FD_CLOEXEC)
+
 #if defined(AT_EACCESS)
   INT_CONSTANT(AT_EACCESS),
 #endif //defined(AT_EACCESS)
 #if defined(AT_FDCWD)
   INT_CONSTANT(AT_FDCWD),
 #endif //defined(AT_FDCWD)
 #if defined(AT_SYMLINK_NOFOLLOW)
   INT_CONSTANT(AT_SYMLINK_NOFOLLOW),
@@ -477,23 +486,35 @@ static const dom::ConstantSpec gLibcProp
   INT_CONSTANT(S_IXGRP),
   INT_CONSTANT(S_IXUSR),
 
   // seek
   INT_CONSTANT(SEEK_CUR),
   INT_CONSTANT(SEEK_END),
   INT_CONSTANT(SEEK_SET),
 
- // fcntl command values
 #if defined(XP_UNIX)
+  // poll
+  INT_CONSTANT(POLLERR),
+  INT_CONSTANT(POLLHUP),
+  INT_CONSTANT(POLLIN),
+  INT_CONSTANT(POLLNVAL),
+  INT_CONSTANT(POLLOUT),
+
+  // wait
+  INT_CONSTANT(WNOHANG),
+
+  // fcntl command values
   INT_CONSTANT(F_GETLK),
+  INT_CONSTANT(F_SETFD),
+  INT_CONSTANT(F_SETFL),
   INT_CONSTANT(F_SETLK),
   INT_CONSTANT(F_SETLKW),
 
- // flock type values
+  // flock type values
   INT_CONSTANT(F_RDLCK),
   INT_CONSTANT(F_WRLCK),
   INT_CONSTANT(F_UNLCK),
 #endif // defined(XP_UNIX)
   // copyfile
 #if defined(COPYFILE_DATA)
   INT_CONSTANT(COPYFILE_DATA),
   INT_CONSTANT(COPYFILE_EXCL),