[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compilation error with gnutls 2.12.10 a,d mingw-w64
From: |
Simon Josefsson |
Subject: |
Re: compilation error with gnutls 2.12.10 a,d mingw-w64 |
Date: |
Mon, 10 Oct 2011 15:14:44 +0200 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux) |
Nikos Mavrogiannopoulos <address@hidden> writes:
> On Mon, Oct 10, 2011 at 2:21 PM, Simon Josefsson <address@hidden> wrote:
>
>> So the proper type to use seems to be gnutls_openpgp_keyid_t instead of
>> uint8_t/unsigned char. It is declared like this:
>> #define GNUTLS_OPENPGP_KEYID_SIZE 8
>> typedef unsigned char gnutls_openpgp_keyid_t[GNUTLS_OPENPGP_KEYID_SIZE];
>
> This is wrong! gnutls_openpgp_keyid_t with the above typedef is just a
> pointer type meaning it has 4 bytes in 32-bit systems. I made the
> definition like that to make clear to the caller that 8-bytes should
> be allocated, but it seems this obscure typedef is confusing. It might
> be better to be replaced with a simple pointer type.
Heh, good point. Lack of coffee. So I think the proper solution then
really is to duplicate the typedef'ed definition like this:
unsigned char keyid[GNUTLS_OPENPGP_KEYID_SIZE];
With the rationale that if the library doesn't use uint8_t for this
type, the tool shouldn't either...
Pushed.
/Simon
- compilation error with gnutls 2.12.10 a,d mingw-w64, Vincent Torri, 2011/10/08
- Re: compilation error with gnutls 2.12.10 a,d mingw-w64, Nikos Mavrogiannopoulos, 2011/10/08
- Re: compilation error with gnutls 2.12.10 a,d mingw-w64, Simon Josefsson, 2011/10/10
- Re: compilation error with gnutls 2.12.10 a,d mingw-w64, Nikos Mavrogiannopoulos, 2011/10/10
- Re: compilation error with gnutls 2.12.10 a,d mingw-w64, Simon Josefsson, 2011/10/10
- Re: compilation error with gnutls 2.12.10 a,d mingw-w64, Nikos Mavrogiannopoulos, 2011/10/10
- Re: compilation error with gnutls 2.12.10 a,d mingw-w64,
Simon Josefsson <=