GnuPG 2.1.0 "modern" released

Werner Koch wk at
Mon Nov 24 12:31:12 CET 2014

On Sat, 22 Nov 2014 16:46, aixtools at said:
> Same question: who to submit bug too? but posting here is also okay.

> "../src/mpi.h", line 292.16: 1506-343 (S) Redeclaration of
> _gcry_mpi_ec_set_mpi differs from previous declaration on line 423 of
> "../src/gcrypt-int.h".

Oh what picky.  We have 

  gpg_err_code_t foo ()


  gpg_error_t    foo ()

The first is an enum and the second is an unsigned int.  According to

  Since the compiler treats enumeration variables and constants as
  integer types, you can freely mix the values of different enumerated
  types, regardless of type compatibility. Compatibility between an
  enumerated type and the integer type that represents it is controlled
  by compiler options and related pragmas.

So it should not complain.  However, this showed that there is some cruft
in the headers.  I fixed that in master.

You may remove the duplicated prototypes from src/gcrypt-int.h.
Something like:

--- a/src/gcrypt-int.h
+++ b/src/gcrypt-int.h
@@ -416,15 +416,10 @@ gcry_mpi_point_t _gcry_mpi_point_set (gcry_mpi_point_t point,
 gcry_mpi_point_t _gcry_mpi_point_snatch_set (gcry_mpi_point_t point,
                                             gcry_mpi_t x, gcry_mpi_t y,
                                             gcry_mpi_t z);
-gpg_error_t _gcry_mpi_ec_new (gcry_ctx_t *r_ctx,
-                             gcry_sexp_t keyparam, const char *curvename);
 gcry_mpi_t _gcry_mpi_ec_get_mpi (const char *name, gcry_ctx_t ctx, int copy);
 gcry_mpi_point_t _gcry_mpi_ec_get_point (const char *name,
                                         gcry_ctx_t ctx, int copy);
-gpg_error_t _gcry_mpi_ec_set_mpi (const char *name, gcry_mpi_t newvalue,
-                                 gcry_ctx_t ctx);
-gpg_error_t _gcry_mpi_ec_set_point (const char *name, gcry_mpi_point_t newvalue,
-                                   gcry_ctx_t ctx);
 int _gcry_mpi_ec_get_affine (gcry_mpi_t x, gcry_mpi_t y, gcry_mpi_point_t point,
                              mpi_ec_t ctx);
 void _gcry_mpi_ec_dup (gcry_mpi_point_t w, gcry_mpi_point_t u, gcry_ctx_t ctx);

Does this help?



Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

More information about the Gnupg-users mailing list