patch for libgcrypt 1.2.0 on pthreads

Robey Pointer robey at danger.com
Wed Jun 30 19:21:02 CEST 2004


Werner Koch wrote:

>On Tue, 29 Jun 2004 10:24:37 -0700, Robey Pointer said:
>
>  
>
>>I won't try to defend gcc.  But it gives these errors without the patch:
>>    
>>
>
>  
>
>>TLSStream.cpp: In function `int gcry_pthread_mutex_init(void**)':
>>TLSStream.cpp:18: error: invalid conversion from `void*' to
>>`pthread_mutex_t*'
>>    
>>
>
>You are using C++ and not C.
>
>C++ is a different language than C - you have to make sure that your
>C++ code uses plain C code correctly.  The only thing we have made
>sure is that the link conventions of Libgcrypt won't conflict with
>C++.
>
>GCRY_THREAD_OPTION_PTHREAD_IMPL is a convenience macro.  Yo should use
>your own implementation with C++.  The manual describes how to do it.
>  
>

That's okay.  I was mostly passing the patch up as a convenience -- 
we're okay with using our forked version with it fixed the right way.

You probably want to remove the lines saying 'extern "C"' at the top of 
gcrypt.h to avoid giving the impression that you support C++ usage.

robey




More information about the Gcrypt-devel mailing list