diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/ChangeLog | 9 | ||||
-rw-r--r-- | common/homedir.c | 2 | ||||
-rw-r--r-- | common/sysutils.h | 4 |
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 <[email protected]> + + * sysutils.h (FD2INT, INT2FD): New. + +2007-09-21 Werner Koch <[email protected]> + + * homedir.c (default_homedir): Make registry work. Reported by + Marc Mutz. + 2007-08-29 Werner Koch <[email protected]> * 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 |