================ @@ -10,9 +10,26 @@ // extensions that will eventually be implemented in Fortran. #include "flang/Runtime/extensions.h" +#include "terminator.h" #include "flang/Runtime/command.h" #include "flang/Runtime/descriptor.h" #include "flang/Runtime/io-api.h" +#include "flang/Runtime/time-intrinsic.h" // copyBufferAndPad +#include <ctime> + +#ifdef _WIN32 +inline void ctime_alloc(char *buffer, size_t bufsize, const time_t cur_time, + Fortran::runtime::Terminator terminator) { + int error = ctime_s(buffer, bufsize, &cur_time); + RUNTIME_CHECK(terminator, error == 0); +} +#else +inline void ctime_alloc(char *buffer, size_t bufsize, const time_t cur_time, + Fortran::runtime::Terminator terminator) { + const char *res = ctime_r(&cur_time, buffer); ---------------- jeanPerier wrote:
LGTM, thanks https://github.com/llvm/llvm-project/pull/71222 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits