summaryrefslogtreecommitdiffstats
path: root/kwsysPlatformTestsCXX.cxx
diff options
context:
space:
mode:
authorKWSys Robot <kwrobot@kitware.com>2013-05-31 20:34:02 (GMT)
committerBrad King <brad.king@kitware.com>2013-06-03 14:23:16 (GMT)
commitd66f6f36baca6d314f1f17e11d90d52b5c9d7ec2 (patch)
treeffc8003ad90d02fcac170f922eccd4adbe55abae /kwsysPlatformTestsCXX.cxx
parent927012979e54a69d9d49f188ce73f7b4ca2fb073 (diff)
downloadCMake-d66f6f36baca6d314f1f17e11d90d52b5c9d7ec2.zip
CMake-d66f6f36baca6d314f1f17e11d90d52b5c9d7ec2.tar.gz
CMake-d66f6f36baca6d314f1f17e11d90d52b5c9d7ec2.tar.bz2
KWSys 2013-05-31 (dccf7725)
Extract upstream KWSys using the following shell commands. $ git archive --prefix=upstream-kwsys/ dccf7725 | tar x $ git shortlog --no-merges --abbrev=8 --format='%h %s' 725e541e..dccf7725 Brad King (2): e3370418 SystemTools: Use COMPILE_DEFINITIONS to pass platform tests dccf7725 SystemTools: Touch with better than 1s resolution if possible Change-Id: Icdbcdf405e27b2d5dd30857c7c8679ed5096f252
Diffstat (limited to 'kwsysPlatformTestsCXX.cxx')
-rw-r--r--kwsysPlatformTestsCXX.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/kwsysPlatformTestsCXX.cxx b/kwsysPlatformTestsCXX.cxx
index 48976c4..a7e3b50 100644
--- a/kwsysPlatformTestsCXX.cxx
+++ b/kwsysPlatformTestsCXX.cxx
@@ -494,6 +494,25 @@ int main()
}
#endif
+#ifdef TEST_KWSYS_CXX_HAS_UTIMES
+#include <sys/time.h>
+int main()
+{
+ struct timeval* current_time = 0;
+ return utimes("/example", current_time);
+}
+#endif
+
+#ifdef TEST_KWSYS_CXX_HAS_UTIMENSAT
+#include <fcntl.h>
+#include <sys/stat.h>
+int main()
+{
+ struct timespec times[2] = {{0,UTIME_OMIT},{0,UTIME_NOW}};
+ return utimensat(AT_FDCWD, "/example", times, AT_SYMLINK_NOFOLLOW);
+}
+#endif
+
#ifdef TEST_KWSYS_CXX_TYPE_INFO
/* Collect fundamental type information and save it to a CMake script. */