aboutsummaryrefslogtreecommitdiffstats
path: root/pc
diff options
context:
space:
mode:
Diffstat (limited to 'pc')
-rw-r--r--pc/ChangeLog5
-rw-r--r--pc/config.h4
-rw-r--r--pc/gawkmisc.pc12
3 files changed, 17 insertions, 4 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog
index 316b23f7..532ea8b2 100644
--- a/pc/ChangeLog
+++ b/pc/ChangeLog
@@ -1,3 +1,8 @@
+Fri Apr 1 11:50:59 2011 Arnold D. Robbins <arnold@skeeve.com>
+
+ * config.h (ISATTY): Remove definition.
+ * gawkmisc.pc (os_iastty): New function.
+
Sun Feb 27 22:58:08 2011 Scott Deifik <scottd.mail@sbcglobal.net>
* Makefile.tst: Sync with mainline version.
diff --git a/pc/config.h b/pc/config.h
index 4ec2d711..4dd797c1 100644
--- a/pc/config.h
+++ b/pc/config.h
@@ -518,8 +518,4 @@
#define HAVE_USLEEP 1
#endif
-#if defined(__MINGW32__) || defined(_MSC_VER)
-# define ISATTY(fd) (isatty(fd) && lseek(fd,SEEK_CUR,0) == -1)
-#endif
-
/* #define NO_LINT 1 */
diff --git a/pc/gawkmisc.pc b/pc/gawkmisc.pc
index 67760676..43f81ff9 100644
--- a/pc/gawkmisc.pc
+++ b/pc/gawkmisc.pc
@@ -280,6 +280,18 @@ int fd;
setmode(fd, orig_tty_mode);
}
}
+
+/* os_isatty --- return true if fd is a tty */
+
+int
+os_isatty(int fd)
+{
+#if defined(__MINGW32__) || defined(_MSC_VER)
+ return (isatty(fd) && lseek(fd, SEEK_CUR, 0) == -1);
+#else
+ return isatty(fd);
+#endif
+}
/* files_are_same --- return true if files are identical */