aboutsummaryrefslogtreecommitdiffstats
path: root/src/serd_config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/serd_config.h')
-rw-r--r--src/serd_config.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/serd_config.h b/src/serd_config.h
index 90c4d31e..0bd9b5ac 100644
--- a/src/serd_config.h
+++ b/src/serd_config.h
@@ -60,6 +60,13 @@
# endif
# endif
+// POSIX.1-2001: isatty()
+# ifndef HAVE_ISATTY
+# if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112L
+# define HAVE_ISATTY
+# endif
+# endif
+
// POSIX.1-2001: posix_fadvise()
# ifndef HAVE_POSIX_FADVISE
# if SERD__POSIX_VERSION >= 200112L && !defined(__APPLE__)
@@ -97,6 +104,12 @@
# define USE_FILENO 0
#endif
+#if defined(HAVE_ISATTY) && HAVE_ISATTY
+# define USE_ISATTY 1
+#else
+# define USE_ISATTY 0
+#endif
+
#if defined(HAVE_POSIX_FADVISE) && HAVE_POSIX_FADVISE
# define USE_POSIX_FADVISE 1
#else