Merge branch 'bw/maint-1.7.9-solaris-getpass' into maint-1.7.11
authorJunio C Hamano <gitster@pobox.com>
Fri, 24 Aug 2012 19:05:11 +0000 (12:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Aug 2012 19:05:11 +0000 (12:05 -0700)
* bw/maint-1.7.9-solaris-getpass:
Enable HAVE_DEV_TTY for Solaris
terminal: seek when switching between reading and writing

Makefile
compat/terminal.c
index df583035e41a3d38eb79f90f73c7d4e6ca87b184..1f72c1c74548ff1622232132d1ff717855f007bc 100644 (file)
--- 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
index 6d16c8fba0b305a2e1020d9e1c7f1d1ad64d302f..bbb038dd0103034b85b0e9d407dfa91e607c1eeb 100644 (file)
@@ -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);
        }