Hash :
39065e3b
Author :
Date :
2012-01-03T13:52:36
isatty: Support for MSVC 9. * doc/posix-functions/isatty.texi: Mention the MSVC problem. * lib/isatty.c: Include <errno.h>, msvc-inval.h. (_isatty_nothrow): New function. (isatty): Use it instead of _isatty. (IsConsoleHandle): Add comment, from Paolo Bonzini. * lib/poll.c (IsConsoleHandle): Likewise. * lib/select.c (IsConsoleHandle): Likewise. * m4/isatty.m4 (gl_FUNC_ISATTY): Fix comment. Reported by Eli Zaretskii. (gl_PREREQ_ISATTY): New macro. * modules/isatty (Depends-on): Add msvc-inval. (configure.ac): Invoke gl_PREREQ_ISATTY.
# isatty.m4 serial 2
dnl Copyright (C) 2012 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_ISATTY],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl On native Windows, the system's isatty(), defined as an alias of _isatty()
dnl in the "oldnames" library, returns true for the NUL device.
case $host_os in
mingw*) REPLACE_ISATTY=1 ;;
esac
])
# Prerequisites of lib/isatty.c.
AC_DEFUN([gl_PREREQ_ISATTY], [
AC_REQUIRE([AC_C_INLINE])
])