Home GnuPG

tests/t-kdf: few changes to pthread example and fix win32/win64 builds

Description

tests/t-kdf: few changes to pthread example and fix win32/win64 builds

* src/gcrypt.h.in (gcry_kdf_thread_ops_t): New based on
'struct gcry_kdf_thread_ops'.
(gcry_kdf_compute): Use 'gcry_kdf_thread_ops_t' instead of
'struct gcry_kdf_thread_ops'.
* tests/Makefile.am: Define 't_kdf_LDADD' and 't_kdf_CFLAGS' on
win32/win64 target too.
* tests/t-kdf.c (pthread_jobs_launch_job): Set 'oldest_thread_idx' on
first thread creation.
(wait_all_jobs_completion): Reset 'oldest_thread_idx' to -1.
(my_kdf_derive): Merge HAVE_PTHREAD ifdefs; Initialize 'oldest_thread_idx'
to -1.

Windows build was not working because of missing HAVE_PTHREAD in
't-kdf.c' and LDADD/CFLAGS issue in 'Makefile.am'.

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Jan 28 2022, 6:17 PM
Parents
rC254fb14044cf: kdf: Change new KDF API.
Branches
Unknown
Tags
Unknown