svn commit: r662717 - /stdcxx/trunk/tests/src/file.cpp
Author: faridz Date: Tue Jun 3 02:18:40 2008 New Revision: 662717 URL: http://svn.apache.org/viewvc?rev=662717view=rev Log: 2008-06-03 Farid Zaripov [EMAIL PROTECTED] Merged r662715 from 4.2.x branch. * tests/src/file.cpp (rw_nextfd) [_MSC_VER]: Disable expected Invalid file descriptor CRT assertions from _commit(). Modified: stdcxx/trunk/tests/src/file.cpp Modified: stdcxx/trunk/tests/src/file.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/file.cpp?rev=662717r1=662716r2=662717view=diff == --- stdcxx/trunk/tests/src/file.cpp (original) +++ stdcxx/trunk/tests/src/file.cpp Tue Jun 3 02:18:40 2008 @@ -50,6 +50,9 @@ # include unistd.h // for close(), open() #else # include io.h // for _commit() +# ifdef _MSC_VER +#include crtdbg.h // for _CrtSetReportMode() +# endif #endif #include assert.h // for assert @@ -480,6 +483,12 @@ #if defined (_WIN32) || defined (_WIN64) +# ifdef _MSC_VER +// save the report mode and disable Invalid file descriptor +// CRT assertions from _commit() +const int prev_mode = _CrtSetReportMode (_CRT_ASSERT, 0); +# endif + for (int i = 0; i != 256; ++i) { const int ret = _commit (i); @@ -487,6 +496,13 @@ if (-1 != ret || EBADF != errno) ++*count; } + +# ifdef _MSC_VER +// restore the previous mode +if (-1 != prev_mode) +_CrtSetReportMode (_CRT_ASSERT, prev_mode); +# endif + #else // if not Windoze for (int i = 0; i != 256; ++i) {
svn commit: r662708 - /stdcxx/trunk/tests/src/driver.cpp
Author: faridz Date: Tue Jun 3 01:55:39 2008 New Revision: 662708 URL: http://svn.apache.org/viewvc?rev=662708view=rev Log: 2008-06-03 Farid Zaripov [EMAIL PROTECTED] Merged r662706 from 4.2.x branch. * tests/src/driver.cpp (_rw_invalid_parameter) [_MSC_VER = 1400]: New function - invalid parameter handler. (_rw_opt_no_popups) [_MSC_VER = 1400]: Set _rw_invalid_parameter() as invalid parameter handler to disable invalid parameter CRT popups. Modified: stdcxx/trunk/tests/src/driver.cpp Modified: stdcxx/trunk/tests/src/driver.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/driver.cpp?rev=662708r1=662707r2=662708view=diff == --- stdcxx/trunk/tests/src/driver.cpp (original) +++ stdcxx/trunk/tests/src/driver.cpp Tue Jun 3 01:55:39 2008 @@ -42,7 +42,7 @@ #include setjmp.h// for longjmp, setjmp, ... #include stdarg.h// for va_list #include stdio.h // for fileno -#include stdlib.h// for free +#include stdlib.h// for free, _set_invalid_parameter_handler() #include string.h// for strchr, strcpy #ifdef _WIN32 @@ -925,6 +925,20 @@ #ifdef _WIN32 +# if defined (_MSC_VER) _MSC_VER = 1400 + +static void +_rw_invalid_parameter (const wchar_t* /*expression*/, + const wchar_t* /*function*/, + const wchar_t* /*file*/, + unsigned int /*line*/, + uintptr_t /*pReserved*/) +{ +// empty handler - ignore invalid parameter validation +} + +# endif // MSVC 8.0 and later + static int _rw_opt_no_popups (int argc, char *argv[]) { @@ -954,6 +968,10 @@ SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); # ifdef _MSC_VER +#if _MSC_VER = 1400 +_set_invalid_parameter_handler (_rw_invalid_parameter); +#endif // MSVC 8.0 and later + _CrtSetReportMode (_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); _CrtSetReportFile (_CRT_WARN, _CRTDBG_FILE_STDERR); _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
[Stdcxx Wiki] Update of FloatingPoint by MartinSebor
Dear Wiki user, You have subscribed to a wiki page or wiki category on Stdcxx Wiki for change notification. The following page has been changed by MartinSebor: http://wiki.apache.org/stdcxx/FloatingPoint The comment on the change is: Started documenting platform-specific Infinity and NaN details. New page: = WORK IN PROGRESS = == libc symbols == The table below lists the public symbols defined on each platform for Infinity, Quiet NaN, and Signaling NaN. || || AIX || HP-UX || IRIX || Linux || Solaris || Tru64 UNIX || Windows || || header|| float.h || || |||| || || || || Infinity ||`DBL_INF` || || N/A || `INFINITY` || `infinity()` || `DBL_INFINITY` || || || Quiet NaN ||`DBL_QNAN` || || N/A || `nan()` || `quiet_nan(long)`|| `DBL_QNAN` || || || Signaling NaN ||`DBL_SNAN` || || N/A || N/A|| `signaling_nan(long)`|| `DBL_SNAN` || || == printf() formatting == || || AIX|| HP-UX|| IRIX || Linux || Solaris || Tru64 || || Infinity || `+/- INF` || `+/- inf`|| `+/- inf` || `+/- inf` || `+/- Inf` || `+/- INF` || || Quiet NaN || `+/- NaNQ` || `+/- nan`|| `+/- nan0xxx` || `+/- nan` || `+/- NaN` || `NaNQ` || || Signaling NaN || `+/- NaNS` || `+/- nan`|| `+/- nan0xxx` || `+/- nan` || `+/- NaN` || `NaNS` || == numeric_limitsdouble values/formatting == || || AIX || HP-UX || IRIX || Linux || Solaris/x86 || Tru64 || || || XLC++ 9.0 || aCC 3,6 || MIPSpro|| gcc|| Sun C++ || HP C++ || || `infinity()` || `INF` || `inf` || `inf` || `inf` || `Inf` || 0 || || `quiet_NaN()`|| `-NaNQ` || `nan` || `nan0xxx` || `nan` || `NaN` || 0 || || `signaling_NaN()`|| `-INF` || `nan` || `nan0xxx` || `nan` || `NaN` || 0 || AIX/Power: INF: INF: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0 QNAN: NaNQ: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x8 SNAN: NaNS: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x0005 HP-UX/IPF: INF: inf: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0 QNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x4 SNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x8 HP-UX/PA INF: inf: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0 QNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x4 SNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x8 Linux/x86_64 INF: inf: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0 QNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x8 SNAN: nan: signbit = 0 sign = 0, exponent = 0x7ff, fraction = 0x4 Tru64 UNIX INF: INF: signbit = 0 sign = 0, exponent = 0, fraction = 0x7ff0 QNAN: NaNQ: signbit = 0x1 sign = 0, exponent = 0, fraction = 0xfff8 SNAN: NaNS: signbit = 0 sign = 0x1, exponent = 0x2aa, fraction = 0x7ff50005