[libcxx-commits] [PATCH] D87940: [SystemZ][ZOS] Porting the time functions within libc++ to z/OS

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 28 10:41:15 PDT 2020


ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.


================
Comment at: libcxx/include/CMakeLists.txt:165
 
+if (ZOS)
+  set(files
----------------
Please put it below in the `if (LIBCXX_INSTALL_SUPPORT_HEADERS)`, and not dependent on `ZOS`.


================
Comment at: libcxx/include/support/ibm/nanosleep.h:15
+
+int nanosleep(const struct timespec* req, struct timespec* rem)
+{
----------------
This needs to be marked `inline` to avoid ODR violations.


================
Comment at: libcxx/src/filesystem/filesystem_common.h:387
+#elif defined(__MVS__)
+TimeSpec extract_mtime(StatT const& st) {
+  TimeSpec TS = {st.st_mtime, 0};
----------------
`inline`.


================
Comment at: libcxx/src/filesystem/filesystem_common.h:391
+}
+TimeSpec extract_atime(StatT const& st) {
+  TimeSpec TS = {st.st_atime, 0};
----------------
`inline`.


================
Comment at: libcxx/src/filesystem/filesystem_common.h:400
 
-// allow the utimes implementation to compile even it we're not going
-// to use it.
-
-bool posix_utimes(const path& p, std::array<TimeSpec, 2> const& TS,
-                  error_code& ec) {
+TimeVal make_timeval(TimeSpec const& ts) {
   using namespace chrono;
----------------
`inline`.


================
Comment at: libcxx/src/filesystem/filesystem_common.h:413
+
+bool posix_utimes(const path& p, std::array<TimeSpec, 2> const& TS,
+                  error_code& ec) {
----------------
Let's take this occasion to make this `inline`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87940/new/

https://reviews.llvm.org/D87940



More information about the libcxx-commits mailing list