|
18 | 18 | #include <ctime>
|
19 | 19 |
|
20 | 20 | #ifdef _WIN32
|
21 |
| -inline void ctime_alloc(char *buffer, size_t bufsize, const time_t cur_time, |
| 21 | +inline void CtimeBuffer(char *buffer, size_t bufsize, const time_t cur_time, |
22 | 22 | Fortran::runtime::Terminator terminator) {
|
23 | 23 | int error{ctime_s(buffer, bufsize, &cur_time)};
|
24 | 24 | RUNTIME_CHECK(terminator, error == 0);
|
25 | 25 | }
|
26 | 26 | #elif _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE || \
|
27 | 27 | _POSIX_SOURCE
|
28 |
| -inline void ctime_alloc(char *buffer, size_t bufsize, const time_t cur_time, |
| 28 | +inline void CtimeBuffer(char *buffer, size_t bufsize, const time_t cur_time, |
29 | 29 | Fortran::runtime::Terminator terminator) {
|
30 | 30 | const char *res{ctime_r(&cur_time, buffer)};
|
31 | 31 | RUNTIME_CHECK(terminator, res != nullptr);
|
32 | 32 | }
|
33 | 33 | #else
|
34 |
| -inline void ctime_alloc(char *buffer, size_t bufsize, const time_t cur_time, |
| 34 | +inline void CtimeBuffer(char *buffer, size_t bufsize, const time_t cur_time, |
35 | 35 | Fortran::runtime::Terminator terminator) {
|
36 | 36 | buffer[0] = '\0';
|
37 | 37 | terminator.Crash("fdate is not supported.");
|
|
0 commit comments