[cmake-commits] alex committed SystemTools.cxx 1.201 1.202
cmake-commits at cmake.org
cmake-commits at cmake.org
Thu Sep 20 09:36:32 EDT 2007
Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv21772
Modified Files:
SystemTools.cxx
Log Message:
COMP: TIOCGWINSZ and struct winsize also doesn't exist on Cray Catamount
Alex
Index: SystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.cxx,v
retrieving revision 1.201
retrieving revision 1.202
diff -u -d -r1.201 -r1.202
--- SystemTools.cxx 20 Sep 2007 13:30:41 -0000 1.201
+++ SystemTools.cxx 20 Sep 2007 13:36:30 -0000 1.202
@@ -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 @@
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)
More information about the Cmake-commits
mailing list