diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-09-20 13:36:30 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-09-20 13:36:30 (GMT) |
commit | f2bb57684fd448e7479a04ae9504902cdd8628cf (patch) | |
tree | a1e31b516896a4adeb3b3bd427cacc0be10eea9e /Source | |
parent | 6b45ec03267b52c1631a2d8e835c3e8e211ffd1d (diff) | |
download | CMake-f2bb57684fd448e7479a04ae9504902cdd8628cf.zip CMake-f2bb57684fd448e7479a04ae9504902cdd8628cf.tar.gz CMake-f2bb57684fd448e7479a04ae9504902cdd8628cf.tar.bz2 |
COMP: TIOCGWINSZ and struct winsize also doesn't exist on Cray Catamount
Alex
Diffstat (limited to 'Source')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
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) |