From: Junio C Hamano Date: Mon, 06 Aug 2012 01:59:48 GMT Subject: Re: [PATCH] Avoid crippled getpass function on Solaris Message-ID: <7vboio231n.fsf@alter.siamese.dyndns.org> In-Reply-To: <1344208672-20028-1-git-send-email-bwalton@artsci.utoronto.ca> Ben Walton writes: > diff --git a/compat/terminal.h b/compat/terminal.h > index 97db7cd..8d7b3f9 100644 > --- a/compat/terminal.h > +++ b/compat/terminal.h > @@ -3,4 +3,13 @@ > > char *git_terminal_prompt(const char *prompt, int echo); > > +/* getpass() returns at most 8 characters on solaris so use > + getpassphrase() which returns up to 256. */ > +# if defined (__SVR4) && defined (__sun) /* solaris */ > +#define GETPASS getpassphrase > +#else > +#define GETPASS getpass > +#endif > + > + > #endif /* COMPAT_TERMINAL_H */ Wouldn't #if solaris #define getpass getpassphrase #endif without anything else be more than sufficient?