Jim Meyering <j...@meyering.net> wrote: > Bruno Haible <br...@clisp.org> wrote: > ... >>> It looks to me like the change below is equivalent to yours, >> >> Ah, I see now what you mean. Fine with me. ...
Hi Bruno, I've reworked those patches accordingly, but didn't test on a MacOS X system. Since your name is on them, I'll wait until you acknowledge before pushing. >From 6bfdd76f3f2e3b03be407dcfab7a231259d23d15 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Sun, 4 Jan 2009 21:31:47 +0100 Subject: [PATCH 1/2] mktime: skip configure test (fail it) for apple universal builds * m4/mktime.m4 (AC_FUNC_MKTIME): Require gl_MULTIARCH. In Apple universal builds, assume that mktime does not work. * modules/mktime (Depends-on): Add multiarch. --- ChangeLog | 7 +++++++ m4/mktime.m4 | 11 +++++++++-- modules/mktime | 1 + 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0cebe87..0dd0b38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-01-04 Bruno Haible <br...@clisp.org> + + mktime: skip configure test (fail it) for apple universal builds + * m4/mktime.m4 (AC_FUNC_MKTIME): Require gl_MULTIARCH. In Apple + universal builds, assume that mktime does not work. + * modules/mktime (Depends-on): Add multiarch. + 2009-01-04 Jim Meyering <meyer...@redhat.com> remove duplicate inclusion of <stdio.h> diff --git a/m4/mktime.m4 b/m4/mktime.m4 index 5faf393..ef4c240 100644 --- a/m4/mktime.m4 +++ b/m4/mktime.m4 @@ -1,5 +1,5 @@ -#serial 13 -dnl Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. +#serial 14 +dnl Copyright (C) 2002, 2003, 2005-2007, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,6 +15,13 @@ dnl From Jim Meyering. AC_DEFUN([AC_FUNC_MKTIME], [AC_CHECK_HEADERS_ONCE(unistd.h) AC_CHECK_FUNCS_ONCE(alarm) +AC_REQUIRE([gl_MULTIARCH]) +if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple MacOS X platforms. + # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode. + # But we need a configuration result that is valid in both modes. + ac_cv_func_working_mktime=no +fi AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime, [AC_RUN_IFELSE([AC_LANG_SOURCE( [[/* Test program from Paul Eggert and Tony Leneis. */ diff --git a/modules/mktime b/modules/mktime index 4846774..6a3ae7f 100644 --- a/modules/mktime +++ b/modules/mktime @@ -6,6 +6,7 @@ lib/mktime.c m4/mktime.m4 Depends-on: +multiarch time_r configure.ac: -- 1.6.1.94.g9388 >From 3826bbfa68aade7230361ea023f0a205751c7a95 Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Sun, 4 Jan 2009 21:42:34 +0100 Subject: [PATCH 2/2] nanosleep: skip configure test (fail it) for apple universal builds * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_MULTIARCH. In Apple universal builds, assume that nanosleep does not work. * modules/nanosleep (Depends-on): Add multiarch. --- ChangeLog | 5 +++++ m4/nanosleep.m4 | 14 +++++++++++--- modules/nanosleep | 1 + 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0dd0b38..8899edb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-01-04 Bruno Haible <br...@clisp.org> + nanosleep: skip configure test (fail it) for apple universal builds + * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_MULTIARCH. In Apple + universal builds, assume that nanosleep does not work. + * modules/nanosleep (Depends-on): Add multiarch. + mktime: skip configure test (fail it) for apple universal builds * m4/mktime.m4 (AC_FUNC_MKTIME): Require gl_MULTIARCH. In Apple universal builds, assume that mktime does not work. diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4 index d5248a7..a6ac544 100644 --- a/m4/nanosleep.m4 +++ b/m4/nanosleep.m4 @@ -1,11 +1,10 @@ -#serial 25 +#serial 26 dnl From Jim Meyering. dnl Check for the nanosleep function. dnl If not found, use the supplied replacement. -dnl -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008 +# Copyright (C) 1999-2001, 2003-2009 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -29,6 +28,15 @@ AC_DEFUN([gl_FUNC_NANOSLEEP], [test "$ac_cv_search_nanosleep" = "none required" || LIB_NANOSLEEP=$ac_cv_search_nanosleep]) + AC_REQUIRE([gl_MULTIARCH]) + if test $APPLE_UNIVERSAL_BUILD = 1; then + # A universal build on Apple MacOS X platforms. + # The test result would be 'no (mishandles large arguments)' in 64-bit mode + # but 'yes' in 32-bit mode. But we need a configuration result that is + # valid in both modes. + gl_cv_func_nanosleep='no (mishandles large arguments)' + fi + AC_CACHE_CHECK([for working nanosleep], [gl_cv_func_nanosleep], [ diff --git a/modules/nanosleep b/modules/nanosleep index 61b4527..ef10653 100644 --- a/modules/nanosleep +++ b/modules/nanosleep @@ -9,6 +9,7 @@ Depends-on: clock-time extensions gettime +multiarch sigaction stdbool sys_select -- 1.6.1.94.g9388