summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2007-10-01 16:48:39 +0200
committerWerner Koch <wk@gnupg.org>2007-10-01 16:48:39 +0200
commit31c19d1d685b75377d9ff6dfbc9138ecbd5600b4 (patch)
treef6630bee0deef3ff050b3ca7dbb55e4951e34372 /common
parentSupport the SETQUALITYBAR command of recent pinentries. (diff)
downloadgnupg2-31c19d1d685b75377d9ff6dfbc9138ecbd5600b4.tar.xz
gnupg2-31c19d1d685b75377d9ff6dfbc9138ecbd5600b4.zip
Use Assuan socket wrapper calls.
Made socket servers secure under Windows.
Diffstat (limited to 'common')
-rw-r--r--common/ChangeLog9
-rw-r--r--common/homedir.c2
-rw-r--r--common/sysutils.h4
3 files changed, 14 insertions, 1 deletions
diff --git a/common/ChangeLog b/common/ChangeLog
index a9b799b4c..577367292 100644
--- a/common/ChangeLog
+++ b/common/ChangeLog
@@ -1,3 +1,12 @@
+2007-10-01 Werner Koch <wk@g10code.com>
+
+ * sysutils.h (FD2INT, INT2FD): New.
+
+2007-09-21 Werner Koch <wk@g10code.com>
+
+ * homedir.c (default_homedir): Make registry work. Reported by
+ Marc Mutz.
+
2007-08-29 Werner Koch <wk@g10code.com>
* exechelp.c (gnupg_wait_process): Add arg EXITCODE. Changed all
diff --git a/common/homedir.c b/common/homedir.c
index 3105aec06..b85f760a0 100644
--- a/common/homedir.c
+++ b/common/homedir.c
@@ -143,7 +143,7 @@ default_homedir (void)
tmp = read_w32_registry_string (NULL, "Software\\GNU\\GnuPG",
"HomeDir");
- if (tmp && *tmp)
+ if (tmp && !*tmp)
{
xfree (tmp);
tmp = NULL;
diff --git a/common/sysutils.h b/common/sysutils.h
index 2a3666882..c053e8fb9 100644
--- a/common/sysutils.h
+++ b/common/sysutils.h
@@ -27,9 +27,13 @@
#ifdef HAVE_W32_SYSTEM
typedef void *gnupg_fd_t;
#define GNUPG_INVALID_FD ((void*)(-1))
+#define INT2FD(s) ((void *)(s))
+#define FD2INT(h) ((unsigned int)(h))
#else
typedef int gnupg_fd_t;
#define GNUPG_INVALID_FD (-1)
+#define INT2FD(s) (s)
+#define FD2INT(h) (h)
#endif