Displaying 4 results from an estimated 4 matches for "toepochtim".
Did you mean:
toepochtime
2004 Dec 14
1
[LLVMdev] __time_t type instead of __time64_t inwin32/TimeValue.cpp
Replace __time_t with time_t in my question. I've compiled function:
std::string TimeValue::toString() const {
// Alas, asctime is not re-entrant on Windows...
//hb: __time64_t ourTime = this->toEpochTime();
time_t ourTime = this->toEpochTime();
//hb: char* buffer = ::asctime(::_localtime64(&ourTime));
char* buffer = ::asctime(::localtime(&ourTime));
std::string result(buffer);
return result.substr(0,24);
}
without any complaints. Shouldn't it do with this, Jeff?
Henrik....
2004 Dec 14
0
[LLVMdev] __time_t type instead of __time64_t in win32/TimeValue.cpp
I'm not sure. Perhaps Jeff Cohen knows as he wrote this.
Reid.
On Tue, 2004-12-14 at 11:51, Henrik Bach wrote:
> Hi,
>
> Is it necessary to use the VC6.1+ `__time64_t' type instead of __time_t in
> win32/TimeValue.cpp?
>
> ---------------
> In file included from
> c:/projects/src/llvm-1/llvm/lib/System/TimeValue.cpp:51:
>
2004 Dec 14
2
[LLVMdev] __time_t type instead of __time64_t in win32/TimeValue.cpp
Hi,
Is it necessary to use the VC6.1+ `__time64_t' type instead of __time_t in
win32/TimeValue.cpp?
---------------
In file included from
c:/projects/src/llvm-1/llvm/lib/System/TimeValue.cpp:51:
c:/projects/build/MinGW/llvm-1-1/lib/System/platform/TimeValue.cpp: In
member function `std::string llvm::sys::TimeValue::toString() const':
2010 Oct 25
1
[LLVMdev] sprintf -> snprintf conversion
...%-6u", mbr.getUser());
memcpy(hdr.uid,buffer,6);
- sprintf(buffer, "%-6u", mbr.getGroup());
+ snprintf(buffer, sizeof(buffer), "%-6u", mbr.getGroup());
memcpy(hdr.gid,buffer,6);
// Set the last modification date
uint64_t secondsSinceEpoch = mbr.getModTime().toEpochTime();
- sprintf(buffer,"%-12u", unsigned(secondsSinceEpoch));
+ snprintf(buffer, sizeof(buffer), "%-12u", unsigned(secondsSinceEpoch));
memcpy(hdr.date,buffer,12);
// Get rid of trailing blanks in the name
@@ -141,9 +141,9 @@
// Set the size field
if (sz < 0) {...