From 7f9ce6e97bd1bb4289477ac76532e156947e7865 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 14 Sep 2014 01:03:19 -0400 Subject: * main.c (main): Set MAKE_TTYOUT and MAKE_TTYERR. * configure.ac: Test for isatty() and ttyname() * makeint.h: provide a substitute for ttyname() if it's not available. * config.ami.template, config.h-vms.template, config.h.W32.template: define/undefine HAVE_ISATTY/HAVE_TTYNAME macros. * NEWS, doc/make.texi: Document these new variables. --- makeint.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'makeint.h') diff --git a/makeint.h b/makeint.h index ab41665..da267cb 100644 --- a/makeint.h +++ b/makeint.h @@ -424,6 +424,12 @@ extern struct rlimit stack_limit; /* The number of bytes needed to represent the largest integer as a string. */ #define INTSTR_LENGTH CSTRLEN ("18446744073709551616") +#ifdef HAVE_TTYNAME +# define TTYNAME(_f) ttyname (_f) +#else +# define TTYNAME(_f) "true" +#endif + const char *concat (unsigned int, ...); void message (int prefix, size_t length, const char *fmt, ...) -- cgit v1.2.3