diff --git a/Source/script.cpp b/Source/script.cpp index dc3df4bc..d216b575 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -160,9 +160,9 @@ void CEXEBuild::set_date_time_predefines() GetTimeFormat(LOCALE_USER_DEFAULT, 0, &stime, NULL, timebuf, sizeof(timebuf)); definedlist.add("__TIME__",(char *)timebuf); #else - strftime(datebuf, sizeof(datebuf), "%x", ltime); + my_strftime(datebuf, sizeof(datebuf), "%x", ltime); definedlist.add("__DATE__",(char *)datebuf); - strftime(timebuf, sizeof(timebuf), "%X", ltime); + my_strftime(timebuf, sizeof(timebuf), "%X", ltime); definedlist.add("__TIME__",(char *)timebuf); #endif } diff --git a/Source/util.cpp b/Source/util.cpp index 92d3d10b..46dae61e 100644 --- a/Source/util.cpp +++ b/Source/util.cpp @@ -1,6 +1,7 @@ #include "Platform.h" #include #include +#include #include "exedata.h" #include "exehead/fileform.h" #include "util.h" @@ -432,3 +433,7 @@ void operator delete(void *p) { void operator delete [](void *p) { if (p) free(p); } + +size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm) { + return strftime(s, max, fmt, tm); +} diff --git a/Source/util.h b/Source/util.h index 1d92af36..6cc136a6 100644 --- a/Source/util.h +++ b/Source/util.h @@ -27,6 +27,8 @@ int generate_unicons_offsets(unsigned char* exeHeader, unsigned char* uninstIcon // returns the number of WCHARs in str including null charcter int WCStrLen(const WCHAR* szwStr); +size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm); + #ifndef _WIN32 char *CharPrev(const char *s, const char *p); char *CharNext(const char *s);