Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 76443 invoked from network); 3 Jun 2008 08:55:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jun 2008 08:55:21 -0000 Received: (qmail 62912 invoked by uid 500); 3 Jun 2008 08:55:24 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 62885 invoked by uid 500); 3 Jun 2008 08:55:24 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 62876 invoked by uid 99); 3 Jun 2008 08:55:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 01:55:24 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jun 2008 08:54:43 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CEE362388A31; Tue, 3 Jun 2008 01:55:00 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r662707 - /stdcxx/branches/4.3.x/tests/src/driver.cpp Date: Tue, 03 Jun 2008 08:55:00 -0000 To: commits@stdcxx.apache.org From: faridz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080603085500.CEE362388A31@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: faridz Date: Tue Jun 3 01:55:00 2008 New Revision: 662707 URL: http://svn.apache.org/viewvc?rev=662707&view=rev Log: 2008-06-03 Farid Zaripov 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/branches/4.3.x/tests/src/driver.cpp Modified: stdcxx/branches/4.3.x/tests/src/driver.cpp URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/driver.cpp?rev=662707&r1=662706&r2=662707&view=diff ============================================================================== --- stdcxx/branches/4.3.x/tests/src/driver.cpp (original) +++ stdcxx/branches/4.3.x/tests/src/driver.cpp Tue Jun 3 01:55:00 2008 @@ -42,7 +42,7 @@ #include // for longjmp, setjmp, ... #include // for va_list #include // for fileno -#include // for free +#include // for free, _set_invalid_parameter_handler() #include // 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);