aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-08-24 12:05:11 -0700
committerJunio C Hamano <gitster@pobox.com>2012-08-24 12:05:11 -0700
commit3f988231ae438e2fc98c94f870a9b266f93e1955 (patch)
tree3cb4bd283b76a32c247043179252a2529f5b9910
parent9e0833c30e1afef7dcffe2c151d0545ecdc730bf (diff)
parent436783c95a59cca00a7cca1219666bb0af67cb81 (diff)
downloadgit-3f988231ae438e2fc98c94f870a9b266f93e1955.tar.gz
git-3f988231ae438e2fc98c94f870a9b266f93e1955.tar.xz
Merge branch 'bw/maint-1.7.9-solaris-getpass' into maint-1.7.11
* bw/maint-1.7.9-solaris-getpass: Enable HAVE_DEV_TTY for Solaris terminal: seek when switching between reading and writing
-rw-r--r--Makefile1
-rw-r--r--compat/terminal.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index df583035e..1f72c1c74 100644
--- a/Makefile
+++ b/Makefile
@@ -1005,6 +1005,7 @@ ifeq ($(uname_S),SunOS)
NO_REGEX = YesPlease
NO_FNMATCH_CASEFOLD = YesPlease
NO_MSGFMT_EXTENDED_OPTIONS = YesPlease
+ HAVE_DEV_TTY = YesPlease
ifeq ($(uname_R),5.6)
SOCKLEN_T = int
NO_HSTRERROR = YesPlease
diff --git a/compat/terminal.c b/compat/terminal.c
index 6d16c8fba..bbb038dd0 100644
--- a/compat/terminal.c
+++ b/compat/terminal.c
@@ -59,6 +59,7 @@ char *git_terminal_prompt(const char *prompt, int echo)
r = strbuf_getline(&buf, fh, '\n');
if (!echo) {
+ fseek(fh, SEEK_CUR, 0);
putc('\n', fh);
fflush(fh);
}