diff options
author | Werner Koch <wk@gnupg.org> | 2014-01-09 19:14:09 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-01-24 16:01:25 +0100 |
commit | ff91ec934ed52294cddcd7dcfacc04721a0487bf (patch) | |
tree | 5a793224d62b52d028348df1ab11f96df27b32e3 /configure.ac | |
parent | 24e65d715812cea28732397870cb1585b8435521 (diff) | |
download | libgcrypt-ff91ec934ed52294cddcd7dcfacc04721a0487bf.tar.gz |
tests: Add a test for the internal locking
* src/global.c (external_lock_test): New.
(_gcry_vcontrol): Call new function with formerly reserved code 61.
* tests/t-common.h: New. Taken from current libgpg-error.
* tests/t-lock.c: New. Based on t-lock.c from libgpg-error.
* configure.ac (HAVE_PTHREAD): Set macro to 1 if defined.
(AC_CHECK_FUNCS): Check for flockfile.
* tests/Makefile.am (tests_bin): Add t-lock.
(noinst_HEADERS): Add t-common.h
(LDADD): Move value to ...
(default_ldadd): new.
(t_lock_LDADD): New.
--
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit fa42c61a84996b6a7574c32233dfd8d9f254d93a)
Resolved conflicts:
* src/ath.c: Remove as not anymore used in 1.7.
* tests/Makefile.am: Merge.
Changes:
* src/global.c (external_lock_test): Use the gpgrt function
for locking.
Changed subject because here we are only adding the test case.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 1d5027ad..4d16fc69 100644 --- a/configure.ac +++ b/configure.ac @@ -731,7 +731,7 @@ AC_SUBST(PTH_LIBS) # AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes) if test "$have_pthread" = yes; then - AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.]) + AC_DEFINE(HAVE_PTHREAD, 1 ,[Define if we have pthread.]) fi @@ -1364,7 +1364,7 @@ AC_CHECK_FUNCS(strtoul memmove stricmp atexit raise) # Other checks AC_CHECK_FUNCS(strerror rand mmap getpagesize sysconf waitpid wait4) AC_CHECK_FUNCS(gettimeofday getrusage gethrtime clock_gettime syslog) -AC_CHECK_FUNCS(fcntl ftruncate) +AC_CHECK_FUNCS(fcntl ftruncate flockfile) GNUPG_CHECK_MLOCK |