This is necessary for programs that are compiled for native Windows and
run in a Cygwin console.
* libtextstyle/autogen.sh (GNULIB_MODULES): Add 'isatty'.
* libtextstyle/configure.ac: Set GNULIB_ISATTY to 0.
* libtextstyle/lib/textstyle.h (libtextstyle_isatty): New declaration.
(isatty): Redirect to libtextstyle_isatty.
/lib/iconv-ostream.oo.c
/lib/iconv-ostream.oo.h
/lib/intprops.h
+/lib/isatty.c
/lib/isinf.c
/lib/isnan.c
/lib/isnand.c
html-styled-ostream
term-styled-ostream
filename
+ isatty
xalloc
xconcat-filename
gl_INIT
+dnl Arrange that the gnulib-generated <unistd.h> does not declare isatty(). The
+dnl adhoc-tests want to get this declaration from <textstyle.h>, not <unistd.h>.
+GNULIB_ISATTY=0
+
dnl Compilation on mingw and Cygwin needs special Makefile rules, because
dnl 1. when we install a shared library, we must arrange to export
dnl auxiliary pointer variables for every exported variable,
}
#endif
+/* ----------------------- Exported gnulib overrides ----------------------- */
+
+#if defined _WIN32 && ! defined __CYGWIN__
+
+# include <io.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+extern int libtextstyle_isatty (int fd);
+# undef isatty
+# define isatty libtextstyle_isatty
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
+
/* ------------------------------------------------------------------------- */
#endif /* _TEXTSTYLE_H */