summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Barre <sebastien.barre@kitware.com>2008-10-17 15:29:30 (GMT)
committerSebastien Barre <sebastien.barre@kitware.com>2008-10-17 15:29:30 (GMT)
commit4ed9faa830af81d6af536a685fb115dee5d0d746 (patch)
treebdfd2008c9a0639f7929a371941ed5a401efa46d
parente2661f1f059d9154c966bcddeb4ed165f0303e6c (diff)
downloadCMake-4ed9faa830af81d6af536a685fb115dee5d0d746.zip
CMake-4ed9faa830af81d6af536a685fb115dee5d0d746.tar.gz
CMake-4ed9faa830af81d6af536a685fb115dee5d0d746.tar.bz2
ENH: fix for VS6 and Cygwin
-rw-r--r--Source/kwsys/SystemInformation.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
index 45fc9b6..322424a 100644
--- a/Source/kwsys/SystemInformation.cxx
+++ b/Source/kwsys/SystemInformation.cxx
@@ -13,6 +13,10 @@
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
+#ifdef _WIN32
+# include <winsock.h> // WSADATA, include before sys/types.h
+#endif
+
#include "kwsysPrivate.h"
#include KWSYS_HEADER(FundamentalType.h)
#include KWSYS_HEADER(stl/string)
@@ -2147,7 +2151,7 @@ int SystemInformationImplementation::RetreiveInformationFromCpuInfoFile()
FILE *fd = fopen("/proc/cpuinfo", "r" );
if ( !fd )
{
- kwsys_ios::cout << "Problem opening /proc/cpuinfo" << kwsys_stl::endl;
+ kwsys_ios::cout << "Problem opening /proc/cpuinfo" << kwsys_ios::endl;
return 0;
}
@@ -2279,7 +2283,7 @@ int SystemInformationImplementation::QueryMemory()
int errorFlag = uname(&unameInfo);
if( errorFlag!=0 )
{
- kwsys_ios::cout << "Problem calling uname(): " << strerror(errno) << kwsys_stl::endl;
+ kwsys_ios::cout << "Problem calling uname(): " << strerror(errno) << kwsys_ios::endl;
return 0;
}
@@ -2303,7 +2307,7 @@ int SystemInformationImplementation::QueryMemory()
FILE *fd = fopen("/proc/meminfo", "r" );
if ( !fd )
{
- kwsys_ios::cout << "Problem opening /proc/meminfo" << kwsys_stl::endl;
+ kwsys_ios::cout << "Problem opening /proc/meminfo" << kwsys_ios::endl;
return 0;
}
@@ -2810,7 +2814,7 @@ kwsys_stl::string SystemInformationImplementation::RunProcess(kwsys_stl::vector<
{
// Should not get here.
kwsys_ios::cerr << "Unexpected ending state after running " << args[0]
- << kwsys_stl::endl;
+ << kwsys_ios::endl;
} break;
}
kwsysProcess_Delete(gp);