aboutsummaryrefslogtreecommitdiffstats
path: root/tests/gpg/t-support.h
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2007-09-27 13:01:54 +0000
committerMarcus Brinkmann <[email protected]>2007-09-27 13:01:54 +0000
commit37ac53e74c6dd66c3df2ad052ef0302cf90cf4b0 (patch)
treeb119cced434baf2903f87527dafcc39bed26d918 /tests/gpg/t-support.h
parentdoc/ (diff)
downloadgpgme-37ac53e74c6dd66c3df2ad052ef0302cf90cf4b0.tar.gz
gpgme-37ac53e74c6dd66c3df2ad052ef0302cf90cf4b0.zip
2007-09-27 Marcus Brinkmann <[email protected]>
* assuan-pipe-connect.c (pipe_connect_gpgme): Do not close process handle here. Use this function also on Unix systems. gpgme/ 2007-09-27 Marcus Brinkmann <[email protected]> * w32-glib-io.c (_gpgme_io_spawn), w32-qt-io.cpp (_gpgme_io_spawn), w32-io.c (_gpgme_io_spawn): Close the process handle, return 0. tests/ 2007-09-27 Marcus Brinkmann <[email protected]> * t-engine-info.c (check_engine_info): Fix debug output. * gpg/Makefile.am (tests_unix): New variable. (TESTS): Use it. * gpg/t-support.h (passphrase_cb) [HAVE_W32_SYSTEM]: Use WriteFile instead of write. * gpg/t-wait.c [HAVE_W32_SYSTEM]: Define sleep as _sleep.
Diffstat (limited to 'tests/gpg/t-support.h')
-rw-r--r--tests/gpg/t-support.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/gpg/t-support.h b/tests/gpg/t-support.h
index 0ed1ac84..362b857a 100644
--- a/tests/gpg/t-support.h
+++ b/tests/gpg/t-support.h
@@ -24,6 +24,10 @@
#include <stdlib.h>
#include <locale.h>
+#ifdef HAVE_W32_SYSTEM
+#include <windows.h>
+#endif
+
#include <gpgme.h>
#ifndef DIM
@@ -65,7 +69,13 @@ gpgme_error_t
passphrase_cb (void *opaque, const char *uid_hint, const char *passphrase_info,
int last_was_bad, int fd)
{
+#ifdef HAVE_W32_SYSTEM
+ DWORD written;
+ WriteFile ((HANDLE) fd, "abc\n", 4, &written, 0);
+#else
write (fd, "abc\n", 4);
+#endif
+
return 0;
}