Subject: Re: [PATCH 5/7] add generic terminal prompt function

From: Jakub Narebski <[email-masked]>
Date: Thu, 08 Dec 2011 13:48:33 -0800 (PST)

Jeff King <[email-masked]> writes:

> 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.

> @@ -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)...

> 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