[Gpg4win-devel] Self-compiled gpgme can't read output of gpgconf.exe [SOLVED]

Andrej Kacian andrej at kacian.sk
Tue Dec 8 12:44:32 CET 2015


On Tue, 8 Dec 2015 10:29:21 +0100
Andrej Kacian <andrej at kacian.sk> wrote:

> I am at a loss at what is causing this. If it matters, I am using
> Mingw-w64 version 4.0.4-1 from Debian Stretch. Compiler used is
> i686-w64-mingw32-gcc (GCC) 4.9.3.

OK, I found out what was the problem (although I am still not entirely
sure what exactly was wrong).

In order to make gpgme build with mingw-w64 4.x, I had to remove
mkstemp() definition from w32-util.c, as mingw-w64 provides this
function from 4.0 onwards. But as it turns out, gpgme's mkstemp()
behaves a bit differently from mkstemp() provided by mingw-w64.

My guess is the use of gpg_err_set_errno() in the function.

I resolved it by renaming the customized mkstemp (see attached diff),
and now gpgme builds, and also works. :) Perhaps this change could be
considered for future-proofing gpgme against environments which
provide mkstemp().

Regards,
-- 
Andrej
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gpgme-mingw4.diff
Type: text/x-patch
Size: 660 bytes
Desc: not available
URL: <http://lists.wald.intevation.org/pipermail/gpg4win-devel/attachments/20151208/2e2572a0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.wald.intevation.org/pipermail/gpg4win-devel/attachments/20151208/2e2572a0/attachment.sig>


More information about the Gpg4win-devel mailing list