delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2015/06/26/07:36:54

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Message-ID: <558D3944.4070604@iki.fi>
Date: Fri, 26 Jun 2015 14:36:36 +0300
From: "Andris Pavenis (andris DOT pavenis AT iki DOT fi)" <djgpp AT delorie DOT com>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Problem with configure mktime() tests
Reply-To: djgpp AT delorie DOT com

This is a multi-part message in MIME format.
--------------010607070405030005070804
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Noticed that mktime() tests run from bash-2.05b configure script fails:
- goes into infinite loop when regenerated with autoconf-2.59 and gets 
interrupted after 60 seconds due to use of alarm() in the test
- fail also when generated by autoconf-2.68

See test program in attachment (configure generated by autoconf-2.68). 
Actual failing part of the test is
spring_forward_gap()

Andris


--------------010607070405030005070804
Content-Type: text/plain; charset=UTF-8;
 name="mktime_test.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="mktime_test.c"

LyogY29uZmRlZnMuaCAqLwojZGVmaW5lIFBBQ0tBR0VfTkFNRSAiYmFzaCIKI2RlZmluZSBQ
QUNLQUdFX1RBUk5BTUUgImJhc2giCiNkZWZpbmUgUEFDS0FHRV9WRVJTSU9OICIyLjA1YiIK
I2RlZmluZSBQQUNLQUdFX1NUUklORyAiYmFzaCAyLjA1YiIKI2RlZmluZSBQQUNLQUdFX0JV
R1JFUE9SVCAiYnVnLWJhc2hAZ251Lm9yZyIKI2RlZmluZSBQQUNLQUdFX1VSTCAiIgojZGVm
aW5lIFVTSU5HX0JBU0hfTUFMTE9DIDEKI2RlZmluZSBBTElBUyAxCiNkZWZpbmUgUFVTSERf
QU5EX1BPUEQgMQojZGVmaW5lIFJFU1RSSUNURURfU0hFTEwgMQojZGV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AgICAgIGlmICghIGJpZ3RpbWVfdGVzdCAoSU5UX01BWCkpCglyZXR1cm4g
MTsKICAgIH0KICByZXR1cm4gISAoaXJpeF82XzRfYnVnICgpICYmIHNwcmluZ19mb3J3YXJk
X2dhcCAoKSAmJiB5ZWFyXzIwNTBfdGVzdCAoKSk7Cn0K
--------------010607070405030005070804--

- Raw text -


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