Mail Archives: cygwin/2002/03/25/03:50:46
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 -