summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2009-01-22 15:06:28 +0000
committerWerner Koch <wk@gnupg.org>2009-01-22 15:06:28 +0000
commit4ca662e91bdae9e49e50423e29bdb59e853fbb9b (patch)
tree4e88d5f5a01b2f69227e33344d7764fce603f300
parent94f821b4b1b8bf8e432b75074952df1fed57a1d5 (diff)
downloadlibassuan-4ca662e91bdae9e49e50423e29bdb59e853fbb9b.tar.gz
Tweak test for nanosleep.
-rw-r--r--ChangeLog4
-rw-r--r--NEWS2
-rw-r--r--configure.ac13
-rw-r--r--src/assuan-connect.c4
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@g10code.com>
+
+ * configure.ac: Check for nanoleep only in libc.
+
2008-11-03 Marcus Brinkmann <marcus@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)