delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/03/25/03:50:46

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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: <000e01c1d3d9$f0718520$0610a8c0@wyw>
From: "Wu Yongwei" <adah AT netstd DOT com>
To: <cygwin AT cygwin DOT com>
Subject: Re: cygwin1.dll bug in ftime
Date: Mon, 25 Mar 2002 16:48:49 +0800
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300

This is from the glibc documentation (is glibc meaningless to the Cygwin
project?):

Function: int gettimeofday (struct timeval *tp, struct timezone *tzp)
The gettimeofday function returns the current calendar time as the elapsed
time since the epoch in the struct timeval structure indicated by tp. (see
section 21.2 Elapsed Time for a description of struct timespec). Information
about the time zone is returned in the structure pointed at tzp. If the tzp
argument is a null pointer, time zone information is ignored. The return
value is 0 on success and -1 on failure. The following errno error condition
is defined for this function:
  ENOSYS   The operating system does not support getting time zone
information, and tzp is not a null pointer. The GNU operating system does
not support using struct timezone to represent time zone information; that
is an obsolete feature of 4.3 BSD. Instead, use the facilities described in
21.4.8 Functions and Variables for Time Zones.

I do not understand you quite clearly. And I want to emphasize again that IT
USED TO WORK! Do I need to write patches so that the code is unpatched?

Best regards,

Wu Yongwei

--- Original Message from Christopher Faylor ---

On Mon, Mar 25, 2002 at 10:45:09AM +0800, Wu Yongwei wrote:
>Thank you for your response, and I do see some reasonableness in your
>message. However, I can hardly calm down unless someone can answer:
>
>1) Why should Cygwin break both backward compatibility with older versions
>and compatibility Linux?

Basic meanness.

>2) If ftime does not need to get timezone information, how about
>gettimeofday?

Look again.  I quoted the Single Unix Specification for both gettimeofday
and
ftime.

>I did not read the documentation you quoted (where is it?),
>but no documentation I read about gettimeofday states that it should
>ignore the timezone argument.

http://www.opengroup.org/onlinepubs/7908799/index.html

>My program used to run on both Cygwin and Linux. But now I even do not know
>how to make it behave like before except that I try to find an old version
>of Cygwin and revert to it. Or I could use some ugly macros to define
>_timezone as timezone in some cases and use _timezone: Cygwin recognizes
>_timezone as a valid global variable while Linux recognizes only timezone.
>Anybody enlightens me to show me the right way to go? Or should I abandon
>running international time-related program on Cygwin in a cross-platform
>way?

You could always submit a 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019