Mercurial > gnulib
view m4/timer_time.m4 @ 17363:5a51fb7777a9
sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin
Problem reported by Marco Atzeri in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00000.html>.
* lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]:
Simply delegate to the system <sys/select.h> in this case too.
Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only
if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to
be needed on Solaris either.
* lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]:
Simply delgate to the system <sys/time.h> in this case.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 19 Mar 2013 09:08:47 -0700 |
parents | e542fd46ad6f |
children | 344018b6e5d7 |
line wrap: on
line source
# timer_time.m4 serial 2 dnl Copyright (C) 2011-2013 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. # Check for timer_settime, and set LIB_TIMER_TIME. AC_DEFUN([gl_TIMER_TIME], [ dnl Based on clock_time.m4. See details there. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_THREADLIB]) LIB_TIMER_TIME= AC_SUBST([LIB_TIMER_TIME]) gl_saved_libs=$LIBS AC_SEARCH_LIBS([timer_settime], [rt posix4], [test "$ac_cv_search_timer_settime" = "none required" || LIB_TIMER_TIME=$ac_cv_search_timer_settime]) dnl GLIBC uses threads to emulate posix timers when kernel support dnl is not available (like Linux < 2.6 or when used with kFreeBSD) dnl Now the pthread lib is linked automatically in the normal case, dnl but when linking statically, it needs to be explicitly specified. AC_EGREP_CPP([Thread], [ #include <features.h> #ifdef __GNU_LIBRARY__ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || (__GLIBC__ > 2)) \ && !defined __UCLIBC__ Thread emulation available #endif #endif ], [LIB_TIMER_TIME="$LIB_TIMER_TIME $LIBMULTITHREAD"]) AC_CHECK_FUNCS([timer_settime]) LIBS=$gl_saved_libs ])