diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-09-20 13:30:41 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-09-20 13:30:41 (GMT) |
commit | 6b45ec03267b52c1631a2d8e835c3e8e211ffd1d (patch) | |
tree | 483c6635d77639e550a9153d3815098564743042 /Source/kwsys/SystemTools.cxx | |
parent | 40fa85883c0ac4111b4867477638d3a67d33eb12 (diff) | |
download | CMake-6b45ec03267b52c1631a2d8e835c3e8e211ffd1d.zip CMake-6b45ec03267b52c1631a2d8e835c3e8e211ffd1d.tar.gz CMake-6b45ec03267b52c1631a2d8e835c3e8e211ffd1d.tar.bz2 |
COMP: make SystemTools.cxx build on Cray Xt3
Alex
Diffstat (limited to 'Source/kwsys/SystemTools.cxx')
-rw-r--r-- | Source/kwsys/SystemTools.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx index 9476764..5079832 100644 --- a/Source/kwsys/SystemTools.cxx +++ b/Source/kwsys/SystemTools.cxx @@ -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 @@ void SystemTools::ConvertToUnixSlashes(kwsys_stl::string& path) 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 @@ void SystemTools::SplitPath(const char* p, components.push_back(root); c += 2; } -#if !defined(_WIN32) +#ifdef HAVE_GETPWNAM else if(c[0] == '~') { int numChars = 1; |