- converted ctime_r to ctime for better portability
- more refactoring git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3691 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
80f062d8ce
commit
a4cad316e7
5 changed files with 36 additions and 73 deletions
|
@ -58,8 +58,8 @@ char *CEXEBuild::set_timestamp_predefine(char *filename)
|
|||
definedlist.del("__TIMESTAMP__");
|
||||
}
|
||||
|
||||
char timestampbuf[256] = "";
|
||||
#ifdef _WIN32
|
||||
char timestampbuf[256] = "";
|
||||
char datebuf[128] = "";
|
||||
char timebuf[128] = "";
|
||||
WIN32_FIND_DATA fd;
|
||||
|
@ -83,13 +83,7 @@ char *CEXEBuild::set_timestamp_predefine(char *filename)
|
|||
#else
|
||||
struct stat st;
|
||||
if (!stat(filename, &st))
|
||||
{
|
||||
ctime_r(&st.st_mtime, timestampbuf);
|
||||
char *p = timestampbuf + strlen(timestampbuf);
|
||||
while (!*p || *p == '\n')
|
||||
*p-- = 0;
|
||||
definedlist.add("__TIMESTAMP__",timestampbuf);
|
||||
}
|
||||
definedlist.add("__TIMESTAMP__",ctime(&st.st_mtime));
|
||||
#endif
|
||||
|
||||
return oldtimestamp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue