[Pkg-gnupg-commit] [libassuan] 238/437: Tweak test for nanosleep.

Eric Dorland eric at moszumanska.debian.org
Fri May 22 05:33:48 UTC 2015


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository libassuan.

commit 4ca662e91bdae9e49e50423e29bdb59e853fbb9b
Author: Werner Koch <wk at gnupg.org>
Date:   Thu Jan 22 15:06:28 2009 +0000

    Tweak test for nanosleep.
---
 ChangeLog            |  4 ++++
 NEWS                 |  2 +-
 configure.ac         | 13 ++++++++++++-
 src/assuan-connect.c |  4 ++--
 4 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c8137de..e7d5faf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-01-22  Werner Koch  <wk at g10code.com>
+
+	* configure.ac: Check for nanoleep only in libc.
+
 2008-11-03  Marcus Brinkmann  <marcus at g10code.de>
 
 	* tests/fdpassing.c (register_commands): Add missing initializer
diff --git a/NEWS b/NEWS
index 33ba58a..1d96c89 100644
--- a/NEWS
+++ b/NEWS
@@ -11,7 +11,7 @@ Noteworthy changes in version 1.0.5 (2008-05-25)
 
  * Minor fixes.
 
- * Build library for GNU/LInux as PIC.
+ * Build library for GNU/Linux as PIC.
 
 
 Noteworthy changes in version 1.0.4 (2007-12-12)
diff --git a/configure.ac b/configure.ac
index 7feac93..c8f493d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -208,9 +208,20 @@ fi
 AM_CONDITIONAL(USE_DESCRIPTOR_PASSING, test "$use_descriptor_passing" = "yes")
 
 
+#
 # Checks for library functions.
+#
+AC_CHECK_FUNCS([flockfile funlockfile])
+
+# 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"
 
-AC_CHECK_FUNCS([flockfile funlockfile nanosleep])
 
 # Check for funopen
 AC_CHECK_FUNCS(funopen)
diff --git a/src/assuan-connect.c b/src/assuan-connect.c
index 1477a24..2106ac3 100644
--- a/src/assuan-connect.c
+++ b/src/assuan-connect.c
@@ -58,8 +58,8 @@ assuan_get_pid (assuan_context_t ctx)
 
 
 #ifndef HAVE_W32_SYSTEM
-/* Return user credentials. PID, UID and GID amy be gived as NULL if
-   you are not interested in this value.  For getting the pid of the
+/* Return user credentials. PID, UID and GID may be given as NULL if
+   you are not interested in a value.  For getting the pid of the
    peer the assuan_get_pid is usually better suited. */
 assuan_error_t
 assuan_get_peercred (assuan_context_t ctx, pid_t *pid, uid_t *uid, gid_t *gid)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git



More information about the Pkg-gnupg-commit mailing list