From 1855c9f7a568317e4c138c00c8527da13f63c7af Mon Sep 17 00:00:00 2001 From: kichik Date: Wed, 18 Aug 2004 16:14:44 +0000 Subject: [PATCH] bug report #1005303 - NSIS build warnings git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3630 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/script.cpp | 4 ++-- Source/util.cpp | 5 +++++ Source/util.h | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) 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);