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

Unified Diff: base/files/file_util_posix.cc

Issue 2807463004: GN: aix port along with linux_s390x, linux_ppc64 and linux_ppc64le support. (Closed)
Patch Set: removed the changes from //base/BUILD.gn Created 3 years, 8 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 | « base/files/file_util.h ('k') | base/logging.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_util_posix.cc
diff --git a/base/files/file_util_posix.cc b/base/files/file_util_posix.cc
index b6a5f3ff92ce5abd09b3ba784ab14105a04838b0..bc74b940539b25310809e55bc2952d0f9f8a55cd 100644
--- a/base/files/file_util_posix.cc
+++ b/base/files/file_util_posix.cc
@@ -56,6 +56,12 @@
#include <grp.h>
#endif
+// We need to do this on AIX due to some inconsistencies in how AIX
+// handles XOPEN_SOURCE and ALL_SOURCE.
+#if defined(OS_AIX)
+extern "C" char* mkdtemp(char* path);
+#endif
+
namespace base {
namespace {
@@ -156,7 +162,7 @@ int CreateAndOpenFdForTemporaryFile(FilePath directory, FilePath* path) {
return HANDLE_EINTR(mkstemp(buffer));
}
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_AIX)
// Determine if /dev/shm files can be mapped and then mprotect'd PROT_EXEC.
// This depends on the mount options used for /dev/shm, which vary among
// different Linux distributions and possibly local configuration. It also
@@ -922,7 +928,7 @@ int GetMaximumPathComponentLength(const FilePath& path) {
#if !defined(OS_ANDROID)
// This is implemented in file_util_android.cc for that platform.
bool GetShmemTempDir(bool executable, FilePath* path) {
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_AIX)
bool use_dev_shm = true;
if (executable) {
static const bool s_dev_shm_executable = DetermineDevShmExecutable();
« no previous file with comments | « base/files/file_util.h ('k') | base/logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698