Alain Guibert <[EMAIL PROTECTED]> writes:

>  On Saturday, May 7, 2005 at 6:56:53 PM +0200, Hrvoje Niksic wrote:
>
>> I was lead to believe that it is quite reasonable to set tm_isdst to
>> zero before calling mktime. In fact, the logic in mktime_from_utc,
>> along with setting tm_isdst to zero, was explicitly written to support
>> discontinuities at DST transition points -- see Roger Beeman's
>> changelog entry from 2001-04-25.
>
> And comments in code, which are very detailed, thanks. Is behaviour
> of mktime() with limit false input values defined in standards?

I don't know, but what would be the point of mktime if it didn't allow
setting things in the struct tm it accepts?

> What about another method: putenv(TZ=GMT0), tzset(), mktime(), reset
> TZ to previous state, tzset() again. Not portable?

That sounds at least as non-portable as the current method, and it
might be slow in addition.  Have you tried that method?  Does it help
in your case?

I find it strange that the cmpt.c mktime produces garbage when that
version is taken from glibc.

> BTW unrelated I tried building alpha-3 on another machine with more
> or less same Debian Bo setup, and got this error:
>
> | gcc -I. -I. -I/opt/include   -DHAVE_CONFIG_H 
> -DSYSTEM_WGETRC=\"/usr/local/etc/wgetrc\" 
> -DLOCALEDIR=\"/usr/local/share/locale\" -O2 -Wall -Wno-implicit -c init.c
> | init.c:214: structure has no member named `random_file'
> | init.c:214: initializer element for `commands[76].place' is not constant
> | make[1]: *** [init.o] Error 1
> | make[1]: Leaving directory `/tmp/wget-1.10-alpha3/src'
> | make: *** [src] Error 2

This has been fixed in CVS; the fix is to wrap the offending init.c
line in #ifdef HAVE_SSL.

Reply via email to