Author: faridz
Date: Wed Sep 19 11:56:02 2007
New Revision: 577414
URL: http://svn.apache.org/viewvc?rev=577414&view=rev
Log:
2007-09-19 Farid Zaripov <[EMAIL PROTECTED]>
* 20.temp.buffer.cpp (run_test): Define constant MAX_SIZE = INT_MAX
for MSVC and ICC/Windows and MAX_SIZE = _RWSTD_PTRDIFF_MAX for other
platforms.
Modified:
incubator/stdcxx/trunk/etc/config/windows/build.wsf
incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp
Modified: incubator/stdcxx/trunk/etc/config/windows/build.wsf
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/build.wsf?rev=577414&r1=577413&r2=577414&view=diff
==============================================================================
--- incubator/stdcxx/trunk/etc/config/windows/build.wsf (original)
+++ incubator/stdcxx/trunk/etc/config/windows/build.wsf Wed Sep 19 11:56:02 2007
@@ -208,6 +208,7 @@
{
try
{
+ WScript.Echo ("project.ExtenderCATID = " +
project.ExtenderCATID);
projectFile = project.UniqueName;
}
catch (e)
Modified: incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp?rev=577414&r1=577413&r2=577414&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp (original)
+++ incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp Wed Sep 19
11:56:02 2007
@@ -33,6 +33,10 @@
#include <cstdio> // for sprintf()
#include <cstring> // for memset()
+#ifdef _MSC_VER
+# include <climits> // for INT_MAX
+#endif
+
#include <rw_new.h>
#include <driver.h>
@@ -385,7 +389,7 @@
struct MyStruct { };
typedef void (MyStruct::*MemberPointer)();
-template <unsigned long N>
+template <std::size_t N>
struct BigStruct { char dummy [N]; };
/**************************************************************************/
@@ -440,12 +444,20 @@
#if (!defined (__IBMCPP__) || __IBMCPP__ > 700) \
&& !defined (__HP_aCC)
+# ifndef _MSC_VER
+ const std::size_t MAX_SIZE = _RWSTD_PTRDIFF_MAX;
+# else
+ // the MSVC and ICC/Windows has maximum size of
+ // the array equal to 0x7fffffff bytes
+ const std::size_t MAX_SIZE = INT_MAX;
+# endif
+
// avoid instantiating test on very large structs
// to prevent failures (at compile or run-time) due
// to compiler bugs
- test_failure ((BigStruct<_RWSTD_LONG_MAX / 2>*)0, 0);
- test_failure ((BigStruct<_RWSTD_LONG_MAX - 1>*)0, 0);
- test_failure ((BigStruct<_RWSTD_LONG_MAX>*)0, 0);
+ test_failure ((BigStruct<MAX_SIZE / 2>*)0, 0);
+ test_failure ((BigStruct<MAX_SIZE - 1>*)0, 0);
+ test_failure ((BigStruct<MAX_SIZE>*)0, 0);
#else