X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ftime_h.m4;h=9852778f9a5db376afbc8b2174cfc67ef96cc01a;hb=7ef6c64e210ac0979d7e8ac69bc5b5208c2405ab;hp=6e6394fdc90033ebfc83b28b2ff7799eee79d817;hpb=0b88a15dca93414df75ff004811c8e2573d593e3;p=gnulib.git diff --git a/m4/time_h.m4 b/m4/time_h.m4 index 6e6394fdc..9852778f9 100644 --- a/m4/time_h.m4 +++ b/m4/time_h.m4 @@ -1,8 +1,8 @@ # Configure a more-standard replacement for . -# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2014 Free Software Foundation, Inc. -# serial 5 +# serial 8 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -23,12 +23,9 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY], AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) gl_NEXT_HEADERS([time.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) - - dnl Ensure the type pid_t gets defined. - AC_REQUIRE([AC_TYPE_PID_T]) ]) -dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared +dnl Check whether 'struct timespec' is declared dnl in time.h, sys/time.h, or pthread.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], @@ -109,4 +106,13 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) + + dnl Hack so that the time module doesn't depend on the sys_time module. + dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent. + : ${GNULIB_GETTIMEOFDAY=0}; AC_SUBST([GNULIB_GETTIMEOFDAY]) + dnl Second, it's OK to not use GNULIB_PORTCHECK for REPLACE_GMTIME + dnl and REPLACE_LOCALTIME, as portability to Solaris 2.6 and earlier + dnl is no longer a big deal. + REPLACE_GMTIME=0; AC_SUBST([REPLACE_GMTIME]) + REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME]) ])