unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: "Charles A. Roelli" <charles@aurox.ch>
Cc: 27736@debbugs.gnu.org, esq@lawlist.com,
	Gnulib bugs <bug-gnulib@gnu.org>,
	npostavs@users.sourceforge.net
Subject: bug#27736: OSX 10.6.8: Building from master branch fails.
Date: Wed, 28 Mar 2018 14:29:38 -0700	[thread overview]
Message-ID: <805d95e1-bfc0-bb40-ced7-c10bb5a7256e__27498.1558010497$1522272494$gmane$org@cs.ucla.edu> (raw)
In-Reply-To: <m2605g2fpv.fsf@aurox.ch>

[-- Attachment #1: Type: text/plain, Size: 849 bytes --]

On 03/28/2018 11:54 AM, Charles A. Roelli wrote:
>
> -            time_t t = -67768038400665600;
> +            time_t t = -67768038400666600;

Thanks, I did that in Gnulib and propagated the result into Emacs master 
(see attached patch).

> And then I got the following in the output of ./configure:
>
>    checking whether localtime loops forever near extrema... ./configure: line 30561: 35760 Alarm clock             TZ=QQQ0 ./conftest$EXEEXT

Thanks for mentioning that; I attempted to suppress the "Alarm clock" 
stuff in the attached patch too.

> I will try to find the exact boundary of the hang again.  And the hang
> is timezone-dependent, so that complicates things too.

I think we should be OK here, as the test case uses UTC so that it is 
reproducible. The use of UTC could explain why the abovementioned 
numeric change was needed.

[-- Attachment #2: 0001-time_rz-fix-workaround-for-Mac-OS-X-10.6-infloop.patch --]
[-- Type: text/x-patch, Size: 2448 bytes --]

From ad52c652a64ebe3523437fb9bb714f99c1ffa9e6 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Wed, 28 Mar 2018 12:45:45 -0700
Subject: [PATCH] time_rz: fix workaround for Mac OS X 10.6 infloop

Problems reported by Charles A. Roelli (Bug#27736#117).
* m4/time_rz.m4 (gl_TIME_RZ): Use a slightly different timestamp.
Also, discard output, which clutters the 'configure' log.
---
 ChangeLog     | 7 +++++++
 m4/time_rz.m4 | 9 +++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 74f3bfc71..bd8df9a1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-03-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+	time_rz: fix workaround for Mac OS X 10.6 infloop
+	Problems reported by Charles A. Roelli (Bug#27736#117).
+	* m4/time_rz.m4 (gl_TIME_RZ): Use a slightly different timestamp.
+	Also, discard output, which clutters the 'configure' log.
+
 2018-03-27  Paul Eggert  <eggert@cs.ucla.edu>
 
 	havelib: port to Solaris 10 /bin/sh
diff --git a/m4/time_rz.m4 b/m4/time_rz.m4
index af9fa02b5..555570625 100644
--- a/m4/time_rz.m4
+++ b/m4/time_rz.m4
@@ -13,8 +13,8 @@ AC_DEFUN([gl_TIME_RZ],
   AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
   AC_REQUIRE([AC_STRUCT_TIMEZONE])
 
-  # Mac OS X 10.6 loops forever with some time_t values less
-  # than -67768038400665599.  See Bug#27706, Bug#27736, and
+  # Mac OS X 10.6 loops forever with some time_t values.
+  # See Bug#27706, Bug#27736, and
   # https://lists.gnu.org/r/bug-gnulib/2017-07/msg00142.html
   AC_CACHE_CHECK([whether localtime loops forever near extrema],
     [gl_cv_func_localtime_infloop_bug],
@@ -26,7 +26,7 @@ AC_DEFUN([gl_TIME_RZ],
             #include <unistd.h>
             #include <time.h>
           ]], [[
-            time_t t = -67768038400665600;
+            time_t t = -67768038400666600;
             struct tm *tm;
             char *tz = getenv ("TZ");
             if (! (tz && strcmp (tz, "QQQ0") == 0))
@@ -36,7 +36,8 @@ AC_DEFUN([gl_TIME_RZ],
             /* Use TM and *TM to suppress over-optimization.  */
             return tm && tm->tm_isdst;
           ]])],
-       [TZ=QQQ0 ./conftest$EXEEXT || gl_cv_func_localtime_infloop_bug=yes],
+       [(TZ=QQQ0 ./conftest$EXEEXT) >/dev/null 2>&1 ||
+           gl_cv_func_localtime_infloop_bug=yes],
        [],
        [gl_cv_func_localtime_infloop_bug="guessing no"])])
   if test "$gl_cv_func_localtime_infloop_bug" = yes; then
-- 
2.14.3


  reply	other threads:[~2018-03-28 21:29 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 15:18 bug#27736: OSX 10.6.8: Building from master branch fails Keith David Bershatsky
2017-07-17 15:29 ` Noam Postavsky
2017-07-17 16:10 ` Keith David Bershatsky
2017-07-17 16:38   ` Noam Postavsky
2017-07-17 18:05 ` Keith David Bershatsky
2017-07-17 18:48   ` Noam Postavsky
2017-07-17 19:43 ` Alan Third
2017-07-17 20:48   ` Charles A. Roelli
2017-07-17 21:37 ` Keith David Bershatsky
2017-07-18  5:08   ` Charles A. Roelli
2017-07-18  6:56 ` Keith David Bershatsky
2017-07-18 14:34   ` Eli Zaretskii
2017-07-18 16:07 ` Keith David Bershatsky
2017-07-18 18:42   ` Charles A. Roelli
2017-07-19 19:58     ` Charles A. Roelli
2017-07-19 22:48       ` Alan Third
2017-07-23  9:28         ` Charles A. Roelli
2017-07-24 15:50           ` Glenn Morris
2017-07-30 16:32             ` Charles A. Roelli
2017-11-05 18:03 ` Keith David Bershatsky
2017-11-05 18:15   ` Noam Postavsky
2017-11-05 20:01 ` Keith David Bershatsky
2017-11-06  2:20 ` Keith David Bershatsky
2017-11-06 19:41   ` Charles A. Roelli
2017-11-06 20:41     ` Charles A. Roelli
2017-11-07  2:13 ` Keith David Bershatsky
2017-11-07 20:20   ` Charles A. Roelli
2017-11-08  5:18 ` Keith David Bershatsky
2017-11-08 19:55   ` Charles A. Roelli
2018-03-27 21:19 ` Paul Eggert
2018-03-28 17:15   ` Glenn Morris
2018-03-28 19:02     ` Charles A. Roelli
2018-03-28 19:33     ` Paul Eggert
2018-03-28 22:08       ` Paul Eggert
2018-03-28 18:54   ` Charles A. Roelli
2018-03-28 21:29     ` Paul Eggert [this message]
     [not found]     ` <805d95e1-bfc0-bb40-ced7-c10bb5a7256e@cs.ucla.edu>
2018-03-31 15:02       ` Charles A. Roelli
     [not found]       ` <m21sg02sr4.fsf@aurox.ch>
2018-04-01 20:32         ` Paul Eggert
     [not found] <m2a800ve9b.wl%esq@lawlist.com>
2017-11-05 20:54 ` Charles A. Roelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='805d95e1-bfc0-bb40-ced7-c10bb5a7256e__27498.1558010497$1522272494$gmane$org@cs.ucla.edu' \
    --to=eggert@cs.ucla.edu \
    --cc=27736@debbugs.gnu.org \
    --cc=bug-gnulib@gnu.org \
    --cc=charles@aurox.ch \
    --cc=esq@lawlist.com \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).