diff options
author | erorcun <erayorcunus@gmail.com> | 2020-11-17 23:45:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 23:45:28 +0100 |
commit | 1d600c640a5f4f2e018c573e2d6c2fbbd57aa662 (patch) | |
tree | da4e6f03769bc8837b8a1f16f2b5005621f47a04 /src/skel | |
parent | pragma twice (diff) | |
parent | Frontend: Stats, Map, Audio inputs, Radio selector (diff) | |
download | re3-1d600c640a5f4f2e018c573e2d6c2fbbd57aa662.tar re3-1d600c640a5f4f2e018c573e2d6c2fbbd57aa662.tar.gz re3-1d600c640a5f4f2e018c573e2d6c2fbbd57aa662.tar.bz2 re3-1d600c640a5f4f2e018c573e2d6c2fbbd57aa662.tar.lz re3-1d600c640a5f4f2e018c573e2d6c2fbbd57aa662.tar.xz re3-1d600c640a5f4f2e018c573e2d6c2fbbd57aa662.tar.zst re3-1d600c640a5f4f2e018c573e2d6c2fbbd57aa662.zip |
Diffstat (limited to '')
-rw-r--r-- | src/skel/crossplatform.cpp | 14 | ||||
-rw-r--r-- | src/skel/crossplatform.h | 4 |
2 files changed, 18 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 diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h index 1635781b..fe1f22fd 100644 --- a/src/skel/crossplatform.h +++ b/src/skel/crossplatform.h @@ -12,6 +12,10 @@ enum eWinVersion OS_WINXP, }; +#if !defined(_MSC_VER) && !defined(__CWCC__) +char *_strdate(char *buf); +#endif + #ifdef _WIN32 // As long as WITHWINDOWS isn't defined / <Windows.h> isn't included, we only need type definitions so let's include <IntSafe.h>. |