summaryrefslogtreecommitdiffstats
path: root/sm
diff options
context:
space:
mode:
authorMarcus Brinkmann <mb@g10code.com>2010-06-10 17:08:29 +0200
committerMarcus Brinkmann <mb@g10code.com>2010-06-10 17:08:29 +0200
commitab3d60c8d2ad0ece570240ef50be4900692b63f4 (patch)
tree5d27f19bbbbbe733daaafb648c76c40d7d8582e3 /sm
parentInclude dirmngr manual (diff)
downloadgnupg2-ab3d60c8d2ad0ece570240ef50be4900692b63f4.tar.xz
gnupg2-ab3d60c8d2ad0ece570240ef50be4900692b63f4.zip
common/
2010-06-10 Marcus Brinkmann <marcus@g10code.de> * estream.c (_es_get_std_stream): Fix cut&paste bug. sm/ 2010-06-10 Marcus Brinkmann <marcus@g10code.de> * server.c (SERVER_STDIN, SERVER_STDOUT): New macros. (gpgsm_server): Use them with assuan_fdopen.
Diffstat (limited to 'sm')
-rw-r--r--sm/server.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sm/server.c b/sm/server.c
index 072064539..d8a30acf3 100644
--- a/sm/server.c
+++ b/sm/server.c
@@ -1249,8 +1249,15 @@ gpgsm_server (certlist_t default_recplist)
/* We use a pipe based server so that we can work from scripts.
assuan_init_pipe_server will automagically detect when we are
called with a socketpair and ignore FILEDES in this case. */
- filedes[0] = assuan_fdopen (0);
- filedes[1] = assuan_fdopen (1);
+#ifdef HAVE_W32CE_SYSTEM
+ #define SERVER_STDIN es_fileno(es_stdin)
+ #define SERVER_STDOUT es_fileno(es_stdout)
+#else
+#define SERVER_STDIN 0
+#define SERVER_STDOUT 1
+#endif
+ filedes[0] = assuan_fdopen (SERVER_STDIN);
+ filedes[1] = assuan_fdopen (SERVER_STDOUT);
rc = assuan_new (&ctx);
if (rc)
{