Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <000901c1d47a$82984380$0610a8c0@wyw> From: "Wu Yongwei" To: Subject: Re: cygwin1.dll bug in ftime (patch included) Date: Tue, 26 Mar 2002 11:58:00 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 OK, here is the patch for src/winsup/cygwin/times.cc: -------------------------------------------------------- --- times.cc.old Tue Mar 26 11:36:53 2002 +++ times.cc Tue Mar 26 11:53:42 2002 @@ -156,4 +156,5 @@ { static hires gtod; + static tzflag; LONGLONG now = gtod.usecs (false); if (now == (LONGLONG) -1) @@ -162,4 +163,15 @@ tv->tv_sec = now / 1000000; tv->tv_usec = now % 1000000; + + if (tz != NULL) + { + if (!tzflag) { + tzset(); + tzflag = 1; + } + tz->tz_minuteswest = _timezone / 60; + tz->tz_dsttime = _daylight; + } + return 0; } -------------------------------------------------------- I did not submit a patch because I did not think you will accept it. Writing the patch itself is easy: it was already there in an old CVS version. Or almost so. Notice that I do not always call tzset. My previous experience with MSVC indicates that calling tzset is costly. I am not sure of the case with Cygwin. However, it is just there for you to review. Best regards, Wu Yongwei --- Original Message from Christopher Faylor --- On Tue, Mar 26, 2002 at 10:45:32AM +0800, Wu Yongwei wrote: >Hope I am clear enough. I am arguing here for a BETTER Cygwin. I guess I wasn't clear enough. SUPPLY A PATCH TO FIX THE BEHAVIOR. If you want me, or anyone else to fix it, you'll undoubtedly have a long wait. Especially since you have now polarized me by arguing points when you could have been investigating the code and supplying a fix. No arguments in the world work better than an actual patch. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/