diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-10-14 22:33:10 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2002-10-14 22:33:10 (GMT) |
commit | 5a1fccd34db2124997bd84ff50c3b29f4fceca3c (patch) | |
tree | 3bc8490a89102a17aaeb274f5703494f46456362 /Source/ctest.cxx | |
parent | f4859295eb01773e05dcb18cc1ade8d4178c4a84 (diff) | |
download | CMake-5a1fccd34db2124997bd84ff50c3b29f4fceca3c.zip CMake-5a1fccd34db2124997bd84ff50c3b29f4fceca3c.tar.gz CMake-5a1fccd34db2124997bd84ff50c3b29f4fceca3c.tar.bz2 |
Fix namespace, typo, and make ftime work on windows
Diffstat (limited to 'Source/ctest.cxx')
-rw-r--r-- | Source/ctest.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/ctest.cxx b/Source/ctest.cxx index 4d81c9c..7420cf4 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -26,8 +26,10 @@ // Taken from Python 2.1.3 #if defined( _WIN32 ) && !defined( __CYGWIN__ ) +# include <sys/timeb.h> # define HAVE_FTIME -# defint FTIME _ftime_ +# define FTIME _ftime +# define TIMEB _timeb #elif defined( __CYGWIN__ ) || defined( __linux__ ) # include <sys/time.h> # define HAVE_GETTIMEOFDAY @@ -58,7 +60,7 @@ floattime(void) #endif /* !HAVE_GETTIMEOFDAY */ { #if defined(HAVE_FTIME) - struct timeb t; + struct TIMEB t; FTIME(&t); return (double)t.time + (double)t.millitm * (double)0.001; #else /* !HAVE_FTIME */ @@ -162,7 +164,7 @@ std::string ctest::MakeXMLSafe(const std::string& str) char ch = str[pos]; if ( ch > 126 ) { - ost << "&" << hex << ch; + ost << "&" << std::hex << (int)ch; } else { |