Re: [PATCH 5/7] add generic terminal prompt function
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Dec 8, 2011, 21:48 UTC
- Message-ID
- <m38vmmivkc.fsf@localhost.localdomain>
- In-Reply-To
- <20111208083323.GE26409@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 5 quoted lines
> diff --git a/Makefile b/Makefile > index b024e2f..2a9bb3d 100644 > --- a/Makefile > +++ b/Makefile > @@ -227,6 +227,9 @@ all::
> +# Define HAVE_DEV_TTY if your system can open /dev/tty to interact with the > +# user.
Show 6 quoted lines
> @@ -833,6 +838,7 @@ ifeq ($(uname_S),Linux) > NO_STRLCPY = YesPlease > NO_MKSTEMPS = YesPlease > HAVE_PATHS_H = YesPlease > + HAVE_DEV_TTY = YesPlease > endif
Here you use HAVE_DEV_TTY (by the way, I wonder if it could be automatically detected by ./configure script)...
Show 12 quoted lines
> diff --git a/compat/terminal.c b/compat/terminal.c > new file mode 100644 > index 0000000..49f16ca > --- /dev/null > +++ b/compat/terminal.c > @@ -0,0 +1,81 @@ > +#include "git-compat-util.h" > +#include "compat/terminal.h" > +#include "sigchain.h" > +#include "strbuf.h" > + > +#ifndef NO_DEV_TTY
> +#endif
+#endif /* NO_DEV_TTY */
...and here you have NO_DEV_TTY
-- Jakub Narębski