mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
common: New function gnupg_usleep.
* configure.ac (HAVE_NANOSLEEP): Test for nanosleep. * common/sysutils.c: Always include time.h. (gnupg_usleep): New. -- This function has been compiled from nPth and Libassuan. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
3b6b8fe32a
commit
ad491ceec6
3 changed files with 56 additions and 1 deletions
10
configure.ac
10
configure.ac
|
@ -1387,6 +1387,16 @@ AC_CHECK_FUNCS([memicmp stpcpy strsep strlwr strtoul memmove stricmp strtol \
|
|||
flockfile funlockfile getpwnam getpwuid \
|
||||
getenv inet_pton strpbrk])
|
||||
|
||||
# On some systems (e.g. Solaris) nanosleep requires linking to librl.
|
||||
# Given that we use nanosleep only as an optimization over a select
|
||||
# based wait function we want it only if it is available in libc.
|
||||
_save_libs="$LIBS"
|
||||
AC_SEARCH_LIBS([nanosleep], [],
|
||||
[AC_DEFINE(HAVE_NANOSLEEP,1,
|
||||
[Define to 1 if you have the `nanosleep' function in libc.])])
|
||||
LIBS="$_save_libs"
|
||||
|
||||
|
||||
# See whether libc supports the Linux inotify interface
|
||||
case "${host}" in
|
||||
*-*-linux*)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue