diff options
Diffstat (limited to 'src/skel/crossplatform.cpp')
-rw-r--r-- | src/skel/crossplatform.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/skel/crossplatform.cpp b/src/skel/crossplatform.cpp index 4b7d3d9a..37c94cb4 100644 --- a/src/skel/crossplatform.cpp +++ b/src/skel/crossplatform.cpp @@ -256,3 +256,17 @@ char* casepath(char const* path, bool checkPathFirst) return out; } #endif + +#if !defined(_MSC_VER) && !defined(__CWCC__) +char *strdate(char *buf) { + time_t timestamp; + time(×tamp); + tm *localTm = localtime(×tamp); + strftime(buf, 10, "%m/%d/%y", localTm); + return buf; +} + +char *_strdate(char *buf) { + return strdate(buf); +} +#endif |