From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16325 invoked by alias); 7 Feb 2005 11:42:55 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 16267 invoked from network); 7 Feb 2005 11:42:49 -0000 Received: from unknown (HELO linda-1.paradise.net.nz) (202.0.58.20) by sourceware.org with SMTP; 7 Feb 2005 11:42:49 -0000 Received: from smtp-2.paradise.net.nz (smtp-2a.paradise.net.nz [202.0.32.195]) by linda-1.paradise.net.nz (Paradise.net.nz) with ESMTP id <0IBJ00H5WHVC3Y@linda-1.paradise.net.nz> for pthreads-win32@sources.redhat.com; Tue, 08 Feb 2005 00:42:48 +1300 (NZDT) Received: from [192.168.2.20] (203-79-66-6.adsl-wns.paradise.net.nz [203.79.66.6]) by smtp-2.paradise.net.nz (Postfix) with ESMTP id A03739E2A5 for ; Tue, 08 Feb 2005 00:42:47 +1300 (NZDT) Date: Mon, 07 Feb 2005 11:42:00 -0000 From: Will Bryant Subject: Re: localtime_r In-reply-to: <20050204115434.GE3172@cross> To: pthreads-win32@sources.redhat.com Message-id: <42075432.4010106@ecosm.com> Organization: eCOSM Limited MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-2 Content-transfer-encoding: 7bit User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) References: <20050204115434.GE3172@cross> X-SW-Source: 2005/txt/msg00011.txt.bz2 Keresztfalvi Laszlo wrote: >I've found that localtime_r() is a macro in pthread-win32 simply referencing >the localtime() function. According to the MSDN localtime() works just like >the UNIX version.. each call overwrites the static struct tm storage. > >Is this really thread safe? > > > Yes; it uses a thread-specific buffer on win32. So it's overwritten with every call in that thread. -- Will Bryant Systems Architect, eCOSM Limited Mobile +64 21 655 443 http://www.ecosm.com/