[cmake-commits] alex committed SystemTools.cxx 1.200 1.201

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Sep 20 09:30:43 EDT 2007


Update of /cvsroot/CMake/CMake/Source/kwsys
In directory public:/mounts/ram/cvs-serv20237

Modified Files:
	SystemTools.cxx 
Log Message:

COMP: make SystemTools.cxx build on Cray Xt3

Alex


Index: SystemTools.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/kwsys/SystemTools.cxx,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -d -r1.200 -r1.201
--- SystemTools.cxx	23 Jul 2007 13:06:48 -0000	1.200
+++ SystemTools.cxx	20 Sep 2007 13:30:41 -0000	1.201
@@ -65,6 +65,14 @@
 # include <windows.h>
 #endif
 
+// getpwnam doesn't exist on Windows and Cray Xt3/Catamount
+#if defined(_WIN32) || defined (__LIBCATAMOUNT__)
+# undef HAVE_GETPWNAM
+#else
+# define HAVE_GETPWNAM 1
+#endif
+
+
 // This is a hack to prevent warnings about these functions being
 // declared but not referenced.
 #if defined(__sgi) && !defined(__GNUC__)
@@ -1380,7 +1388,7 @@
         path.replace(0,1,homeEnv);
         }
       }
-#if !defined(_WIN32)
+#ifdef HAVE_GETPWNAM
     else if(pathCString[0] == '~')
       {
       kwsys_stl::string::size_type idx = path.find_first_of("/\0");
@@ -2923,7 +2931,7 @@
     components.push_back(root);
     c += 2;
     }
-#if !defined(_WIN32)
+#ifdef HAVE_GETPWNAM
   else if(c[0] == '~')
     {
     int numChars = 1;



More information about the Cmake-commits mailing list