summaryrefslogtreecommitdiffstats
path: root/libcxx/src/experimental/filesystem/operations.cpp
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-18 19:11:40 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-18 19:11:40 +0000
commitd7ae63da67660feeda30d04a70518d24fbfdeec8 (patch)
treed99db1db351cf15fd46d89078ab728a89b01abc6 /libcxx/src/experimental/filesystem/operations.cpp
parentb88d8f63469ca7465f18ffa4f5b718fb55cbd74c (diff)
downloadbcm5719-llvm-d7ae63da67660feeda30d04a70518d24fbfdeec8.tar.gz
bcm5719-llvm-d7ae63da67660feeda30d04a70518d24fbfdeec8.zip
Remove Apple specific guard for utimensat. Use !defined(UTIME_OMIT) instead.
As pointed out by @majnemer this is a better way to detect utimensat on all platforms. The Apple specific guard is unneeded. llvm-svn: 273093
Diffstat (limited to 'libcxx/src/experimental/filesystem/operations.cpp')
-rw-r--r--libcxx/src/experimental/filesystem/operations.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/libcxx/src/experimental/filesystem/operations.cpp b/libcxx/src/experimental/filesystem/operations.cpp
index ebaadf4044e..6448caf6b3a 100644
--- a/libcxx/src/experimental/filesystem/operations.cpp
+++ b/libcxx/src/experimental/filesystem/operations.cpp
@@ -19,7 +19,7 @@
#include <sys/stat.h>
#include <sys/statvfs.h>
#include <fcntl.h> /* values for fchmodat */
-#if defined(__APPLE__)
+#if !defined(UTIME_OMIT)
#include <sys/time.h> // for ::utimes as used in __last_write_time
#endif
@@ -507,10 +507,9 @@ void __last_write_time(const path& p, file_time_type new_time,
using namespace std::chrono;
std::error_code m_ec;
- // We can use the presence of UTIME_OMIT to detect GLIBC versions that
- // do not provide utimensat.
- // FIXME: Use utimensat when it becomes available on OS X.
-#if defined(__APPLE__) || !defined(UTIME_OMIT)
+ // We can use the presence of UTIME_OMIT to detect platforms that do not
+ // provide utimensat.
+#if !defined(UTIME_OMIT)
// This implementation has a race condition between determining the
// last access time and attempting to set it to the same value using
// ::utimes
OpenPOWER on IntegriCloud