Do not use a broken ttyname.
authorWerner Koch <wk@gnupg.org>
Tue, 20 Nov 2012 18:01:13 +0000 (19:01 +0100)
committerWerner Koch <wk@gnupg.org>
Tue, 20 Nov 2012 18:03:49 +0000 (19:03 +0100)
commit835698b72bc509565aad52b0753f1c56c1a8f062
treedd5352b45d74cb3ef4b3091dcc16824ce57e4991
parente7bc5012c568da9ceb0a80a8f3fe3edf3dac9564
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.
agent/gpg-agent.c
common/session-env.c
common/simple-pwquery.c
common/util.h
configure.ac
sm/misc.c