Use setitimer in timer_* fallbacks
CCurrently on GNU/Hurd the timer_* functions are not implemented;
check's configure detects that and switches to the replacements
functions in lib/, which use alarm for the timer. However, using
alarm does not allow a timeout precision more than 1 second (as also
written in the comments in lib/timer_settime.c), causing the failure
of the two tests check_check_export and check_check.
As a workaround, it is possible to get a better precision using the
POSIX function setitimer [1] (declared obsolescent, but still usable)
instead of alarm.
This change checks for the existence of setitimer, and in case it
exists uses it (with its ITIMER_REAL timer) in the replacement
timer_settime and timer_delete. Given they are implemented in the
Hurd, all the tests of check passes.
[1] http://pubs.opengroup.org/onlinepubs/
9699919799/functions/getitimer.html
Patch submitted by Pino Toscano, patch#49
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@759
64e312b2-a51f-0410-8e61-
82d0ca0eb02a