summaryrefslogtreecommitdiffstats
path: root/Source/ctest.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-15 11:20:02 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2002-10-15 11:20:02 (GMT)
commitf70a759446c4be2e9dc6c797cac84acadc9ed6ac (patch)
treee4c7c6079b21e5b3fc6a78a2f4e6d98182889101 /Source/ctest.cxx
parent5a1fccd34db2124997bd84ff50c3b29f4fceca3c (diff)
downloadCMake-f70a759446c4be2e9dc6c797cac84acadc9ed6ac.zip
CMake-f70a759446c4be2e9dc6c797cac84acadc9ed6ac.tar.gz
CMake-f70a759446c4be2e9dc6c797cac84acadc9ed6ac.tar.bz2
Remove std::hex as it does not seems to work on SGI, attempt to fix ftime problem on borland
Diffstat (limited to 'Source/ctest.cxx')
-rw-r--r--Source/ctest.cxx21
1 files changed, 14 insertions, 7 deletions
diff --git a/Source/ctest.cxx b/Source/ctest.cxx
index 7420cf4..81e3edb 100644
--- a/Source/ctest.cxx
+++ b/Source/ctest.cxx
@@ -26,13 +26,18 @@
// Taken from Python 2.1.3
#if defined( _WIN32 ) && !defined( __CYGWIN__ )
-# include <sys/timeb.h>
-# define HAVE_FTIME
-# define FTIME _ftime
-# define TIMEB _timeb
+# include <sys/timeb.h>
+# define HAVE_FTIME
+# if defined( __BORLANDC__)
+# define FTIME ftime
+# define TIMEB timeb
+# else // Visual studio?
+# define FTIME _ftime
+# define TIMEB _timeb
+# endif
#elif defined( __CYGWIN__ ) || defined( __linux__ )
-# include <sys/time.h>
-# define HAVE_GETTIMEOFDAY
+# include <sys/time.h>
+# define HAVE_GETTIMEOFDAY
#endif
static double
@@ -159,12 +164,14 @@ std::string ctest::MakeXMLSafe(const std::string& str)
{
std::string::size_type pos = 0;
cmOStringStream ost;
+ char buffer[10];
for ( pos = 0; pos < str.size(); pos ++ )
{
char ch = str[pos];
if ( ch > 126 )
{
- ost << "&" << std::hex << (int)ch;
+ sprintf(buffer, "&%x", (int)ch);
+ ost << buffer;
}
else
{