From f2bb57684fd448e7479a04ae9504902cdd8628cf Mon Sep 17 00:00:00 2001 From: Alexander Neundorf <neundorf@kde.org> Date: Thu, 20 Sep 2007 09:36:30 -0400 Subject: COMP: TIOCGWINSZ and struct winsize also doesn't exist on Cray Catamount Alex --- Source/kwsys/SystemTools.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 5079832..a5d7e2f 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -66,10 +66,13 @@ #endif // getpwnam doesn't exist on Windows and Cray Xt3/Catamount +// same for TIOCGWINSZ #if defined(_WIN32) || defined (__LIBCATAMOUNT__) # undef HAVE_GETPWNAM +# undef HAVE_TTY_INFO #else # define HAVE_GETPWNAM 1 +# define HAVE_TTY_INFO 1 #endif @@ -3664,7 +3667,7 @@ bool SystemTools::GetLineFromStream(kwsys_ios::istream& is, int SystemTools::GetTerminalWidth() { int width = -1; -#ifndef _WIN32 +#ifdef HAVE_TTY_INFO struct winsize ws; char *columns; /* Unix98 environment variable */ if(ioctl(1, TIOCGWINSZ, &ws) != -1 && ws.ws_col>0 && ws.ws_row>0) -- cgit v0.12