[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 14:21:34 +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 11:25 AM, Simon Josefsson <address@hidden> wrote:
>
>> src/cli.c does not include stdint.h though. Could it be that simple?
>> I've pushed a patch. Vincent, please try adding '#include <stdint.h>'
>> at the top of src/cli.c after the '#include <config.h>' line.
>
> Indeed, but I saw no point to include it for only one occurrence.
> Using the uint*_t types is better though.
Looking more closely at this code made me change my mind though. The
declaration is:
uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE];
and the variable is used like this:
get_keyid (keyid, info.pgp_subkey);
...
gnutls_pcert_import_openpgp_raw (&pgp_crt, &data,
GNUTLS_OPENPGP_FMT_BASE64, info.pgp_subkey!=NULL?keyid:NULL, 0);
...
gnutls_openpgp_privkey_set_preferred_key_id (tmp_pgp_key, keyid)
Those functions has prototypes like this:
int get_keyid (gnutls_openpgp_keyid_t keyid, const char *str)
int gnutls_pcert_import_openpgp_raw (gnutls_pcert_st *pcert,
const gnutls_datum_t* cert,
gnutls_openpgp_crt_fmt_t format,
gnutls_openpgp_keyid_t keyid,
unsigned int flags)
int
gnutls_openpgp_privkey_set_preferred_key_id (gnutls_openpgp_privkey_t key,
const gnutls_openpgp_keyid_t
keyid)
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];
I've made this change now... (keeping stdint.h, it doesn't hurt that
much I think)
/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 <=
- 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