Merge topic 'update-kwsys'
6f6afbd
Merge branch 'upstream-kwsys' into update-kwsys495fa24
KWSys 2013-01-07 (fc60c8b8)
This commit is contained in:
commit
e41d4951b3
|
@ -596,6 +596,13 @@ IF(KWSYS_USE_SystemInformation)
|
|||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(CMAKE_SYSTEM MATCHES "HP-UX")
|
||||
CHECK_INCLUDE_FILES("sys/mpctl.h" KWSYS_SYS_HAS_MPCTL_H)
|
||||
IF(KWSYS_SYS_HAS_MPCTL_H)
|
||||
SET_PROPERTY(SOURCE SystemInformation.cxx APPEND PROPERTY
|
||||
COMPILE_DEFINITIONS KWSYS_SYS_HAS_MPCTL_H=1)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
IF(KWSYS_LFS_AVAILABLE AND NOT KWSYS_LFS_DISABLE)
|
||||
SET(KWSYS_PLATFORM_CXX_TEST_DEFINES -DKWSYS_HAS_LFS=1)
|
||||
ENDIF()
|
||||
|
|
|
@ -26,12 +26,9 @@
|
|||
/* Whether ostream supports long long. */
|
||||
#define @KWSYS_NAMESPACE@_IOS_HAS_OSTREAM_LONG_LONG @KWSYS_IOS_HAS_OSTREAM_LONG_LONG@
|
||||
|
||||
/* Size of type long long and 0 if not available. */
|
||||
#define @KWSYS_NAMESPACE@_IOS_SIZEOF_LONG_LONG @KWSYS_SIZEOF_LONG_LONG@
|
||||
|
||||
/* Determine whether we need to define the streaming operators for
|
||||
long long or __int64. */
|
||||
#if @KWSYS_NAMESPACE@_IOS_SIZEOF_LONG_LONG
|
||||
#if @KWSYS_USE_LONG_LONG@
|
||||
# if !@KWSYS_NAMESPACE@_IOS_HAS_ISTREAM_LONG_LONG || \
|
||||
!@KWSYS_NAMESPACE@_IOS_HAS_OSTREAM_LONG_LONG
|
||||
# define @KWSYS_NAMESPACE@_IOS_NEED_OPERATORS_LL 1
|
||||
|
@ -136,7 +133,6 @@ operator<<(kwsys_ios::ostream& os, @KWSYS_NAMESPACE@::IOStreamULL value)
|
|||
/* If building a C++ file in kwsys itself, give the source file
|
||||
access to the macros without a configured namespace. */
|
||||
#if defined(KWSYS_NAMESPACE)
|
||||
# define KWSYS_IOS_SIZEOF_LONG_LONG @KWSYS_NAMESPACE@_IOS_SIZEOF_LONG_LONG
|
||||
# define KWSYS_IOS_HAS_ISTREAM_LONG_LONG @KWSYS_NAMESPACE@_IOS_HAS_ISTREAM_LONG_LONG
|
||||
# define KWSYS_IOS_HAS_OSTREAM_LONG_LONG @KWSYS_NAMESPACE@_IOS_HAS_OSTREAM_LONG_LONG
|
||||
# define KWSYS_IOS_NEED_OPERATORS_LL @KWSYS_NAMESPACE@_IOS_NEED_OPERATORS_LL
|
||||
|
|
|
@ -63,10 +63,6 @@ do.
|
|||
#include <dirent.h> /* DIR, dirent */
|
||||
#include <ctype.h> /* isspace */
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#undef __BEOS__
|
||||
#endif
|
||||
|
||||
#if defined(__VMS)
|
||||
# define KWSYSPE_VMS_NONBLOCK , O_NONBLOCK
|
||||
#else
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -157,7 +157,7 @@ public:
|
|||
#include <os/storage/Path.h>
|
||||
#endif
|
||||
|
||||
#if defined(__BEOS__) && !defined(__ZETA__) && !defined(__HAIKU__)
|
||||
#if defined(__BEOS__) && !defined(__ZETA__)
|
||||
#include <be/kernel/OS.h>
|
||||
#include <be/storage/Path.h>
|
||||
|
||||
|
@ -622,11 +622,7 @@ bool SystemTools::MakeDirectory(const char* path)
|
|||
}
|
||||
SystemTools::ConvertToUnixSlashes(dir);
|
||||
|
||||
kwsys_stl::string::size_type pos = dir.find(':');
|
||||
if(pos == kwsys_stl::string::npos)
|
||||
{
|
||||
pos = 0;
|
||||
}
|
||||
kwsys_stl::string::size_type pos = 0;
|
||||
kwsys_stl::string topdir;
|
||||
while((pos = dir.find('/', pos)) != kwsys_stl::string::npos)
|
||||
{
|
||||
|
@ -634,14 +630,7 @@ bool SystemTools::MakeDirectory(const char* path)
|
|||
Mkdir(topdir.c_str());
|
||||
pos++;
|
||||
}
|
||||
if(dir[dir.size()-1] == '/')
|
||||
{
|
||||
topdir = dir.substr(0, dir.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
topdir = dir;
|
||||
}
|
||||
topdir = dir;
|
||||
if(Mkdir(topdir.c_str()) != 0)
|
||||
{
|
||||
// There is a bug in the Borland Run time library which makes MKDIR
|
||||
|
@ -4054,7 +4043,7 @@ kwsys_stl::string SystemTools::GetCurrentDateTime(const char* format)
|
|||
return kwsys_stl::string(buf);
|
||||
}
|
||||
|
||||
kwsys_stl::string SystemTools::MakeCindentifier(const char* s)
|
||||
kwsys_stl::string SystemTools::MakeCidentifier(const char* s)
|
||||
{
|
||||
kwsys_stl::string str(s);
|
||||
if (str.find_first_of("0123456789") == 0)
|
||||
|
|
|
@ -91,8 +91,13 @@ public:
|
|||
* then an underscore is prepended. Note that this can produce
|
||||
* identifiers that the standard reserves (_[A-Z].* and __.*).
|
||||
*/
|
||||
static kwsys_stl::string MakeCindentifier(const char* s);
|
||||
|
||||
static kwsys_stl::string MakeCidentifier(const char* s);
|
||||
|
||||
static kwsys_stl::string MakeCindentifier(const char* s)
|
||||
{
|
||||
return MakeCidentifier(s);
|
||||
}
|
||||
|
||||
/**
|
||||
* Replace replace all occurences of the string in the source string.
|
||||
*/
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#include KWSYS_HEADER(ios/iostream)
|
||||
#include KWSYS_HEADER(stl/string)
|
||||
|
||||
#if defined(__BEOS__) && !defined(__HAIKU__)
|
||||
#if defined(__BEOS__)
|
||||
#include <be/kernel/OS.h> /* disable_debugger() API. */
|
||||
#endif
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
# pragma warn -8060 /* possibly incorrect assignment */
|
||||
#endif
|
||||
|
||||
#if defined(__BEOS__) && !defined(__ZETA__) && !defined(__HAIKU__)
|
||||
#if defined(__BEOS__) && !defined(__ZETA__)
|
||||
/* BeOS 5 doesn't have usleep(), but it has snooze(), which is identical. */
|
||||
# include <be/kernel/OS.h>
|
||||
static inline void testProcess_usleep(unsigned int msec)
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
|
||||
int testSystemInformation(int, char*[])
|
||||
{
|
||||
kwsys_ios::cout << "CTEST_FULL_OUTPUT\n"; // avoid truncation
|
||||
|
||||
kwsys::SystemInformation info;
|
||||
info.RunCPUCheck();
|
||||
info.RunOSCheck();
|
||||
|
@ -86,6 +88,13 @@ int testSystemInformation(int, char*[])
|
|||
printMethod3(info, GetHostMemoryUsed(), "KiB");
|
||||
printMethod3(info, GetProcMemoryUsed(), "KiB");
|
||||
|
||||
for (int i = 0; i <= 31; i++)
|
||||
{
|
||||
if (info.DoesCPUSupportFeature(1 << i))
|
||||
{
|
||||
kwsys_ios::cout << "CPU feature " << i << "\n";
|
||||
}
|
||||
}
|
||||
//int GetProcessorCacheXSize(long int);
|
||||
// bool DoesCPUSupportFeature(long int);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue