This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] __TIMESTAMP__ predefined macro


> 
> On Wed, Feb 15, 2006 at 06:26:58PM +0300, Grigory Zagorodnev wrote:
> > 
> > >Also why don't you just use ctime or asctime instead of spelling it out?
> > This is correct. Describing __DATE__ and __TIME__ predefined macro in 
> > section 6.10.8, the C99 Standard refers asctime. Thus using 
> > asctime(localtime()) seems to be suitable solution. However the original 
> > idea was to follow existing cpplib approach for __DATE__ and __TIME__ 
> > string generation.
> > 
> 
> asctime is locale dependent. Grigory's approach is locale independent,
> like __DATE__ and __TIME__.

No, asctime is locale independent.

-- pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]