diff options
author | Werner Koch <[email protected]> | 2012-11-20 18:01:13 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2012-11-20 18:03:49 +0000 |
commit | 835698b72bc509565aad52b0753f1c56c1a8f062 (patch) | |
tree | dd5352b45d74cb3ef4b3091dcc16824ce57e4991 /common/simple-pwquery.c | |
parent | Fix non-portable use of chmod in autogen.sh. (diff) | |
download | gnupg-835698b72bc509565aad52b0753f1c56c1a8f062.tar.gz gnupg-835698b72bc509565aad52b0753f1c56c1a8f062.zip |
Do not use a broken ttyname.
* configure.ac (HAVE_BROKEN_TTYNAME): New ac_define set for Android
systems.
* common/util.h (gnupg_ttyname): New macro. Change all callers of
ttyname to use this macro instead.
(ttyname) [W32]: Rename to _gnupg_ttyname and use also if
HAVE_BROKEN_TTYNAME is defined.
* common/simple-pwquery.c (agent_send_all_options): Keep on using
ttyname unless HAVE_BROKEN_TTYNAME is set. This is because this file
may be used standalone.
Diffstat (limited to 'common/simple-pwquery.c')
-rw-r--r-- | common/simple-pwquery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c index 23e4b893a..08f59d246 100644 --- a/common/simple-pwquery.c +++ b/common/simple-pwquery.c @@ -222,7 +222,7 @@ agent_send_all_options (int fd) } dft_ttyname = getenv ("GPG_TTY"); -#ifndef HAVE_W32_SYSTEM +#if !defined(HAVE_W32_SYSTEM) && !defined(HAVE_BROKEN_TTYNAME) if ((!dft_ttyname || !*dft_ttyname) && ttyname (0)) dft_ttyname = ttyname (0); #endif |