aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-10-20 14:45:18 +0000
committerJustus Winter <[email protected]>2016-10-20 15:01:24 +0000
commit8c7c4faf3de28ca70a60e6b15f51c1b206e0ddd9 (patch)
tree8ca337ff14ad02369b2e13a6865cf5cb91bb68e0 /tests
parenttests,w32: Cope with Windows line endings. (diff)
downloadgnupg-8c7c4faf3de28ca70a60e6b15f51c1b206e0ddd9.tar.gz
gnupg-8c7c4faf3de28ca70a60e6b15f51c1b206e0ddd9.zip
common,w32: Fix setting environment variables on Windows.
* common/sysutils.c (gnupg_setenv): Also update the environment block maintained by the C runtime. (gnupg_unsetenv): Likewise. * tests/gpgscm/ffi.c (do_setenv): Fix error handling. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to '')
-rw-r--r--tests/gpgscm/ffi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/gpgscm/ffi.c b/tests/gpgscm/ffi.c
index a0fbe2e64..8e21ba6d3 100644
--- a/tests/gpgscm/ffi.c
+++ b/tests/gpgscm/ffi.c
@@ -236,7 +236,9 @@ do_setenv (scheme *sc, pointer args)
FFI_ARG_OR_RETURN (sc, char *, value, string, args);
FFI_ARG_OR_RETURN (sc, int, overwrite, bool, args);
FFI_ARGS_DONE_OR_RETURN (sc, args);
- FFI_RETURN_ERR (sc, gnupg_setenv (name, value, overwrite));
+ if (gnupg_setenv (name, value, overwrite))
+ FFI_RETURN_ERR (sc, gpg_error_from_syserror ());
+ FFI_RETURN (sc);
}
static pointer