svn commit: r555341 - /incubator/stdcxx/trunk/etc/config/windows/runall.wsf
Author: faridz Date: Wed Jul 11 10:07:33 2007 New Revision: 555341 URL: http://svn.apache.org/viewvc?view=revrev=555341 Log: 2007-07-11 Farid Zaripov [EMAIL PROTECTED] * runall.wsf: Added processing of FORMAT, NOUT, TRAP status. Modified: incubator/stdcxx/trunk/etc/config/windows/runall.wsf Modified: incubator/stdcxx/trunk/etc/config/windows/runall.wsf URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/runall.wsf?view=diffrev=555341r1=555340r2=555341 == --- incubator/stdcxx/trunk/etc/config/windows/runall.wsf (original) +++ incubator/stdcxx/trunk/etc/config/windows/runall.wsf Wed Jul 11 10:07:33 2007 @@ -300,12 +300,15 @@ { case 0: // OK case -7: // OUTPUT +case -8: // FORMAT +case -9: // NOUT ++exRunSucceeded; fileLog.WriteLine(itemInfo.name + completed successfully, exit code + itemInfo.exitCode); break; -case -1: // other -case -4: // SEGV +case -1: // other +case -4: // SEGV +case -10: // TRAP ++exRunFailed; fileLog.WriteLine(itemInfo.name + failed); break; @@ -371,6 +374,15 @@ break; case OUTPUT: res = -7; +break; +case FORMAT: +res = -8; +break; +case NOUT: +res = -9; +break; +case TRAP: +res = -10; break; default: res = -1;
svn commit: r555657 - in /incubator/stdcxx/trunk/util: exec.cpp runall.cpp
Author: faridz Date: Thu Jul 12 08:19:20 2007 New Revision: 555657 URL: http://svn.apache.org/viewvc?view=revrev=555657 Log: 2007-07-12 Farid Zaripov [EMAIL PROTECTED] * exec.cpp [WIN32]: Added map between NT_STATUS values and UNIX signals. (exec_file) [WIN32]: Translate exit code to signal value using map. * runall.cpp [WIN32]: Removed #include'ing of signal.h and windows.h. Modified: incubator/stdcxx/trunk/util/exec.cpp incubator/stdcxx/trunk/util/runall.cpp Modified: incubator/stdcxx/trunk/util/exec.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/exec.cpp?view=diffrev=555657r1=555656r2=555657 == --- incubator/stdcxx/trunk/util/exec.cpp (original) +++ incubator/stdcxx/trunk/util/exec.cpp Thu Jul 12 08:19:20 2007 @@ -48,7 +48,10 @@ # include windows.h /* for PROCESS_INFORMATION, ... */ # include process.h /* for CreateProcess, ... */ # ifndef SIGTRAP -# define SIGTRAP 5 // STATUS_BREAKPOINT translated into SIGTRAP +#define SIGTRAP 5 // STATUS_BREAKPOINT translated into SIGTRAP +# endif +# ifndef SIGBUS +#define SIGBUS 10 // STATUS_IN_PAGE_ERROR translated into SIGBUS # endif #endif #include sys/stat.h /* for S_* */ @@ -925,6 +928,29 @@ } } #else /* _WIN{32,64} */ + +// map between NT_STATUS value and corresponding UNIX signal +static const struct { +DWORD nt_status; +int signal; +} nt_status_map [] = { +{ STATUS_BREAKPOINT, SIGTRAP }, +{ STATUS_ACCESS_VIOLATION,SIGSEGV }, +{ STATUS_IN_PAGE_ERROR, SIGBUS }, +{ STATUS_ILLEGAL_INSTRUCTION, SIGILL }, +{ STATUS_PRIVILEGED_INSTRUCTION, SIGILL }, +{ STATUS_FLOAT_DENORMAL_OPERAND, SIGFPE }, +{ STATUS_FLOAT_DIVIDE_BY_ZERO,SIGFPE }, +{ STATUS_FLOAT_INEXACT_RESULT,SIGFPE }, +{ STATUS_FLOAT_INVALID_OPERATION, SIGFPE }, +{ STATUS_FLOAT_OVERFLOW, SIGFPE }, +{ STATUS_FLOAT_STACK_CHECK, SIGFPE }, +{ STATUS_FLOAT_UNDERFLOW, SIGFPE }, +{ STATUS_INTEGER_DIVIDE_BY_ZERO, SIGFPE }, +{ STATUS_INTEGER_OVERFLOW,SIGFPE } +}; + + /** Opens an input file, based on exec_name, using the child_sa security setting. @@ -1243,13 +1269,12 @@ if (0 == CloseHandle (child.hProcess)) warn_last_error (Closing child process handle); -if (STATUS_ACCESS_VIOLATION == result-exit) { -result-exit = SIGSEGV; -result-signaled = 1; -} -else if (STATUS_BREAKPOINT == result-exit) { -result-exit = SIGTRAP; -result-signaled = 1; +for (int i = 0; i sizeof (nt_status_map) / sizeof (*nt_status_map); ++i) { +if (nt_status_map [i].nt_status == DWORD (result-exit)) { +result-exit = nt_status_map [i].signal; +result-signaled = 1; +break; +} } } Modified: incubator/stdcxx/trunk/util/runall.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/runall.cpp?view=diffrev=555657r1=555656r2=555657 == --- incubator/stdcxx/trunk/util/runall.cpp (original) +++ incubator/stdcxx/trunk/util/runall.cpp Thu Jul 12 08:19:20 2007 @@ -35,9 +35,6 @@ #include sys/stat.h #if !defined (_WIN32) !defined (_WIN64) # include sys/wait.h /* for WIFEXITED(), ... */ -#else -# include signal.h /* for SIGSEGV */ -# include windows.h/* for STATUS_ACCESS_VIOLATION */ #endif #include cmdopt.h
svn commit: r555970 - /incubator/stdcxx/trunk/tests/src/fmt_bits.cpp
Author: faridz Date: Fri Jul 13 05:31:08 2007 New Revision: 555970 URL: http://svn.apache.org/viewvc?view=revrev=555970 Log: 2007-07-13 Farid Zaripov [EMAIL PROTECTED] * fmt_bits.cpp (_rw_fmtlasterror): Cast pmsg to const char* to avoid MSVC error. Modified: incubator/stdcxx/trunk/tests/src/fmt_bits.cpp Modified: incubator/stdcxx/trunk/tests/src/fmt_bits.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/fmt_bits.cpp?view=diffrev=555970r1=555969r2=555970 == --- incubator/stdcxx/trunk/tests/src/fmt_bits.cpp (original) +++ incubator/stdcxx/trunk/tests/src/fmt_bits.cpp Fri Jul 13 05:31:08 2007 @@ -1026,7 +1026,9 @@ newspec.width= 0; newspec.fl_pound = 0; -const int result = _rw_fmtstr (newspec, buf, pmsg, _RWSTD_SIZE_MAX); +const int result = _rw_fmtstr (newspec, buf, + _RWSTD_STATIC_CAST (const char*, pmsg), + _RWSTD_SIZE_MAX); LocalFree (pmsg);
svn commit: r557661 - /incubator/stdcxx/trunk/tests/self/0.new.cpp
Author: faridz Date: Thu Jul 19 08:43:08 2007 New Revision: 557661 URL: http://svn.apache.org/viewvc?view=revrev=557661 Log: 2007-07-19 Farid Zaripov [EMAIL PROTECTED] * 0.new.cpp: Removed handling of the SIGSEGV signal. Skip all tests if _RWSTD_NO_REPLACEABLE_NEW_DELETE macro #defined. Modified: incubator/stdcxx/trunk/tests/self/0.new.cpp Modified: incubator/stdcxx/trunk/tests/self/0.new.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/self/0.new.cpp?view=diffrev=557661r1=557660r2=557661 == --- incubator/stdcxx/trunk/tests/self/0.new.cpp (original) +++ incubator/stdcxx/trunk/tests/self/0.new.cpp Thu Jul 19 08:43:08 2007 @@ -61,7 +61,6 @@ #define FAIL(code) \ fail = line = __LINE__; \ signal (SIGABRT, handle_ABRT); \ -signal (SIGSEGV, handle_ABRT); \ if (0 == setjmp (env)) {\ code; \ exit_status = 1;\ @@ -73,7 +72,6 @@ #define PASS(code) \ fail = -1; line = __LINE__; \ signal (SIGABRT, handle_ABRT); \ -signal (SIGSEGV, handle_ABRT); \ if (0 == setjmp (env)) {\ code; \ } \ @@ -469,13 +467,14 @@ int run_test (int, char**) { -#define TEST(name) \ +#ifndef _RWSTD_NO_REPLACEABLE_NEW_DELETE + +# define TEST(name)\ if (rw_opt_no_ ## name) \ rw_note (0, 0, __LINE__, %s test disabled, #name);\ -else\ +else\ test_ ## name () - TEST (bad_alloc); TEST (mismatch); TEST (double_delete); @@ -484,11 +483,22 @@ TEST (leaks); TEST (stress); +#else// _RWSTD_NO_REPLACEABLE_NEW_DELETE + +rw_note (0, 0, __LINE__, Test disabled); + +#endif // _RWSTD_NO_REPLACEABLE_NEW_DELETE + return 0; } /**/ - +/* +void* operator new (size_t n) throw (std::bad_alloc) +{ +return 0; +} +*/ int main (int argc, char** argv) { return rw_test (argc, argv, __FILE__,
svn commit: r557710 - /incubator/stdcxx/trunk/tests/include/rw_streambuf.h
Author: faridz Date: Thu Jul 19 11:06:00 2007 New Revision: 557710 URL: http://svn.apache.org/viewvc?view=revrev=557710 Log: 2007-07-19 Farid Zaripov [EMAIL PROTECTED] * rw_streambuf.h (MyStreambuf): Init throw_when_ array using when parameter. Modified: incubator/stdcxx/trunk/tests/include/rw_streambuf.h Modified: incubator/stdcxx/trunk/tests/include/rw_streambuf.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/include/rw_streambuf.h?view=diffrev=557710r1=557709r2=557710 == --- incubator/stdcxx/trunk/tests/include/rw_streambuf.h (original) +++ incubator/stdcxx/trunk/tests/include/rw_streambuf.h Thu Jul 19 11:06:00 2007 @@ -235,6 +235,10 @@ // set the fail and throw flags if (fail_set Throw) { throw_set_ = fail_set ~Throw; + +for (unsigned i = 0; i 11; ++i) +if (throw_set_ (1U i)) +throw_when_ [i] = when; } else { fail_set_ = fail_set; @@ -281,6 +285,10 @@ // set the fail and throw flags if (fail_set Throw) { throw_set_ = fail_set ~Throw; + +for (unsigned i = 0; i 11; ++i) +if (throw_set_ (1U i)) +throw_when_ [i] = when; } else { fail_set_ = fail_set;
svn commit: r557742 - /incubator/stdcxx/trunk/include/string.cc
Author: faridz Date: Thu Jul 19 12:11:06 2007 New Revision: 557742 URL: http://svn.apache.org/viewvc?view=revrev=557742 Log: 2007-07-19 Farid Zaripov [EMAIL PROTECTED] STDCXX-466 * string.cc (rfind): Don't throw std::length_error() if n max_size(). Modified: incubator/stdcxx/trunk/include/string.cc Modified: incubator/stdcxx/trunk/include/string.cc URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/string.cc?view=diffrev=557742r1=557741r2=557742 == --- incubator/stdcxx/trunk/include/string.cc (original) +++ incubator/stdcxx/trunk/include/string.cc Thu Jul 19 12:11:06 2007 @@ -753,12 +753,6 @@ { _RWSTD_ASSERT(__s != 0); -_RWSTD_REQUIRES (__n = max_size (), - (_RWSTD_ERROR_LENGTH_ERROR, - _RWSTD_FUNC (basic_string::rfind(const_pointer, - size_type, size_type) const), - __n, max_size ())); - if (size() __n) return npos;
svn commit: r558688 - /incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp
Author: faridz Date: Mon Jul 23 04:33:41 2007 New Revision: 558688 URL: http://svn.apache.org/viewvc?view=revrev=558688 Log: 2007-07-23 Farid Zaripov [EMAIL PROTECTED] * 21.string.rfind.stdcxx-466.cpp: New regression test for STDCXX-466. Added: incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp (with props) Added: incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp?view=autorev=558688 == --- incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp (added) +++ incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp Mon Jul 23 04:33:41 2007 @@ -0,0 +1,41 @@ +/ + * + * 21.string.rfind.stdcxx-466.cpp - test case from STDCXX-466 issue + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + **/ + +#include cassert +#include string + +int main (int argc, char* argv[]) +{ +std::string s (abcd); +try { +assert (std::string::npos == s.rfind (bc, 0, s.max_size () + 1)); +} +catch (...) { +assert (!Unexpected exception was thrown); +} + +return 0; +} Propchange: incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp -- svn:eol-style = native Propchange: incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp -- svn:keywords = Id
svn commit: r559049 - in /incubator/stdcxx/trunk/tests/strings: 21.string.rfind.stdcxx-466.cpp 21.string.stdcxx-466.cpp
Author: faridz Date: Tue Jul 24 06:27:37 2007 New Revision: 559049 URL: http://svn.apache.org/viewvc?view=revrev=559049 Log: 2007-07-24 Farid Zaripov [EMAIL PROTECTED] * 21.string.rfind.stdcxx-466.cpp: Added testing of find(), find_first_of(), find_last_of(), find_first_not_of(), find_last_not_of(), compare() methods. File renamed ... * 21.string.stdcxx-466: ... to this. Added: incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cpp - copied, changed from r558984, incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp Removed: incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp Copied: incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cpp (from r558984, incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp) URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cpp?view=diffrev=559049p1=incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cppr1=558984p2=incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cppr2=559049 == --- incubator/stdcxx/trunk/tests/strings/21.string.rfind.stdcxx-466.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cpp Tue Jul 24 06:27:37 2007 @@ -29,13 +29,29 @@ int main (int argc, char* argv[]) { -std::string s (abcd); -try { -assert (std::string::npos == s.rfind (bc, 0, s.max_size () + 1)); -} -catch (...) { -assert (!Unexpected exception was thrown); -} +const std::string s (efgh); + +const std::string::size_type len = s.max_size () + 1; + +#define TEST(expr) \ +try { \ +assert (expr); \ +} \ +catch (...) { \ +assert (!Unexpected exception was thrown);\ +} (void)0 + +const std::string::size_type npos = std::string::npos; + +TEST (npos == s.find (fg, 0, len)); +TEST (npos == s.rfind (fg, 0, len)); +TEST (0 == s.find_first_of (eh, 0, len)); +TEST (3 == s.find_last_of (eh, npos, len)); +TEST (npos == s.find_first_not_of (eh, 0, len)); +TEST (npos == s.find_last_not_of (eh, npos, len)); +TEST (0 s.compare (0, npos, efgh, len)); +TEST (0 s.compare (0, npos, ijkl, len)); +TEST (0 s.compare (0, npos, abcd, len)); return 0; }
svn commit: r559084 - /incubator/stdcxx/trunk/include/string.cc
Author: faridz Date: Tue Jul 24 08:32:40 2007 New Revision: 559084 URL: http://svn.apache.org/viewvc?view=revrev=559084 Log: 2007-07-24 Farid Zaripov [EMAIL PROTECTED] STDCXX-175 * string.cc (replace): Throw std::length_error() if __n2 max_size(). Modified: incubator/stdcxx/trunk/include/string.cc Modified: incubator/stdcxx/trunk/include/string.cc URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/string.cc?view=diffrev=559084r1=559083r2=559084 == --- incubator/stdcxx/trunk/include/string.cc (original) +++ incubator/stdcxx/trunk/include/string.cc Tue Jul 24 08:32:40 2007 @@ -346,6 +346,12 @@ // number of characters to delete const size_type __xlen = _C_min (__n1, __size0 - __pos1); +_RWSTD_REQUIRES (__n2 = max_size (), + (_RWSTD_ERROR_LENGTH_ERROR, + _RWSTD_FUNC (basic_string::replace(size_type, size_type + , const_pointer, size_type)), + __n2, max_size())); + _RWSTD_REQUIRES (__size0 - __xlen = max_size () - __n2, (_RWSTD_ERROR_LENGTH_ERROR, _RWSTD_FUNC (basic_string::replace(size_type, size_type
svn commit: r559085 - in /incubator/stdcxx/trunk/tests/strings: 21.string.replace.stdcxx-175.cpp 21.string.stdcxx-466.cpp
Author: faridz Date: Tue Jul 24 08:35:38 2007 New Revision: 559085 URL: http://svn.apache.org/viewvc?view=revrev=559085 Log: 2007-07-24 Farid Zaripov [EMAIL PROTECTED] * 21.string.stdcxx-466.cpp: Corrected file name in file header. * 21.string.replace.stdcxx-175.cpp: New regression test for STDCXX-175. Added: incubator/stdcxx/trunk/tests/strings/21.string.replace.stdcxx-175.cpp (with props) Modified: incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cpp Added: incubator/stdcxx/trunk/tests/strings/21.string.replace.stdcxx-175.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.replace.stdcxx-175.cpp?view=autorev=559085 == --- incubator/stdcxx/trunk/tests/strings/21.string.replace.stdcxx-175.cpp (added) +++ incubator/stdcxx/trunk/tests/strings/21.string.replace.stdcxx-175.cpp Tue Jul 24 08:35:38 2007 @@ -0,0 +1,45 @@ +/ +* +* 21.string.replace.stdcxx-175.cpp - test case from STDCXX-175 issue +* +* $Id$ +* +*** +* +* Licensed to the Apache Software Foundation (ASF) under one or more +* contributor license agreements. See the NOTICE file distributed +* with this work for additional information regarding copyright +* ownership. The ASF licenses this file to you under the Apache +* License, Version 2.0 (the License); you may not use this file +* except in compliance with the License. You may obtain a copy of +* the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +* implied. See the License for the specific language governing +* permissions and limitations under the License. +* +**/ + +#include cassert +#include string +#include stdexcept + +int main (int argc, char* argv []) +{ +std::string s (4095, 'a'); + +try +{ +s.replace (0, 1, a, s.max_size () + 1); +assert (!Expect length error, got nothing); +} +catch (std::length_error e) +{ +} + +return 0; +} Propchange: incubator/stdcxx/trunk/tests/strings/21.string.replace.stdcxx-175.cpp -- svn:eol-style = native Propchange: incubator/stdcxx/trunk/tests/strings/21.string.replace.stdcxx-175.cpp -- svn:keywords = Id Modified: incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cpp?view=diffrev=559085r1=559084r2=559085 == --- incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cpp Tue Jul 24 08:35:38 2007 @@ -1,6 +1,6 @@ / * - * 21.string.rfind.stdcxx-466.cpp - test case from STDCXX-466 issue + * 21.string.stdcxx-466.cpp - test case from STDCXX-466 issue * * $Id$ *
svn propchange: r559049 - svn:log
Author: faridz Revision: 559049 Modified property: svn:log Modified: svn:log at Tue Jul 24 10:26:23 2007 -- --- svn:log (original) +++ svn:log Tue Jul 24 10:26:23 2007 @@ -3,4 +3,4 @@ * 21.string.rfind.stdcxx-466.cpp: Added testing of find(), find_first_of(), find_last_of(), find_first_not_of(), find_last_not_of(), compare() methods. File renamed ... - * 21.string.stdcxx-466: ... to this. + * 21.string.stdcxx-466.cpp: ... to this.
svn commit: r559370 - in /incubator/stdcxx/trunk/tests: localization/ regress/ strings/
Author: faridz Date: Wed Jul 25 02:02:33 2007 New Revision: 559370 URL: http://svn.apache.org/viewvc?view=revrev=559370 Log: 2007-07-25 Farid Zaripov [EMAIL PROTECTED] * 22.locale.cons.stdcxx-485.cpp: Moved to tests/regress directory. * 21.string.replace.stdcxx-175.cpp: Ditto. * 21.string.stdcxx-466.cpp: Ditto. Added: incubator/stdcxx/trunk/tests/regress/21.string.replace.stdcxx-175.cpp - copied unchanged from r559356, incubator/stdcxx/trunk/tests/strings/21.string.replace.stdcxx-175.cpp incubator/stdcxx/trunk/tests/regress/21.string.stdcxx-466.cpp - copied unchanged from r559356, incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cpp incubator/stdcxx/trunk/tests/regress/22.locale.cons.stdcxx-485.cpp - copied unchanged from r559356, incubator/stdcxx/trunk/tests/localization/22.locale.cons.stdcxx-485.cpp Removed: incubator/stdcxx/trunk/tests/localization/22.locale.cons.stdcxx-485.cpp incubator/stdcxx/trunk/tests/strings/21.string.replace.stdcxx-175.cpp incubator/stdcxx/trunk/tests/strings/21.string.stdcxx-466.cpp
svn commit: r559425 - in /incubator/stdcxx/trunk/util: cmdopt.cpp exec.cpp
Author: faridz Date: Wed Jul 25 05:37:56 2007 New Revision: 559425 URL: http://svn.apache.org/viewvc?view=revrev=559425 Log: 2007-07-25 Farid Zaripov [EMAIL PROTECTED] * cmdopt.cpp [_WIN32]: #define RLIMIT_AS (for limit process memory on Windows). * exec.cpp (exec_file) [_WIN32]: Create process in suspended state. Limit process memory if needed. Set start time as time before resuming process. Modified: incubator/stdcxx/trunk/util/cmdopt.cpp incubator/stdcxx/trunk/util/exec.cpp Modified: incubator/stdcxx/trunk/util/cmdopt.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/cmdopt.cpp?view=diffrev=559425r1=559424r2=559425 == --- incubator/stdcxx/trunk/util/cmdopt.cpp (original) +++ incubator/stdcxx/trunk/util/cmdopt.cpp Wed Jul 25 05:37:56 2007 @@ -73,6 +73,14 @@ const char suffix_sep = '.'; const size_t exe_suffix_len = 4; /* strlen(.exe) == 4 */ const float TICKS_PER_SEC = 1000; /* 100 nanosecond units in a second */ + +# ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +# endif + +# if _WIN32_WINNT = 0x0500 +#define RLIMIT_AS +# endif #endif static const char Modified: incubator/stdcxx/trunk/util/exec.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/exec.cpp?view=diffrev=559425r1=559424r2=559425 == --- incubator/stdcxx/trunk/util/exec.cpp (original) +++ incubator/stdcxx/trunk/util/exec.cpp Wed Jul 25 05:37:56 2007 @@ -45,8 +45,10 @@ #include sys/resource.h /* for setlimit(), RLIMIT_CORE, ... */ # endif #else -# include windows.h /* for PROCESS_INFORMATION, ... */ -# include process.h /* for CreateProcess, ... */ +# ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 +# endif +# include windows.h /* for PROCESS_INFORMATION, CreateProcess, ... */ # ifndef SIGTRAP #define SIGTRAP 5 // STATUS_BREAKPOINT translated into SIGTRAP # endif @@ -1203,12 +1205,9 @@ UINT old_mode = SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX); -/* Check the wall clock before creating the process */ -GetSystemTimeAsFileTime(start); - -/* Create the child process */ +/* Create the child process in suspended state */ if (0 == CreateProcess (options-argv [0], merged, 0, 0, 1, -CREATE_NEW_PROCESS_GROUP, 0, 0, context, child)) { +CREATE_NEW_PROCESS_GROUP | CREATE_SUSPENDED, 0, 0, context, child)) { /* record the status if we failed to create the process */ result-status = ST_SYSTEM_ERROR; warn_last_error (Creating child process);; @@ -1230,6 +1229,41 @@ /* Return if we failed to create the child process */ if (ST_SYSTEM_ERROR == result-status) return; + +#if _WIN32_WINNT = 0x0500 +if (options-as) { +if (HANDLE hJob = CreateJobObject (NULL, NULL)) { +if (AssignProcessToJobObject (hJob, child.hProcess)) { +JOBOBJECT_EXTENDED_LIMIT_INFORMATION job_info = { 0 }; + +job_info.BasicLimitInformation.LimitFlags = +JOB_OBJECT_LIMIT_PROCESS_MEMORY; + +const rw_rlimit* as = options-as; +job_info.ProcessMemoryLimit = +as-rlim_cur as-rlim_max ? as-rlim_cur : as-rlim_max; + +if (!SetInformationJobObject (hJob, + JobObjectExtendedLimitInformation, + job_info, sizeof (job_info))) +warn_last_error (Setting process limits); +} +else +warn_last_error (Assigning process to job object); + +if (!CloseHandle (hJob)) +warn_last_error (Closing job object handle); +} +else +warn_last_error (Creating job object); +} +#endif // _WIN32_WINNT = 0x0500 + +/* Check the wall clock before resuming the process */ +GetSystemTimeAsFileTime(start); + +if (DWORD (-1) == ResumeThread (child.hThread)) +warn_last_error (Resuming process); if (0 == CloseHandle (child.hThread)) warn_last_error (Closing child main thread handle);
svn commit: r559497 - in /incubator/stdcxx/trunk/tests: regress/21.string.stdcxx-466.cpp strings/21.string.find.first.not.of.cpp strings/21.string.find.first.of.cpp strings/21.string.find.last.not.of.
Author: faridz Date: Wed Jul 25 08:43:58 2007 New Revision: 559497 URL: http://svn.apache.org/viewvc?view=revrev=559497 Log: 2007-07-25 Farid Zaripov [EMAIL PROTECTED] * 21.string.stdcxx-466.cpp: Corrected tests for find_first_not_of() and find_last_not_of(). * 21.string.find.first.not.of.cpp: Test updated to reflect changes from r559037. * 21.string.find.first.of.cpp: Ditto. * 21.string.find.last.not.of.cpp: Ditto. * 21.string.find.last.of.cpp: Ditto. Modified: incubator/stdcxx/trunk/tests/regress/21.string.stdcxx-466.cpp incubator/stdcxx/trunk/tests/strings/21.string.find.first.not.of.cpp incubator/stdcxx/trunk/tests/strings/21.string.find.first.of.cpp incubator/stdcxx/trunk/tests/strings/21.string.find.last.not.of.cpp incubator/stdcxx/trunk/tests/strings/21.string.find.last.of.cpp Modified: incubator/stdcxx/trunk/tests/regress/21.string.stdcxx-466.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/regress/21.string.stdcxx-466.cpp?view=diffrev=559497r1=559496r2=559497 == --- incubator/stdcxx/trunk/tests/regress/21.string.stdcxx-466.cpp (original) +++ incubator/stdcxx/trunk/tests/regress/21.string.stdcxx-466.cpp Wed Jul 25 08:43:58 2007 @@ -29,7 +29,7 @@ int main (int argc, char* argv[]) { -const std::string s (efgh); +std::string s (efgh); const std::string::size_type len = s.max_size () + 1; @@ -47,11 +47,14 @@ TEST (npos == s.rfind (fg, 0, len)); TEST (0 == s.find_first_of (eh, 0, len)); TEST (3 == s.find_last_of (eh, npos, len)); -TEST (npos == s.find_first_not_of (eh, 0, len)); -TEST (npos == s.find_last_not_of (eh, npos, len)); TEST (0 s.compare (0, npos, efgh, len)); TEST (0 s.compare (0, npos, ijkl, len)); TEST (0 s.compare (0, npos, abcd, len)); + +s.clear (); + +TEST (npos == s.find_first_not_of (eh, 0, len)); +TEST (npos == s.find_last_not_of (eh, npos, len)); return 0; } Modified: incubator/stdcxx/trunk/tests/strings/21.string.find.first.not.of.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.find.first.not.of.cpp?view=diffrev=559497r1=559496r2=559497 == --- incubator/stdcxx/trunk/tests/strings/21.string.find.first.not.of.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.string.find.first.not.of.cpp Wed Jul 25 08:43:58 2007 @@ -396,14 +396,7 @@ TEST (abcdefghij, abc,10, 3, NPOS, 0), TEST (abcdefghij, cba,10, 1, NPOS, 0), -#ifndef _RWSTD_NO_EXCEPTIONS - -TEST (, cba, 0, -1,0, 1), -TEST (abcdefghij, cba, 0, -1,0, 1), -TEST ([EMAIL PROTECTED], xxx, 0, -1,0, 1), -TEST (abcdefghij, [EMAIL PROTECTED], 0, -1,0, 1), - -#endif // _RWSTD_NO_EXCEPTIONS +TEST (, cba, 0, -1, NPOS, 0), TEST (last test, test, 0, 4,0, 0) }; Modified: incubator/stdcxx/trunk/tests/strings/21.string.find.first.of.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.find.first.of.cpp?view=diffrev=559497r1=559496r2=559497 == --- incubator/stdcxx/trunk/tests/strings/21.string.find.first.of.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.string.find.first.of.cpp Wed Jul 25 08:43:58 2007 @@ -404,10 +404,10 @@ TEST (abcdefghij, abc,10, 3, NPOS, 0), TEST (abcdefghij, cba,10, 1, NPOS, 0), -TEST (, cba, 0, -1,0, 1), -TEST (abcdefghij, cba, 0, -1,0, 1), -TEST ([EMAIL PROTECTED], xxx, 0, -1,0, 1), -TEST (abcdefghij, [EMAIL PROTECTED], 0, -1,0, 1), +TEST (, cba, 0, -1, NPOS, 0), +TEST (abcdefghij, cba, 0, -1,0, 0), +TEST ([EMAIL PROTECTED], xxx, 0, -1,0, 0), +TEST (abcdefghij, [EMAIL PROTECTED], 0, -1,0, 0), TEST (last test, test, 0, 4,2, 0) }; Modified: incubator/stdcxx/trunk/tests/strings/21.string.find.last.not.of.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.string.find.last.not.of.cpp?view=diffrev=559497r1=559496r2=559497 == --- incubator/stdcxx/trunk/tests/strings/21.string.find.last.not.of.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.string.find.last.not.of.cpp Wed Jul 25 08:43:58 2007 @@ -404,10 +404,7 @@ TEST (defghijabc, abc,15, 3,6, 0), TEST (defghijabc, cba,15, 1,8, 0), -TEST (, cba, 0, -1,0
svn commit: r559932 - in /incubator/stdcxx/trunk/etc/config/windows: projectdef.js projects.js runall.wsf utilities.js
Author: faridz Date: Thu Jul 26 11:41:36 2007 New Revision: 559932 URL: http://svn.apache.org/viewvc?view=revrev=559932 Log: 2007-07-26 Farid Zaripov [EMAIL PROTECTED] * utilities.js: Added global variable EXEC_TIMEOUT = 300 seconds. * projectdef.js: Removed execTimeout variable, instead used EXEC_TIMEOUT. * runall.wsf: Removed /COMPAT option, added /RUNFLAGS option. * projects.js: Added proper /RUNFLAGS:... to runExamples, runTests, testLocale projects. Modified: incubator/stdcxx/trunk/etc/config/windows/projectdef.js incubator/stdcxx/trunk/etc/config/windows/projects.js incubator/stdcxx/trunk/etc/config/windows/runall.wsf incubator/stdcxx/trunk/etc/config/windows/utilities.js Modified: incubator/stdcxx/trunk/etc/config/windows/projectdef.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projectdef.js?view=diffrev=559932r1=559931r2=559932 == --- incubator/stdcxx/trunk/etc/config/windows/projectdef.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projectdef.js Thu Jul 26 11:41:36 2007 @@ -27,9 +27,6 @@ var TristateTrue = -1; var TristateFalse = 0; -// the timeout for the exec utility -var execTimeout = 180; - var dte = null; var VCProjectEngine = null; var ICConvertTool = ICProjConvert90.exe; @@ -793,7 +790,7 @@ sanityDef.PreBuildCmd += echo cscript /nologo \ + srcdir + \\run_locale_utils.wsf\ + /s /b:\ + bindir + \ \ + test + .bat\; -sanityDef.CustomBuildCmd = setPath + \r\n\ + exec + \ -t + execTimeout + \ + test + .bat\; +sanityDef.CustomBuildCmd = setPath + \r\n\ + exec + \ -t + EXEC_TIMEOUT + \ + test + .bat\; sanityDef.CustomBuildOut = test + .out; projectDefs.push(sanityDef); @@ -846,7 +843,7 @@ echo cscript /nologo \ + srcdir + \\run_locale_utils.wsf\ + /f /b:\ + bindir + \ /i:\ + nlsDir + \ + /l: + locale.Name + \ + test + .bat\; -projectDef.CustomBuildCmd = setPath + \r\n\ + exec + \ -t + execTimeout + \ + test + .bat\; +projectDef.CustomBuildCmd = setPath + \r\n\ + exec + \ -t + EXEC_TIMEOUT + \ + test + .bat\; projectDef.CustomBuildOut = test + .out; projectDef.PrjDeps.push(sanityDef); Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?view=diffrev=559932r1=559931r2=559932 == --- incubator/stdcxx/trunk/etc/config/windows/projects.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projects.js Thu Jul 26 11:41:36 2007 @@ -257,7 +257,8 @@ /EXEDIR:\$(OutDir)\ + /PRJDIR:\ + runexamplesDef.VCProjDir + \ + /CONFIG:\%SOLUTION%\ + - /LOGFILE:\runexamples.log\; + /LOGFILE:\runexamples.log\ + + /RUNFLAGS:\-t + EXEC_TIMEOUT + \; runexamplesDef.CustomBuildOut = $(OutDir)\\runexamples.log; runexamplesDef.CustomBuildDeps = %FILES%; //runexamplesDef.PrjDeps.push(allexamplesDef); @@ -317,8 +318,8 @@ /EXEDIR:\$(OutDir)\ + /PRJDIR:\ + runtestsDef.VCProjDir + \ + /CONFIG:\%SOLUTION%\ + - /COMPAT + - /LOGFILE:\runtests.log\; + /LOGFILE:\runtests.log\ + + /RUNFLAGS:\--compat -x \'--compat -O -\' -t + EXEC_TIMEOUT + \; runtestsDef.CustomBuildOut = $(OutDir)\\runtests.log; runtestsDef.CustomBuildDeps = %FILES%; //runtestsDef.PrjDeps.push(alltestsDef); @@ -395,7 +396,8 @@ /EXEDIR:\$(OutDir)\ + /CONFIG:\%SOLUTION%\ + /LOGFILE:\runloctests.log\ + - /EXT:bat; + /EXT:bat + + /RUNFLAGS:\-t + EXEC_TIMEOUT + \; testlocaleTplDef.CustomBuildOut = $(OutDir)\\runloctests.log; var testlocalesDef = testlocaleTplDef.createTestLocalesDef(%SRCDIR%\\etc\\nls); Modified: incubator/stdcxx/trunk/etc/config/windows/runall.wsf URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/runall.wsf?view=diffrev=559932r1=559931r2=559932 == --- incubator/stdcxx/trunk/etc/config/windows/runall.wsf (original) +++ incubator/stdcxx/trunk/etc/config/windows/runall.wsf Thu Jul 26 11:41:36 2007 @@ -34,10 +34,10 @@ name=INOUTDIR required=false type=string/ named helpstring=The log file name=LOGFILE required=false type=string/ -named helpstring=Run tests in compat mode name=COMPAT -required=false type=string/ named helpstring=The examples extension name=EXT required=false type=string/ +named helpstring=The additional options for exec utility +name=RUNFLAGS required=false type=string
svn commit: r560283 - /incubator/stdcxx/trunk/include/ansi/cwchar
Author: faridz Date: Fri Jul 27 08:43:52 2007 New Revision: 560283 URL: http://svn.apache.org/viewvc?view=revrev=560283 Log: 2007-07-27 Farid Zaripov [EMAIL PROTECTED] * cwchar: _RWSTD_NO_TM replaced with _RWSTD_NO_STRUCT_TM. Added using ::tm after #including _RWSTD_ANSI_C_TIME_H. Modified: incubator/stdcxx/trunk/include/ansi/cwchar Modified: incubator/stdcxx/trunk/include/ansi/cwchar URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/ansi/cwchar?view=diffrev=560283r1=560282r2=560283 == --- incubator/stdcxx/trunk/include/ansi/cwchar (original) +++ incubator/stdcxx/trunk/include/ansi/cwchar Fri Jul 27 08:43:52 2007 @@ -113,13 +113,15 @@ #ifndef _RWSTD_NO_STRUCT_TM_IN_WCHAR_H using ::tm; -#elif !defined (_RWSTD_NO_TM) +#elif !defined (_RWSTD_NO_STRUCT_TM) } // namespace std #include _RWSTD_ANSI_C_TIME_H namespace std { + +using ::tm; #endif // NO_STRUCT_TM
svn commit: r561060 - in /incubator/stdcxx/trunk/etc/config: GNUmakefile.exm makefile.rules
Author: faridz Date: Mon Jul 30 10:39:50 2007 New Revision: 561060 URL: http://svn.apache.org/viewvc?view=revrev=561060 Log: 2007-07-30 Farid Zaripov [EMAIL PROTECTED] * GNUmakefile.exm: Set TZ environment variable only for examples. * makefile.rules: Determine cygwin using PLATFORM variable. [CYGWIN]: Add $(BINDIR) to PATH. Modified: incubator/stdcxx/trunk/etc/config/GNUmakefile.exm incubator/stdcxx/trunk/etc/config/makefile.rules Modified: incubator/stdcxx/trunk/etc/config/GNUmakefile.exm URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/GNUmakefile.exm?view=diffrev=561060r1=561059r2=561060 == --- incubator/stdcxx/trunk/etc/config/GNUmakefile.exm (original) +++ incubator/stdcxx/trunk/etc/config/GNUmakefile.exm Mon Jul 30 10:39:50 2007 @@ -50,4 +50,7 @@ realclean: dependclean clean rm -f *.out +#set TZ environment variable for examples +run runall run_all: TZ = MST+7 + include ../makefile.rules Modified: incubator/stdcxx/trunk/etc/config/makefile.rules URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/makefile.rules?view=diffrev=561060r1=561059r2=561060 == --- incubator/stdcxx/trunk/etc/config/makefile.rules (original) +++ incubator/stdcxx/trunk/etc/config/makefile.rules Mon Jul 30 10:39:50 2007 @@ -112,14 +112,13 @@ # PlumHall specific: # for all top level tests that failed to build, find and build all # subtests (the little tests the main test consists of) -ifneq ($(LIBSUFFIX),.dll) +ifeq (,$(findstring cygwin,$(PLATFORM))) run runall run_all: $(BINDIR)/exec @(LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(LIBDIR);\ PATH=$$PATH:.;\ TOPDIR=$(TOPDIR); \ TMP=$${TMP:-/tmp}/stdcxx-run-;\ -TZ=MST+7; \ export TMP; \ export LD_LIBRARY_PATH PATH TMP TOPDIR TZ;\ trap rm -rf $$TMP HUP INT QUIT TERM EXIT; \ @@ -128,13 +127,12 @@ exit 0) else -# on Cygwin add $(LIBDIR) to PATH +# on Cygwin add $(LIBDIR) and $(BINDIR) to PATH run runall run_all: $(BINDIR)/exec @(LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(LIBDIR);\ -PATH=$$PATH:$(LIBDIR):.; \ +PATH=$$PATH:$(LIBDIR):$(BINDIR):.;\ TOPDIR=$(TOPDIR); \ TMP=$${TMP:-/tmp}/stdcxx-run-;\ -TZ=MST+7; \ export TMP; \ export LD_LIBRARY_PATH PATH TMP TOPDIR TZ;\ trap rm -rf $$TMP HUP INT QUIT TERM EXIT; \
svn commit: r561069 - /incubator/stdcxx/trunk/tests/src/locale.cpp
Author: faridz Date: Mon Jul 30 10:56:49 2007 New Revision: 561069 URL: http://svn.apache.org/viewvc?view=revrev=561069 Log: 2007-07-30 Farid Zaripov [EMAIL PROTECTED] * locale.cpp (rw_locales): On error return C\0 instead of 0. [_MSC_VER]: Use _free_dbg() instead of free(). Modified: incubator/stdcxx/trunk/tests/src/locale.cpp Modified: incubator/stdcxx/trunk/tests/src/locale.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/locale.cpp?view=diffrev=561069r1=561068r2=561069 == --- incubator/stdcxx/trunk/tests/src/locale.cpp (original) +++ incubator/stdcxx/trunk/tests/src/locale.cpp Mon Jul 30 10:56:49 2007 @@ -329,6 +329,7 @@ _TEST_EXPORT char* rw_locales (int loc_cat, const char* grep_exp) { +static char deflocname [3] = C\0; static char* slocname = 0; static size_t size = 0; // the number of elements in the array @@ -370,7 +371,7 @@ const char* const fname = rw_tmpnam (0); if (!fname) { -return 0; // error +return deflocname; // error } // make sure that grep_exp is = 80 @@ -385,7 +386,7 @@ : rw_system (locale -a %s, fname); if (exit_status) { -return 0; // error +return deflocname; // error } // open file containing the list of installed locales @@ -429,7 +430,12 @@ _RWSTD_STATIC_CAST (char*, malloc (total_size)); memcpy (tmp, slocname, total_size - 5120); + +#ifndef _MSC_VER free (slocname); +#else +_free_dbg (slocname, _CLIENT_BLOCK); +#endif slocname = tmp; locname = slocname + size - strlen (linebuf) - 1; @@ -477,7 +483,7 @@ remove (fname); -return slocname; +return *slocname ? slocname : deflocname; } /**/
svn commit: r561419 - in /incubator/stdcxx/trunk/etc/config: makefile.rules windows/projects.js
Author: faridz Date: Tue Jul 31 11:14:58 2007 New Revision: 561419 URL: http://svn.apache.org/viewvc?view=revrev=561419 Log: 2007-07-31 Farid Zaripov [EMAIL PROTECTED] * makefile.rules: Removed double exporting of the TMP variable. * projects.js: Set TOPDIR env variable before running tests. Modified: incubator/stdcxx/trunk/etc/config/makefile.rules incubator/stdcxx/trunk/etc/config/windows/projects.js Modified: incubator/stdcxx/trunk/etc/config/makefile.rules URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/makefile.rules?view=diffrev=561419r1=561418r2=561419 == --- incubator/stdcxx/trunk/etc/config/makefile.rules (original) +++ incubator/stdcxx/trunk/etc/config/makefile.rules Tue Jul 31 11:14:58 2007 @@ -119,7 +119,6 @@ PATH=$$PATH:.;\ TOPDIR=$(TOPDIR); \ TMP=$${TMP:-/tmp}/stdcxx-run-;\ -export TMP; \ export LD_LIBRARY_PATH PATH TMP TOPDIR TZ;\ trap rm -rf $$TMP HUP INT QUIT TERM EXIT; \ mkdir -p $$TMP; \ @@ -133,7 +132,6 @@ PATH=$$PATH:$(LIBDIR):$(BINDIR):.;\ TOPDIR=$(TOPDIR); \ TMP=$${TMP:-/tmp}/stdcxx-run-;\ -export TMP; \ export LD_LIBRARY_PATH PATH TMP TOPDIR TZ;\ trap rm -rf $$TMP HUP INT QUIT TERM EXIT; \ mkdir -p $$TMP; \ Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?view=diffrev=561419r1=561418r2=561419 == --- incubator/stdcxx/trunk/etc/config/windows/projects.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projects.js Tue Jul 31 11:14:58 2007 @@ -314,6 +314,7 @@ runtestsDef.CustomBuildFile = runall.wsf; runtestsDef.CustomBuildCmd = set PATH=$(SolutionDir)%CONFIG%\\bin;$(SolutionDir)%CONFIG%\\lib;%PATH%\r\n + +set TOPDIR=%SRCDIR%\r\n + cscript /nologo \%CUSTOMFILE%\ + /EXEDIR:\$(OutDir)\ + /PRJDIR:\ + runtestsDef.VCProjDir + \ +
svn propchange: r555006 - svn:log
Author: faridz Revision: 555006 Modified property: svn:log Modified: svn:log at Wed Aug 1 11:20:15 2007 -- --- svn:log (original) +++ svn:log Wed Aug 1 11:20:15 2007 @@ -1,4 +1,5 @@ 2007-07-10 Farid Zaripov [EMAIL PROTECTED] + STDCXX-508 * catalog.cpp (catopen): while() loop replaced to for() loop with checking for max iterations.
svn commit: r562537 - /incubator/stdcxx/trunk/etc/config/windows/runall.wsf
Author: faridz Date: Fri Aug 3 11:11:59 2007 New Revision: 562537 URL: http://svn.apache.org/viewvc?view=revrev=562537 Log: 2007-08-03 Farid Zaripov [EMAIL PROTECTED] * runall.wsf (runAllExamples): Run command using cmd.exe with redirecting stderr to stdout to avoid deadlocks. Modified: incubator/stdcxx/trunk/etc/config/windows/runall.wsf Modified: incubator/stdcxx/trunk/etc/config/windows/runall.wsf URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/runall.wsf?view=diffrev=562537r1=562536r2=562537 == --- incubator/stdcxx/trunk/etc/config/windows/runall.wsf (original) +++ incubator/stdcxx/trunk/etc/config/windows/runall.wsf Fri Aug 3 11:11:59 2007 @@ -255,7 +255,7 @@ var prevDir = WshShell.CurrentDirectory; WshShell.CurrentDirectory = exeDir; -var oExec = WshShell.Exec(runCmd); +var oExec = WshShell.Exec(cmd /c + runCmd + 21); WshShell.CurrentDirectory = prevDir; if (!oExec)
svn commit: r563498 - /incubator/stdcxx/trunk/etc/config/windows/projects.js
Author: faridz Date: Tue Aug 7 06:36:26 2007 New Revision: 563498 URL: http://svn.apache.org/viewvc?view=revrev=563498 Log: 2007-08-07 Farid Zaripov [EMAIL PROTECTED] * projects.js (CreateProjectsDefs): Fixed bug with deleting original rwtest.dll when solution was generated with /COPYDLL:yes. Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?view=diffrev=563498r1=563497r2=563498 == --- incubator/stdcxx/trunk/etc/config/windows/projects.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projects.js Tue Aug 7 06:36:26 2007 @@ -428,15 +428,20 @@ var arrDeps = projectDef.PrjRefs.concat(projectDef.PrjDeps); var command = ; +var cmdtpl = set src=_SRC_\r\n + + set dst=_DST_\r\n + + if /I not %src%==%dst% (\r\n + + if exist %src% (\r\n + + del %dst%\r\n + + copy /Y %src% %dst%\r\n + + )); + if (0 = arrayIndexOf(arrDeps, stdcxxDef)) { var libname = libstd%CONFIG%.dll; var src = \ + libPath + \\ + libname + \; var dst = \$(OutDir)\\ + libname + \; -var cmd = if exist + src + (\r\n + - del + dst + \r\n + - copy /Y + src + + dst + \r\n + - ); +var cmd = cmdtpl.replace(_SRC_, src).replace(_DST_, dst); if (0 == command.length) command = cmd; else @@ -448,10 +453,7 @@ var libname = rwtest.dll; var src = \$(SolutionDir)%CONFIG%\\tests\\ + libname + \; var dst = \$(OutDir)\\ + libname + \; -var cmd = if exist + src + (\r\n + - del + dst + \r\n + - copy /Y + src + + dst + \r\n + - ); +var cmd = cmdtpl.replace(_SRC_, src).replace(_DST_, dst); if (0 == command.length) command = cmd; else
svn commit: r563513 - /incubator/stdcxx/trunk/etc/config/windows/runall.wsf
Author: faridz Date: Tue Aug 7 07:39:08 2007 New Revision: 563513 URL: http://svn.apache.org/viewvc?view=revrev=563513 Log: 2007-08-07 Farid Zaripov [EMAIL PROTECTED] * runall.wsf (runAllExamples): Removed quotes around exec.exe. Lowered timeout to 100 ms. Modified: incubator/stdcxx/trunk/etc/config/windows/runall.wsf Modified: incubator/stdcxx/trunk/etc/config/windows/runall.wsf URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/runall.wsf?view=diffrev=563513r1=563512r2=563513 == --- incubator/stdcxx/trunk/etc/config/windows/runall.wsf (original) +++ incubator/stdcxx/trunk/etc/config/windows/runall.wsf Tue Aug 7 07:39:08 2007 @@ -243,7 +243,7 @@ ++exRun; } -var runCmd = \ + utlExec + \; +var runCmd = utlExec; if (0 srcDir.length) runCmd += -d \ + srcDir + \; @@ -268,9 +268,10 @@ while (oExec.Status == 0) { execOut += oExec.StdOut.ReadAll(); -WScript.Sleep(500); +WScript.Sleep(100); } +execOut += oExec.StdOut.ReadAll(); WScript.Echo(execOut); for (var i = 0; i arrInfo.length; ++i)
svn commit: r564002 - /incubator/stdcxx/trunk/util/exec.cpp
Author: faridz Date: Wed Aug 8 12:31:00 2007 New Revision: 564002 URL: http://svn.apache.org/viewvc?view=revrev=564002 Log: 2007-08-08 Farid Zaripov [EMAIL PROTECTED] * exec.cpp [_WIN32]: Added mappings of the STATUS_STACK_OVERFLOW and STATUS_INVALID_PARAMETER. Modified: incubator/stdcxx/trunk/util/exec.cpp Modified: incubator/stdcxx/trunk/util/exec.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/exec.cpp?view=diffrev=564002r1=564001r2=564002 == --- incubator/stdcxx/trunk/util/exec.cpp (original) +++ incubator/stdcxx/trunk/util/exec.cpp Wed Aug 8 12:31:00 2007 @@ -55,6 +55,12 @@ # ifndef SIGBUS #define SIGBUS 10 // STATUS_IN_PAGE_ERROR translated into SIGBUS # endif +# ifndef SIGSYS +#define SIGSYS 12 // STATUS_INVALID_PARAMETER translated into SIGSYS +# endif +# ifndef STATUS_INVALID_PARAMETER +#define STATUS_INVALID_PARAMETER ((DWORD)0xC00DL) +# endif #endif #include sys/stat.h /* for S_* */ #include sys/types.h @@ -862,6 +868,7 @@ } nt_status_map [] = { { STATUS_BREAKPOINT, SIGTRAP }, { STATUS_ACCESS_VIOLATION,SIGSEGV }, +{ STATUS_STACK_OVERFLOW, SIGSEGV }, { STATUS_IN_PAGE_ERROR, SIGBUS }, { STATUS_ILLEGAL_INSTRUCTION, SIGILL }, { STATUS_PRIVILEGED_INSTRUCTION, SIGILL }, @@ -873,7 +880,8 @@ { STATUS_FLOAT_STACK_CHECK, SIGFPE }, { STATUS_FLOAT_UNDERFLOW, SIGFPE }, { STATUS_INTEGER_DIVIDE_BY_ZERO, SIGFPE }, -{ STATUS_INTEGER_OVERFLOW,SIGFPE } +{ STATUS_INTEGER_OVERFLOW,SIGFPE }, +{ STATUS_INVALID_PARAMETER, SIGSYS } };
svn commit: r564007 - in /incubator/stdcxx/trunk/util: cmdopt.cpp exec.cpp
Author: faridz Date: Wed Aug 8 12:59:59 2007 New Revision: 564007 URL: http://svn.apache.org/viewvc?view=revrev=564007 Log: 2007-08-08 Farid Zaripov [EMAIL PROTECTED] * cmdopt.cpp [_WIN32]: Set TICKS_PER_SEC = CLOCKS_PER_SEC. * exec.cpp [_WIN32]: Added mappings of the STATUS_STACK_BUFFER_OVERRUN. Translate wall time value from 100ns units to clocks. Modified: incubator/stdcxx/trunk/util/cmdopt.cpp incubator/stdcxx/trunk/util/exec.cpp Modified: incubator/stdcxx/trunk/util/cmdopt.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/cmdopt.cpp?view=diffrev=564007r1=564006r2=564007 == --- incubator/stdcxx/trunk/util/cmdopt.cpp (original) +++ incubator/stdcxx/trunk/util/cmdopt.cpp Wed Aug 8 12:59:59 2007 @@ -72,7 +72,7 @@ const char default_path_sep = '\\'; const char suffix_sep = '.'; const size_t exe_suffix_len = 4; /* strlen(.exe) == 4 */ -const float TICKS_PER_SEC = 1000; /* 100 nanosecond units in a second */ +const float TICKS_PER_SEC = CLOCKS_PER_SEC; # ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0500 Modified: incubator/stdcxx/trunk/util/exec.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/exec.cpp?view=diffrev=564007r1=564006r2=564007 == --- incubator/stdcxx/trunk/util/exec.cpp (original) +++ incubator/stdcxx/trunk/util/exec.cpp Wed Aug 8 12:59:59 2007 @@ -59,7 +59,10 @@ #define SIGSYS 12 // STATUS_INVALID_PARAMETER translated into SIGSYS # endif # ifndef STATUS_INVALID_PARAMETER -#define STATUS_INVALID_PARAMETER ((DWORD)0xC00DL) +#define STATUS_INVALID_PARAMETER ((DWORD)0xC00DL) +# endif +# ifndef STATUS_STACK_BUFFER_OVERRUN +#define STATUS_STACK_BUFFER_OVERRUN ((DWORD)0xC409L) # endif #endif #include sys/stat.h /* for S_* */ @@ -869,6 +872,7 @@ { STATUS_BREAKPOINT, SIGTRAP }, { STATUS_ACCESS_VIOLATION,SIGSEGV }, { STATUS_STACK_OVERFLOW, SIGSEGV }, +{ STATUS_STACK_BUFFER_OVERRUN,SIGSEGV }, { STATUS_IN_PAGE_ERROR, SIGBUS }, { STATUS_ILLEGAL_INSTRUCTION, SIGILL }, { STATUS_PRIVILEGED_INSTRUCTION, SIGILL }, @@ -1156,9 +1160,14 @@ /* Calculate wall clock time elapsed while the process ran */ GetSystemTimeAsFileTime(end); +/* 100 nanosecond units in a second */ +const DWORD UNITS_PER_SEC = 1000; +const DWORD UNITS_PER_CLOCK = UNITS_PER_SEC / CLOCKS_PER_SEC; +assert (UNITS_PER_CLOCK * CLOCKS_PER_SEC == UNITS_PER_SEC); + /* We're ignoring dwHighDateTime, as it's outside the percision of clock_t */ -wall = end.dwLowDateTime - start.dwLowDateTime; +wall = (end.dwLowDateTime - start.dwLowDateTime) / UNITS_PER_CLOCK; /* Link the delta */ result-wall = wall;
svn commit: r564170 - /incubator/stdcxx/trunk/include/ansi/csetjmp
Author: faridz Date: Thu Aug 9 04:24:59 2007 New Revision: 564170 URL: http://svn.apache.org/viewvc?view=revrev=564170 Log: 2007-08-09 Farid Zaripov [EMAIL PROTECTED] STDCXX-513 * csetjmp: #define setjmp macro if it's not #defined. Modified: incubator/stdcxx/trunk/include/ansi/csetjmp Modified: incubator/stdcxx/trunk/include/ansi/csetjmp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/ansi/csetjmp?view=diffrev=564170r1=564169r2=564170 == --- incubator/stdcxx/trunk/include/ansi/csetjmp (original) +++ incubator/stdcxx/trunk/include/ansi/csetjmp Thu Aug 9 04:24:59 2007 @@ -54,7 +54,7 @@ #endif // _RWSTD_NAMESPACE_STD_OPEN == 9 #else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS) -#undef setjmp + #ifndef _RWSTD_CSETJMP_INCLUDED #define _RWSTD_CSETJMP_INCLUDED @@ -76,5 +76,9 @@ #endif // _RWSTD_CSETJMP_INCLUDED #endif // _RWSTD_NO_DEPRECATED_C_HEADERS + +#ifndef setjmp +# define setjmp(env) setjmp (env) +#endif #endif // _RWSTD_NO_PURE_C_HEADERS
svn commit: r564228 - /incubator/stdcxx/trunk/tests/regress/27.stringbuf.str.stdcxx-514.cpp
Author: faridz Date: Thu Aug 9 07:41:38 2007 New Revision: 564228 URL: http://svn.apache.org/viewvc?view=revrev=564228 Log: 2007-08-09 Farid Zaripov [EMAIL PROTECTED] * 27.stringbuf.str.stdcxx-514.cpp: New regression test from STDCXX-514 issue. Added: incubator/stdcxx/trunk/tests/regress/27.stringbuf.str.stdcxx-514.cpp (with props) Added: incubator/stdcxx/trunk/tests/regress/27.stringbuf.str.stdcxx-514.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/regress/27.stringbuf.str.stdcxx-514.cpp?view=autorev=564228 == --- incubator/stdcxx/trunk/tests/regress/27.stringbuf.str.stdcxx-514.cpp (added) +++ incubator/stdcxx/trunk/tests/regress/27.stringbuf.str.stdcxx-514.cpp Thu Aug 9 07:41:38 2007 @@ -0,0 +1,58 @@ +/ + * + * 27.stringbuf.str.stdcxx-514.cpp - test case from STDCXX-514 issue + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + **/ + +#include sstream // for stringbuf +#include memory // for allocator + +#include cassert // for assert() + +char extbuf [3]; + +struct MyAlloc : std::allocator char +{ +pointer allocate (size_type __n, std::allocatorvoid::const_pointer = 0) { +return new char [__n]; +} + +void deallocate (pointer __p, size_type) +{ +assert (extbuf != __p); +delete [] __p; +} +}; + +int main () +{ +std::basic_stringbuf char, std::char_traits char, MyAlloc sbuf; + +sbuf.pubsetbuf (extbuf, sizeof (extbuf)); + +const char* str = abcdef; +sbuf.str (str); +assert (sbuf.str () == str); + +return 0; +} Propchange: incubator/stdcxx/trunk/tests/regress/27.stringbuf.str.stdcxx-514.cpp -- svn:eol-style = native Propchange: incubator/stdcxx/trunk/tests/regress/27.stringbuf.str.stdcxx-514.cpp -- svn:keywords = Id
svn commit: r564694 - /incubator/stdcxx/trunk/util/exec.cpp
Author: faridz Date: Fri Aug 10 10:48:01 2007 New Revision: 564694 URL: http://svn.apache.org/viewvc?view=revrev=564694 Log: 2007-08-10 Farid Zaripov [EMAIL PROTECTED] * exec.cpp (fttoull) [_WIN32]: New function to convert from FILETIME to ULONGLONG. (exec_file) [_WIN32]: Get kernel time and user time of the child process using GetProcessTimes(). Map STATUS_FLOAT_STACK_CHECK to SIGSTKFLT signal instead of SIGFPE. Modified: incubator/stdcxx/trunk/util/exec.cpp Modified: incubator/stdcxx/trunk/util/exec.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/exec.cpp?view=diffrev=564694r1=564693r2=564694 == --- incubator/stdcxx/trunk/util/exec.cpp (original) +++ incubator/stdcxx/trunk/util/exec.cpp Fri Aug 10 10:48:01 2007 @@ -50,13 +50,16 @@ # endif # include windows.h /* for PROCESS_INFORMATION, CreateProcess, ... */ # ifndef SIGTRAP -#define SIGTRAP 5 // STATUS_BREAKPOINT translated into SIGTRAP +#define SIGTRAP 5 // STATUS_BREAKPOINT translated into SIGTRAP # endif # ifndef SIGBUS -#define SIGBUS 10 // STATUS_IN_PAGE_ERROR translated into SIGBUS +#define SIGBUS10 // STATUS_IN_PAGE_ERROR translated into SIGBUS # endif # ifndef SIGSYS -#define SIGSYS 12 // STATUS_INVALID_PARAMETER translated into SIGSYS +#define SIGSYS12 // STATUS_INVALID_PARAMETER translated into SIGSYS +# endif +# ifndef SIGSTKFLT +#define SIGSTKFLT 16 // STATUS_FLOAT_STACK_CHECK translated into SIGSTKFLT # endif # ifndef STATUS_INVALID_PARAMETER #define STATUS_INVALID_PARAMETER ((DWORD)0xC00DL) @@ -869,23 +872,23 @@ DWORD nt_status; int signal; } nt_status_map [] = { -{ STATUS_BREAKPOINT, SIGTRAP }, -{ STATUS_ACCESS_VIOLATION,SIGSEGV }, -{ STATUS_STACK_OVERFLOW, SIGSEGV }, -{ STATUS_STACK_BUFFER_OVERRUN,SIGSEGV }, -{ STATUS_IN_PAGE_ERROR, SIGBUS }, -{ STATUS_ILLEGAL_INSTRUCTION, SIGILL }, -{ STATUS_PRIVILEGED_INSTRUCTION, SIGILL }, -{ STATUS_FLOAT_DENORMAL_OPERAND, SIGFPE }, -{ STATUS_FLOAT_DIVIDE_BY_ZERO,SIGFPE }, -{ STATUS_FLOAT_INEXACT_RESULT,SIGFPE }, -{ STATUS_FLOAT_INVALID_OPERATION, SIGFPE }, -{ STATUS_FLOAT_OVERFLOW, SIGFPE }, -{ STATUS_FLOAT_STACK_CHECK, SIGFPE }, -{ STATUS_FLOAT_UNDERFLOW, SIGFPE }, -{ STATUS_INTEGER_DIVIDE_BY_ZERO, SIGFPE }, -{ STATUS_INTEGER_OVERFLOW,SIGFPE }, -{ STATUS_INVALID_PARAMETER, SIGSYS } +{ STATUS_BREAKPOINT, SIGTRAP }, +{ STATUS_ACCESS_VIOLATION,SIGSEGV }, +{ STATUS_STACK_OVERFLOW, SIGSEGV }, +{ STATUS_STACK_BUFFER_OVERRUN,SIGSEGV }, +{ STATUS_IN_PAGE_ERROR, SIGBUS}, +{ STATUS_ILLEGAL_INSTRUCTION, SIGILL}, +{ STATUS_PRIVILEGED_INSTRUCTION, SIGILL}, +{ STATUS_FLOAT_DENORMAL_OPERAND, SIGFPE}, +{ STATUS_FLOAT_DIVIDE_BY_ZERO,SIGFPE}, +{ STATUS_FLOAT_INEXACT_RESULT,SIGFPE}, +{ STATUS_FLOAT_INVALID_OPERATION, SIGFPE}, +{ STATUS_FLOAT_OVERFLOW, SIGFPE}, +{ STATUS_FLOAT_UNDERFLOW, SIGFPE}, +{ STATUS_INTEGER_DIVIDE_BY_ZERO, SIGFPE}, +{ STATUS_INTEGER_OVERFLOW,SIGFPE}, +{ STATUS_FLOAT_STACK_CHECK, SIGSTKFLT }, +{ STATUS_INVALID_PARAMETER, SIGSYS} }; @@ -1020,6 +1023,15 @@ warn_last_error (Waiting for child process); } +/* FILETIME to ULONGLONG */ +inline ULONGLONG fttoull (const FILETIME ft) +{ +ULARGE_INTEGER __ft; +__ft.LowPart = ft.dwLowDateTime; +__ft.HighPart = ft.dwHighDateTime; +return __ft.QuadPart; +} + void exec_file (const struct target_opts* options, struct target_status* result) { char* merged; @@ -1165,9 +1177,22 @@ const DWORD UNITS_PER_CLOCK = UNITS_PER_SEC / CLOCKS_PER_SEC; assert (UNITS_PER_CLOCK * CLOCKS_PER_SEC == UNITS_PER_SEC); -/* We're ignoring dwHighDateTime, as it's outside the percision of clock_t - */ -wall = (end.dwLowDateTime - start.dwLowDateTime) / UNITS_PER_CLOCK; +#if _WIN32_WINNT = 0x0500 +FILETIME stime, utime; +static clock_t user, sys; +if (GetProcessTimes (child.hProcess, start, end, stime, utime)) { +user = clock_t (fttoull (utime) / UNITS_PER_CLOCK); +sys = clock_t (fttoull (stime) / UNITS_PER_CLOCK); + +/* Link the delta */ +result-user = user; +result-sys = sys; +} +else +warn_last_error (Getting child process times); +#endif // _WIN32_WINNT = 0x0500 + +wall = clock_t ((fttoull (end) - fttoull (start)) / UNITS_PER_CLOCK); /* Link the delta */ result-wall = wall;
svn commit: r564698 - /incubator/stdcxx/trunk/include/rw/_mutex.h
Author: faridz Date: Fri Aug 10 11:00:54 2007 New Revision: 564698 URL: http://svn.apache.org/viewvc?view=revrev=564698 Log: 2007-08-10 Farid Zaripov [EMAIL PROTECTED] * _mutex.h (__rw_atomic_preincrement) [_WIN32]: Cast __x to int instead of long to use InterlockedIncrement() optimized function instead of generic one using critical sections. Modified: incubator/stdcxx/trunk/include/rw/_mutex.h Modified: incubator/stdcxx/trunk/include/rw/_mutex.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_mutex.h?view=diffrev=564698r1=564697r2=564698 == --- incubator/stdcxx/trunk/include/rw/_mutex.h (original) +++ incubator/stdcxx/trunk/include/rw/_mutex.h Fri Aug 10 11:00:54 2007 @@ -1371,7 +1371,7 @@ inline unsigned int __rw_atomic_preincrement (unsigned int __x, bool) { -return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long, __x), +return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (int, __x), false); }
svn commit: r565079 - /incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp
Author: faridz Date: Sun Aug 12 08:12:35 2007 New Revision: 565079 URL: http://svn.apache.org/viewvc?view=revrev=565079 Log: 2007-08-12 Farid Zaripov [EMAIL PROTECTED] * 21.cwchar.cpp: Define long long overloads of get_type_name() (fixes compilation problem on MSVC-x64). Modified: incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp Modified: incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp?view=diffrev=565079r1=565078r2=565079 == --- incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp Sun Aug 12 08:12:35 2007 @@ -822,6 +822,11 @@ GET_TYPE_NAME (unsigned long); GET_TYPE_NAME (double); +#ifndef _RWSTD_NO_LONG_LONG +GET_TYPE_NAME (_RWSTD_LONG_LONG); +GET_TYPE_NAME (unsigned _RWSTD_LONG_LONG); +#endif + #ifndef _RWSTD_NO_NATIVE_WCHAR_T GET_TYPE_NAME (wchar_t); #endif
svn commit: r565141 - in /incubator/stdcxx/trunk/etc/config/windows: projectdef.js projects.js
Author: faridz Date: Sun Aug 12 13:44:23 2007 New Revision: 565141 URL: http://svn.apache.org/viewvc?view=revrev=565141 Log: 2007-08-12 Farid Zaripov [EMAIL PROTECTED] * projectdef.js: Enable RTTI by default. * projects.js: Ditto. Disable RTTI for projects in NonRTTIProjects array. Modified: incubator/stdcxx/trunk/etc/config/windows/projectdef.js incubator/stdcxx/trunk/etc/config/windows/projects.js Modified: incubator/stdcxx/trunk/etc/config/windows/projectdef.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projectdef.js?view=diffrev=565141r1=565140r2=565141 == --- incubator/stdcxx/trunk/etc/config/windows/projectdef.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projectdef.js Sun Aug 12 13:44:23 2007 @@ -135,7 +135,7 @@ this.Type = type; this.SubSystem = typeGeneric == type ? null : (typeApplication == type ? subSystemConsole : subSystemWindows); -this.RTTI = false; +this.RTTI = true; this.VCProjDir = %BUILDDIR%; this.FilterDefs = new Array(); this.Defines = null; Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?view=diffrev=565141r1=565140r2=565141 == --- incubator/stdcxx/trunk/etc/config/windows/projects.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projects.js Sun Aug 12 13:44:23 2007 @@ -35,7 +35,7 @@ var ProjectsDir = %BUILDDIR%\\Projects; // projects which requires RTTI support -var RTTIProjects = new Array(18.exception); +var NonRTTIProjects = new Array(); var rxExcludedFolders = new RegExp(^(?:\\.svn|Release.*|Debug.*|in|out|CVS)$,i); @@ -86,7 +86,6 @@ /// var stdcxxDef = new ProjectDef(.stdcxx, typeLibrary); stdcxxDef.VCProjDir = ProjectsDir; -stdcxxDef.RTTI = true; stdcxxDef.FilterDefs.push( new FilterDef(sourceFilterName, sourceFilterUuid, sourceFilterExts, eFileTypeCppCode, false). addFilesByMask(%SRCDIR%\\src, rxExcludedFolders, null)); @@ -108,7 +107,6 @@ /// var rwtestDef = new ProjectDef(.rwtest, typeLibrary); rwtestDef.VCProjDir = ProjectsDir; -rwtestDef.RTTI = true; rwtestDef.FilterDefs.push( new FilterDef(sourceFilterName, sourceFilterUuid, sourceFilterExts, eFileTypeCppCode, false). addFilesByMask(%SRCDIR%\\tests\\src, rxExcludedFolders, null)); @@ -271,7 +269,6 @@ var testTplDef = new ProjectDef(null, typeApplication); testTplDef.VCProjDir = ProjectsDir + \\tests; -testTplDef.RTTI = true; testTplDef.Defines = commonDefines; testTplDef.Includes = rwtestIncludes; testTplDef.OutDir = $(SolutionDir)%CONFIG%\\tests; @@ -484,9 +481,9 @@ { var projectDef = projectArray[j]; -// turn on RTTI support if project in RTTIProjects array -if (0 = arrayIndexOf(RTTIProjects, projectDef.Name)) -projectDef.RTTI = true; +// turn off RTTI support if project in NonRTTIProjects array +if (0 = arrayIndexOf(NonRTTIProjects, projectDef.Name)) +projectDef.RTTI = false; projectDef.createVCProject(VCProjectEngine, report); }
svn commit: r565196 - /incubator/stdcxx/trunk/include/rw/_defs.h
Author: faridz Date: Sun Aug 12 16:06:52 2007 New Revision: 565196 URL: http://svn.apache.org/viewvc?view=revrev=565196 Log: 2007-08-13 Farid Zaripov [EMAIL PROTECTED] * _defs.h: Quote assert.h and setjmp.h pathnames in order to prevent the corresponding macro expanding in the #include directive. Modified: incubator/stdcxx/trunk/include/rw/_defs.h Modified: incubator/stdcxx/trunk/include/rw/_defs.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_defs.h?view=diffrev=565196r1=565195r2=565196 == --- incubator/stdcxx/trunk/include/rw/_defs.h (original) +++ incubator/stdcxx/trunk/include/rw/_defs.h Sun Aug 12 16:06:52 2007 @@ -91,7 +91,7 @@ #else // if defined (_RWSTD_NO_NEW_HEADER) -# define _RWSTD_CASSERT assert.h +# define _RWSTD_CASSERT assert.h # define _RWSTD_CCTYPEctype.h # define _RWSTD_CERRNOerrno.h # define _RWSTD_CFLOATfloat.h @@ -99,7 +99,7 @@ # define _RWSTD_CLIMITS limits.h # define _RWSTD_CLOCALE locale.h # define _RWSTD_CMATH math.h -# define _RWSTD_CSETJMP setjmp.h +# define _RWSTD_CSETJMP setjmp.h # define _RWSTD_CSIGNAL signal.h # define _RWSTD_CSTDARG stdarg.h # define _RWSTD_CSTDDEF stddef.h @@ -135,7 +135,9 @@ #if defined (_M_IA64) // IA64/Itanium SDK paths # if !defined (_RWSTD_NO_ASSERT_H) !defined (_RWSTD_ANSI_C_ASSERT_H) -#define _RWSTD_ANSI_C_ASSERT_H ../include/crt/assert.h + // pathname quoted in order to prevent the assert macro + // from expanding in the include directive +#define _RWSTD_ANSI_C_ASSERT_H ../include/crt/assert.h # endif # if !defined (_RWSTD_NO_CTYPE_H) !defined (_RWSTD_ANSI_C_CTYPE_H) #define _RWSTD_ANSI_C_CTYPE_H ../include/crt/ctype.h @@ -167,7 +169,9 @@ #define _RWSTD_ANSI_C_MATH_H ../include/crt/math.h # endif # if !defined (_RWSTD_NO_SETJMP_H) !defined (_RWSTD_ANSI_C_SETJMP_H) -#define _RWSTD_ANSI_C_SETJMP_H ../include/crt/setjmp.h + // pathname quoted in order to prevent the setjmp macro + // from expanding in the include directive +#define _RWSTD_ANSI_C_SETJMP_H ../include/crt/setjmp.h # endif # if !defined (_RWSTD_NO_SIGNAL_H) !defined (_RWSTD_ANSI_C_SIGNAL_H) #define _RWSTD_ANSI_C_SIGNAL_H ../include/crt/signal.h @@ -205,7 +209,9 @@ #elif !defined (_RWSTD_NO_FORCE_RELATIVE_PATHS) # undef _RWSTD_ANSI_C_ASSERT_H -# define _RWSTD_ANSI_C_ASSERT_H ../include/assert.h + // pathname quoted in order to prevent the assert macro + // from expanding in the include directive +# define _RWSTD_ANSI_C_ASSERT_H ../include/assert.h # undef _RWSTD_ANSI_C_CTYPE_H # define _RWSTD_ANSI_C_CTYPE_H ../include/ctype.h # undef _RWSTD_ANSI_C_ERRNO_H @@ -229,7 +235,9 @@ # undef _RWSTD_ANSI_C_MATH_H # define _RWSTD_ANSI_C_MATH_H ../include/math.h # undef _RWSTD_ANSI_C_SETJMP_H -# define _RWSTD_ANSI_C_SETJMP_H ../include/setjmp.h + // pathname quoted in order to prevent the setjmp macro + // from expanding in the include directive +# define _RWSTD_ANSI_C_SETJMP_H ../include/setjmp.h # undef _RWSTD_ANSI_C_SIGNAL_H # define _RWSTD_ANSI_C_SIGNAL_H ../include/signal.h # undef _RWSTD_ANSI_C_STDARG_H @@ -262,7 +270,9 @@ #elif defined (_RWSTD_USE_USR_INCLUDE_HEADERS) # if !defined (_RWSTD_NO_ASSERT_H) !defined (_RWSTD_ANSI_C_ASSERT_H) -#define _RWSTD_ANSI_C_ASSERT_H /usr/include/assert.h + // pathname quoted in order to prevent the assert macro + // from expanding in the include directive +#define _RWSTD_ANSI_C_ASSERT_H /usr/include/assert.h # endif # if !defined (_RWSTD_NO_CTYPE_H) !defined (_RWSTD_ANSI_C_CTYPE_H) #define _RWSTD_ANSI_C_CTYPE_H /usr/include/ctype.h @@ -294,7 +304,9 @@ #define _RWSTD_ANSI_C_MATH_H /usr/include/math.h # endif # if !defined (_RWSTD_NO_SETJMP_H) !defined (_RWSTD_ANSI_C_SETJMP_H) -#define _RWSTD_ANSI_C_SETJMP_H /usr/include/setjmp.h + // pathname quoted in order to prevent the setjmp macro + // from expanding in the include directive +#define _RWSTD_ANSI_C_SETJMP_H /usr/include/setjmp.h # endif # if !defined (_RWSTD_NO_SIGNAL_H) !defined (_RWSTD_ANSI_C_SIGNAL_H) #define _RWSTD_ANSI_C_SIGNAL_H /usr/include/signal.h @@ -332,7 +344,9 @@ #else // if !_WIN64 !_RWSTD_USE_USR_INCLUDE_HEADERS # if !defined (_RWSTD_NO_ASSERT_H) !defined (_RWSTD_ANSI_C_ASSERT_H) -#define _RWSTD_ANSI_C_ASSERT_H ../include/assert.h + // pathname quoted in order to prevent the assert macro + // from expanding in the include directive +#define _RWSTD_ANSI_C_ASSERT_H ../include/assert.h # endif # if !defined (_RWSTD_NO_CTYPE_H) !defined (_RWSTD_ANSI_C_CTYPE_H) #define _RWSTD_ANSI_C_CTYPE_H ../include/ctype.h @@ -364,7 +378,9 @@ #define _RWSTD_ANSI_C_MATH_H ../include/math.h # endif # if !defined (_RWSTD_NO_SETJMP_H) !defined (_RWSTD_ANSI_C_SETJMP_H) -#define _RWSTD_ANSI_C_SETJMP_H
svn commit: r565217 - /incubator/stdcxx/trunk/tests/src/char.cpp
Author: faridz Date: Sun Aug 12 18:20:08 2007 New Revision: 565217 URL: http://svn.apache.org/viewvc?view=revrev=565217 Log: 2007-08-13 Farid Zaripov [EMAIL PROTECTED] * char.cpp (rw_widen): Don't write after end of dst. Modified: incubator/stdcxx/trunk/tests/src/char.cpp Modified: incubator/stdcxx/trunk/tests/src/char.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/char.cpp?view=diffrev=565217r1=565216r2=565217 == --- incubator/stdcxx/trunk/tests/src/char.cpp (original) +++ incubator/stdcxx/trunk/tests/src/char.cpp Sun Aug 12 18:20:08 2007 @@ -509,7 +509,6 @@ if (src) { // copy src into dst memcpy (dst, src, len); -dst [len] = '\0'; } else { // set dst to all NUL @@ -856,11 +855,13 @@ // if len is non-zero dst must be non-0 as well RW_ASSERT (0 == len || 0 != dst); -if (dst) { +if (len) { +RW_ASSERT (0 != dst); + if (src) { // widen src into dst one element at a time for (size_t i = 0; ; ++i) { -if (i == len) { +if (i == len - 1) { dst [i] = L'\0'; break; } @@ -873,6 +874,8 @@ memset (dst, 0, len * sizeof *dst); } } +else if (dst) +*dst = L'\0'; return dst; } @@ -1004,11 +1007,13 @@ // if len is non-zero dst must be non-0 as well RW_ASSERT (0 == len || 0 != dst); -if (dst) { +if (len) { +RW_ASSERT (0 != dst); + if (src) { // widen src into dst one element at a time for (size_t i = 0; ; ++i) { -if (i == len) { +if (i == len - 1) { dst [i] = UserChar::eos (); break; } @@ -1022,6 +1027,8 @@ memset (dst, 0, len * sizeof *dst); } } +else if (dst) +*dst = UserChar::eos (); return dst; }
svn commit: r565279 - /incubator/stdcxx/trunk/examples/manual/fmtflags_manip.cpp
Author: faridz Date: Mon Aug 13 02:13:46 2007 New Revision: 565279 URL: http://svn.apache.org/viewvc?view=revrev=565279 Log: 2007-08-13 Farid Zaripov [EMAIL PROTECTED] STDCXX-519 * fmtflags_manip.cpp (fmtflags_manip): Use value initialization to workaround MSVC 7.1 bug. Modified: incubator/stdcxx/trunk/examples/manual/fmtflags_manip.cpp Modified: incubator/stdcxx/trunk/examples/manual/fmtflags_manip.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/examples/manual/fmtflags_manip.cpp?view=diffrev=565279r1=565278r2=565279 == --- incubator/stdcxx/trunk/examples/manual/fmtflags_manip.cpp (original) +++ incubator/stdcxx/trunk/examples/manual/fmtflags_manip.cpp Mon Aug 13 02:13:46 2007 @@ -42,7 +42,7 @@ std::ios_base::fmtflags saved_; public: -fmtflags_manip (): strm_ (), saved_ () { } +fmtflags_manip (): strm_ (), saved_ (std::ios_base::fmtflags (-1)) { } void operator() (std::ios_base strm, std::ios_base::fmtflags flags) const {
svn commit: r568583 - /incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp
Author: faridz Date: Wed Aug 22 05:23:21 2007 New Revision: 568583 URL: http://svn.apache.org/viewvc?rev=568583view=rev Log: 2007-08-22 Farid Zaripov [EMAIL PROTECTED] * 21.cwchar.cpp (test_functions) [_MSC_VER]: Prevent invalid parameter validation error by setting size to 1. Modified: incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp Modified: incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp?rev=568583r1=568582r2=568583view=diff == --- incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp (original) +++ incubator/stdcxx/trunk/tests/strings/21.cwchar.cpp Wed Aug 22 05:23:21 2007 @@ -87,10 +87,6 @@ /**/ -#ifdef _MSC_VER -#include crtdbg.h // for _CrtSetReportMode() -#endif - #include cwchar #include any.h // for rw_any_t #include driver.h // for rw_test(), ... @@ -931,16 +927,16 @@ const test_tm* tmb = (const test_tm*)tm_buf; #ifdef _MSC_VER -// disable GUI window with error: -// Assertion failed: (Zero length output buffer passed to strftime,0) -int oldmode = _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_DEBUG); +// prevent MSVC parameter validation error: +// Zero length output buffer passed to strftime +size = 1; #endif TEST (test_size_t, wcsftime, (wstr, size, L, tmb), WCSFTIME, -1); #ifdef _MSC_VER -// restore error report mode -_CrtSetReportMode (_CRT_ASSERT, oldmode); +// restore size +size = 0; #endif TEST (test_wint_t, btowc, (i), BTOWC, -1);
svn commit: r568639 - /incubator/stdcxx/trunk/etc/config/windows/projects.js
Author: faridz Date: Wed Aug 22 07:56:53 2007 New Revision: 568639 URL: http://svn.apache.org/viewvc?rev=568639view=rev Log: 2007-08-22 Farid Zaripov [EMAIL PROTECTED] * projects.js (CreateProjectsDefs): Set BINDIR env variable before run tests (used in rw_locale(), rw_localedef()). Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?rev=568639r1=568638r2=568639view=diff == --- incubator/stdcxx/trunk/etc/config/windows/projects.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projects.js Wed Aug 22 07:56:53 2007 @@ -312,6 +312,7 @@ runtestsDef.CustomBuildCmd = set PATH=$(SolutionDir)%CONFIG%\\bin;$(SolutionDir)%CONFIG%\\lib;%PATH%\r\n + set TOPDIR=%SRCDIR%\r\n + +set BINDIR=$(SolutionDir)%CONFIG%\\bin\r\n + cscript /nologo \%CUSTOMFILE%\ + /EXEDIR:\$(OutDir)\ + /PRJDIR:\ + runtestsDef.VCProjDir + \ +
svn commit: r570420 - in /incubator/stdcxx/trunk/src: i86/atomic.s i86_64/atomic.s ia64/atomic-64.s ia64/atomic.s parisc/atomic-64.s parisc/atomic.s sparc/atomic-64.s sparc/atomic.s
Author: faridz Date: Tue Aug 28 06:40:53 2007 New Revision: 570420 URL: http://svn.apache.org/viewvc?rev=570420view=rev Log: 2007-08-28 Farid Zaripov [EMAIL PROTECTED] * ia64/atomic-64.s: Updated copyright notice. * ia64/atomic.s: Ditto. * parisc/atomic-64.s: Ditto. * parisc/atomic.s: Ditto. * sparc/atomic-64.s: Ditto. * sparc/atomic.s: Ditto. * i86/atomic.s: Updated comments. * i86_64/atomic.s: Updated copyright notice and comments. Modified: incubator/stdcxx/trunk/src/i86/atomic.s incubator/stdcxx/trunk/src/i86_64/atomic.s incubator/stdcxx/trunk/src/ia64/atomic-64.s incubator/stdcxx/trunk/src/ia64/atomic.s incubator/stdcxx/trunk/src/parisc/atomic-64.s incubator/stdcxx/trunk/src/parisc/atomic.s incubator/stdcxx/trunk/src/sparc/atomic-64.s incubator/stdcxx/trunk/src/sparc/atomic.s Modified: incubator/stdcxx/trunk/src/i86/atomic.s URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/i86/atomic.s?rev=570420r1=570419r2=570420view=diff == --- incubator/stdcxx/trunk/src/i86/atomic.s (original) +++ incubator/stdcxx/trunk/src/i86/atomic.s Tue Aug 28 06:40:53 2007 @@ -129,7 +129,7 @@ .globl SYMNAME (__rw_atomic_add16) TYPE_DIR (__rw_atomic_add16, @function) -SYMNAME (__rw_atomic_add16): /* ; long (long *dst, long inc)*/ +SYMNAME (__rw_atomic_add16): /* ; short (short *dst, short inc) */ mov4(%esp), %ecx /* ; %ecx = dst*/ mov8(%esp), %eax /* ; %eax = inc*/ mov%eax, %edx /* ; */ @@ -137,7 +137,7 @@ lock xaddw %ax, (%ecx) /* ; tmp = *dst; ; dst += inc; - ; eax = tmp */ + ; %ax = tmp */ add%edx, %eax /* ; return %eax + inc */ ret @@ -153,7 +153,7 @@ .globl SYMNAME (__rw_atomic_add32) TYPE_DIR (__rw_atomic_add32, @function) -SYMNAME (__rw_atomic_add32): /* ; long (long *dst, long inc)*/ +SYMNAME (__rw_atomic_add32): /* ; int (int *dst, int inc) */ movl 4(%esp), %ecx /* ; %ecx = dst*/ movl 8(%esp), %edx /* ; %edx = inc*/ movl %edx, %eax /* ; */ Modified: incubator/stdcxx/trunk/src/i86_64/atomic.s URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/i86_64/atomic.s?rev=570420r1=570419r2=570420view=diff == --- incubator/stdcxx/trunk/src/i86_64/atomic.s (original) +++ incubator/stdcxx/trunk/src/i86_64/atomic.s Tue Aug 28 06:40:53 2007 @@ -6,22 +6,23 @@ * *** * - * Copyright 2005-2006 The Apache Software Foundation or its licensors, - * as applicable. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at * - * Copyright 2005-2006 Rogue Wave Software. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 2005-2006 Rogue Wave Software. * **/ @@ -55,7 +56,7 @@ .type __rw_atomic_xchg16, @function __rw_atomic_xchg16:/* ; int16_t (int16_t *x, int16_t y) */ movq %rdi, %rcx /* ; %rcx = x*/ -movw %si, %ax/* ; %eax = y*/ +movw %si, %ax/* ; %ax = y */ xchgw %ax
svn commit: r570431 - /incubator/stdcxx/trunk/include/rw/_mutex.h
Author: faridz Date: Tue Aug 28 07:00:10 2007 New Revision: 570431 URL: http://svn.apache.org/viewvc?rev=570431view=rev Log: 2007-08-28 Farid Zaripov [EMAIL PROTECTED] * _mutex.h [__ia64 || __x86_64]: Define set of __rw_atomic_xxx() functions for types _RWSTD_LONG_LONG and unsigned _RWSTD_LONG_LONG. Modified: incubator/stdcxx/trunk/include/rw/_mutex.h Modified: incubator/stdcxx/trunk/include/rw/_mutex.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_mutex.h?rev=570431r1=570430r2=570431view=diff == --- incubator/stdcxx/trunk/include/rw/_mutex.h (original) +++ incubator/stdcxx/trunk/include/rw/_mutex.h Tue Aug 28 07:00:10 2007 @@ -1527,6 +1527,32 @@ #endif // _RWSTD_LONG_SIZE +#ifdef _RWSTD_LONG_LONG +# if _RWSTD_LLONG_SIZE _RWSTD_LONG_SIZE + +inline _RWSTD_LONG_LONG +__rw_atomic_preincrement (_RWSTD_LONG_LONG __x, bool) +{ +_RWSTD_COMPILE_ASSERT (8 == sizeof (_RWSTD_LONG_LONG)); + +return __rw_atomic_add64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, __x), + +1); +} + + +inline unsigned _RWSTD_LONG_LONG +__rw_atomic_preincrement (unsigned _RWSTD_LONG_LONG __x, bool) +{ +_RWSTD_COMPILE_ASSERT (8 == sizeof (unsigned _RWSTD_LONG_LONG)); + +return __rw_atomic_add64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, __x), + +1); +} + +# endif // _RWSTD_LLONG_SIZE _RWSTD_LONG_SIZE +#endif // _RWSTD_LONG_LONG + + inline char __rw_atomic_predecrement (char __x, bool) { @@ -1612,7 +1638,7 @@ inline unsigned long __rw_atomic_predecrement (unsigned long __x, bool) { -_RWSTD_COMPILE_ASSERT (8 == sizeof (long)); +_RWSTD_COMPILE_ASSERT (8 == sizeof (unsigned long)); return __rw_atomic_add64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, __x), -1); @@ -1621,6 +1647,32 @@ #endif // _RWSTD_LONG_SIZE +#ifdef _RWSTD_LONG_LONG +# if _RWSTD_LLONG_SIZE _RWSTD_LONG_SIZE + +inline _RWSTD_LONG_LONG +__rw_atomic_predecrement (_RWSTD_LONG_LONG __x, bool) +{ +_RWSTD_COMPILE_ASSERT (8 == sizeof (_RWSTD_LONG_LONG)); + +return __rw_atomic_add64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, __x), + -1); +} + + +inline unsigned _RWSTD_LONG_LONG +__rw_atomic_predecrement (unsigned _RWSTD_LONG_LONG __x, bool) +{ +_RWSTD_COMPILE_ASSERT (8 == sizeof (unsigned _RWSTD_LONG_LONG)); + +return __rw_atomic_add64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, __x), + -1); +} + +# endif // _RWSTD_LLONG_SIZE _RWSTD_LONG_SIZE +#endif // _RWSTD_LONG_LONG + + inline char __rw_atomic_exchange (char __x, char __y, bool) { @@ -1713,6 +1765,34 @@ } # endif // _RWSTD_LONG_SIZE == _RWSTD_INT_SIZE + + +#ifdef _RWSTD_LONG_LONG +# if _RWSTD_LLONG_SIZE _RWSTD_LONG_SIZE + +inline _RWSTD_LONG_LONG +__rw_atomic_exchange (_RWSTD_LONG_LONG __x, _RWSTD_LONG_LONG __y, bool) +{ +_RWSTD_COMPILE_ASSERT (8 == sizeof (_RWSTD_LONG_LONG)); + +return __rw_atomic_xchg64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, __x), + _RWSTD_STATIC_CAST (_RWSTD_INT64_T, __y)); +} + + +inline unsigned _RWSTD_LONG_LONG +__rw_atomic_exchange (unsigned _RWSTD_LONG_LONG __x, + unsigned _RWSTD_LONG_LONG __y, bool) +{ +_RWSTD_COMPILE_ASSERT (8 == sizeof (unsigned _RWSTD_LONG_LONG)); + +return __rw_atomic_xchg64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, __x), + _RWSTD_STATIC_CAST (_RWSTD_INT64_T, __y)); +} + +# endif // _RWSTD_LLONG_SIZE _RWSTD_LONG_SIZE +#endif // _RWSTD_LONG_LONG + #elif !defined (_RWSTD_NO_ATOMIC_OPS) # define _RWSTD_NO_ATOMIC_OPS
svn commit: r570514 - /incubator/stdcxx/trunk/include/sstream.cc
Author: faridz Date: Tue Aug 28 11:14:27 2007 New Revision: 570514 URL: http://svn.apache.org/viewvc?rev=570514view=rev Log: 2007-08-28 Farid Zaripov [EMAIL PROTECTED] STDCXX-515 * sstream.cc (xsputn): Correct write position after growing the buffer. Modified: incubator/stdcxx/trunk/include/sstream.cc Modified: incubator/stdcxx/trunk/include/sstream.cc URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/sstream.cc?rev=570514r1=570513r2=570514view=diff == --- incubator/stdcxx/trunk/include/sstream.cc (original) +++ incubator/stdcxx/trunk/include/sstream.cc Tue Aug 28 11:14:27 2007 @@ -185,9 +185,15 @@ const _RWSTD_SIZE_T __bufsize = __n + (this-pptr () - this-pbase ()); +// preserve current pptr() since str() would seek to end +const streamsize __cur = this-pptr () - this-pbase (); + // grow the buffer if necessary to accommodate the whole // string plus the contents of the buffer up to pptr() str (this-_C_buffer, __bufsize); + +// restore pptr() +this-pbump (__cur - (this-pptr () - this-pbase ())); _RWSTD_ASSERT (__n = this-epptr () - this-pptr ()); }
svn commit: r570724 - /incubator/stdcxx/trunk/include/rw/_config-icc.h
Author: faridz Date: Wed Aug 29 02:45:54 2007 New Revision: 570724 URL: http://svn.apache.org/viewvc?rev=570724view=rev Log: 2007-08-29 Farid Zaripov [EMAIL PROTECTED] * _config-icc.h: Corrected warning number. Modified: incubator/stdcxx/trunk/include/rw/_config-icc.h Modified: incubator/stdcxx/trunk/include/rw/_config-icc.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_config-icc.h?rev=570724r1=570723r2=570724view=diff == --- incubator/stdcxx/trunk/include/rw/_config-icc.h (original) +++ incubator/stdcxx/trunk/include/rw/_config-icc.h Wed Aug 29 02:45:54 2007 @@ -54,7 +54,7 @@ # endif // _RWSHARED // disable function was declared deprecated -# pragma warning (disable: 1478) +# pragma warning (disable: 1786) // disable dllexport/dllimport conflict with ... ; dllexport assumed # pragma warning (disable: 1740)
svn commit: r570727 - in /incubator/stdcxx/trunk/etc/config/windows: icc-10.0-x64.config icc-10.0.config msvc-7.0.config projectdef.js
Author: faridz Date: Wed Aug 29 02:54:23 2007 New Revision: 570727 URL: http://svn.apache.org/viewvc?rev=570727view=rev Log: 2007-08-29 Farid Zaripov [EMAIL PROTECTED] * msvc-7.0.config: Updated comment on ICCCONVERT variable. * icc-10.0.config: Set ICCCONVERT=ICProjConvert100.exe. * icc-10.0-x64.config: Ditto. * projectdef.js (InitVSObjects): Updated the intel conversion utility path detection algorithm. Modified: incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config incubator/stdcxx/trunk/etc/config/windows/projectdef.js Modified: incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config?rev=570727r1=570726r2=570727view=diff == --- incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config (original) +++ incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config Wed Aug 29 02:54:23 2007 @@ -7,3 +7,4 @@ LD=icl AR=xilib CLVARSBAT=%ICPP_COMPILER10%\EM64T\Bin\iclvars.bat +ICCCONVERT=ICProjConvert100.exe Modified: incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config?rev=570727r1=570726r2=570727view=diff == --- incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config (original) +++ incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config Wed Aug 29 02:54:23 2007 @@ -7,3 +7,4 @@ LD=icl AR=xilib CLVARSBAT=%ICPP_COMPILER10%\IA32\Bin\iclvars.bat +ICCCONVERT=ICProjConvert100.exe Modified: incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config?rev=570727r1=570726r2=570727view=diff == --- incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config (original) +++ incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config Wed Aug 29 02:54:23 2007 @@ -17,8 +17,8 @@ // if empty it will be tried to be detected automatically WINDIFF= -// Path to the ICProjConvert90.exe utility: -// if empty it will be tried to be detected automatically +// Path of the ICProjConvertxx.exe utility: +// if path is empty it will be tried to be detected automatically ICCCONVERT= // Convert solution to ICC format Modified: incubator/stdcxx/trunk/etc/config/windows/projectdef.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projectdef.js?rev=570727r1=570726r2=570727view=diff == --- incubator/stdcxx/trunk/etc/config/windows/projectdef.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projectdef.js Wed Aug 29 02:54:23 2007 @@ -66,14 +66,17 @@ if (CONVERT) { +if (ICCCONVERT == ) +ICCCONVERT = ICProjConvert90.exe; + var ICConvertTool = ICCCONVERT; var arrPath = new Array(ICConvertTool); -if (ICConvertTool == ) +if (0 ICConvertTool.indexOf(\\)) { -ICConvertTool = ICProjConvert90.exe; -arrPath[0] = ICConvertTool; +// no file path specified +// try to detect the path if (null != dte) { try @@ -103,6 +106,7 @@ if (!success) { WScript.StdErr.WriteLine(ICCCONVERT + conversion utility not found); +WScript.StdErr.WriteLine(You should check ICCCONVERT configuration variable); WScript.Quit(3); } }
svn commit: r572744 - /incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp
Author: faridz Date: Tue Sep 4 10:20:01 2007 New Revision: 572744 URL: http://svn.apache.org/viewvc?rev=572744view=rev Log: 2007-09-04 Farid Zaripov [EMAIL PROTECTED] * 22.locale.messages.cpp (test_open_close) [_WIN32]: Don't test file descriptor leaking because the catalog functions not uses files on Win32. (stress_test) [_WIN32]: Removed appending .dll because it will be appended by Windows by default. Modified: incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp Modified: incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp?rev=572744r1=572743r2=572744view=diff == --- incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp (original) +++ incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp Tue Sep 4 10:20:01 2007 @@ -527,7 +527,14 @@ int fdcount [2]; int next_fd [2]; +#ifndef _WIN32 next_fd [0] = rw_nextfd (fdcount + 0); +#else +// don't test file descriptor leaking on Win32 to avoid +// invalid parameter error +// catalog functions not uses file descriptors +next_fd [0] = fdcount [0] = 0; +#endif rw_info (0, 0, __LINE__, std::messages%s::open() and close() in locale(#%s), @@ -551,7 +558,11 @@ close_catalog (msgs, cat, true, cname, __LINE__); // verify that no file descriptor has leaked +#ifndef _WIN32 next_fd [1] = rw_nextfd (fdcount + 1); +#else +next_fd [1] = fdcount [1] = 0; +#endif rw_assert (next_fd [1] == next_fd [0] fdcount [0] == fdcount [1], 0, __LINE__, @@ -782,10 +793,6 @@ const char* const dot = std::strrchr (msg_name, '.'); std::strncpy (catalog_names[i], msg_name, dot - msg_name); *(catalog_names[i] + (dot - msg_name)) = '\0'; - -#ifdef _WIN32 -std::strcat (catalog_names[i], .dll); -#endif // _WIN32 // open each catalog (expect success) cats [i] = open_catalog (msgs, catalog_names [i],
svn commit: r572913 - in /incubator/stdcxx/trunk: etc/config/GNUmakefile.bin etc/config/windows/projects.js util/gencat.cpp
Author: faridz Date: Wed Sep 5 02:18:49 2007 New Revision: 572913 URL: http://svn.apache.org/viewvc?rev=572913view=rev Log: 2007-09-05 Farid Zaripov [EMAIL PROTECTED] * GNUmakefile.bin: Added gencat target. * projects.js (CreateProjectsDefs): Added gencat utility project. * gencat.cpp: New utility for generating the message catalogs. Added: incubator/stdcxx/trunk/util/gencat.cpp (with props) Modified: incubator/stdcxx/trunk/etc/config/GNUmakefile.bin incubator/stdcxx/trunk/etc/config/windows/projects.js Modified: incubator/stdcxx/trunk/etc/config/GNUmakefile.bin URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/GNUmakefile.bin?rev=572913r1=572912r2=572913view=diff == --- incubator/stdcxx/trunk/etc/config/GNUmakefile.bin (original) +++ incubator/stdcxx/trunk/etc/config/GNUmakefile.bin Wed Sep 5 02:18:49 2007 @@ -34,7 +34,7 @@ ONE_REPOSITORY = 1 include ../makefile.common -TARGET= exec localedef locale +TARGET= exec localedef locale gencat # locale sources and related NLSDIR = $(TOPDIR)/etc/nls @@ -99,6 +99,12 @@ # link the locale utility locale: locale_stub.o + @echo $(LD) $^ -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$) \ +$(LOGFILE) + $(LD) $^ -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$) $(TEEOPTS) + +# link the gencat utility +gencat: gencat.o @echo $(LD) $^ -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$) \ $(LOGFILE) $(LD) $^ -o $@ $(LDFLAGS) $(LDLIBS) $(call CXX.repo,$) $(TEEOPTS) Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?rev=572913r1=572912r2=572913view=diff == --- incubator/stdcxx/trunk/etc/config/windows/projects.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projects.js Wed Sep 5 02:18:49 2007 @@ -190,6 +190,22 @@ utilsArray.push(localeDef); /// +var gencatDef = new ProjectDef(util_gencat, typeApplication); +gencatDef.VCProjDir = ProjectsDir + \\util; +gencatDef.FilterDefs.push( +new FilterDef(sourceFilterName, sourceFilterUuid, sourceFilterExts, eFileTypeCppCode, false). +addFiles(%SRCDIR%\\util, +new Array(gencat.cpp))); +gencatDef.Defines = commonDefines; +gencatDef.Includes = stdcxxIncludes; +gencatDef.OutDir = binPath; +gencatDef.Libs = commonLibs; +gencatDef.OutFile = $(OutDir)\\gencat.exe; +gencatDef.PrjRefs.push(stdcxxDef); + +utilsArray.push(gencatDef); + +/// var utilsDef = new ProjectDef(.stdcxx_utils, typeGeneric); utilsDef.VCProjDir = ProjectsDir + \\util; utilsDef.OutDir = binPath; @@ -197,6 +213,7 @@ utilsDef.PrjDeps.push(execDef); utilsDef.PrjDeps.push(localedefDef); utilsDef.PrjDeps.push(localeDef); +utilsDef.PrjDeps.push(gencatDef); utilsArray.push(utilsDef); Added: incubator/stdcxx/trunk/util/gencat.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/gencat.cpp?rev=572913view=auto == --- incubator/stdcxx/trunk/util/gencat.cpp (added) +++ incubator/stdcxx/trunk/util/gencat.cpp Wed Sep 5 02:18:49 2007 @@ -0,0 +1,169 @@ +/*** + * + * gencat.cpp - Utility for generating message catalogs on Windows + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + **/ + +#include cstdlib // for system(), getenv() +#include cstdio// for printf() +#include cstring // for strcmp(), strrchr() +#include cstddef // for size_t + +#include string + +static const char +usage_text[] = { +Usage: %s OUTPUT-FILE
svn commit: r572920 - in /incubator/stdcxx/trunk/tests: include/rw_locale.h src/locale.cpp
Author: faridz Date: Wed Sep 5 02:24:09 2007 New Revision: 572920 URL: http://svn.apache.org/viewvc?rev=572920view=rev Log: 2007-09-05 Farid Zaripov [EMAIL PROTECTED] * rw_locale.h (rw_create_catalog): New function to generate message catalog. * locale.cpp (rw_create_catalog): Ditto. Modified: incubator/stdcxx/trunk/tests/include/rw_locale.h incubator/stdcxx/trunk/tests/src/locale.cpp Modified: incubator/stdcxx/trunk/tests/include/rw_locale.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/include/rw_locale.h?rev=572920r1=572919r2=572920view=diff == --- incubator/stdcxx/trunk/tests/include/rw_locale.h (original) +++ incubator/stdcxx/trunk/tests/include/rw_locale.h Wed Sep 5 02:24:09 2007 @@ -120,4 +120,13 @@ _TEST_EXPORT int rw_opt_setlocales (int, char*[]); + +// creates message file and invokes gencat to create message catalog +// then removes the message file +// catalog is a '\0' separated list of strings, each of which representing +// a single message, and with a blank line separating one set from another +// returns 0 in success +_TEST_EXPORT int +rw_create_catalog (const char * /* catname */, const char * /* catalog */); + #endif // RW_LOCALE_H_INCLUDED Modified: incubator/stdcxx/trunk/tests/src/locale.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/locale.cpp?rev=572920r1=572919r2=572920view=diff == --- incubator/stdcxx/trunk/tests/src/locale.cpp (original) +++ incubator/stdcxx/trunk/tests/src/locale.cpp Wed Sep 5 02:24:09 2007 @@ -108,6 +108,13 @@ #define RELPATHetc SLASH nls #define TESTS_ETC_PATH tests SLASH etc +// extension of the catalog file +#ifndef _WIN32 +# define RW_CAT_EXT .cat +#else +# define RW_CAT_EXT .dll +#endif + /**/ _TEST_EXPORT int @@ -858,4 +865,55 @@ // return 0 on success return 0; +} + + +/**/ + +_TEST_EXPORT int +rw_create_catalog (const char * catname, const char * catalog) +{ +RW_ASSERT (catname catalog); + +FILE* const f = fopen (catname, w); + +if (!f) +return -1; + +#ifndef _WIN32 + +for (int i = 1; *catalog; ++catalog, ++i) { +fprintf (f, $set %d This is Set %d\n, i, i); +for (int j = 1; *catalog; catalog += strlen (catalog) + 1, ++j) + fprintf (f, %d %s\n, j, catalog); +} + +#else // if defined (_WIN32) + +fprintf (f, STRINGTABLE\nBEGIN\n); + +for (int i = 1; *catalog; ++catalog) { +for (; *catalog; catalog += strlen (catalog) + 1, ++i) +fprintf (f, %d \%s\\n, i, catalog); +} + +fprintf (f, END\n); + +#endif // _WIN32 + +fclose (f); + +char *cat_name = new char [strlen (catname) + 1]; +strcpy (cat_name, catname); +if (char *dot = strrchr (cat_name, '.')) +*dot = '\0'; + +const int ret = rw_system (gencat %s RW_CAT_EXT %s, + cat_name, catname); + +delete[] cat_name; + +remove (catname); + +return ret; }
svn commit: r572923 - /incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp
Author: faridz Date: Wed Sep 5 02:26:17 2007 New Revision: 572923 URL: http://svn.apache.org/viewvc?rev=572923view=rev Log: 2007-09-05 Farid Zaripov [EMAIL PROTECTED] * 22.locale.messages.cpp: Removed generate_catalog() function. Used rw_create_catalog() istead of generate_catalog(). Modified: incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp Modified: incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp?rev=572923r1=572922r2=572923view=diff == --- incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp (original) +++ incubator/stdcxx/trunk/tests/localization/22.locale.messages.cpp Wed Sep 5 02:26:17 2007 @@ -40,7 +40,7 @@ #include cstring // for strlen() #include cstdlib // for getcwd(), getenv() -#include cstdio// for FILE, fopen(), fprintf() +#include cstdio// for remove() #include clocale // for LC_ALL #include cwchar// for mbsinit() @@ -260,75 +260,7 @@ } }; - -void generate_catalog (const char *msg_name, - const char* const text [MAX_SETS][MAX_MESSAGES]) -{ -std::FILE* const f = std::fopen (msg_name, w); - -if (!f) -return; - -#ifndef _WIN32 - -for (int i = 0; i MAX_SETS; ++i) { -std::fprintf (f, $set %d This is Set %d\n, i+1, i+1); -for (int j = 0; j MAX_MESSAGES; ++j) { -std::fprintf (f, %d %s\n, j + 1, text [i][j]); -} -} - -#else // if defined (_WIN32) - -std::fprintf (f, STRINGTABLE\nBEGIN\n); -for (int i = 0; i MAX_SETS; ++i) { -for (int j = 0; j MAX_MESSAGES; ++j) { -const int msgid = msg_id (i + 1, j + 1); -std::fprintf (f, %d \%s\\n, msgid, text[i][j]); -} -} - -std::fprintf (f, END\n); - -#endif // _WIN32 - -std::fclose (f); - -char *cat_name = new char [std::strlen (msg_name) + 1]; -const char *dot = std::strrchr (msg_name, '.'); -std::strncpy (cat_name, msg_name, dot - msg_name); -*(cat_name + (dot - msg_name)) = '\0'; - -#ifndef _WIN32 - -rw_system (gencat %s.cat %s, cat_name, msg_name); - -#else // if defined (_WIN32) - -char cpp_name [128]; - -std::sprintf (cpp_name, %s.cpp, cat_name); - -std::FILE* const cpp_file = std::fopen (cpp_name, w); -std::fprintf (cpp_file, void foo () { }); -std::fclose (cpp_file); - -rw_system ( rc -r %s.rc -cl -nologo -c %s -link -nologo /DLL /OUT:%s.dll %s.obj %s.res, - cat_name, - cpp_name, - cat_name, cat_name, cat_name); - -rw_system (SHELL_RM_F %s %s.rc %s.res %s.obj, - cpp_name, cat_name, cat_name, cat_name); - -#endif // _WIN32 - -delete[] cat_name; - -std::remove (msg_name); -} +static std::string catalog; /***/ @@ -788,7 +720,7 @@ std::sprintf (msg_name, rwstdmessages_%d.rc, int (i)); #endif -generate_catalog (msg_name, messages); +rw_create_catalog (msg_name, catalog.c_str ()); const char* const dot = std::strrchr (msg_name, '.'); std::strncpy (catalog_names[i], msg_name, dot - msg_name); @@ -891,9 +823,16 @@ static int run_test (int, char*[]) { +for (int i = 0; i MAX_SETS; ++i) { +for (int j = 0; j MAX_MESSAGES; ++j) +catalog.append (messages [i][j], std::strlen (messages [i][j]) + 1); + +catalog.append (1, '\0'); +} + const char* const locname = find_named_locale (); -generate_catalog (MSG_NAME, messages); +rw_create_catalog (MSG_NAME, catalog.c_str ()); test_messages (char (), char, locname);
svn commit: r572976 - /incubator/stdcxx/trunk/tests/regress/22.locale.messages.stdcxx-508_542.cpp
Author: faridz Date: Wed Sep 5 08:48:43 2007 New Revision: 572976 URL: http://svn.apache.org/viewvc?rev=572976view=rev Log: 2007-09-05 Farid Zaripov [EMAIL PROTECTED] * 22.locale.messages.stdcxx-508_542.cpp: New regression test for STDCXX-508 and STDCXX-542 issues. Added: incubator/stdcxx/trunk/tests/regress/22.locale.messages.stdcxx-508_542.cpp (with props) Added: incubator/stdcxx/trunk/tests/regress/22.locale.messages.stdcxx-508_542.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/regress/22.locale.messages.stdcxx-508_542.cpp?rev=572976view=auto == --- incubator/stdcxx/trunk/tests/regress/22.locale.messages.stdcxx-508_542.cpp (added) +++ incubator/stdcxx/trunk/tests/regress/22.locale.messages.stdcxx-508_542.cpp Wed Sep 5 08:48:43 2007 @@ -0,0 +1,99 @@ +/ + * + * 22.locale.messages.stdcxx-508_542.cpp + * + * the regression test for STDCXX-508, STDCXX-542 issues + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + **/ + +#include cstdio +#include cassert +#include locale + +#include rw_locale.h +#include driver.h + +#ifdef _MSC_VER +#include crtdbg.h +#endif + +#ifdef _WIN32 +# define CATALOG test +# define MSG_EXT .rc +# define CAT_EXT .dll +#else +# define CATALOG ./test +# define MSG_EXT .msg +# define CAT_EXT .cat +#endif + + +static int run_test (int, char**) +{ +const char * catalog = +First set, first message\0\0 +Second set, first message\0\0; + +rw_create_catalog (CATALOG MSG_EXT, catalog); + +typedef std::messageschar messagesT; + +const std::locale loc; + +const messagesT msgs = +std::use_facetmessagesT(loc); + +messagesT::catalog cats [4]; + +int i; + +// test STDCXX-508 +for (i = 0; i sizeof (cats) / sizeof (*cats); ++i) { +cats [i] = msgs.open (CATALOG CAT_EXT, loc); +assert (-1 != cats [i]); +} + +// test STDCXX-542 +for (--i; i = 0; --i) +msgs.close (cats [i]); + +std::remove (CATALOG CAT_EXT); + +return 0; +} + + +int main (int argc, char* argv[]) +{ +#ifdef _MSC_VER +// disable GUI window from abort() +_CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_DEBUG); +#endif + +return rw_test (argc, argv, __FILE__, +lib.locale.messages, +STDCXX-508;STDCXX-542, +run_test, +, +(void*)0); +} Propchange: incubator/stdcxx/trunk/tests/regress/22.locale.messages.stdcxx-508_542.cpp -- svn:eol-style = native Propchange: incubator/stdcxx/trunk/tests/regress/22.locale.messages.stdcxx-508_542.cpp -- svn:keywords = Id
svn commit: r572979 - /incubator/stdcxx/trunk/src/catalog.cpp
Author: faridz Date: Wed Sep 5 08:59:31 2007 New Revision: 572979 URL: http://svn.apache.org/viewvc?rev=572979view=rev Log: 2007-09-05 Travis Vitek [EMAIL PROTECTED] STDCXX-542 * catalog.cpp (catclose): check bounds before index to avoid out of bound access. Modified: incubator/stdcxx/trunk/src/catalog.cpp Modified: incubator/stdcxx/trunk/src/catalog.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/catalog.cpp?rev=572979r1=572978r2=572979view=diff == --- incubator/stdcxx/trunk/src/catalog.cpp (original) +++ incubator/stdcxx/trunk/src/catalog.cpp Wed Sep 5 08:59:31 2007 @@ -134,7 +134,7 @@ delete __rw_catlist[i]; __rw_catlist[i] = 0; CatVector::size_type j; -for (j = i+1; __rw_catlist[j] j __rw_catlist.size(); j++) +for (j = i+1; j __rw_catlist.size() __rw_catlist[j]; j++) __rw_catlist[j-1] = __rw_catlist[j]; if (j __rw_catlist.size()) __rw_catlist[j] = 0;
svn commit: r573012 - /incubator/stdcxx/trunk/etc/config/windows/build.wsf
Author: faridz Date: Wed Sep 5 10:42:35 2007 New Revision: 573012 URL: http://svn.apache.org/viewvc?rev=573012view=rev Log: 2007-09-05 Farid Zaripov [EMAIL PROTECTED] * build.wsf (event_ProjectBuildFinished): Read text from all buildlog.htm files, which is present in output window text. (BuildProject): Trying to fix build.wsf(163, 14) (null): Invalid pointer error; rewritten logic on ICC builds. Modified: incubator/stdcxx/trunk/etc/config/windows/build.wsf Modified: incubator/stdcxx/trunk/etc/config/windows/build.wsf URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/build.wsf?rev=573012r1=573011r2=573012view=diff == --- incubator/stdcxx/trunk/etc/config/windows/build.wsf (original) +++ incubator/stdcxx/trunk/etc/config/windows/build.wsf Wed Sep 5 10:42:35 2007 @@ -65,6 +65,7 @@ var longConfName = ; var buildOnly = false; var outputPane = null; +var postBuildInvoked; var description = new build; // run @@ -108,6 +109,8 @@ function event_ProjectBuildFinished(Cfg, Warnings, Errors, Canceled) { +postBuildInvoked = true; + var log = ; var htm = BuildLog.htm; @@ -132,21 +135,28 @@ sel.SelectAll(); log = sel.Text; -// find BuildLoh.htm path -var proto = file://; -var begin = log.indexOf(proto); -if (0 = begin) +var log2 = ; +var begin = 0; + +while (true) { +// find BuildLog.htm path +var proto = file://; +begin = log.indexOf(proto, begin); +if (0 begin) +break; + begin += proto.length; var end = log.indexOf(htm, begin); -if (0 = end) -{ -var path = log.substring(begin, end + htm.length); -var log2 = getBuildLog(path); -if (0 log2.length) -log = log2; -} +if (0 end) +break; + +var path = log.substring(begin, end + htm.length); +log2 += getBuildLog(path); } + +if (0 log2.length) +log = log2; } WScript.Echo(log); @@ -154,27 +164,34 @@ function BuildProject(solutionBuild, projectName) { -var projectFile = null; +var projectFile = ; var projects = dte.Solution.Projects; -for (var i = 1; i = projects.Count null == projectFile; ++i) +for (var i = 1; i = projects.Count 0 == projectFile.length; ++i) { var project = projects.Item(i); if (project.Name == projectName) -projectFile = project.UniqueName; +{ +try +{ +projectFile = project.UniqueName; +} +catch (e) +{ +WScript.Echo(Exception: cannot get UniqueName for + projectName + \n); +projectFile = project.FileName; +} +} } -if (null != projectFile) +if (0 projectFile.length) { -var isICC = 0 projectFile.indexOf(.icproj); +event_ProjectBuildStarted(null); -if (isICC) -// event not invoked automatically for Intel projects -event_ProjectBuildStarted(null); +postBuildInvoked = false; solutionBuild.BuildProject(longConfName, projectFile, true); -if (isICC) -// event not invoked automatically for Intel projects +if (!postBuildInvoked) event_ProjectBuildFinished(null, 0, 0, 0); return solutionBuild.LastBuildInfo;
svn commit: r573285 - /incubator/stdcxx/trunk/util/gencat.cpp
Author: faridz Date: Thu Sep 6 07:41:32 2007 New Revision: 573285 URL: http://svn.apache.org/viewvc?rev=573285view=rev Log: 2007-09-06 Farid Zaripov [EMAIL PROTECTED] * gencat.cpp (main): Resolve ambiguity of overloaded methods. Modified: incubator/stdcxx/trunk/util/gencat.cpp Modified: incubator/stdcxx/trunk/util/gencat.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/gencat.cpp?rev=573285r1=573284r2=573285view=diff == --- incubator/stdcxx/trunk/util/gencat.cpp (original) +++ incubator/stdcxx/trunk/util/gencat.cpp Thu Sep 6 07:41:32 2007 @@ -127,7 +127,7 @@ } if (std::string::npos != cmd.find (' ')) { -cmd.insert (0, 1, '\'); +cmd.insert (cmd.begin (), 1, '\'); cmd.push_back ('\'); }
svn commit: r573294 - /incubator/stdcxx/trunk/etc/config/windows/projects.js
Author: faridz Date: Thu Sep 6 08:15:44 2007 New Revision: 573294 URL: http://svn.apache.org/viewvc?rev=573294view=rev Log: 2007-09-06 Farid Zaripov [EMAIL PROTECTED] * projects.js (CreateProjectsDefs): Added echo path of clvars.bat file to see why the system cannot find the path. Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?rev=573294r1=573293r2=573294view=diff == --- incubator/stdcxx/trunk/etc/config/windows/projects.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projects.js Thu Sep 6 08:15:44 2007 @@ -67,7 +67,8 @@ configureDef.IntDir = configureDef.OutDir; configureDef.CustomBuildFile = configure.wsf; if (0 CLVARSBAT.length) -configureDef.CustomBuildCmd = call \ + CLVARSBAT + \\r\n; +configureDef.CustomBuildCmd = echo Calling \ + CLVARSBAT + \\r\n + + call \ + CLVARSBAT + \\r\n; else configureDef.CustomBuildCmd = ; configureDef.CustomBuildCmd += cscript /nologo \%CUSTOMFILE%\ +
svn commit: r573337 - in /incubator/stdcxx/trunk: etc/config/windows/projects.js include/rw/_mutex.h src/i86/atomic.asm src/i86_64/atomic.asm src/once.cpp
Author: faridz Date: Thu Sep 6 12:05:30 2007 New Revision: 573337 URL: http://svn.apache.org/viewvc?rev=573337view=rev Log: 2007-09-06 Farid Zaripov [EMAIL PROTECTED] * projects.js: Added definitions of the platform dependent files. * i86/atomic.asm: New file with definitions of the __rw_atomic_xxx() functions for Win32 platform. * i86_64/atomic.asm: New file with definitions of the __rw_atomic_xxx() functions for Windows/x64 platform. * _mutex.h: Use new __rw_atomic_xxx() functions if corresponding InterlockedXXX() functions are not present. [_MSC_VER = 1400]: Use intrinsic InterlockedXXX() functions on MSVC 8 and higher. * once.cpp [_WIN32 _DLL]: Tell linker to export __atomic_xxx() functions, defined in .asm files. Added: incubator/stdcxx/trunk/src/i86/atomic.asm (with props) incubator/stdcxx/trunk/src/i86_64/atomic.asm (with props) Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js incubator/stdcxx/trunk/include/rw/_mutex.h incubator/stdcxx/trunk/src/once.cpp Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?rev=573337r1=573336r2=573337view=diff == --- incubator/stdcxx/trunk/etc/config/windows/projects.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projects.js Thu Sep 6 12:05:30 2007 @@ -85,6 +85,10 @@ projectDefs.push(new Array(configureDef)); /// +// add platform dependent files +customFileDefs.push(new CustomFileDef(i86\\atomic.asm, Win32, InitAsmTool)); +customFileDefs.push(new CustomFileDef(i86_64\\atomic.asm, x64, InitAsmTool)); + var stdcxxDef = new ProjectDef(.stdcxx, typeLibrary); stdcxxDef.VCProjDir = ProjectsDir; stdcxxDef.FilterDefs.push( Modified: incubator/stdcxx/trunk/include/rw/_mutex.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_mutex.h?rev=573337r1=573336r2=573337view=diff == --- incubator/stdcxx/trunk/include/rw/_mutex.h (original) +++ incubator/stdcxx/trunk/include/rw/_mutex.h Thu Sep 6 12:05:30 2007 @@ -140,6 +140,9 @@ __declspec (dllimport) void __stdcall DeleteCriticalSection (_RTL_CRITICAL_SECTION*); + +#if defined _RWSTD_INTERLOCKED_T (!defined (_MSC_VER) || _MSC_VER 1400) + __declspec (dllimport) long __stdcall InterlockedIncrement (_RWSTD_INTERLOCKED_T*); @@ -149,6 +152,12 @@ __declspec (dllimport) long __stdcall InterlockedExchange (_RWSTD_INTERLOCKED_T*, long); +# define _InterlockedIncrement InterlockedIncrement +# define _InterlockedDecrement InterlockedDecrement +# define _InterlockedExchange InterlockedExchange + +#endif // _RWSTD_INTERLOCKED_T (!_MSC_VER || _MSC_VER 1400) + } // extern C _RWSTD_NAMESPACE (__rw) { @@ -166,6 +175,21 @@ # endif // _RWSTD_NO_FWD_DECLARATIONS +# if _MSC_VER = 1400 +#include intrin.h + +#pragma intrinsic (_InterlockedIncrement) +#pragma intrinsic (_InterlockedIncrement16) +#pragma intrinsic (_InterlockedDecrement) +#pragma intrinsic (_InterlockedDecrement16) +#pragma intrinsic (_InterlockedExchange) + +#ifdef _M_X64 +# pragma intrinsic (_InterlockedIncrement64) +# pragma intrinsic (_InterlockedDecrement64) +# pragma intrinsic (_InterlockedExchange64) +#endif +# endif // _MSC_VER = 1400 _RWSTD_NAMESPACE (__rw) { @@ -480,9 +504,9 @@ // up with multiple copies) static volatile long __cntr /* = 0 */; // initialization counter -#if defined (_WIN32) || defined (_WIN64) +#if defined (_WIN32) // MT safe -if (0 == __cntr 1 == InterlockedIncrement ((long*)__cntr)) +if (0 == __cntr 1 == _InterlockedIncrement ((long*)__cntr)) #else // not so safe (volatile should help) if (0 == __cntr 1 == ++__cntr) @@ -1161,19 +1185,20 @@ false); } -/** i386/gcc **/ +/** i386/gcc || _M_IX86 */ -#elif defined (__i386__) (defined (__GNUG__) || defined (__INTEL_COMPILER)) +#elif defined (__i386__) (defined (__GNUG__) \ + || defined (__INTEL_COMPILER)) || defined (_M_IX86) extern C { -char __rw_atomic_add8 (char*, int); -short __rw_atomic_add16 (short*, short); -int __rw_atomic_add32 (int*, int); - -char __rw_atomic_xchg8 (char*, char); -short __rw_atomic_xchg16 (short*, short); -int __rw_atomic_xchg32 (int*, int); +_RWSTD_EXPORT char __rw_atomic_add8 (char*, int); +_RWSTD_EXPORT short __rw_atomic_add16 (short*, short); +_RWSTD_EXPORT int __rw_atomic_add32 (int*, int); + +_RWSTD_EXPORT char __rw_atomic_xchg8 (char*, char); +_RWSTD_EXPORT short
svn commit: r573563 - in /incubator/stdcxx/trunk/src: atomic-cxx.S atomic.s
Author: faridz Date: Fri Sep 7 06:02:04 2007 New Revision: 573563 URL: http://svn.apache.org/viewvc?rev=573563view=rev Log: 2007-09-07 Farid Zaripov [EMAIL PROTECTED] * atomic-cxx.S: Updated copyright notice. * atomic.s: Ditto. Modified: incubator/stdcxx/trunk/src/atomic-cxx.S incubator/stdcxx/trunk/src/atomic.s Modified: incubator/stdcxx/trunk/src/atomic-cxx.S URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/atomic-cxx.S?rev=573563r1=573562r2=573563view=diff == --- incubator/stdcxx/trunk/src/atomic-cxx.S (original) +++ incubator/stdcxx/trunk/src/atomic-cxx.S Fri Sep 7 06:02:04 2007 @@ -6,22 +6,23 @@ * *** * - * Copyright 2005-2006 The Apache Software Foundation or its licensors, - * as applicable. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at * - * Copyright 2003-2006 Rogue Wave Software. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 2003-2006 Rogue Wave Software. * **/ Modified: incubator/stdcxx/trunk/src/atomic.s URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/atomic.s?rev=573563r1=573562r2=573563view=diff == --- incubator/stdcxx/trunk/src/atomic.s (original) +++ incubator/stdcxx/trunk/src/atomic.s Fri Sep 7 06:02:04 2007 @@ -6,22 +6,23 @@ * *** * - * Copyright 2005-2006 The Apache Software Foundation or its licensors, - * as applicable. + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at * - * Copyright 2003-2006 Rogue Wave Software. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 2003-2006 Rogue Wave Software. * **/
svn propchange: r574613 - svn:log
Author: faridz Revision: 574613 Modified property: svn:log Modified: svn:log at Tue Sep 11 10:17:37 2007 -- --- svn:log (original) +++ svn:log Tue Sep 11 10:17:37 2007 @@ -7,5 +7,5 @@ the success or failure of the initialization. * utilities.js (getCompilerOpts): Set variables to initial state before parsing .config file. - README: Updated text on CONFIG and BUILDDIR parameters of + * README: Updated text on CONFIG and BUILDDIR parameters of the generate.bat script.
svn propchange: r574618 - svn:log
Author: faridz Revision: 574618 Modified property: svn:log Modified: svn:log at Tue Sep 11 10:17:49 2007 -- --- svn:log (original) +++ svn:log Tue Sep 11 10:17:49 2007 @@ -3,4 +3,4 @@ STDCXX-516 * generate.bat: File renamed ... * configure.bat: ... to this. - README: generate.bat text replaced by configure.bat. + * README: generate.bat text replaced by configure.bat.
svn propchange: r574626 - svn:log
Author: faridz Revision: 574626 Modified property: svn:log Modified: svn:log at Tue Sep 11 10:18:09 2007 -- --- svn:log (original) +++ svn:log Tue Sep 11 10:18:09 2007 @@ -1,4 +1,4 @@ 2007-09-11 Farid Zaripov [EMAIL PROTECTED] STDCXX-517 - README: Fixed a typo. + * README: Fixed a typo.
svn commit: r574997 - /incubator/stdcxx/trunk/generate.bat
Author: faridz Date: Wed Sep 12 08:42:53 2007 New Revision: 574997 URL: http://svn.apache.org/viewvc?rev=574997view=rev Log: 2007-09-12 Farid Zaripov [EMAIL PROTECTED] * generate.bat: New batch file which just invokes configure.bat to preserve the user interface to the library. This file is deprecated and will be removed in 4.3 release. Added: incubator/stdcxx/trunk/generate.bat (with props) Added: incubator/stdcxx/trunk/generate.bat URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/generate.bat?rev=574997view=auto == --- incubator/stdcxx/trunk/generate.bat (added) +++ incubator/stdcxx/trunk/generate.bat Wed Sep 12 08:42:53 2007 @@ -0,0 +1 @@ [EMAIL PROTECTED] %* Propchange: incubator/stdcxx/trunk/generate.bat -- svn:eol-style = native Propchange: incubator/stdcxx/trunk/generate.bat -- svn:keywords = Id
svn commit: r575613 - in /incubator/stdcxx/trunk/include/loc: _messages.h _moneypunct.h
Author: faridz Date: Fri Sep 14 03:44:52 2007 New Revision: 575613 URL: http://svn.apache.org/viewvc?rev=575613view=rev Log: 2007-09-14 Farid Zaripov [EMAIL PROTECTED] STDCXX-554 * _messages.h (messages): Removed explicit invoking of the messages_base() ctor to avoid buffer overrun due to bad code generation on MSVC 7.1. * _moneypunct.h (moneypunct): Removed explicit invoking of the money_base() ctor to avoid buffer overrun due to bad code generation on MSVC 7.1. Modified: incubator/stdcxx/trunk/include/loc/_messages.h incubator/stdcxx/trunk/include/loc/_moneypunct.h Modified: incubator/stdcxx/trunk/include/loc/_messages.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/loc/_messages.h?rev=575613r1=575612r2=575613view=diff == --- incubator/stdcxx/trunk/include/loc/_messages.h (original) +++ incubator/stdcxx/trunk/include/loc/_messages.h Fri Sep 14 03:44:52 2007 @@ -82,7 +82,7 @@ allocatorchar_type string_type; _EXPLICIT messages (_RWSTD_SIZE_T __refs = 0) -: _RW::__rw_facet (__refs), messages_base () { } +: _RW::__rw_facet (__refs) { } catalog open (const string __fun, const locale __loc) const { Modified: incubator/stdcxx/trunk/include/loc/_moneypunct.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/loc/_moneypunct.h?rev=575613r1=575612r2=575613view=diff == --- incubator/stdcxx/trunk/include/loc/_moneypunct.h (original) +++ incubator/stdcxx/trunk/include/loc/_moneypunct.h Fri Sep 14 03:44:52 2007 @@ -66,7 +66,7 @@ string_type; _EXPLICIT moneypunct (_RWSTD_SIZE_T __refs = 0) -: _RW::__rw_facet (__refs), money_base () { } +: _RW::__rw_facet (__refs) { } char_type decimal_point () const { return do_decimal_point ();
svn commit: r575684 - /incubator/stdcxx/trunk/util/runall.cpp
Author: faridz Date: Fri Sep 14 07:01:00 2007 New Revision: 575684 URL: http://svn.apache.org/viewvc?rev=575684view=rev Log: 2007-09-14 Farid Zaripov [EMAIL PROTECTED] * runall.cpp (main): Pass buf to strchr() call instead of target (we need char* result instead of const char*). Modified: incubator/stdcxx/trunk/util/runall.cpp Modified: incubator/stdcxx/trunk/util/runall.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/runall.cpp?rev=575684r1=575683r2=575684view=diff == --- incubator/stdcxx/trunk/util/runall.cpp (original) +++ incubator/stdcxx/trunk/util/runall.cpp Fri Sep 14 07:01:00 2007 @@ -570,7 +570,8 @@ if (target) { /* remove terminating newline character if present */ -if (char* pos = strchr (target, '\n')) +assert (buf == target); +if (char* pos = strchr (buf, '\n')) *pos = '\0'; if (*target) { ++progs_count;
svn commit: r576787 - /incubator/stdcxx/trunk/src/messages.cpp
Author: faridz Date: Tue Sep 18 02:07:09 2007 New Revision: 576787 URL: http://svn.apache.org/viewvc?rev=576787view=rev Log: 2007-09-18 Farid Zaripov [EMAIL PROTECTED] * messages.cpp (__rw_cat_open): Use _RWSTD_MT_CLASS_GUARD instead of _RWSTD_MT_STATIC_GUARD to synchronize access to global repository of open catalogs. (__rw_get_message): Ditto. (__rw_get_locale): Ditto. (__rw_cat_close): Ditto. Modified: incubator/stdcxx/trunk/src/messages.cpp Modified: incubator/stdcxx/trunk/src/messages.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/messages.cpp?rev=576787r1=576786r2=576787view=diff == --- incubator/stdcxx/trunk/src/messages.cpp (original) +++ incubator/stdcxx/trunk/src/messages.cpp Tue Sep 18 02:07:09 2007 @@ -213,7 +213,7 @@ int __rw_cat_open (const _STD::string cat_name, const _STD::locale loc) { -_RWSTD_MT_STATIC_GUARD (__rw_open_cat_data); +_RWSTD_MT_CLASS_GUARD (__rw_open_cat_data); const nl_catd catd = catopen (cat_name.c_str (), NL_CAT_LOCALE); if (_RWSTD_BAD_CATD == catd) @@ -239,7 +239,7 @@ if (cat 0) return 0; -_RWSTD_MT_STATIC_GUARD (__rw_open_cat_data); +_RWSTD_MT_CLASS_GUARD (__rw_open_cat_data); __rw_open_cat_data *const pcat_data = __rw_manage_cat_data (cat, 0); @@ -264,7 +264,7 @@ const _STD::locale __rw_get_locale (int cat) { -_RWSTD_MT_STATIC_GUARD (__rw_open_cat_data); +_RWSTD_MT_CLASS_GUARD (__rw_open_cat_data); _RWSTD_ASSERT (0 = cat); __rw_open_cat_data* const pcat_data = __rw_manage_cat_data (cat, 0); @@ -279,7 +279,7 @@ void __rw_cat_close (int cat) { -_RWSTD_MT_STATIC_GUARD (__rw_open_cat_data); +_RWSTD_MT_CLASS_GUARD (__rw_open_cat_data); __rw_open_cat_data* const pcat_data = cat 0 ? 0 : __rw_manage_cat_data (cat, 0);
svn commit: r577007 - /incubator/stdcxx/trunk/util/gencat.cpp
Author: faridz Date: Tue Sep 18 11:05:38 2007 New Revision: 577007 URL: http://svn.apache.org/viewvc?rev=577007view=rev Log: 2007-09-18 Farid Zaripov [EMAIL PROTECTED] * gencat.cpp [_WIN32] (main): Added checking VS90COMNTOOLS environment variable (get ready to use with MSVC 9.0 Orcas). Modified: incubator/stdcxx/trunk/util/gencat.cpp Modified: incubator/stdcxx/trunk/util/gencat.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/gencat.cpp?rev=577007r1=577006r2=577007view=diff == --- incubator/stdcxx/trunk/util/gencat.cpp (original) +++ incubator/stdcxx/trunk/util/gencat.cpp Tue Sep 18 11:05:38 2007 @@ -115,7 +115,8 @@ # endif // _WIN64 const char* const env_vars [] = { -VS80COMNTOOLS, VS71COMNTOOLS, VSCOMNTOOLS +VS90COMNTOOLS, VS80COMNTOOLS, +VS71COMNTOOLS, VSCOMNTOOLS }; for (size_t i = 0; i sizeof (env_vars) / sizeof (*env_vars); ++i) {
svn commit: r577000 - in /incubator/stdcxx/trunk: include/loc/_messages.h src/messages.cpp
Author: faridz Date: Tue Sep 18 10:56:44 2007 New Revision: 577000 URL: http://svn.apache.org/viewvc?rev=577000view=rev Log: 2007-09-18 Farid Zaripov [EMAIL PROTECTED] * _messages.h (__rw_cat_open): Declare fnuction as _RWSTD_EXPORT. * _messages.h (__rw_get_message): Ditto. * _messages.h (__rw_get_locale): Ditto. * _messages.h (__rw_cat_close): Ditto. * messages.cpp (__rw_cat_open): Ditto. * messages.cpp (__rw_get_message): Ditto. * messages.cpp (__rw_get_locale): Ditto. * messages.cpp (__rw_cat_close): Ditto. Modified: incubator/stdcxx/trunk/include/loc/_messages.h incubator/stdcxx/trunk/src/messages.cpp Modified: incubator/stdcxx/trunk/include/loc/_messages.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/loc/_messages.h?rev=577000r1=576999r2=577000view=diff == --- incubator/stdcxx/trunk/include/loc/_messages.h (original) +++ incubator/stdcxx/trunk/include/loc/_messages.h Tue Sep 18 10:56:44 2007 @@ -49,13 +49,17 @@ _RWSTD_NAMESPACE (__rw) { -int __rw_cat_open (const _STD::string, const _V3_LOCALE::locale); +_RWSTD_EXPORT int +__rw_cat_open (const _STD::string, const _V3_LOCALE::locale); -const char* __rw_get_message (int, int, int); +_RWSTD_EXPORT const char* +__rw_get_message (int, int, int); -const _V3_LOCALE::locale __rw_get_locale (int); +_RWSTD_EXPORT const _V3_LOCALE::locale +__rw_get_locale (int); -void __rw_cat_close (int); +_RWSTD_EXPORT void +__rw_cat_close (int); } // namespace __rw Modified: incubator/stdcxx/trunk/src/messages.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/messages.cpp?rev=577000r1=576999r2=577000view=diff == --- incubator/stdcxx/trunk/src/messages.cpp (original) +++ incubator/stdcxx/trunk/src/messages.cpp Tue Sep 18 10:56:44 2007 @@ -210,7 +210,7 @@ // Open a message catalog and assign and return a handle for it. -int +_RWSTD_EXPORT int __rw_cat_open (const _STD::string cat_name, const _STD::locale loc) { _RWSTD_MT_CLASS_GUARD (__rw_open_cat_data); @@ -233,7 +233,7 @@ // Get message text from catalog. -const char* +_RWSTD_EXPORT const char* __rw_get_message (int cat, int set_num, int msg_num) { if (cat 0) @@ -261,7 +261,7 @@ // Get locale to be used for character translation for this message catalog. -const _STD::locale +_RWSTD_EXPORT const _STD::locale __rw_get_locale (int cat) { _RWSTD_MT_CLASS_GUARD (__rw_open_cat_data); @@ -276,7 +276,7 @@ // Close a catalog and release its handle. -void +_RWSTD_EXPORT void __rw_cat_close (int cat) { _RWSTD_MT_CLASS_GUARD (__rw_open_cat_data);
svn commit: r577002 - /incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp
Author: faridz Date: Tue Sep 18 11:01:47 2007 New Revision: 577002 URL: http://svn.apache.org/viewvc?rev=577002view=rev Log: 2007-09-18 Farid Zaripov [EMAIL PROTECTED] * 20.temp.buffer.cpp (run_test): Use _RWSTD_LONG_MAX instead of _RWSTD_PTRDIFF_MAX because BigStruct parametrized by unsigned long type and sizeof (_RWSTD_PTRDIFF_T) can be greater that sizeof (unsigned long). Modified: incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp 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=577002r1=577001r2=577002view=diff == --- incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp (original) +++ incubator/stdcxx/trunk/tests/utilities/20.temp.buffer.cpp Tue Sep 18 11:01:47 2007 @@ -443,9 +443,9 @@ // avoid instantiating test on very large structs // to prevent failures (at compile or run-time) due // to compiler bugs -test_failure ((BigStruct_RWSTD_PTRDIFF_MAX / 2*)0, 0); -test_failure ((BigStruct_RWSTD_PTRDIFF_MAX - 1*)0, 0); -test_failure ((BigStruct_RWSTD_PTRDIFF_MAX*)0, 0); +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); #else
svn commit: r577004 - /incubator/stdcxx/trunk/util/exec.cpp
Author: faridz Date: Tue Sep 18 11:03:42 2007 New Revision: 577004 URL: http://svn.apache.org/viewvc?rev=577004view=rev Log: 2007-09-18 Farid Zaripov [EMAIL PROTECTED] * exec.cpp [_WIN32]: Added STATUS_INVALID_CRUNTIME_PARAMETER to the nt_status_map (detected on x64 Windows). Modified: incubator/stdcxx/trunk/util/exec.cpp Modified: incubator/stdcxx/trunk/util/exec.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/exec.cpp?rev=577004r1=577003r2=577004view=diff == --- incubator/stdcxx/trunk/util/exec.cpp (original) +++ incubator/stdcxx/trunk/util/exec.cpp Tue Sep 18 11:03:42 2007 @@ -62,10 +62,13 @@ #define SIGSTKFLT 16 // STATUS_FLOAT_STACK_CHECK translated into SIGSTKFLT # endif # ifndef STATUS_INVALID_PARAMETER -#define STATUS_INVALID_PARAMETER ((DWORD)0xC00DL) +#define STATUS_INVALID_PARAMETER ((DWORD)0xC00DL) # endif # ifndef STATUS_STACK_BUFFER_OVERRUN -#define STATUS_STACK_BUFFER_OVERRUN ((DWORD)0xC409L) +#define STATUS_STACK_BUFFER_OVERRUN ((DWORD)0xC409L) +# endif +# ifndef STATUS_INVALID_CRUNTIME_PARAMETER +#define STATUS_INVALID_CRUNTIME_PARAMETER ((DWORD)0xC417L) # endif #endif #include sys/stat.h /* for S_* */ @@ -872,23 +875,24 @@ DWORD nt_status; int signal; } nt_status_map [] = { -{ STATUS_BREAKPOINT, SIGTRAP }, -{ STATUS_ACCESS_VIOLATION,SIGSEGV }, -{ STATUS_STACK_OVERFLOW, SIGSEGV }, -{ STATUS_STACK_BUFFER_OVERRUN,SIGSEGV }, -{ STATUS_IN_PAGE_ERROR, SIGBUS}, -{ STATUS_ILLEGAL_INSTRUCTION, SIGILL}, -{ STATUS_PRIVILEGED_INSTRUCTION, SIGILL}, -{ STATUS_FLOAT_DENORMAL_OPERAND, SIGFPE}, -{ STATUS_FLOAT_DIVIDE_BY_ZERO,SIGFPE}, -{ STATUS_FLOAT_INEXACT_RESULT,SIGFPE}, -{ STATUS_FLOAT_INVALID_OPERATION, SIGFPE}, -{ STATUS_FLOAT_OVERFLOW, SIGFPE}, -{ STATUS_FLOAT_UNDERFLOW, SIGFPE}, -{ STATUS_INTEGER_DIVIDE_BY_ZERO, SIGFPE}, -{ STATUS_INTEGER_OVERFLOW,SIGFPE}, -{ STATUS_FLOAT_STACK_CHECK, SIGSTKFLT }, -{ STATUS_INVALID_PARAMETER, SIGSYS} +{ STATUS_BREAKPOINT, SIGTRAP }, +{ STATUS_ACCESS_VIOLATION, SIGSEGV }, +{ STATUS_STACK_OVERFLOW, SIGSEGV }, +{ STATUS_STACK_BUFFER_OVERRUN, SIGSEGV }, +{ STATUS_IN_PAGE_ERROR, SIGBUS}, +{ STATUS_ILLEGAL_INSTRUCTION,SIGILL}, +{ STATUS_PRIVILEGED_INSTRUCTION, SIGILL}, +{ STATUS_FLOAT_DENORMAL_OPERAND, SIGFPE}, +{ STATUS_FLOAT_DIVIDE_BY_ZERO, SIGFPE}, +{ STATUS_FLOAT_INEXACT_RESULT, SIGFPE}, +{ STATUS_FLOAT_INVALID_OPERATION,SIGFPE}, +{ STATUS_FLOAT_OVERFLOW, SIGFPE}, +{ STATUS_FLOAT_UNDERFLOW,SIGFPE}, +{ STATUS_INTEGER_DIVIDE_BY_ZERO, SIGFPE}, +{ STATUS_INTEGER_OVERFLOW, SIGFPE}, +{ STATUS_FLOAT_STACK_CHECK, SIGSTKFLT }, +{ STATUS_INVALID_PARAMETER, SIGSYS}, +{ STATUS_INVALID_CRUNTIME_PARAMETER, SIGSYS} };
svn commit: r577031 - /incubator/stdcxx/trunk/include/rw/_mutex.h
Author: faridz Date: Tue Sep 18 12:46:28 2007 New Revision: 577031 URL: http://svn.apache.org/viewvc?rev=577031view=rev Log: 2007-09-18 Farid Zaripov [EMAIL PROTECTED] * _mutex.h: Use #pragma intrinsic only on MSVC (ICC doesn't support this #pragma). Use _InterlockedIncrement16() and _InterlockedDecrement16() intrinsic functions only on MSVC (ICC doesn't support them). Modified: incubator/stdcxx/trunk/include/rw/_mutex.h Modified: incubator/stdcxx/trunk/include/rw/_mutex.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_mutex.h?rev=577031r1=577030r2=577031view=diff == --- incubator/stdcxx/trunk/include/rw/_mutex.h (original) +++ incubator/stdcxx/trunk/include/rw/_mutex.h Tue Sep 18 12:46:28 2007 @@ -175,7 +175,7 @@ # endif // _RWSTD_NO_FWD_DECLARATIONS -# if _MSC_VER = 1400 +# if defined (_MSC_VER) _MSC_VER = 1400 !defined (__INTEL_COMPILER) #include intrin.h #pragma intrinsic (_InterlockedIncrement) @@ -189,7 +189,7 @@ # pragma intrinsic (_InterlockedDecrement64) # pragma intrinsic (_InterlockedExchange64) #endif -# endif // _MSC_VER = 1400 +# endif // _MSC_VER = 1400 !__INTEL_COMPILER _RWSTD_NAMESPACE (__rw) { @@ -1232,7 +1232,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (short)); -#if defined (_MSC_VER) _MSC_VER = 1400 +#if defined (_MSC_VER) _MSC_VER = 1400 !defined (__INTEL_COMPILER) return _InterlockedIncrement16 (__x); #else return __rw_atomic_add16 (__x, +1); @@ -1245,7 +1245,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short)); -#if defined (_MSC_VER) _MSC_VER = 1400 +#if defined (_MSC_VER) _MSC_VER = 1400 !defined (__INTEL_COMPILER) return _InterlockedIncrement16 (_RWSTD_REINTERPRET_CAST (short*, __x)); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (short*, __x), +1); @@ -1308,7 +1308,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (short)); -#if defined (_MSC_VER) _MSC_VER = 1400 +#if defined (_MSC_VER) _MSC_VER = 1400 !defined (__INTEL_COMPILER) return _InterlockedDecrement16 (__x); #else return __rw_atomic_add16 (__x, -1); @@ -1321,7 +1321,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short)); -#if defined (_MSC_VER) _MSC_VER = 1400 +#if defined (_MSC_VER) _MSC_VER = 1400 !defined (__INTEL_COMPILER) return _InterlockedDecrement16 (_RWSTD_REINTERPRET_CAST (short*, __x)); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (short*, __x), -1); @@ -1499,7 +1499,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (short)); -#ifdef _MSC_VER +#if defined (_MSC_VER) !defined (__INTEL_COMPILER) return _InterlockedIncrement16 (__x); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, __x), @@ -1513,7 +1513,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short)); -#ifdef _MSC_VER +#if defined (_MSC_VER) !defined (__INTEL_COMPILER) return _InterlockedIncrement16 (_RWSTD_REINTERPRET_CAST (short*, __x)); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, __x), @@ -1643,7 +1643,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (short)); -#ifdef _MSC_VER +#if defined (_MSC_VER) !defined (__INTEL_COMPILER) return _InterlockedDecrement16 (__x); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, __x), @@ -1657,7 +1657,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short)); -#ifdef _MSC_VER +#if defined (_MSC_VER) !defined (__INTEL_COMPILER) return _InterlockedDecrement16 (_RWSTD_REINTERPRET_CAST (short*, __x)); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, __x),
svn commit: r577304 - in /incubator/stdcxx/trunk: include/loc/_messages.h src/messages.cpp
Author: faridz Date: Wed Sep 19 06:46:52 2007 New Revision: 577304 URL: http://svn.apache.org/viewvc?rev=577304view=rev Log: 2007-09-19 Farid Zaripov [EMAIL PROTECTED] * _messages.h: Reverted changes from r577000 because they are obsolete since r577098. messages.cpp: Ditto. Modified: incubator/stdcxx/trunk/include/loc/_messages.h incubator/stdcxx/trunk/src/messages.cpp Modified: incubator/stdcxx/trunk/include/loc/_messages.h URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/loc/_messages.h?rev=577304r1=577303r2=577304view=diff == --- incubator/stdcxx/trunk/include/loc/_messages.h (original) +++ incubator/stdcxx/trunk/include/loc/_messages.h Wed Sep 19 06:46:52 2007 @@ -49,17 +49,13 @@ _RWSTD_NAMESPACE (__rw) { -_RWSTD_EXPORT int -__rw_cat_open (const _STD::string, const _V3_LOCALE::locale); +int __rw_cat_open (const _STD::string, const _V3_LOCALE::locale); -_RWSTD_EXPORT const char* -__rw_get_message (int, int, int); +const char* __rw_get_message (int, int, int); -_RWSTD_EXPORT const _V3_LOCALE::locale -__rw_get_locale (int); +const _V3_LOCALE::locale __rw_get_locale (int); -_RWSTD_EXPORT void -__rw_cat_close (int); +void __rw_cat_close (int); } // namespace __rw Modified: incubator/stdcxx/trunk/src/messages.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/messages.cpp?rev=577304r1=577303r2=577304view=diff == --- incubator/stdcxx/trunk/src/messages.cpp (original) +++ incubator/stdcxx/trunk/src/messages.cpp Wed Sep 19 06:46:52 2007 @@ -210,8 +210,7 @@ // Open a message catalog and assign and return a handle for it. -_RWSTD_EXPORT int -__rw_cat_open (const _STD::string cat_name, const _STD::locale loc) +int __rw_cat_open (const _STD::string cat_name, const _STD::locale loc) { _RWSTD_MT_CLASS_GUARD (__rw_open_cat_data); @@ -233,8 +232,7 @@ // Get message text from catalog. -_RWSTD_EXPORT const char* -__rw_get_message (int cat, int set_num, int msg_num) +const char* __rw_get_message (int cat, int set_num, int msg_num) { if (cat 0) return 0; @@ -261,8 +259,7 @@ // Get locale to be used for character translation for this message catalog. -_RWSTD_EXPORT const _STD::locale -__rw_get_locale (int cat) +const _STD::locale __rw_get_locale (int cat) { _RWSTD_MT_CLASS_GUARD (__rw_open_cat_data); @@ -276,8 +273,7 @@ // Close a catalog and release its handle. -_RWSTD_EXPORT void -__rw_cat_close (int cat) +void __rw_cat_close (int cat) { _RWSTD_MT_CLASS_GUARD (__rw_open_cat_data);
svn commit: r577415 - /incubator/stdcxx/trunk/etc/config/windows/build.wsf
Author: faridz Date: Wed Sep 19 12:00:20 2007 New Revision: 577415 URL: http://svn.apache.org/viewvc?rev=577415view=rev Log: 2007-09-19 Farid Zaripov [EMAIL PROTECTED] * build.wsf (BuildProject): Remove temporary checks (used for investigating of the problem with build on icc). Modified: incubator/stdcxx/trunk/etc/config/windows/build.wsf Modified: incubator/stdcxx/trunk/etc/config/windows/build.wsf URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/build.wsf?rev=577415r1=577414r2=577415view=diff == --- incubator/stdcxx/trunk/etc/config/windows/build.wsf (original) +++ incubator/stdcxx/trunk/etc/config/windows/build.wsf Wed Sep 19 12:00:20 2007 @@ -205,70 +205,7 @@ { var project = projects.Item(i); if (project.Name == projectName) -{ -try -{ -WScript.Echo (project.ExtenderCATID = + project.ExtenderCATID); -projectFile = project.UniqueName; -} -catch (e) -{ -WScript.Echo(Exception: cannot get UniqueName for + projectName + : + e.message); - -if (undefined != typeof (project.CodeModel)) -WScript.Echo (project.CodeModel); - -if (undefined != typeof (project.Collection)) -WScript.Echo (project.Collection); - -if (undefined != typeof (project.ConfigurationManager)) -WScript.Echo (project.ConfigurationManager); - -if (undefined != typeof (project.DTE)) -WScript.Echo (project.DTE = + project.DTE); - -if (undefined != typeof (project.Extender)) -WScript.Echo (project.Extender); - -if (undefined != typeof (project.ExtenderCATID)) -WScript.Echo (project.ExtenderCATID = + project.ExtenderCATID); - -if (undefined != typeof (project.ExtenderNames)) -WScript.Echo (project.ExtenderNames); - -if (undefined != typeof (project.FullName)) -WScript.Echo (project.FullName = + project.FullName); - -if (undefined != typeof (project.Globals)) -WScript.Echo (project.Globals); - -if (undefined != typeof (project.Kind)) -WScript.Echo (project.Kind = + project.Kind); - -if (undefined != typeof (project.Name)) -WScript.Echo (project.Name = + project.Name); - -if (undefined != typeof (project.Object)) -WScript.Echo (project.Object); - -if (undefined != typeof (project.ParentProjectItem)) -WScript.Echo (project.ParentProjectItem); - -if (undefined != typeof (project.ProjectItems)) -WScript.Echo (project.ProjectItems); - -if (undefined != typeof (project.Properties)) -WScript.Echo (project.Properties); - -if (undefined != typeof (project.Saved)) -WScript.Echo (project.Saved = + project.Saved); - -if (undefined != typeof (project.UniqueName)) -WScript.Echo (project.UniqueName = + project.UniqueName); - -break; -} -} +projectFile = project.UniqueName; } if (0 projectFile.length)
svn commit: r577414 - in /incubator/stdcxx/trunk: etc/config/windows/build.wsf tests/utilities/20.temp.buffer.cpp
Author: faridz Date: Wed Sep 19 11:56:02 2007 New Revision: 577414 URL: http://svn.apache.org/viewvc?rev=577414view=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=577414r1=577413r2=577414view=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=577414r1=577413r2=577414view=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 0x7fff 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 ((BigStructMAX_SIZE / 2*)0, 0); +test_failure ((BigStructMAX_SIZE - 1*)0, 0); +test_failure ((BigStructMAX_SIZE*)0, 0); #else
svn commit: r577613 - in /incubator/stdcxx/trunk: configure.bat generate.bat
Author: faridz Date: Thu Sep 20 00:59:05 2007 New Revision: 577613 URL: http://svn.apache.org/viewvc?rev=577613view=rev Log: 2007-09-20 Farid Zaripov [EMAIL PROTECTED] STDCXX-560 * configure.bat: Added ASL header. * generate.bat: Ditto. Modified: incubator/stdcxx/trunk/configure.bat incubator/stdcxx/trunk/generate.bat Modified: incubator/stdcxx/trunk/configure.bat URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/configure.bat?rev=577613r1=577612r2=577613view=diff == --- incubator/stdcxx/trunk/configure.bat (original) +++ incubator/stdcxx/trunk/configure.bat Thu Sep 20 00:59:05 2007 @@ -1,5 +1,25 @@ @echo off +:: +:: Licensed to the Apache Software Foundation (ASF) under one or more +:: contributor license agreements. See the NOTICE file distributed +:: with this work for additional information regarding copyright +:: ownership. The ASF licenses this file to you under the Apache +:: License, Version 2.0 (the License); you may not use this file +:: except in compliance with the License. You may obtain a copy of +:: the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an AS IS BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +:: implied. See the License for the specific language governing +:: permissions and limitations under the License. +:: +:: Copyright 1999-2007 Rogue Wave Software, Inc. +:: + set exedir= if exist %SystemRoot%\SysWow64\cscript.exe set exedir=%SystemRoot%\SysWow64\ Modified: incubator/stdcxx/trunk/generate.bat URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/generate.bat?rev=577613r1=577612r2=577613view=diff == --- incubator/stdcxx/trunk/generate.bat (original) +++ incubator/stdcxx/trunk/generate.bat Thu Sep 20 00:59:05 2007 @@ -1 +1,21 @@ +:: +:: Licensed to the Apache Software Foundation (ASF) under one or more +:: contributor license agreements. See the NOTICE file distributed +:: with this work for additional information regarding copyright +:: ownership. The ASF licenses this file to you under the Apache +:: License, Version 2.0 (the License); you may not use this file +:: except in compliance with the License. You may obtain a copy of +:: the License at +:: +:: http://www.apache.org/licenses/LICENSE-2.0 +:: +:: Unless required by applicable law or agreed to in writing, software +:: distributed under the License is distributed on an AS IS BASIS, +:: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +:: implied. See the License for the specific language governing +:: permissions and limitations under the License. +:: +:: Copyright 1999-2007 Rogue Wave Software, Inc. +:: + @%~dp0configure.bat %*
svn propchange: r577778 - svn:log
Author: faridz Revision: 58 Modified property: svn:log Modified: svn:log at Thu Sep 20 08:39:55 2007 -- --- svn:log (original) +++ svn:log Thu Sep 20 08:39:55 2007 @@ -1,1049 +1,1049 @@ 2007-09-20 Travis Vitek [EMAIL PROTECTED] STDCXX-561 - ANSI_X3.110-1983: Add ASL Header - ANSI_X3.4-1968: Same. - ASMO_449: Same. - BIG5: Same. - BIG5-HKSCS: Same. - BS_4730: Same. - BS_VIEWDATA: Same. - CP10007: Same. - CP1250: Same. - CP1251: Same. - CP1252: Same. - CP1253: Same. - CP1254: Same. - CP1255: Same. - CP1256: Same. - CP1257: Same. - CP1258: Same. - CP437: Same. - CP737: Same. - CP775: Same. - CP949: Same. - CSA_Z243.4-1985-1: Same. - CSA_Z243.4-1985-2: Same. - CSA_Z243.4-1985-GR: Same. - CSN_369103: Same. - CWI: Same. - DEC-MCS: Same. - DIN_66003: Same. - DS_2089: Same. - EBCDIC-AT-DE: Same. - EBCDIC-AT-DE-A: Same. - EBCDIC-CA-FR: Same. - EBCDIC-DK-NO: Same. - EBCDIC-DK-NO-A: Same. - EBCDIC-ES: Same. - EBCDIC-ES-A: Same. - EBCDIC-ES-S: Same. - EBCDIC-FI-SE: Same. - EBCDIC-FI-SE-A: Same. - EBCDIC-FR: Same. - EBCDIC-IS-FRISS: Same. - EBCDIC-IT: Same. - EBCDIC-PT: Same. - EBCDIC-UK: Same. - EBCDIC-US: Same. - ECMA-CYRILLIC: Same. - ES: Same. - ES2: Same. - EUC-JP: Same. - EUC-KR: Same. - EUC-TW: Same. - GB18030: Same. - GB2312: Same. - GB_1988-80: Same. - GBK: Same. - GEORGIAN-ACADEMY: Same. - GEORGIAN-PS: Same. - GOST_19768-74: Same. - GREEK-CCITT: Same. - GREEK7: Same. - GREEK7-OLD: Same. - HP-ROMAN8: Same. - IBM037: Same. - IBM038: Same. - IBM1004: Same. - IBM1026: Same. - IBM1047: Same. - IBM256: Same. - IBM273: Same. - IBM274: Same. - IBM275: Same. - IBM277: Same. - IBM278: Same. - IBM280: Same. - IBM281: Same. - IBM284: Same. - IBM285: Same. - IBM290: Same. - IBM297: Same. - IBM420: Same. - IBM423: Same. - IBM424: Same. - IBM437: Same. - IBM500: Same. - IBM850: Same. - IBM851: Same. - IBM852: Same. - IBM855: Same. - IBM857: Same. - IBM860: Same. - IBM861: Same. - IBM862: Same. - IBM863: Same. - IBM864: Same. - IBM865: Same. - IBM866: Same. - IBM868: Same. - IBM869: Same. - IBM870: Same. - IBM871: Same. - IBM874: Same. - IBM875: Same. - IBM880: Same. - IBM891: Same. - IBM903: Same. - IBM904: Same. - IBM905: Same. - IBM918: Same. - IEC_P27-1: Same. - INIS: Same. - INIS-8: Same. - INIS-CYRILLIC: Same. - INVARIANT: Same. - ISIRI-3342: Same. - ISO-8859-1: Same. - ISO-8859-10: Same. - ISO-8859-13: Same. - ISO-8859-14: Same. - ISO-8859-15: Same. - ISO-8859-16: Same. - ISO-8859-2: Same. - ISO-8859-3: Same. - ISO-8859-4: Same. - ISO-8859-5: Same. - ISO-8859-6: Same. - ISO-8859-7: Same. - ISO-8859-8: Same. - ISO-8859-9: Same. - ISO-IR-197: Same. - ISO-IR-209: Same. - ISO-IR-90: Same. - ISO_10367-BOX: Same. - ISO_10646: Same. - ISO_2033-1983: Same. - ISO_5427: Same. - ISO_5427-EXT: Same. - ISO_5428: Same. - ISO_646.BASIC: Same. - ISO_646.IRV: Same. - ISO_6937: Same. - ISO_6937-2-25: Same. - ISO_6937-2-ADD: Same. - ISO_8859-1,GL: Same. - ISO_8859-SUPP: Same. - IT: Same. - JIS_C6220-1969-JP: Same. - JIS_C6220-1969-RO: Same. - JIS_C6229-1984-A: Same. - JIS_C6229-1984-B: Same. - JIS_C6229-1984-B-ADD: Same. - JIS_C6229-1984-HAND: Same. - JIS_C6229-1984-HAND-ADD: Same. - JIS_C6229-1984-KANA: Same. - JIS_X0201: Same. - JOHAB: Same. - JUS_I.B1.002: Same. - JUS_I.B1.003-MAC: Same. - JUS_I.B1.003-SERB: Same. - KOI-8: Same. - KOI8-R: Same. - KOI8-T: Same. - KOI8-U: Same. - KSC5636: Same. - LATIN-GREEK: Same. - LATIN-GREEK-1: Same. - MAC-CYRILLIC: Same. - MAC-IS: Same. - MAC-SAMI: Same. - MAC-UK: Same. - MACINTOSH: Same. - MSZ_7795.3: Same. - NATS-DANO: Same. - NATS-DANO-ADD: Same. - NATS-SEFI: Same. - NATS-SEFI-ADD: Same. - NC_NC00-10: Same. - NEXTSTEP: Same. - NF_Z_62-010: Same. - NF_Z_62-010_1973: Same. - NS_4551-1: Same. - NS_4551-2: Same. - PT: Same. - PT2: Same. - SAMI: Same. - SAMI-WS2: Same. - SEN_850200_B: Same. - SEN_850200_C
svn commit: r577807 - /incubator/stdcxx/trunk/etc/config/windows/
Author: faridz Date: Thu Sep 20 09:38:11 2007 New Revision: 577807 URL: http://svn.apache.org/viewvc?rev=577807view=rev Log: 2007-09-20 Farid Zaripov [EMAIL PROTECTED] STDCXX-560 * icc-10.0-x64.config: Added ASL header. * icc-10.0.config: Ditto. * icc-9.0.config: Ditto. * icc-9.1-x64.config: Ditto. * icc-9.1.config: Ditto. * msvc-7.0.config: Ditto. * msvc-7.1.config: Ditto. * msvc-8.0-x64.config: Ditto. * msvc-8.0.config: Ditto. * msvc-9.0-x64.config: Ditto. * msvc-9.0.config: Ditto. * msvcex-8.0.config: Ditto. Modified: incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config incubator/stdcxx/trunk/etc/config/windows/icc-9.1-x64.config incubator/stdcxx/trunk/etc/config/windows/icc-9.1.config incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config incubator/stdcxx/trunk/etc/config/windows/msvc-7.1.config incubator/stdcxx/trunk/etc/config/windows/msvc-8.0-x64.config incubator/stdcxx/trunk/etc/config/windows/msvc-8.0.config incubator/stdcxx/trunk/etc/config/windows/msvc-9.0-x64.config incubator/stdcxx/trunk/etc/config/windows/msvc-9.0.config incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config Modified: incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config?rev=577807r1=577806r2=577807view=diff == --- incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config (original) +++ incubator/stdcxx/trunk/etc/config/windows/icc-10.0-x64.config Thu Sep 20 09:38:11 2007 @@ -1,3 +1,28 @@ +// +// $Id$ +// +// icc-10.0-x64.config - configuration file for 64 bit Intel C++ 10.0 +// +// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed +// with this work for additional information regarding copyright +// ownership. The ASF licenses this file to you under the Apache +// License, Version 2.0 (the License); you may not use this file +// except in compliance with the License. You may obtain a copy of +// the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// + #include msvc-8.0-x64 DEVENVFLAGS=/useenv CPPFLAGS= Modified: incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config?rev=577807r1=577806r2=577807view=diff == --- incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config (original) +++ incubator/stdcxx/trunk/etc/config/windows/icc-10.0.config Thu Sep 20 09:38:11 2007 @@ -1,3 +1,28 @@ +// +// $Id$ +// +// icc-10.0.config - configuration file for Intel C++ 10.0 +// +// +// +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed +// with this work for additional information regarding copyright +// ownership. The ASF licenses this file to you under the Apache +// License, Version 2.0 (the License); you may not use this file +// except in compliance with the License. You may obtain a copy of +// the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an AS IS BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +// implied. See the License for the specific language governing +// permissions and limitations under the License. +// +// + #include msvc-8.0 DEVENVFLAGS=/useenv CPPFLAGS= Modified: incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config?rev=577807r1=577806r2=577807view=diff == --- incubator/stdcxx/trunk/etc/config/windows/icc-9.0.config (original) +++ incubator/stdcxx/trunk/etc/config/windows/icc-9.0
svn propchange: r576543 - svn:log
Author: faridz Revision: 576543 Modified property: svn:log Modified: svn:log at Thu Sep 20 10:14:23 2007 -- --- svn:log (original) +++ svn:log Thu Sep 20 10:14:23 2007 @@ -2,4 +2,4 @@ * msvc-7.0.config: Comments extended with information on MSVC 9.0 (Orcas). * msvc-9.0.config: New config file for MSVC 9.0. - * msvc-9.0-x64.configNew config file for MSVC 9.0 x64 platform. + * msvc-9.0-x64.config: New config file for MSVC 9.0 x64 platform.
svn commit: r579502 - in /incubator/stdcxx/trunk/etc/config/windows: msvc-7.0.config msvcex-8.0.config projects.js utilities.js
Author: faridz Date: Wed Sep 26 01:12:36 2007 New Revision: 579502 URL: http://svn.apache.org/viewvc?rev=579502view=rev Log: 2007-09-26 Farid Zaripov [EMAIL PROTECTED] * msvc-7.0.config: Added new config variable: LIBS. * utilities.js: Ditto. * msvcex-8.0.config: Set LIBS=user32.lib (by default the VCExpress links with kernel32.lib only). * projects.js: Use LIBS config variable instead of hardcoded commonLibs. Modified: incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config incubator/stdcxx/trunk/etc/config/windows/projects.js incubator/stdcxx/trunk/etc/config/windows/utilities.js Modified: incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config?rev=579502r1=579501r2=579502view=diff == --- incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config (original) +++ incubator/stdcxx/trunk/etc/config/windows/msvc-7.0.config Wed Sep 26 01:12:36 2007 @@ -56,6 +56,8 @@ CPPFLAGS= // additional flags for the linker LDFLAGS= +// additional libraries +LIBS= // CXX, LD, AR used only at configure build step // CXX - command invoked to compile the test source file Modified: incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config?rev=579502r1=579501r2=579502view=diff == --- incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config (original) +++ incubator/stdcxx/trunk/etc/config/windows/msvcex-8.0.config Wed Sep 26 01:12:36 2007 @@ -27,3 +27,4 @@ #include msvc-8.0 DEVENV=VCExpress.exe SLNCOMMENT=Visual C++ Express 2005 +LIBS=user32.lib Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?rev=579502r1=579501r2=579502view=diff == --- incubator/stdcxx/trunk/etc/config/windows/projects.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projects.js Wed Sep 26 01:12:36 2007 @@ -27,7 +27,6 @@ var commonIncludes = $(SolutionDir)%CONFIG%\\include; var stdcxxIncludes = %SRCDIR%\\include;%SRCDIR%\\include\\ansi; + commonIncludes; var rwtestIncludes = %SRCDIR%\\tests\\include; + stdcxxIncludes; -var commonLibs = kernel32.lib user32.lib; var binPath = $(SolutionDir)%CONFIG%\\bin; var libPath = $(SolutionDir)%CONFIG%\\lib; @@ -99,7 +98,7 @@ stdcxxDef.Includes = stdcxxIncludes; stdcxxDef.OutDir = libPath; stdcxxDef.IntDir = $(SolutionDir)%CONFIG%\\src; -stdcxxDef.Libs = commonLibs; +stdcxxDef.Libs = LIBS; stdcxxDef.OutFile = $(OutDir)\\libstd%CONFIG%%EXT%; stdcxxDef.PrjDeps.push(configureDef); @@ -120,7 +119,7 @@ rwtestDef.Includes = rwtestIncludes; rwtestDef.OutDir = $(SolutionDir)%CONFIG%\\tests; rwtestDef.IntDir = rwtestDef.OutDir + \\src; -rwtestDef.Libs = commonLibs; +rwtestDef.Libs = LIBS; rwtestDef.PrjRefs.push(stdcxxDef); projectDefs.push(new Array(rwtestDef)); @@ -141,7 +140,7 @@ execDef.Defines = ; execDef.Includes = commonIncludes; execDef.OutDir = binPath; -execDef.Libs = commonLibs; +execDef.Libs = LIBS; execDef.OutFile = $(OutDir)\\exec.exe; execDef.PrjDeps.push(configureDef); @@ -168,7 +167,7 @@ localedefDef.Defines = commonDefines; localedefDef.Includes = stdcxxIncludes; localedefDef.OutDir = binPath; -localedefDef.Libs = commonLibs; +localedefDef.Libs = LIBS; localedefDef.OutFile = $(OutDir)\\localedef.exe; localedefDef.PrjRefs.push(stdcxxDef); @@ -184,7 +183,7 @@ localeDef.Defines = commonDefines; localeDef.Includes = stdcxxIncludes; localeDef.OutDir = binPath; -localeDef.Libs = commonLibs; +localeDef.Libs = LIBS; localeDef.OutFile = $(OutDir)\\locale.exe; localeDef.PrjDeps.push(configureDef); @@ -200,7 +199,7 @@ gencatDef.Defines = commonDefines; gencatDef.Includes = stdcxxIncludes; gencatDef.OutDir = binPath; -gencatDef.Libs = commonLibs; +gencatDef.Libs = LIBS; gencatDef.OutFile = $(OutDir)\\gencat.exe; gencatDef.PrjRefs.push(stdcxxDef); @@ -228,7 +227,7 @@ exampleTplDef.Defines = commonDefines; exampleTplDef.Includes = %SRCDIR%\\examples\\include; + stdcxxIncludes; exampleTplDef.OutDir = $(SolutionDir)%CONFIG%\\examples; -exampleTplDef.Libs = commonLibs; +exampleTplDef.Libs = LIBS; exampleTplDef.PrjRefs.push(stdcxxDef); var exampleDefs = exampleTplDef.createProjectDefsFromFolder( @@ -290,7 +289,7 @@ testTplDef.Defines = commonDefines; testTplDef.Includes = rwtestIncludes
svn commit: r579667 - /incubator/stdcxx/trunk/include/loc/_money_get.cc
Author: faridz Date: Wed Sep 26 07:27:43 2007 New Revision: 579667 URL: http://svn.apache.org/viewvc?rev=579667view=rev Log: 2007-09-26 Farid Zaripov [EMAIL PROTECTED] * _money_get.cc (_C_get): If no characters available during parsing sign part of the pattern, then set failbit only when positive_sign and negative_sign both are not empty. Else set negative sign if positive_sign is not empty and negative_sign is empty. Modified: incubator/stdcxx/trunk/include/loc/_money_get.cc Modified: incubator/stdcxx/trunk/include/loc/_money_get.cc URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/loc/_money_get.cc?rev=579667r1=579666r2=579667view=diff == --- incubator/stdcxx/trunk/include/loc/_money_get.cc (original) +++ incubator/stdcxx/trunk/include/loc/_money_get.cc Wed Sep 26 07:27:43 2007 @@ -165,7 +165,10 @@ case /* '\3' */ money_base::sign: { if (__it == __end) { -__ebits |= _RW::__rw_failbit; +if (__ps.size () __ns.size ()) +__ebits |= _RW::__rw_failbit; +else +__sign = __ps.empty () - 1; break; }
svn commit: r579670 - /incubator/stdcxx/trunk/tests/localization/22.locale.money.get.cpp
Author: faridz Date: Wed Sep 26 07:31:46 2007 New Revision: 579670 URL: http://svn.apache.org/viewvc?rev=579670view=rev Log: 2007-09-26 Farid Zaripov [EMAIL PROTECTED] * 22.locale.money.get.cpp (set_pattern): New function to translate test format to money_base::pattern. (do_test): If fmat is not null set pattern using set_pattern(). (test_get): Test patterns replaced to human-readable form. Modified: incubator/stdcxx/trunk/tests/localization/22.locale.money.get.cpp Modified: incubator/stdcxx/trunk/tests/localization/22.locale.money.get.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/localization/22.locale.money.get.cpp?rev=579670r1=579669r2=579670view=diff == --- incubator/stdcxx/trunk/tests/localization/22.locale.money.get.cpp (original) +++ incubator/stdcxx/trunk/tests/localization/22.locale.money.get.cpp Wed Sep 26 07:31:46 2007 @@ -241,6 +241,27 @@ /**/ +std::money_base::pattern +set_pattern (const char *format) +{ +std::money_base::pattern pat; + +for (unsigned i = 0; i != sizeof pat.field / sizeof *pat.field; ++i) { +switch (format [i]) { +case '\0': case '@': pat.field [i] = std::money_base::none; break; +case '\1': case ' ': pat.field [i] = std::money_base::space; break; +case '\2': case '$': pat.field [i] = std::money_base::symbol; break; +case '\3': case '-': pat.field [i] = std::money_base::sign; break; +case '\4': case '1': pat.field [i] = std::money_base::value; break; +default: +_RWSTD_ASSERT (!!bad format specifier); +} +} + +return pat; +} + + template class charT void do_test (boolintl,// international? charT which, // which overload to exercise @@ -271,6 +292,8 @@ fmat = pat.field; } +else +fmat = set_pattern (fmat).field; // local format? (the opposite of interantional) const bool locl = !intl; @@ -696,10 +719,10 @@ TEST (T, 41.0, +41-, 4, 0,eofbit, 0, 0, ); TEST (T, 42.0, +42+ , 4, 0,goodbit, 0, 0, ); TEST (T, 43.0, +43- , 4, 0,goodbit, 0, 0, ); -TEST (T, 44.0, +44 $+, 6, showbase, eofbit, 0, \3\4\0\2, $); -TEST (T, 45.0, +45 $-, 6, showbase, eofbit, 0, \3\4\0\2, $); -TEST (T, 46.0, +46$+ , 5, showbase, goodbit, 0, \3\4\2\0, $); -TEST (T, 47.0, +47$- , 5, showbase, goodbit, 0, \3\4\2\0, $); +TEST (T, 44.0, +44 $+, 6, showbase, eofbit, 0, [EMAIL PROTECTED], $); +TEST (T, 45.0, +45 $-, 6, showbase, eofbit, 0, [EMAIL PROTECTED], $); +TEST (T, 46.0, +46$+ , 5, showbase, goodbit, 0, -1$@, $); +TEST (T, 47.0, +47$- , 5, showbase, goodbit, 0, -1$@, $); // none = 0, space = 1, symbol = 2, sign = 3, value = 4 @@ -709,54 +732,54 @@ PunctDatacharT::negative_sign_ [intl] = minus [0]; PunctDatacharT::negative_sign_ [locl] = minus [1]; -TEST (T, -100.0, $-1, 3, showbase, eofbit, 2, \2\3\4\0, $); -TEST (T, -200.0, $-2 , 3, showbase, goodbit, 2, \2\3\4\0, $); +TEST (T, -100.0, $-1, 3, showbase, eofbit, 2, $-1@, $); +TEST (T, -200.0, $-2 , 3, showbase, goodbit, 2, $-1@, $); // where none appears in the pattern, whitespace is optional -TEST (T, -300.0, -3$, 3, showbase, eofbit, 2, \3\4\0\2, $); -TEST (T, -400.0, -4 $, 4, showbase, eofbit, 2, \3\4\0\2, $); +TEST (T, -300.0, -3$, 3, showbase, eofbit, 2, [EMAIL PROTECTED], $); +TEST (T, -400.0, -4 $, 4, showbase, eofbit, 2, [EMAIL PROTECTED], $); // where space appears in the pattern, a whitespace character is required -TEST (T,0.0, -5$,2, showbase, failbit, 2, \3\4\1\2, $); -TEST (T, -600.0, -6 $, 4, showbase, eofbit, 2, \3\4\1\2, $); -TEST (T, -700.0, -7\t$, 4, showbase, eofbit, 2, \3\4\1\2, $); - -TEST (T, 0.0, -8$, 1, showbase, failbit, 2, \3\1\4\2, $); -TEST (T, -900.0, -\n9$, 4, showbase, eofbit, 2, \3\1\4\2, $); -TEST (T, -1000.0, - 10$, 5, showbase, eofbit, 2, \3\1\4\2, $); +TEST (T,0.0, -5$,2, showbase, failbit, 2, -1 $, $); +TEST (T, -600.0, -6 $, 4, showbase, eofbit, 2, -1 $, $); +TEST (T, -700.0, -7\t$, 4, showbase, eofbit, 2, -1 $, $); + +TEST (T, 0.0, -8$, 1, showbase, failbit, 2, - 1$, $); +TEST (T, -900.0, -\n9$, 4, showbase, eofbit, 2, - 1$, $); +TEST (T, -1000.0, - 10$, 5, showbase, eofbit, 2, - 1$, $); // white space is required even at the beginning of input // (if the optional sign or symbol is missing) -TEST (T, 0.0, 11$, 0, showbase, failbit, 2, \3\1\4\2, $); +TEST (T, 0.0, 11$, 0, showbase, failbit, 2, - 1$, $); -TEST (T, -1200.0, 12$-, 4, showbase, eofbit, 2, \4\0\2\3, $); -TEST (T, -1300.0, 13 $-, 5, showbase, eofbit, 2, \4\0\2\3, $); -TEST (T
svn commit: r579725 - /incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.mt.cpp
Author: faridz Date: Wed Sep 26 10:33:27 2007 New Revision: 579725 URL: http://svn.apache.org/viewvc?rev=579725view=rev Log: 2007-09-26 Farid Zaripov [EMAIL PROTECTED] * 22.locale.moneypunct.mt.cpp (thread_loop_body): Corrected char type to wchar_t. Modified: incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.mt.cpp Modified: incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.mt.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.mt.cpp?rev=579725r1=579724r2=579725view=diff == --- incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.mt.cpp (original) +++ incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.mt.cpp Wed Sep 26 10:33:27 2007 @@ -179,8 +179,8 @@ const Punct mp = std::use_facetPunct(loc); -const char dp = mp.decimal_point (); -const char ts = mp.thousands_sep (); +const wchar_tdp = mp.decimal_point (); +const wchar_tts = mp.thousands_sep (); const std::stringgrp = mp.grouping (); const std::wstring cur = mp.curr_symbol (); const std::wstring pos = mp.positive_sign (); @@ -208,8 +208,8 @@ const Punct mp = std::use_facetPunct(loc); -const char dp = mp.decimal_point (); -const char ts = mp.thousands_sep (); +const wchar_tdp = mp.decimal_point (); +const wchar_tts = mp.thousands_sep (); const std::stringgrp = mp.grouping (); const std::wstring cur = mp.curr_symbol (); const std::wstring pos = mp.positive_sign ();
svn commit: r579958 - /incubator/stdcxx/trunk/etc/config/windows/projects.js
Author: faridz Date: Thu Sep 27 02:27:16 2007 New Revision: 579958 URL: http://svn.apache.org/viewvc?rev=579958view=rev Log: 2007-09-27 Farid Zaripov [EMAIL PROTECTED] * projects.js (CreateProjectsDefs): Set stdcxx_runtests project dependent on stdcxx_utils project (was dependent on exec project only). Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?rev=579958r1=579957r2=579958view=diff == --- incubator/stdcxx/trunk/etc/config/windows/projects.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projects.js Thu Sep 27 02:27:16 2007 @@ -339,7 +339,7 @@ runtestsDef.CustomBuildOut = $(OutDir)\\runtests.log; runtestsDef.CustomBuildDeps = %FILES%; //runtestsDef.PrjDeps.push(alltestsDef); -runtestsDef.PrjDeps.push(execDef); +runtestsDef.PrjDeps.push(utilsDef); projectDefs.push(new Array(runtestsDef));
svn commit: r580959 - /incubator/stdcxx/branches/4.2.0/src/punct.cpp
Author: faridz Date: Mon Oct 1 06:56:49 2007 New Revision: 580959 URL: http://svn.apache.org/viewvc?rev=580959view=rev Log: 2007-10-01 Farid Zaripov [EMAIL PROTECTED] STDCXX-453 * punct.cpp (__rw_get_moneypunct): After creating __rw_setlocale object check if the locale data is initialized by another thread to avoid doing unnecessary work and leaking memory. (__rw_get_numpunct): Ditto. Modified: incubator/stdcxx/branches/4.2.0/src/punct.cpp Modified: incubator/stdcxx/branches/4.2.0/src/punct.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/src/punct.cpp?rev=580959r1=580958r2=580959view=diff == --- incubator/stdcxx/branches/4.2.0/src/punct.cpp (original) +++ incubator/stdcxx/branches/4.2.0/src/punct.cpp Mon Oct 1 06:56:49 2007 @@ -132,6 +132,14 @@ // set all categories -- need LC_NUMERIC and LC_CTYPE const __rw_setlocale clocale (locname, _RWSTD_LC_ALL); +if (pfacet-_C_data ()) { +// check to see if another thread may have set _C_data() +// while we were waiting for the lock in __rw_setlocale +// ctor above and, if so, call self recursively on the +// already initialized `impdata' +return __rw_get_numpunct (pfacet, flags); +} + // get the lconv data const lconv* const pconv = localeconv (); if (!pconv) @@ -307,6 +315,14 @@ // set all categories -- need LC_NUMERIC and LC_CTYPE const __rw_setlocale clocale (locname, _RWSTD_LC_ALL); + +if (pfacet-_C_data ()) { +// check to see if another thread may have set _C_data() +// while we were waiting for the lock in __rw_setlocale +// ctor above and, if so, call self recursively on the +// already initialized `impdata' +return __rw_get_moneypunct (pfacet, flags); +} // get the lconv data const lconv* const pconv = localeconv ();
svn commit: r580961 - /incubator/stdcxx/branches/4.2.0/src/setlocale.cpp
Author: faridz Date: Mon Oct 1 06:58:30 2007 New Revision: 580961 URL: http://svn.apache.org/viewvc?rev=580961view=rev Log: 2007-10-01 Travis Vitek [EMAIL PROTECTED] STDCXX-452 * setlocale.cpp (~__rw_setlocale): Restore the previous locale in a threadsafe manner. Simplified. Modified: incubator/stdcxx/branches/4.2.0/src/setlocale.cpp Modified: incubator/stdcxx/branches/4.2.0/src/setlocale.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/src/setlocale.cpp?rev=580961r1=580960r2=580961view=diff == --- incubator/stdcxx/branches/4.2.0/src/setlocale.cpp (original) +++ incubator/stdcxx/branches/4.2.0/src/setlocale.cpp Mon Oct 1 06:58:30 2007 @@ -135,18 +135,18 @@ // was in effect when the object was constructed __rw_setlocale::~__rw_setlocale () { -// release the lock -if (_C_guard) -__rw_setlocale_mutex._C_release (); - -if (_C_name) { +// if guard is set, constructor changed the locale +if (_C_guard) { -// and restore the locale +// restore the locale ::setlocale (_C_cat, _C_name); -if (_C_name != _C_namebuf) -delete [] _C_name; +// release the lock +__rw_setlocale_mutex._C_release (); } + +if (_C_name != _C_namebuf) +delete [] _C_name; }
svn propchange: r580959 - svn:log
Author: faridz Revision: 580959 Modified property: svn:log Modified: svn:log at Mon Oct 1 07:43:47 2007 -- --- svn:log (original) +++ svn:log Mon Oct 1 07:43:47 2007 @@ -1,5 +1,6 @@ 2007-10-01 Farid Zaripov [EMAIL PROTECTED] + STDCXX-452 STDCXX-453 * punct.cpp (__rw_get_moneypunct): After creating __rw_setlocale object check if the locale data is initialized by another thread
svn commit: r580979 - in /incubator/stdcxx/trunk/src: punct.cpp setlocale.cpp
Author: faridz Date: Mon Oct 1 07:51:01 2007 New Revision: 580979 URL: http://svn.apache.org/viewvc?rev=580979view=rev Log: 2007-10-01 Farid Zaripov [EMAIL PROTECTED] * Merged the head of branches/4.2.0 Modified: incubator/stdcxx/trunk/src/punct.cpp incubator/stdcxx/trunk/src/setlocale.cpp Modified: incubator/stdcxx/trunk/src/punct.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/punct.cpp?rev=580979r1=580978r2=580979view=diff == --- incubator/stdcxx/trunk/src/punct.cpp (original) +++ incubator/stdcxx/trunk/src/punct.cpp Mon Oct 1 07:51:01 2007 @@ -132,6 +132,14 @@ // set all categories -- need LC_NUMERIC and LC_CTYPE const __rw_setlocale clocale (locname, _RWSTD_LC_ALL); +if (pfacet-_C_data ()) { +// check to see if another thread may have set _C_data() +// while we were waiting for the lock in __rw_setlocale +// ctor above and, if so, call self recursively on the +// already initialized `impdata' +return __rw_get_numpunct (pfacet, flags); +} + // get the lconv data const lconv* const pconv = localeconv (); if (!pconv) @@ -307,6 +315,14 @@ // set all categories -- need LC_NUMERIC and LC_CTYPE const __rw_setlocale clocale (locname, _RWSTD_LC_ALL); + +if (pfacet-_C_data ()) { +// check to see if another thread may have set _C_data() +// while we were waiting for the lock in __rw_setlocale +// ctor above and, if so, call self recursively on the +// already initialized `impdata' +return __rw_get_moneypunct (pfacet, flags); +} // get the lconv data const lconv* const pconv = localeconv (); Modified: incubator/stdcxx/trunk/src/setlocale.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/setlocale.cpp?rev=580979r1=580978r2=580979view=diff == --- incubator/stdcxx/trunk/src/setlocale.cpp (original) +++ incubator/stdcxx/trunk/src/setlocale.cpp Mon Oct 1 07:51:01 2007 @@ -135,18 +135,18 @@ // was in effect when the object was constructed __rw_setlocale::~__rw_setlocale () { -// release the lock -if (_C_guard) -__rw_setlocale_mutex._C_release (); - -if (_C_name) { +// if guard is set, constructor changed the locale +if (_C_guard) { -// and restore the locale +// restore the locale ::setlocale (_C_cat, _C_name); -if (_C_name != _C_namebuf) -delete [] _C_name; +// release the lock +__rw_setlocale_mutex._C_release (); } + +if (_C_name != _C_namebuf) +delete [] _C_name; }
svn commit: r580981 - /incubator/stdcxx/trunk/util/locale.cpp
Author: faridz Date: Mon Oct 1 07:54:49 2007 New Revision: 580981 URL: http://svn.apache.org/viewvc?rev=580981view=rev Log: 2007-10-01 Farid Zaripov [EMAIL PROTECTED] * locale.cpp [_WIN32] (EnumLocales): New function to enumerate system locales. (print_locale_names): Obtain list of system locales if RWSTD_LOCALE_ROOT environment variable is not defined. Modified: incubator/stdcxx/trunk/util/locale.cpp Modified: incubator/stdcxx/trunk/util/locale.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/locale.cpp?rev=580981r1=580980r2=580981view=diff == --- incubator/stdcxx/trunk/util/locale.cpp (original) +++ incubator/stdcxx/trunk/util/locale.cpp Mon Oct 1 07:54:49 2007 @@ -2361,6 +2361,38 @@ } +#ifdef _WIN32 +static BOOL CALLBACK +EnumLocales (char* locale_id) +{ +const LCID lcid = std::strtoul (locale_id, 0, 16); + +char buf [80]; +const int bufsize = sizeof (buf) / sizeof (*buf); + +std::string name; + +if (GetLocaleInfo (lcid, LOCALE_SENGLANGUAGE, buf, bufsize)) +name = buf; + +if (GetLocaleInfo (lcid, LOCALE_SENGCOUNTRY, buf, bufsize)) { +name += '_'; +name += buf; +} + +if ( GetLocaleInfo (lcid, LOCALE_IDEFAULTANSICODEPAGE , buf, bufsize) + std::strtoul (buf, 0, 10)) { +name += '.'; +name += buf; +} + +if (const char* locname = std::setlocale (LC_ALL, name.c_str ())) +std::cout locname '\n'; + +return TRUE; +} +#endif + // print the available locales static void print_locale_names () @@ -2373,6 +2405,13 @@ const std::string cmd = std::string (LS_1) + locale_root; std::system (cmd.c_str ()); +} +else { +#ifndef _WIN32 +std::system (/usr/bin/locale -a); +#else +EnumSystemLocales (EnumLocales, LCID_INSTALLED); +#endif } }
svn commit: r580982 - /incubator/stdcxx/trunk/src/time_put.cpp
Author: faridz Date: Mon Oct 1 07:59:48 2007 New Revision: 580982 URL: http://svn.apache.org/viewvc?rev=580982view=rev Log: 2007-10-01 Farid Zaripov [EMAIL PROTECTED] * time_put.cpp (__rw_get_date_fmat): Convert char argument of isspace(), isdigit(), ispunct() to unsigned char. (__rw_get_time_fmat): Ditto. Modified: incubator/stdcxx/trunk/src/time_put.cpp Modified: incubator/stdcxx/trunk/src/time_put.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/time_put.cpp?rev=580982r1=580981r2=580982view=diff == --- incubator/stdcxx/trunk/src/time_put.cpp (original) +++ incubator/stdcxx/trunk/src/time_put.cpp Mon Oct 1 07:59:48 2007 @@ -160,6 +160,7 @@ #ifdef _RWSTD_NO_NL_LANGINFO +typedef unsigned char UChar; // compute the format string corresponding to the %x format specifier // in the current locale (set by setlocale (LC_ALL, ...)) @@ -197,16 +198,16 @@ for (char *ptmp = tmp; *ptmp; ) { // store all whitespace as part of format -for (; (isspace)(*ptmp); ++ptmp) +for (; (isspace)(UChar (*ptmp)); ++ptmp) *pfmt++ = *ptmp; const char *begin = ptmp; // skip over all non-digit characters -for (; *ptmp !(isdigit)(*ptmp); ++ptmp) { -if ((ispunct)(*ptmp) || (isspace)(*ptmp)) { +for (; *ptmp !(isdigit)(UChar (*ptmp)); ++ptmp) { +if ((ispunct)(UChar (*ptmp)) || (isspace)(UChar (*ptmp))) { // store all punctuators as part of format -for ( ; (ispunct)(*ptmp) || (isspace)(*ptmp); ++ptmp) +for ( ; (ispunct)(UChar (*ptmp)) || (isspace)(UChar (*ptmp)); ++ptmp) *pfmt++ = *ptmp; break; } @@ -258,9 +259,9 @@ } } -if ((isdigit)(*ptmp)) { +if ((isdigit)(UChar (*ptmp))) { -for (begin = ptmp; (isdigit)(*ptmp); ++ptmp); +for (begin = ptmp; (isdigit)(UChar (*ptmp)); ++ptmp); *pfmt++ = '%'; if (ptmp - begin == 1) { @@ -322,16 +323,16 @@ for (char *ptmp = tmp; *ptmp; ) { -for (; (isspace)(*ptmp); ++ptmp) +for (; (isspace)(UChar (*ptmp)); ++ptmp) *pfmt++ = *ptmp; const char *begin = ptmp; -for (; *ptmp !(isdigit)(*ptmp); ++ptmp) { -if ( (ispunct)(*ptmp) -|| (isspace)(*ptmp)) { -for (;(ispunct)(*ptmp) - || (isspace)(*ptmp); ++ptmp) +for (; *ptmp !(isdigit)(UChar (*ptmp)); ++ptmp) { +if ( (ispunct)(UChar (*ptmp)) +|| (isspace)(UChar (*ptmp))) { +for (;(ispunct)(UChar (*ptmp)) + || (isspace)(UChar (*ptmp)); ++ptmp) *pfmt++ = *ptmp; break; } @@ -359,9 +360,9 @@ } } -if ((isdigit)(*ptmp)) { +if ((isdigit)(UChar (*ptmp))) { -for (begin = ptmp; (isdigit)(*ptmp); ++ptmp); +for (begin = ptmp; (isdigit)(UChar (*ptmp)); ++ptmp); *pfmt++ = '%';
svn commit: r581013 - /incubator/stdcxx/branches/4.2.0/etc/config/src/MADVISE.cpp
Author: faridz Date: Mon Oct 1 09:56:29 2007 New Revision: 581013 URL: http://svn.apache.org/viewvc?rev=581013view=rev Log: 2007-10-01 Travis Vitek [EMAIL PROTECTED] STDCXX-560 * MADVISE.cpp: Add ASL header. Modified: incubator/stdcxx/branches/4.2.0/etc/config/src/MADVISE.cpp Modified: incubator/stdcxx/branches/4.2.0/etc/config/src/MADVISE.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/etc/config/src/MADVISE.cpp?rev=581013r1=581012r2=581013view=diff == --- incubator/stdcxx/branches/4.2.0/etc/config/src/MADVISE.cpp (original) +++ incubator/stdcxx/branches/4.2.0/etc/config/src/MADVISE.cpp Mon Oct 1 09:56:29 2007 @@ -1,5 +1,27 @@ // checking for madvise() in sys/mman.h +/*** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 1999-2007 Rogue Wave Software, Inc. + * + **/ + #include sys/mman.h// for madvise(), MADV_WILLNEED #include sys/types.h // for caddr_t
svn commit: r581015 - in /incubator/stdcxx/branches/4.2.0/etc/nls: charmaps/T.61-8BIT posix/charmaps/ISO_646.IRV
Author: faridz Date: Mon Oct 1 09:57:37 2007 New Revision: 581015 URL: http://svn.apache.org/viewvc?rev=581015view=rev Log: 2007-10-01 Travis Vitek [EMAIL PROTECTED] STDCXX-561 * T.61-8BIT: Add ASL header. * ISO_646.IRV: Same. Modified: incubator/stdcxx/branches/4.2.0/etc/nls/charmaps/T.61-8BIT incubator/stdcxx/branches/4.2.0/etc/nls/posix/charmaps/ISO_646.IRV Modified: incubator/stdcxx/branches/4.2.0/etc/nls/charmaps/T.61-8BIT URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/etc/nls/charmaps/T.61-8BIT?rev=581015r1=581014r2=581015view=diff == --- incubator/stdcxx/branches/4.2.0/etc/nls/charmaps/T.61-8BIT (original) +++ incubator/stdcxx/branches/4.2.0/etc/nls/charmaps/T.61-8BIT Mon Oct 1 09:57:37 2007 @@ -1,6 +1,27 @@ code_set_name T.61-8BIT comment_char % escape_char / +% +% +% Licensed to the Apache Software Foundation (ASF) under one or more +% contributor license agreements. See the NOTICE file distributed +% with this work for additional information regarding copyright +% ownership. The ASF licenses this file to you under the Apache +% License, Version 2.0 (the License); you may not use this file +% except in compliance with the License. You may obtain a copy of +% the License at +% +% http://www.apache.org/licenses/LICENSE-2.0 +% +% Unless required by applicable law or agreed to in writing, software +% distributed under the License is distributed on an AS IS BASIS, +% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +% implied. See the License for the specific language governing +% permissions and limitations under the License. +% +% Copyright 1999-2007 Rogue Wave Software, Inc. +% +% % version: 1.0 % alias T.61 % source: ECMA registry Modified: incubator/stdcxx/branches/4.2.0/etc/nls/posix/charmaps/ISO_646.IRV URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/etc/nls/posix/charmaps/ISO_646.IRV?rev=581015r1=581014r2=581015view=diff == --- incubator/stdcxx/branches/4.2.0/etc/nls/posix/charmaps/ISO_646.IRV (original) +++ incubator/stdcxx/branches/4.2.0/etc/nls/posix/charmaps/ISO_646.IRV Mon Oct 1 09:57:37 2007 @@ -1,6 +1,27 @@ code_set_name ISO_646.IRV comment_char % escape_char / +% +% +% Licensed to the Apache Software Foundation (ASF) under one or more +% contributor license agreements. See the NOTICE file distributed +% with this work for additional information regarding copyright +% ownership. The ASF licenses this file to you under the Apache +% License, Version 2.0 (the License); you may not use this file +% except in compliance with the License. You may obtain a copy of +% the License at +% +% http://www.apache.org/licenses/LICENSE-2.0 +% +% Unless required by applicable law or agreed to in writing, software +% distributed under the License is distributed on an AS IS BASIS, +% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +% implied. See the License for the specific language governing +% permissions and limitations under the License. +% +% Copyright 1999-2007 Rogue Wave Software, Inc. +% +% % version: 1.0 % repertoiremap: mnemonic,ds % source: ECMA registry
svn commit: r581018 - in /incubator/stdcxx/trunk/etc: config/src/MADVISE.cpp nls/charmaps/T.61-8BIT nls/posix/charmaps/ISO_646.IRV
Author: faridz Date: Mon Oct 1 10:13:06 2007 New Revision: 581018 URL: http://svn.apache.org/viewvc?rev=581018view=rev Log: 2007-10-01 Farid Zaripov [EMAIL PROTECTED] * Merged the head of branches/4.2.0 Modified: incubator/stdcxx/trunk/etc/config/src/MADVISE.cpp incubator/stdcxx/trunk/etc/nls/charmaps/T.61-8BIT incubator/stdcxx/trunk/etc/nls/posix/charmaps/ISO_646.IRV Modified: incubator/stdcxx/trunk/etc/config/src/MADVISE.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/src/MADVISE.cpp?rev=581018r1=581017r2=581018view=diff == --- incubator/stdcxx/trunk/etc/config/src/MADVISE.cpp (original) +++ incubator/stdcxx/trunk/etc/config/src/MADVISE.cpp Mon Oct 1 10:13:06 2007 @@ -1,5 +1,27 @@ // checking for madvise() in sys/mman.h +/*** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 1999-2007 Rogue Wave Software, Inc. + * + **/ + #include sys/mman.h// for madvise(), MADV_WILLNEED #include sys/types.h // for caddr_t Modified: incubator/stdcxx/trunk/etc/nls/charmaps/T.61-8BIT URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/nls/charmaps/T.61-8BIT?rev=581018r1=581017r2=581018view=diff == --- incubator/stdcxx/trunk/etc/nls/charmaps/T.61-8BIT (original) +++ incubator/stdcxx/trunk/etc/nls/charmaps/T.61-8BIT Mon Oct 1 10:13:06 2007 @@ -1,6 +1,27 @@ code_set_name T.61-8BIT comment_char % escape_char / +% +% +% Licensed to the Apache Software Foundation (ASF) under one or more +% contributor license agreements. See the NOTICE file distributed +% with this work for additional information regarding copyright +% ownership. The ASF licenses this file to you under the Apache +% License, Version 2.0 (the License); you may not use this file +% except in compliance with the License. You may obtain a copy of +% the License at +% +% http://www.apache.org/licenses/LICENSE-2.0 +% +% Unless required by applicable law or agreed to in writing, software +% distributed under the License is distributed on an AS IS BASIS, +% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +% implied. See the License for the specific language governing +% permissions and limitations under the License. +% +% Copyright 1999-2007 Rogue Wave Software, Inc. +% +% % version: 1.0 % alias T.61 % source: ECMA registry Modified: incubator/stdcxx/trunk/etc/nls/posix/charmaps/ISO_646.IRV URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/nls/posix/charmaps/ISO_646.IRV?rev=581018r1=581017r2=581018view=diff == --- incubator/stdcxx/trunk/etc/nls/posix/charmaps/ISO_646.IRV (original) +++ incubator/stdcxx/trunk/etc/nls/posix/charmaps/ISO_646.IRV Mon Oct 1 10:13:06 2007 @@ -1,6 +1,27 @@ code_set_name ISO_646.IRV comment_char % escape_char / +% +% +% Licensed to the Apache Software Foundation (ASF) under one or more +% contributor license agreements. See the NOTICE file distributed +% with this work for additional information regarding copyright +% ownership. The ASF licenses this file to you under the Apache +% License, Version 2.0 (the License); you may not use this file +% except in compliance with the License. You may obtain a copy of +% the License at +% +% http://www.apache.org/licenses/LICENSE-2.0 +% +% Unless required by applicable law or agreed to in writing, software +% distributed under the License is distributed on an AS IS BASIS, +% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +% implied. See the License for the specific language governing +% permissions and limitations
svn commit: r581020 - in /incubator/stdcxx/branches/4.2.0/examples/manual: rwstdmessages.cpp rwstdmessages.msg rwstdmessages.rc
Author: faridz Date: Mon Oct 1 10:25:35 2007 New Revision: 581020 URL: http://svn.apache.org/viewvc?rev=581020view=rev Log: 2007-10-01 Travis Vitek [EMAIL PROTECTED] STDCXX-568 * rwstdmessages.cpp: Add ASL header. * rwstdmessages.msg: Same. * rwstdmessages.rc: Same. Modified: incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.cpp incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.msg incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.rc Modified: incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.cpp?rev=581020r1=581019r2=581020view=diff == --- incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.cpp (original) +++ incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.cpp Mon Oct 1 10:25:35 2007 @@ -1,3 +1,31 @@ +/** + * + * rwstdmessages.cpp - + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + * Copyright 1994-2007 Rogue Wave Software. + * + **/ + #include rwstdmessages.h int _rw_messages_version() { Modified: incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.msg URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.msg?rev=581020r1=581019r2=581020view=diff == --- incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.msg (original) +++ incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.msg Mon Oct 1 10:25:35 2007 @@ -1,3 +1,29 @@ +$ $$ +$ +$ $Id$ +$ +$ $$ +$ +$ Licensed to the Apache Software Foundation (ASF) under one or more +$ contributor license agreements. See the NOTICE file distributed +$ with this work for additional information regarding copyright +$ ownership. The ASF licenses this file to you under the Apache +$ License, Version 2.0 (the License); you may not use this file +$ except in compliance with the License. You may obtain a copy of +$ the License at +$ +$ http://www.apache.org/licenses/LICENSE-2.0 +$ +$ Unless required by applicable law or agreed to in writing, software +$ distributed under the License is distributed on an AS IS BASIS, +$ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +$ implied. See the License for the specific language governing +$ permissions and limitations under the License. +$ +$ Copyright 1994-2007 Rogue Wave Software, Inc. +$ +$ $$ + $set 1 Standard Library greeting messages 1 Hello 2 Goodbye Modified: incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.rc URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.rc?rev=581020r1=581019r2=581020view=diff == --- incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.rc (original) +++ incubator/stdcxx/branches/4.2.0/examples/manual/rwstdmessages.rc Mon Oct 1 10:25:35 2007 @@ -1,3 +1,31 @@ +/*** + * + * rwstdmessages.rc - Messages for messages facet example program + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may
svn commit: r581022 - in /incubator/stdcxx/branches/4.2.0/src: mapfile.gcc mapfile.gcc-2
Author: faridz Date: Mon Oct 1 10:31:21 2007 New Revision: 581022 URL: http://svn.apache.org/viewvc?rev=581022view=rev Log: 2007-10-01 Travis Vitek [EMAIL PROTECTED] STDCXX-568 * mapfile.gcc: Add ASL header. * mapfile.gcc-2: Same. Modified: incubator/stdcxx/branches/4.2.0/src/mapfile.gcc incubator/stdcxx/branches/4.2.0/src/mapfile.gcc-2 Modified: incubator/stdcxx/branches/4.2.0/src/mapfile.gcc URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/src/mapfile.gcc?rev=581022r1=581021r2=581022view=diff == --- incubator/stdcxx/branches/4.2.0/src/mapfile.gcc (original) +++ incubator/stdcxx/branches/4.2.0/src/mapfile.gcc Mon Oct 1 10:31:21 2007 @@ -1,6 +1,27 @@ # # $Id$ # +### +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the License); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. +# +# Copyright 1994-2006 Rogue Wave Software. +# +### RWSTD.4.1.3 { Modified: incubator/stdcxx/branches/4.2.0/src/mapfile.gcc-2 URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/src/mapfile.gcc-2?rev=581022r1=581021r2=581022view=diff == --- incubator/stdcxx/branches/4.2.0/src/mapfile.gcc-2 (original) +++ incubator/stdcxx/branches/4.2.0/src/mapfile.gcc-2 Mon Oct 1 10:31:21 2007 @@ -1,6 +1,27 @@ # # $Id$ # +### +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed +# with this work for additional information regarding copyright +# ownership. The ASF licenses this file to you under the Apache +# License, Version 2.0 (the License); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an AS IS BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. See the License for the specific language governing +# permissions and limitations under the License. +# +# Copyright 1994-2006 Rogue Wave Software. +# +### RWSTD.3.1.1 {
svn commit: r581626 - /incubator/stdcxx/trunk/util/display.cpp
Author: faridz Date: Wed Oct 3 08:25:27 2007 New Revision: 581626 URL: http://svn.apache.org/viewvc?rev=581626view=rev Log: 2007-10-03 Farid Zaripov [EMAIL PROTECTED] * display.cpp (print_status_plain): Use float arithmetic when calculating the percent of the failed assertions to avoid overflow of the unsigned int type. Modified: incubator/stdcxx/trunk/util/display.cpp Modified: incubator/stdcxx/trunk/util/display.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/util/display.cpp?rev=581626r1=581625r2=581626view=diff == --- incubator/stdcxx/trunk/util/display.cpp (original) +++ incubator/stdcxx/trunk/util/display.cpp Wed Oct 3 08:25:27 2007 @@ -205,8 +205,10 @@ 0 == status-status 0 == status-exit) { if (status-assert) { -printf ( %7u %6u %5d%%, status-assert, status-failed, -100 * (status-assert - status-failed) / status-assert); +const int percnt = int ( 100.0 +* (status-assert - status-failed) +/ status-assert); +printf ( %7u %6u %5d%%, status-assert, status-failed, percnt); } else { printf ( 0 %6u 100%%, status-failed);
svn commit: r581659 - /incubator/stdcxx/trunk/tests/regress/23.vector.bool.stdcxx-235.cpp
Author: faridz Date: Wed Oct 3 10:08:49 2007 New Revision: 581659 URL: http://svn.apache.org/viewvc?rev=581659view=rev Log: 2007-10-03 Farid Zaripov [EMAIL PROTECTED] * 23.vector.bool.stdcxx-235.cpp (main): Corrected the lines which are testing the operator!=. Modified: incubator/stdcxx/trunk/tests/regress/23.vector.bool.stdcxx-235.cpp Modified: incubator/stdcxx/trunk/tests/regress/23.vector.bool.stdcxx-235.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/regress/23.vector.bool.stdcxx-235.cpp?rev=581659r1=581658r2=581659view=diff == --- incubator/stdcxx/trunk/tests/regress/23.vector.bool.stdcxx-235.cpp (original) +++ incubator/stdcxx/trunk/tests/regress/23.vector.bool.stdcxx-235.cpp Wed Oct 3 10:08:49 2007 @@ -42,8 +42,8 @@ assert (cbegin == begin); assert (begin == cbegin); -assert (!(cbegin == begin)); -assert (!(begin == cbegin)); +assert (!(cbegin != begin)); +assert (!(begin != cbegin)); assert (cbegin = begin); assert (begin = cbegin);
svn commit: r581667 - /incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.cpp
Author: faridz Date: Wed Oct 3 10:34:31 2007 New Revision: 581667 URL: http://svn.apache.org/viewvc?rev=581667view=rev Log: 2007-10-03 Farid Zaripov [EMAIL PROTECTED] * 22.locale.moneypunct.cpp (convert): Save the name of the original locale using std::string object. Use return instead of break to avoid restoring the original locale twice. Modified: incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.cpp Modified: incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.cpp?rev=581667r1=581666r2=581667view=diff == --- incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.cpp (original) +++ incubator/stdcxx/trunk/tests/localization/22.locale.moneypunct.cpp Wed Oct 3 10:34:31 2007 @@ -279,7 +279,10 @@ convert (const char *locname, const char *s, const wchar_t*) { // save the name of the original locale -const char *savename = std::setlocale (LC_ALL, 0); +std::string saved_loc; + +if (const char *savename = std::setlocale (LC_ALL, 0)) +saved_loc = savename; // switch to (named) locale const char *loc = std::setlocale (LC_ALL, locname); @@ -305,14 +308,15 @@ // restore the original locale before printing out // the error message (we don't want it localized) -std::setlocale (LC_ALL, savename); +std::setlocale (LC_ALL, saved_loc.c_str ()); rw_fprintf (rw_stderr, %s:%d: mbstowcs(..., %#s, %zu) = -1: %m\n, __FILE__, __LINE__, s, res.capacity ()); res = std::wstring (); // mbstowcs() error -break; + +return res; } else { // shrink if necessary @@ -322,7 +326,7 @@ } // restore original locale -std::setlocale (LC_ALL, savename); +std::setlocale (LC_ALL, saved_loc.c_str ()); return res; }
svn commit: r581874 - /incubator/stdcxx/trunk/tests/regress/27.stringbuf.xsputn.stdcxx-576.cpp
Author: faridz Date: Thu Oct 4 05:18:35 2007 New Revision: 581874 URL: http://svn.apache.org/viewvc?rev=581874view=rev Log: 2007-10-04 Farid Zaripov [EMAIL PROTECTED] * 27.stringbuf.xsputn.stdcxx-576.cpp: Regression test for STDCXX-576 issue. Added: incubator/stdcxx/trunk/tests/regress/27.stringbuf.xsputn.stdcxx-576.cpp (with props) Added: incubator/stdcxx/trunk/tests/regress/27.stringbuf.xsputn.stdcxx-576.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/regress/27.stringbuf.xsputn.stdcxx-576.cpp?rev=581874view=auto == --- incubator/stdcxx/trunk/tests/regress/27.stringbuf.xsputn.stdcxx-576.cpp (added) +++ incubator/stdcxx/trunk/tests/regress/27.stringbuf.xsputn.stdcxx-576.cpp Thu Oct 4 05:18:35 2007 @@ -0,0 +1,54 @@ +/ + * + * 27.stringbuf.xsputn.stdcxx-576.cpp - test case from STDCXX-576 issue + * + * $Id$ + * + *** + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the License); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + * implied. See the License for the specific language governing + * permissions and limitations under the License. + * + **/ + +#include sstream // for stringbuf +#include string // for string +#include cassert // for assert() + +struct PubBuf: std::stringbuf +{ +char* Pbase () const { return this-pbase (); } +}; + +int main () +{ +// 512 is the default buffer size of the basic_stringbuf +std::string s (512, 'a'); + +std::stringbuf sbuf (s); +PubBuf buf = (PubBuf)sbuf; + +std::streamsize res = buf.sputn (buf.Pbase (), 128); +s.append (s.begin (), s.begin () + 128); + +const std::string str = buf.str (); + +assert (res == 128); +assert (str.size () == s.size ()); +assert (str == s); + +return 0; +} Propchange: incubator/stdcxx/trunk/tests/regress/27.stringbuf.xsputn.stdcxx-576.cpp -- svn:eol-style = native Propchange: incubator/stdcxx/trunk/tests/regress/27.stringbuf.xsputn.stdcxx-576.cpp -- svn:keywords = Id
svn commit: r581872 - /incubator/stdcxx/trunk/include/sstream.cc
Author: faridz Date: Thu Oct 4 05:16:24 2007 New Revision: 581872 URL: http://svn.apache.org/viewvc?rev=581872view=rev Log: 2007-10-04 Farid Zaripov [EMAIL PROTECTED] * Merged the head of branches/4.2.0 Modified: incubator/stdcxx/trunk/include/sstream.cc Modified: incubator/stdcxx/trunk/include/sstream.cc URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/sstream.cc?rev=581872r1=581871r2=581872view=diff == --- incubator/stdcxx/trunk/include/sstream.cc (original) +++ incubator/stdcxx/trunk/include/sstream.cc Thu Oct 4 05:16:24 2007 @@ -185,6 +185,15 @@ const _RWSTD_SIZE_T __bufsize = __n + (this-pptr () - this-pbase ()); +_RWSTD_PTRDIFF_T __off = -1; + +if (this-pbase () = __s this-pptr () __s) { +// __s is a part of the buffer +_RWSTD_ASSERT (this-epptr () = __s + __n); +// save the offset from pbase() +__off = this-pbase () - __s; +} + // preserve current pptr() since str() would seek to end const streamsize __cur = this-pptr () - this-pbase (); @@ -196,6 +205,11 @@ this-pbump (__cur - (this-pptr () - this-pbase ())); _RWSTD_ASSERT (__n = this-epptr () - this-pptr ()); + +if (0 = __off) { +// correct __s after the buffer reallocation +__s = this-pbase () + __off; +} } // copy the whole string
svn commit: r581871 - /incubator/stdcxx/branches/4.2.0/include/sstream.cc
Author: faridz Date: Thu Oct 4 05:13:09 2007 New Revision: 581871 URL: http://svn.apache.org/viewvc?rev=581871view=rev Log: 2007-10-04 Farid Zaripov [EMAIL PROTECTED] STDCXX-576 * sstream.cc (xsputn): If __s is a part of the internal buffer and buffer reallocation is needed, save the offset of the __s from pbase() anc correct __s value after the buffer reallocation. Modified: incubator/stdcxx/branches/4.2.0/include/sstream.cc Modified: incubator/stdcxx/branches/4.2.0/include/sstream.cc URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/sstream.cc?rev=581871r1=581870r2=581871view=diff == --- incubator/stdcxx/branches/4.2.0/include/sstream.cc (original) +++ incubator/stdcxx/branches/4.2.0/include/sstream.cc Thu Oct 4 05:13:09 2007 @@ -185,6 +185,15 @@ const _RWSTD_SIZE_T __bufsize = __n + (this-pptr () - this-pbase ()); +_RWSTD_PTRDIFF_T __off = -1; + +if (this-pbase () = __s this-pptr () __s) { +// __s is a part of the buffer +_RWSTD_ASSERT (this-epptr () = __s + __n); +// save the offset from pbase() +__off = this-pbase () - __s; +} + // preserve current pptr() since str() would seek to end const streamsize __cur = this-pptr () - this-pbase (); @@ -196,6 +205,11 @@ this-pbump (__cur - (this-pptr () - this-pbase ())); _RWSTD_ASSERT (__n = this-epptr () - this-pptr ()); + +if (0 = __off) { +// correct __s after the buffer reallocation +__s = this-pbase () + __off; +} } // copy the whole string
svn commit: r581929 - in /incubator/stdcxx/branches/4.2.0: include/loc/_punct.cc src/file.cpp
Author: faridz Date: Thu Oct 4 07:37:59 2007 New Revision: 581929 URL: http://svn.apache.org/viewvc?rev=581929view=rev Log: 2007-10-04 Farid Zaripov [EMAIL PROTECTED] STDCXX-564 * _punct.cc (__rw_match_name): Cast 1UL constant to _RWSTD_SIZE_T to avoid 64-bit MSVC warning C4334: '' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?). * file.cpp [_WIN64]: Disable 64-bit MSVC warning C4244 for __rw_fseek(), __rw_fread(), __rw_fwrite() functions. Modified: incubator/stdcxx/branches/4.2.0/include/loc/_punct.cc incubator/stdcxx/branches/4.2.0/src/file.cpp Modified: incubator/stdcxx/branches/4.2.0/include/loc/_punct.cc URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/loc/_punct.cc?rev=581929r1=581928r2=581929view=diff == --- incubator/stdcxx/branches/4.2.0/include/loc/_punct.cc (original) +++ incubator/stdcxx/branches/4.2.0/include/loc/_punct.cc Thu Oct 4 07:37:59 2007 @@ -87,7 +87,10 @@ typedef _STD::char_traits_CharT _Traits; -if (__bits 1UL __k) { +const _RWSTD_SIZE_T __mask = +_RWSTD_STATIC_CAST(_RWSTD_SIZE_T, 1UL) __k; + +if (__bits __mask) { // `name' is still in the set, see if the next char matches // (case insensitive comparison done if `ctp' is nonzero) if ( __pos __sizes [__k] @@ -108,7 +111,7 @@ // this match is a duplicate of the last best one // remove this match from the set -__bits = ~(1UL __k); +__bits = ~__mask; --__nmatch; } else if ( __sizes [__k] __sizes [__inx] @@ -137,7 +140,7 @@ // clear the bit for the `name' that failed to match // and decrement the numeber of matches -__bits = ~(1UL __k); +__bits = ~__mask; --__nmatch; } } Modified: incubator/stdcxx/branches/4.2.0/src/file.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/src/file.cpp?rev=581929r1=581928r2=581929view=diff == --- incubator/stdcxx/branches/4.2.0/src/file.cpp (original) +++ incubator/stdcxx/branches/4.2.0/src/file.cpp Thu Oct 4 07:37:59 2007 @@ -475,13 +475,18 @@ } +#ifdef _WIN64 +// disable MSVC warning: conversion from '__int64' to 'long', possible loss of data +#pragma warning (disable: 4244) +#endif + _RWSTD_EXPORT long __rw_fseek (void *file, int flags, _RWSTD_PTRDIFF_T offset, int origin) { if (flags _RWSTD_IOS_STDIO) { FILE* const fp = _RWSTD_STATIC_CAST (FILE*, file); -const int pos = fseek (fp, offset, origin); +const int pos = fseek (fp, long (offset), origin); if (pos 0) return long (pos); @@ -522,6 +527,11 @@ return write (fd, buf, size); } + +#ifdef _WIN64 +// restore MSVC warning: conversion from '__int64' to 'long', possible loss of data +#pragma warning (default: 4244) +#endif _RWSTD_EXPORT extern const void* __rw_std_streams[];
svn commit: r581935 - in /incubator/stdcxx/trunk: include/loc/_punct.cc src/file.cpp
Author: faridz Date: Thu Oct 4 07:45:07 2007 New Revision: 581935 URL: http://svn.apache.org/viewvc?rev=581935view=rev Log: 2007-10-04 Farid Zaripov [EMAIL PROTECTED] * Merged the head of branches/4.2.0 Modified: incubator/stdcxx/trunk/include/loc/_punct.cc incubator/stdcxx/trunk/src/file.cpp Modified: incubator/stdcxx/trunk/include/loc/_punct.cc URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/loc/_punct.cc?rev=581935r1=581934r2=581935view=diff == --- incubator/stdcxx/trunk/include/loc/_punct.cc (original) +++ incubator/stdcxx/trunk/include/loc/_punct.cc Thu Oct 4 07:45:07 2007 @@ -87,7 +87,10 @@ typedef _STD::char_traits_CharT _Traits; -if (__bits 1UL __k) { +const _RWSTD_SIZE_T __mask = +_RWSTD_STATIC_CAST(_RWSTD_SIZE_T, 1UL) __k; + +if (__bits __mask) { // `name' is still in the set, see if the next char matches // (case insensitive comparison done if `ctp' is nonzero) if ( __pos __sizes [__k] @@ -108,7 +111,7 @@ // this match is a duplicate of the last best one // remove this match from the set -__bits = ~(1UL __k); +__bits = ~__mask; --__nmatch; } else if ( __sizes [__k] __sizes [__inx] @@ -137,7 +140,7 @@ // clear the bit for the `name' that failed to match // and decrement the numeber of matches -__bits = ~(1UL __k); +__bits = ~__mask; --__nmatch; } } Modified: incubator/stdcxx/trunk/src/file.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/src/file.cpp?rev=581935r1=581934r2=581935view=diff == --- incubator/stdcxx/trunk/src/file.cpp (original) +++ incubator/stdcxx/trunk/src/file.cpp Thu Oct 4 07:45:07 2007 @@ -475,13 +475,18 @@ } +#ifdef _WIN64 +// disable MSVC warning: conversion from '__int64' to 'long', possible loss of data +#pragma warning (disable: 4244) +#endif + _RWSTD_EXPORT long __rw_fseek (void *file, int flags, _RWSTD_PTRDIFF_T offset, int origin) { if (flags _RWSTD_IOS_STDIO) { FILE* const fp = _RWSTD_STATIC_CAST (FILE*, file); -const int pos = fseek (fp, offset, origin); +const int pos = fseek (fp, long (offset), origin); if (pos 0) return long (pos); @@ -522,6 +527,11 @@ return write (fd, buf, size); } + +#ifdef _WIN64 +// restore MSVC warning: conversion from '__int64' to 'long', possible loss of data +#pragma warning (default: 4244) +#endif _RWSTD_EXPORT extern const void* __rw_std_streams[];
svn commit: r581946 - /incubator/stdcxx/trunk/tests/localization/22.locale.cons.mt.cpp
Author: faridz Date: Thu Oct 4 08:19:39 2007 New Revision: 581946 URL: http://svn.apache.org/viewvc?rev=581946view=rev Log: 2007-10-04 Farid Zaripov [EMAIL PROTECTED] STDCXX-575 * 22.locale.cons.mt.cpp [_MSC_VER] (test_ctors): If cat == std::locale::messages, compare combined locale with first because of the MSVC doesn't support LC_MESSAGES constant. Modified: incubator/stdcxx/trunk/tests/localization/22.locale.cons.mt.cpp Modified: incubator/stdcxx/trunk/tests/localization/22.locale.cons.mt.cpp URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/localization/22.locale.cons.mt.cpp?rev=581946r1=581945r2=581946view=diff == --- incubator/stdcxx/trunk/tests/localization/22.locale.cons.mt.cpp (original) +++ incubator/stdcxx/trunk/tests/localization/22.locale.cons.mt.cpp Thu Oct 4 08:19:39 2007 @@ -119,8 +119,13 @@ const std::locale combined (first, next_name, cat); // verify that the locales were created correctly -if (std::locale::none == cat || first == next) +if ( std::locale::none == cat +#ifdef _MSC_VER +|| std::locale::messages == cat +#endif +|| first == next) { RW_ASSERT (combined == first); +} else if (std::locale::all == cat) RW_ASSERT (combined == next); else @@ -129,8 +134,13 @@ // repeat the step above but with a locale object const std::locale combined_2 (first, next, cat); -if (std::locale::none == cat || first == next) +if ( std::locale::none == cat +#ifdef _MSC_VER +|| std::locale::messages == cat +#endif +|| first == next) { RW_ASSERT (combined_2 == first); +} else if (std::locale::all == cat) RW_ASSERT (combined_2 == next); else
svn commit: r582335 - /incubator/stdcxx/trunk/include/loc/_punct.cc
Author: faridz Date: Fri Oct 5 09:25:54 2007 New Revision: 582335 URL: http://svn.apache.org/viewvc?rev=582335view=rev Log: 2007-10-05 Farid Zaripov [EMAIL PROTECTED] * _punct.cc (__rw_match_name): Added missing space character. Modified: incubator/stdcxx/trunk/include/loc/_punct.cc Modified: incubator/stdcxx/trunk/include/loc/_punct.cc URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/loc/_punct.cc?rev=582335r1=582334r2=582335view=diff == --- incubator/stdcxx/trunk/include/loc/_punct.cc (original) +++ incubator/stdcxx/trunk/include/loc/_punct.cc Fri Oct 5 09:25:54 2007 @@ -88,7 +88,7 @@ typedef _STD::char_traits_CharT _Traits; const _RWSTD_SIZE_T __mask = -_RWSTD_STATIC_CAST(_RWSTD_SIZE_T, 1UL) __k; +_RWSTD_STATIC_CAST (_RWSTD_SIZE_T, 1UL) __k; if (__bits __mask) { // `name' is still in the set, see if the next char matches
svn commit: r582336 - /incubator/stdcxx/branches/4.2.0/include/loc/_punct.cc
Author: faridz Date: Fri Oct 5 09:26:44 2007 New Revision: 582336 URL: http://svn.apache.org/viewvc?rev=582336view=rev Log: 2007-10-05 Farid Zaripov [EMAIL PROTECTED] * _punct.cc (__rw_match_name): Added missing space character. Modified: incubator/stdcxx/branches/4.2.0/include/loc/_punct.cc Modified: incubator/stdcxx/branches/4.2.0/include/loc/_punct.cc URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/loc/_punct.cc?rev=582336r1=582335r2=582336view=diff == --- incubator/stdcxx/branches/4.2.0/include/loc/_punct.cc (original) +++ incubator/stdcxx/branches/4.2.0/include/loc/_punct.cc Fri Oct 5 09:26:44 2007 @@ -88,7 +88,7 @@ typedef _STD::char_traits_CharT _Traits; const _RWSTD_SIZE_T __mask = -_RWSTD_STATIC_CAST(_RWSTD_SIZE_T, 1UL) __k; +_RWSTD_STATIC_CAST (_RWSTD_SIZE_T, 1UL) __k; if (__bits __mask) { // `name' is still in the set, see if the next char matches
svn commit: r583840 - in /incubator/stdcxx/trunk/etc/config/windows: configure.wsf projects.js
Author: faridz Date: Thu Oct 11 07:47:20 2007 New Revision: 583840 URL: http://svn.apache.org/viewvc?rev=583840view=rev Log: 2007-10-11 Farid Zaripov [EMAIL PROTECTED] * configure.wsf (configure): Removed IncludeDir command line option. * projects.js (CreateProjectsDefs): Removed /IncludeDir option from command line of the configure.wsf script. Modified: incubator/stdcxx/trunk/etc/config/windows/configure.wsf incubator/stdcxx/trunk/etc/config/windows/projects.js Modified: incubator/stdcxx/trunk/etc/config/windows/configure.wsf URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/configure.wsf?rev=583840r1=583839r2=583840view=diff == --- incubator/stdcxx/trunk/etc/config/windows/configure.wsf (original) +++ incubator/stdcxx/trunk/etc/config/windows/configure.wsf Thu Oct 11 07:47:20 2007 @@ -72,7 +72,6 @@ var configFile = configTargerDir + \\ + configFileName; var stageFile = stageDir + \\ + configFileName; var srcDir = slnDir + \\etc\\config\\src; -var includeDir = slnDir + \\include; var runWindowMode = 0; var timeOut = 3; // 30 sec var logFileName = config.log; @@ -135,18 +134,6 @@ WScript.Quit(2); } } - -if (WScript.Arguments.Named.Exists(IncludeDir)) -{ -includeDir = WScript.Arguments.Named(IncludeDir); -if (!fso.FolderExists(includeDir)) -{ -WScript.StdErr.WriteLine( -Configure: Fatal error: Unable to read includes folder -+ includeDir); -WScript.Quit(2); -} -} if (WScript.Arguments.Named.Exists(OutFile)) configFile = WScript.Arguments.Named(OutFile); @@ -257,7 +244,7 @@ LDFLAGS += /DEBUG; } -CPPFLAGS += joinArray(new Array(stageDir, includeDir), /I); +CPPFLAGS += /I\ + stageDir + \; var defines = new Array (); Modified: incubator/stdcxx/trunk/etc/config/windows/projects.js URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/windows/projects.js?rev=583840r1=583839r2=583840view=diff == --- incubator/stdcxx/trunk/etc/config/windows/projects.js (original) +++ incubator/stdcxx/trunk/etc/config/windows/projects.js Thu Oct 11 07:47:20 2007 @@ -74,7 +74,6 @@ /SolutionName:\%SOLUTION%\ + /ConfigurationName:\%CFGNAME%\ + /SrcDir:\%SRCDIR%\\etc\\config\\src\ + - /IncludeDir:\%SRCDIR%\\include\ + /OutDir:\$(OutDir)\ + /OutFile:\$(OutDir)\\config.h\ + /LogFile:\$(OutDir)\\config.log\;
svn commit: r584801 - /incubator/stdcxx/trunk/include/rw/_ioinsert.cc
Author: faridz Date: Mon Oct 15 08:10:53 2007 New Revision: 584801 URL: http://svn.apache.org/viewvc?rev=584801view=rev Log: 2007-10-15 Farid Zaripov [EMAIL PROTECTED] STDCXX-206 * _ioinsert.cc (__rw_insert): Corrected #ifndef to #ifdef. Modified: incubator/stdcxx/trunk/include/rw/_ioinsert.cc Modified: incubator/stdcxx/trunk/include/rw/_ioinsert.cc URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_ioinsert.cc?rev=584801r1=584800r2=584801view=diff == --- incubator/stdcxx/trunk/include/rw/_ioinsert.cc (original) +++ incubator/stdcxx/trunk/include/rw/_ioinsert.cc Mon Oct 15 08:10:53 2007 @@ -170,7 +170,7 @@ else { __err = _STD::ios_base::badbit; -#ifndef _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE +#ifdef _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE __strm.width (0); #endif // _RWSTD_NO_EXT_KEEP_WIDTH_ON_FAILURE }