[LLVMdev] __time_t type instead of __time64_t inwin32/TimeValue.cpp

Henrik Bach henrik_bach_llvm at hotmail.com
Tue Dec 14 12:59:13 PST 2004


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.


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:
 > c:/projects/build/MinGW/llvm-1-1/lib/System/platform/TimeValue.cpp: In
 > member function `std::string llvm::sys::TimeValue::toString() const':
 > c:/projects/build/MinGW/llvm-1-1/lib/System/platform/TimeValue.cpp:36:
 > error: `__time64_t' undeclared (first use this function)
 > c:/projects/build/MinGW/llvm-1-1/lib/System/platform/TimeValue.cpp:36:
 > error: (Each undeclared identifier is reported only once for each 
function
 > it appears in.)
 > ---------------
 >
 > Henrik.
 >
 > =============================================================
 > Henrik Bach
 > Open Source Developer
 >
 > e-mail: henrik_bach_llvm at hotmail.com
 > =============================================================
 > Got Freedom?
 > Software Freedom Day 2004 - 28th of August
 > http://www.softwarefreedomday.org/
 > =============================================================
 >
 > _________________________________________________________________
 > Undgå pop-ups med MSN Toolbar -  http://toolbar.msn.dk/ hent den gratis!
 >
 > _______________________________________________
 > LLVM Developers mailing list
 > LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
 > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev
<< signature.asc >>
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev

_________________________________________________________________
Log på MSN Messenger direkte fra nettet  http://webmessenger.msn.com/




More information about the llvm-dev mailing list