From: <ny...@us...> - 2007-01-03 15:07:33
|
Revision: 234 http://svn.sourceforge.net/pmplib/?rev=234&view=rev Author: nyaochi Date: 2007-01-03 06:49:09 -0800 (Wed, 03 Jan 2007) Log Message: ----------- Revised configure.in to check isatty(). Modified Paths: -------------- trunk/pmplib/frontend/easypmp/cui/console_posix.c Modified: trunk/pmplib/frontend/easypmp/cui/console_posix.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/console_posix.c 2007-01-03 14:48:39 UTC (rev 233) +++ trunk/pmplib/frontend/easypmp/cui/console_posix.c 2007-01-03 14:49:09 UTC (rev 234) @@ -34,19 +34,21 @@ #ifdef HAVE_CONFIG_H #include <config.h> #endif/*HAVE_CONFIG_H*/ -#ifdef HAVE_STRING_H -#include <string.h> -#endif/*HAVE_STRING_H*/ #include <os.h> #include <stdio.h> #include <stdlib.h> #include <ucs2char.h> +#ifdef HAVE_STRING_H +#include <string.h> +#endif/*HAVE_STRING_H*/ +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif/*HAVE_UNISTD_H*/ + #include "console.h" -#define HAVE_TTY - #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define MIN(a, b) ((a) < (b) ? (a) : (b)) @@ -128,7 +130,7 @@ */ int console_init() { -#ifdef HAVE_TTY +#ifdef HAVE_ISATTY int i; for(i = 0; i <= POSSIBLE_TTYS; ++i) fd_is_tty[i] = isatty(i); @@ -137,7 +139,7 @@ signal(SIGWINCH,window_size_changed); window_size_changed(0); #endif/*CAN_GET_WIN_SIZE*/ -#endif/*HAVE_TTY*/ +#endif/*HAVE_ISATTY*/ return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |