List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:October 7 2008 12:52pm
Subject:RE: bzr commit into mysql-6.0-falcon-team branch
(lars-erik.bjork:2859) Bug#39647
View as plain text  

> -----Original Message-----
> From: Lars-Erik.Bjork@stripped [mailto:Lars-Erik.Bjork@stripped]
> Sent: Tuesday, October 07, 2008 9:19 AM
> To: commits@stripped
> Subject: bzr commit into mysql-6.0-falcon-team branch (lars-
> erik.bjork:2859) Bug#39647




> +void getTimestamp(int length, char* buffer)
> +{
> +#ifdef __WIN__
> +	SYSTEMTIME now;
> +	GetLocalTime(&now);
> +	snprintf(buffer, length, "%.2d%.2d%.2d %2d:%.2d:%.2d",
> +			 (int)now.wYear % 100,
> +			 (int)now.wMonth,
> +			 (int)now.wDay,
> +			 (int)now.wHour,
> +			 (int)now.wMinute,
> +			 (int)now.wSecond);
> +#else

1. Olav is right, Falcon indeed does not use __WIN__  but _WIN32 (which is
more handy, as predefined by compiler).
2. You need neither __WIN__ nor _WIN32 ;)

localtime() is there (http://msdn.microsoft.com/en-us/library/bf12f0hc.aspx
) and is thread-safe, as it uses thread local storage rather than global
variable to store the result. So I'd suggest to  remove #ifdef __WIN__ part
and corresponding #endif and expect the code to work ok.





Thread
bzr commit into mysql-6.0-falcon-team branch (lars-erik.bjork:2859) Bug#39647lars-erik.bjork7 Oct
  • Re: bzr commit into mysql-6.0-falcon-team branch(lars-erik.bjork:2859) Bug#39647Olav Sandstaa7 Oct
  • RE: bzr commit into mysql-6.0-falcon-team branch(lars-erik.bjork:2859) Bug#39647Vladislav Vaintroub7 Oct