From 468f7dc4294905d19f55c58c47ba91cd23bf357b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 13 Jan 2021 20:00:25 +0100 Subject: WIP: Add extensible logging API --- src/serd_config.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/serd_config.h') diff --git a/src/serd_config.h b/src/serd_config.h index 7f58696e..12930b1b 100644 --- a/src/serd_config.h +++ b/src/serd_config.h @@ -51,6 +51,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 # ifndef __APPLE__ @@ -83,6 +90,12 @@ # define USE_FILENO 0 #endif +#ifdef HAVE_ISATTY +# define USE_ISATTY 1 +#else +# define USE_ISATTY 0 +#endif + #ifdef HAVE_POSIX_FADVISE # define USE_POSIX_FADVISE 1 #else -- cgit v1.2.1