aboutsummaryrefslogtreecommitdiffstats
path: root/src/echoes.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-12-05 17:19:53 +0100
committerMattias Andrée <maandree@operamail.com>2015-12-05 17:19:53 +0100
commit2736d90da3dd10a002d7576c70a51e05cc66e29b (patch)
treecd411c3c21ac5a5a24d1393990157ce7479c7ef5 /src/echoes.c
parentm + bug fix (diff)
downloadlibpassphrase-2736d90da3dd10a002d7576c70a51e05cc66e29b.tar.gz
libpassphrase-2736d90da3dd10a002d7576c70a51e05cc66e29b.tar.bz2
libpassphrase-2736d90da3dd10a002d7576c70a51e05cc66e29b.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/echoes.c')
-rw-r--r--src/echoes.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/echoes.c b/src/echoes.c
index 7274e52..bc8d3ff 100644
--- a/src/echoes.c
+++ b/src/echoes.c
@@ -47,6 +47,9 @@ static struct termios saved_stty;
/**
* Disable echoing and do anything else to the terminal settnings `passphrase_read` requires
*/
+#if defined(__GNUC__) && !defined(NEED_TERMIOS)
+__attribute__((const))
+#endif /* __GNUC__ && !NEED_TERMIOS */
void passphrase_disable_echo(void)
{
passphrase_disable_echo1(STDIN_FILENO);
@@ -56,6 +59,9 @@ void passphrase_disable_echo(void)
/**
* Undo the actions of `passphrase_disable_echo`
*/
+#if defined(__GNUC__) && !defined(NEED_TERMIOS)
+__attribute__((const))
+#endif /* __GNUC__ && !NEED_TERMIOS */
void passphrase_reenable_echo(void)
{
passphrase_reenable_echo1(STDIN_FILENO);