Thanks for reporting. Unfortunately unistd.h is not supported by all compilers, and this warning would become a fatal error for those not supporting the include. I'm, however, searching for a suitable solution.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The unistd.h header should be supported on any POSIX-conformant system (since 1988). It seems likely that isatty() is only supported on POSIX-type systems. The isatty() function is defined by IEEE-std 1003.1-1988 (i.e. POSIX.1). It should be safe to include unistd.h wherever isatty() is used.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Bob, you are right but unfortunately unistd.h it is not part of C99, at least my C99 PDF does not mention it. MS VC also doesn't support it (yep, I know VC does not conform to any standard, but we have to live with that). Maybe I should get rid of isatty function call instead. It is used only to provide a prompt, which may be taken only as a cosmetic feature.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for reporting. Unfortunately unistd.h is not supported by all compilers, and this warning would become a fatal error for those not supporting the include. I'm, however, searching for a suitable solution.
The unistd.h header should be supported on any POSIX-conformant system (since 1988). It seems likely that isatty() is only supported on POSIX-type systems. The isatty() function is defined by IEEE-std 1003.1-1988 (i.e. POSIX.1). It should be safe to include unistd.h wherever isatty() is used.
Bob, you are right but unfortunately unistd.h it is not part of C99, at least my C99 PDF does not mention it. MS VC also doesn't support it (yep, I know VC does not conform to any standard, but we have to live with that). Maybe I should get rid of isatty function call instead. It is used only to provide a prompt, which may be taken only as a cosmetic feature.
As the problem is still present in version 2 2, a developer for Gentoo Linux proposed this patch for the issue:
--- lcms2-2.2/utils/transicc/transicc.c.orig
+++ lcms2-2.2/utils/transicc/transicc.c
@@ -26,6 +26,10 @@
#include "utils.h"
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
+
#ifdef CMS_IS_WINDOWS_
#include <io.h>
#endif
fixed in git, thanks for reporting