From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wolfgang Jenkner Newsgroups: gmane.emacs.bugs Subject: bug#19874: 25.0.50; encode-time not working as expected Date: Thu, 26 Feb 2015 20:00:18 +0100 Message-ID: <85mw405whp.fsf@iznogoud.viz> References: <54EE0959.5080901@cs.ucla.edu> <86sidta5ak.fsf@chateau.d.if> <54EED638.8070604@cs.ucla.edu> <85385s94c9.fsf@iznogoud.viz> <54EF5ECD.2030909@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424977286 12619 80.91.229.3 (26 Feb 2015 19:01:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Feb 2015 19:01:26 +0000 (UTC) Cc: 19874@debbugs.gnu.org, Ashish SHUKLA To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 26 20:01:15 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YR3gQ-0006Qx-FB for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Feb 2015 20:01:14 +0100 Original-Received: from localhost ([::1]:60398 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR3gP-0000GX-I6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 26 Feb 2015 14:01:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR3gK-0000Cu-6Y for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2015 14:01:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YR3gE-0007pJ-3f for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2015 14:01:08 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YR3gE-0007p9-1a for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2015 14:01:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YR3gD-0003EJ-Kb for bug-gnu-emacs@gnu.org; Thu, 26 Feb 2015 14:01:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <86vbj35m3n.fsf@chateau.d.if> Resent-From: Wolfgang Jenkner Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Feb 2015 19:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19874 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19874-submit@debbugs.gnu.org id=B19874.142497723012370 (code B ref 19874); Thu, 26 Feb 2015 19:01:01 +0000 Original-Received: (at 19874) by debbugs.gnu.org; 26 Feb 2015 19:00:30 +0000 Original-Received: from localhost ([127.0.0.1]:58949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YR3fi-0003DR-1o for submit@debbugs.gnu.org; Thu, 26 Feb 2015 14:00:30 -0500 Original-Received: from b2bfep14.mx.upcmail.net ([62.179.121.59]:60820) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YR3fe-0003D9-3E for 19874@debbugs.gnu.org; Thu, 26 Feb 2015 14:00:27 -0500 Original-Received: from edge11.upcmail.net ([192.168.13.81]) by b2bfep14.mx.upcmail.net (InterMail vM.8.01.05.11 201-2260-151-128-20120928) with ESMTP id <20150226190019.MWHX11972.b2bfep14-int.chello.at@edge11.upcmail.net> for <19874@debbugs.gnu.org>; Thu, 26 Feb 2015 20:00:19 +0100 Original-Received: from iznogoud.viz ([91.119.99.97]) by edge11.upcmail.net with edge id x70J1p00c264PVX0B70JeC; Thu, 26 Feb 2015 20:00:19 +0100 X-SourceIP: 91.119.99.97 Original-Received: from wolfgang by iznogoud.viz with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YR3fW-0000Yf-DJ; Thu, 26 Feb 2015 20:00:18 +0100 User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (berkeley-unix) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99847 Archived-At: On Thu, Feb 26 2015, Paul Eggert wrote: > On 02/26/2015 05:42 AM, Wolfgang Jenkner wrote: >>> Is 'configure' setting APPLE_UNIVERSAL_BUILD to 1, or to 0? You can >>> >tell by looking for APPLE_UNIVERSAL_BUILD in lib/Makefile. >> What has this to do with FreeBSD? >> > > If 'configure' mistakenly set APPLE_UNIVERSAL_BUILD to 1, it would > cause 'configure' to guess that mktime was buggy, and I was worried > that this would have caused the problem. However, this was a red > herring, as you've established that FreeBSD localtime and/or mktime is > indeed buggy in this area, so 'configure' appears to be doing the > right thing in rejecting FreeBSD mktime. Thanks for the explanation! However, there's no indication that mktime is buggy (all tests pass when adjusting time_t_min, time_t_max), while localtime (and localtime_r) certainly is. Nevertheless, the configure test causes mktime to be replaced but not localtime_r, which is actually used in emacs. If I may say so this seems a bit like pulling the wrong tooth ;-) > It also appears to be the case that FreeBSD 10.1's implementation of > putenv is buggy, and that this is what is breaking Emacs's time code > (as Emacs uses putenv to modify the TZ environment variable), but we > haven't gotten to the bottom of that yet. I'll try to write a little > test program to narrow it down. But putenv is already replaced on my 10-STABLE system (and emacs trunk): $ nm src/emacs | grep putenv 00000000005b85a0 T rpl_putenv 0000000000527150 T xputenv Ah, and the OP's example actually seems to give the expected result here (my timezone is Europe/Vienna): (encode-time 44 42 6 15 2 2015 0 nil 0) => (21728 16356)