Permalink
Browse files

2008-08-01 Travis Vitek <vitek@roguewave.com>

	Merge r666742, r666829, r668632, r673164, r673573, r673978, r674008,
	r674023, r674069, r674236, r674441, r674550, r675269, r675315, r676077,
	r677756, r677764, r677770, r677777, r677789, r677783, r677791, r677800,
	r677810, r678003, r678239, r678483, r678619, r678905, r679241, r679246,
	r679601, r680049, r680050, r680051, r680545, r680756, r680775, r680791,
	r681102 from branches/4.2.x:


	2008-06-11  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-871
	* tests/include/rw_driver.h (rw_fatal):
	* tests/include/rw_printf.h (rw_sprintfa, rw_snprintfa): Add
	link to page containing specifications for formatting directives.
	* tests/include/rw_printf.h (rw_asnprintf): Removed old list of
	formatting directives.  Added more specifications for formatting
	directives to rwtest-fmtspec page and listed undocumented (i.e.
	complicated) formatting directives in a separate section so all
	directives are at least accounted for.


	2008-06-11  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-488
	* etc/config/gcc.config: Use rpath on Darwin 9 OR LATER VERSION.
	Do not use rpath on Darwin 8.


	2008-06-17  Farid Zaripov  <farid_zaripov@epam.com>

	* GNUmakefile: Add "narrow" mode to the build mode in 15d builds.


	2008-07-01  Travis Vitek  <vitek@roguewave.com>

	STDCXX-670
	* include/ansi/setjmp.h [!setjmp]: Define function macro setjmp.


	2008-07-02  Martin Sebor  <sebor@roguewave.com>

	STDCXX-986
	* doc/stdlibug/2-3.html (2.3.1 Input Stream Iterators): Corrected
	a typo in example code.


	2008-07-04  Farid Zaripov  <faridz@apache.org>

	* etc/config/makefile.rules: Define local shell variable
	TZ to export its value (to complete changes in rev. 561060).


	2008-07-04  Farid Zaripov  <faridz@apache.org>

	* tests/include/rw_file.h: Replaced _MSC_VER to _WIN32 in
	preprocessor directive to use correct file name on MinGW.


	2008-07-04  Farid Zaripov  <faridz@apache.org>

	* tests/src/printf.cpp (_rw_fmtfloating): Use workaround for
	MSVC on MinGW too since MinGW uses MSVC's runtime.


	2008-07-04  Farid Zaripov  <faridz@apache.org>

	* include/rw/_config-gcc.h [__MINGW32__]: Add MinGW specific defines.
	* tests/localization/22.locale.cons.mt.cpp (test_ctors): Use MSVC
	specific workarounds on MinGW too.
	* tests/localization/22.locale.time.put.cpp (rw_strftime): Ditto.
	* util/gencat.cpp [__MINGW32__] (main): Create message catalog dll's
	independent on cygwin1.dll.


	2008-07-05  Martin Sebor  <sebor@roguewave.com>

	* include/rw/_config-gcc.h: Corrected typos in comments.
	Added comments to clearly separate sections dealing with
	individual operating environments.


	2008-07-07  Farid Zaripov  <faridz@apache.org>

	* etc/config/makefile.rules: Added comment about TZ variable.


	2008-07-07  Martin Sebor  <sebor@roguewave.com>

	STDCXX-988
	* include/ansi/limits.h [__GNUG__]: Used #include_next twice to coax
	gcc's <limits.h> to pull in the system <limits.h> in order to #define
	POSIX and system macros.
	* tests/regress/18.c.limits.stdcxx-988.cpp: Regression test for
	STDCXX-988. Tested with gcc 4.1.2 and EDG eccp 3.9 on Fedora 8.


	2008-07-09  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-550
	* tests/utilities/20.operators.cpp (test_random_access_iterators):
	Account for debug iterators on HP-UX platforms.


	2008-07-09  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-550
	* tests/utilities/20.operators.cpp (test_random_access_iterator):
	Oops.  Should be `!defined' in #if directive.


	2008-07-11  Martin Sebor  <sebor@roguewave.com>

	* src/wcodecvt.cpp (size_t): Used type throughout in place of
	the _RWSTD_SIZE_T macro which is necessary in library headers.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	STDCXX-494
	* include/vector (vector): Removed Allocator base class, replacing
	it (in a binary compatible way) with a new member, _C_alloc, instead.
	(_C_value_alloc_type): Removed member typedef.
	(vector): Initialized the _C_alloc member instead of allocator_type
	in all class ctors.
	(~vector, begin, end, size, max_size, empty, swap): Referenced
	_C_begin, _C_end, and _C_bufend indirectly, via the new _C_alloc
	member.
	(pop_back, push_back): Used the new _C_alloc member to destroy
	and construct elements.
	* include/vector.cc (_C_realloc, _C_destroy, _C_insert_1,
	_C_insert_n, _C_insert_range): Same as above.
	* tests/regress/23.vector.stdcxx-494: Added regression test for
	the vector part of the issue.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	* tests/regress/18.c.limits.stdcxx-988.cpp (main): Avoided testing
	macros for specific values to prevent failures on non-conforming
	systems.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	* etc/config/xfail.txt: Copied from trunk.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	* tests/regress/18.c.limits.stdcxx-988.cpp [HP aCC] (main): Avoided
	testing LLONG_MAX and LLONG_MIN unless 199901L <= __STDC_VERSION__
	(otherwise the macros are deliberately not defined).


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	* test/strings/21.string.erase.cpp (test_erase): Cast actual
	function arguments to the target type to silence HP aCC 6.16
	remarks #4271-D: type conversion may lose sign.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	STDCXX-780
	* tests/include/rw_streambuf.h (test): Aasserted a precondition
	to silence HP aCC 6/cadvise warning #20206-D: Out of bound access.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	* tests/containers/23.deque.modifiers.cpp (exception_loop): Converted
	a signed int to size_type to silence HP aCC 6 remark #4271-D: type
	conversion may lose sign.


	2008-07-17  Martin Sebor  <sebor@roguewave.com>

	STDCXX-896
	* tests/containers/23.deque.modifiers.cpp (test_insert, test_assign):
	Cast away the constness of the target type before deleting a pointer
	to work around an HP aCC 6.16 bug.


	2008-07-18  Martin Sebor  <sebor@roguewave.com>

	* examples/manual/wctype.cpp: New example showcasing the wchar_t
	specialization of the std::ctype_byname facet along with the wide
	character classification functions, inspired by the following post
	to the Sun C++ discussion forum:
	http://forums.sun.com/thread.jspa?threadID=5315069.


	2008-07-19  Martin Sebor  <sebor@roguewave.com>

	STDCXX-997
	* src/strtol.cpp [__SUNPRO_CC] (__rw_strtol, __rw_strtoul): Used
	#pragma no_side_effects to help Sun C++ optimizer generate better
	code (about 5% improvement was measured).
	[__SUNPRO_CC && _RWSTD_LONG_LONG] (__rw_strtoll, __rw_strtoull):
	Same.


	2008-07-21  Eric Lemings  <eric.lemings@roguewave.com>

	STDCXX-808
	* tests/regress/27.streambuf.buffer.stdcxx-808.cpp: Add
	regression test case that has failed in previous releases.


	2008-07-21  Martin Sebor  <sebor@roguewave.com>

	STDCXX-999
	* NOTICE.txt: Updated year of copyright.


	2008-07-22  Eric Lemings  <eric.lemings@roguewave.com>

	STDCXX-808
	* tests/regress/27.streambuf.buffer.stdcxx-808.cpp: Add file
	header comment.


	2008-07-23  Martin Sebor  <sebor@roguewave.com>

	STDCXX-997
	* include/bitset [__SUNPRO_CC] (__rw_bitset, __rw_bit_count,
	__rw_shl, __rw_shr): Used #pragma no_side_effects to help the
	optimizer generate better code.


	2008-07-23  Martin Sebor  <sebor@roguewave.com>

	* include/bitset [__SUNPRO_CC] Spelled #pragma no_side_effect
	the same as in the manual (even if the compiler seems to grok
	it both ways).


	2008-07-26  Martin Sebor  <sebor@roguewave.com>

	STDCXX-998
	* include/rw/_defs.h [_RWSTD_ATTRIBUTE_NOTHROW] (_RWSTD_DECLARE_NOTHROW,
	_RWSTD_DEFINE_NOTHROW): Defined new helper macros to make it possible to
	declare functions with the attribute((nothrow)) when it's available and
	to use the empty exception specification to emulate the same feature
	when it isn't.
	(__rw_assert_fail): Used _RWSTD_DECLARE_NOTHROW.
	* include/rw/_config-gcc.h [gcc >= 3.3] (RWSTD_ATTRIBUTE_NOTHROW):
	Defined.


	2008-07-26  Martin Sebor  <sebor@roguewave.com>

	STDCXX-998
	* src/assert.cpp (U_STACK_TRACE, __rw_stack_trace, printstack,
	__rw_assert_fail): Declared nothrow.


	2008-07-26  Martin Sebor  <sebor@roguewave.com>

	STDCXX-998
	* src/strtol.h (__rw_strtol, __rw_strtoll): Declared nothrow.
	(__rw_strtoul, __rw_strtoull): Same.
	* src/strtol.cpp: Same.


	2008-07-28  Travis Vitek  <vitek@roguewave.com>

	* include/rw/_defs.h: Use _RWSTD_DECLARE_NOTHROW macro only after
	definition of _THROWS to avoid compile errors.


	2008-07-29  Martin Sebor  <sebor@roguewave.com>

	* include/loc/_moneypunct.h (~moneypunct): Explicitly declared
	to prevent the compiler from generating a definition (and vtable)
	in every translation unit that uses the class. Pursuant to
	STDCXX-998, made use of attribute((nothrow)) where available.
	* include/loc/_codecvt.h (~codecvt, ~codecvt_byname): Same.
	* include/loc/_collate.h (~collate, ~collate_byname): Same.
	* include/loc/_codecvt.cc (~codecvt, ~codecvt_byname): Defined.
	* include/loc/_moneypunct.cc (~moneypunct): Same.
	* include/loc/_collate.cc (~collate, ~collate_byname): Same.
	* src/collate.cpp (~collate, ~collate_byname): Same.
	* src/codecvt.cpp (~codecvt): Same.
	* src/wcodecvt.cpp (~codecvt, ~codecvt_byname): Defined.


	2008-07-29  Martin Sebor  <sebor@roguewave.com>

	* include/loc/_messages.h (~messages, ~messages_byname): Explicitly
	declared dtors to prevent the compiler from emitting function and
	vtable definition in every translation unit that uses the class.
	* include/loc/_money_put.h (~money_put): Same.
	* include/loc/_moneypunct.h (~moneypunct_byname): Same.
	* include/loc/_numpunct.h (~numpunct_byname): Same.
	* include/loc/_time_get.h (~time_get, ~time_get_byname): Same.
	* include/loc/_time_put.h (~time_put, ~time_put_byname): Same.
	* include/loc/_money_put.cc (~money_put): Defined.
	* include/loc/_time_get.cc (~time_get, ~time_get_byname): Same.
	* include/loc/_moneypunct.cc (~moneypunct_byname): Same.
	* include/loc/_messages.cc (~messages, ~messages_byname): Same.
	* include/loc/_numpunct.cc (~numpunct_byname): Same.
	* include/loc/_time_put.cc (~time_put, ~time_put_byname): Same.


	2008-07-29  Martin Sebor  <sebor@roguewave.com>

	* include/loc/_codecvt.h (codecvt_byname<char, char>): Added
	an explicit specialization to avoid having to explicitly
	instanting the primary template in order to emit the definition
	of (the now explicitly defined out-of-line, since rev 680756)
	virtual dtor needed in __rw::__rw_ct_codecvt().
	* src/codecvt.cpp (codecvt_byname<char, char>): Defined ctor
	and dtor.


	2008-07-30  Martin Sebor  <sebor@roguewave.com>

	* include/rw/_defs.h (_RWSTD_ATTRIBUTE_NOTHROW): Defined as a no-op
	when the attribute isn't supported by the compiler to make the macro
	portably usable.
	(__rw_assert_fail): Inverted the order of the function attribute
	and exception specification to prevent compiler errors.



git-svn-id: http://svn.apache.org/repos/asf/stdcxx/trunk@681826 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent c564296 commit c4d29769fdf0a5d78e713a7a1c01b265f9623d88 vitek committed Aug 1, 2008
Showing with 1,313 additions and 304 deletions.
  1. +2 −2 NOTICE.txt
  2. +4 −2 etc/config/gcc.config
  3. +5 −0 etc/config/makefile.rules
  4. +193 −0 examples/manual/wctype.cpp
  5. +6 −1 include/ansi/limits.h
  6. +4 −0 include/ansi/setjmp.h
  7. +11 −0 include/bitset
  8. +20 −1 include/loc/_codecvt.cc
  9. +24 −1 include/loc/_codecvt.h
  10. +11 −1 include/loc/_collate.cc
  11. +13 −3 include/loc/_collate.h
  12. +20 −0 include/loc/_messages.cc
  13. +3 −0 include/loc/_messages.h
  14. +10 −0 include/loc/_money_put.cc
  15. +2 −0 include/loc/_money_put.h
  16. +22 −1 include/loc/_moneypunct.cc
  17. +5 −1 include/loc/_moneypunct.h
  18. +15 −2 include/loc/_numpunct.cc
  19. +2 −0 include/loc/_numpunct.h
  20. +21 −1 include/loc/_time_get.cc
  21. +4 −0 include/loc/_time_get.h
  22. +20 −0 include/loc/_time_put.cc
  23. +4 −0 include/loc/_time_put.h
  24. +26 −1 include/rw/_config-gcc.h
  25. +56 −34 include/rw/_defs.h
  26. +45 −44 include/vector
  27. +75 −83 include/vector.cc
  28. +11 −4 src/assert.cpp
  29. +21 −1 src/codecvt.cpp
  30. +37 −1 src/collate.cpp
  31. +5 −5 src/strtol.cpp
  32. +26 −7 src/strtol.h
  33. +67 −52 src/wcodecvt.cpp
  34. +18 −5 tests/containers/23.deque.modifiers.cpp
  35. +2 −1 tests/include/rw_driver.h
  36. +3 −3 tests/include/rw_file.h
  37. +226 −29 tests/include/rw_printf.h
  38. +6 −2 tests/include/rw_streambuf.h
  39. +2 −2 tests/localization/22.locale.cons.mt.cpp
  40. +7 −6 tests/localization/22.locale.time.put.cpp
  41. +175 −0 tests/regress/18.c.limits.stdcxx-988.cpp
  42. +71 −0 tests/regress/23.vector.stdcxx-494.cpp
  43. +2 −2 tests/src/printf.cpp
  44. +5 −2 tests/strings/21.string.erase.cpp
  45. +5 −3 tests/utilities/20.operators.cpp
  46. +1 −1 util/gencat.cpp
View
@@ -1,12 +1,12 @@
Apache C++ Standard Library - stdcxx
-Copyright 2005-2007 The Apache Software Foundation.
+Copyright 2005-2008 The Apache Software Foundation.
This product includes software developed at The Apache Software Foundation
(http://www.apache.org/).
Portions of this software were developed at Rogue Wave Software, Inc.,
-Copyright (c) 1994-2007.
+Copyright (c) 1994-2008.
This software contains code derived from the HP Standard Template Library,
Copyright (c) 1994 Hewlett-Packard Company.
View
@@ -106,7 +106,7 @@ else
-compatibility_version 4 -current_version $(LIBVER)
# use appropriate install_name
- ifeq ($(shell [ $(OS_MAJOR) -eq 9 ] && echo 1), 1)
+ ifeq ($(shell [ $(OS_MAJOR) -ge 9 ] && echo 1), 1)
LDSOFLAGS += -install_name @rpath/$(LIBNAME)
else
LDSOFLAGS += -install_name $(LIBNAME)
@@ -207,7 +207,9 @@ else
endif
ifeq ($(OSNAME),Darwin)
- RPATH = -Wl,-rpath,
+ ifeq ($(shell [ $(OS_MAJOR) -ge 9 ] && echo 1), 1)
+ RPATH = -Wl,-rpath,
+ endif
endif
# debug/optimization options
@@ -158,6 +158,9 @@ endif # eq ($(NO_DOT_O),)
# creates and sets the POSIX TMPDIR environment variable to a temporary
# directory before running the programs which is then removed when done
#
+# The variable TZ is used in examples and initialized in GNUmakefile.exm
+# (see rev.561060)
+#
# PlumHall specific:
# for all "top level" tests that failed to build, find and build all
# subtests (the little tests the main test consists of)
@@ -168,6 +171,7 @@ run runall run_all: $(BINDIR)/exec
PATH=$$PATH:.; \
TOPDIR=$(TOPDIR); \
TMPDIR=$${TMPDIR:-/tmp}/stdcxx-run-$$$$; \
+ TZ=$(TZ); \
export LD_LIBRARY_PATH PATH TMPDIR TOPDIR TZ; \
trap "rm -rf $$TMPDIR" HUP INT QUIT TERM EXIT; \
mkdir -p $$TMPDIR; \
@@ -181,6 +185,7 @@ run runall run_all: $(BINDIR)/exec
PATH=$$PATH:$(LIBDIR):$(BINDIR):.; \
TOPDIR=$(TOPDIR); \
TMPDIR=$${TMPDIR:-/tmp}/stdcxx-run-$$$$; \
+ TZ=$(TZ); \
export LD_LIBRARY_PATH PATH TMPDIR TOPDIR TZ; \
trap "rm -rf $$TMPDIR" HUP INT QUIT TERM EXIT; \
mkdir -p $$TMPDIR; \
View
@@ -0,0 +1,193 @@
+/**************************************************************************
+ *
+ * wctype.cpp - Example program showcasing the wchar_t specialization
+ * of the std::ctype_byname facet, inspired by a Sun C++
+ * forum post:
+ * http://forums.sun.com/thread.jspa?threadID=5315069
+ *
+ * $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 2008 Rogue Wave Software, Inc.
+ *
+ **************************************************************************/
+
+#include <cwctype> // for iswxxx(), wint_t
+#include <stdexcept> // for runtime_error
+#include <iomanip> // for setfill, setw
+#include <ios> // for oct
+#include <iostream> // for cerr, cout
+#include <locale> // for isxxx(), locale
+
+
+static std::locale
+make_named_locale ()
+{
+ static const char* const
+ locale_names [] = {
+ "es_ES.ISO8859-1", // AIX, Solaris, Tru64
+ "es_ES.iso88591", // HP-UX, Linux
+ "es_ES.88591",
+ "De_DE.88591", // Reliant
+ "es_ES",
+ "es", // Linux, Solaris
+ "Spanish",
+ "spanish", // Linux
+ "espanol", // Linux
+ "spanish_spain.1252", // Windows
+ "POSIX", // POSIX systems
+ "C", // all C/C++ systems
+ 0 // (sentinel)
+ };
+
+ std::locale german;
+
+ // iterate over the know locale names above until a valid one
+ // is found (i.e., one that doesn't cause locale to throw)
+ for (const char* const *names = locale_names; ; ) {
+ try {
+ german = std::locale (names [0]);
+ break;
+ }
+ catch (std::runtime_error&) {
+ // continue trying until the next name is null
+ if (0 == *++names)
+ throw;
+ }
+ catch (...) {
+ throw;
+ }
+ }
+
+ return german;
+}
+
+
+int main ()
+{
+ std::locale locale;
+
+ try {
+ // try to contruct a named locale
+ locale = make_named_locale ();
+ }
+ catch (std::runtime_error& e) {
+ // a runtime_error will be thrown if the locale cannot be constructed
+ std::cerr << "Caught runtime_error:\n";
+ std::cerr << e.what () << '\n';
+
+ return 1;
+ }
+ catch (...) {
+ std::cerr << "Caught an unknown exception\n";
+
+ return 2;
+ }
+
+ // set the global C/C++ locale to be used by the C classification
+ // functions (such as iswalpha())
+ std::locale::global (locale);
+
+ // imbue the named locale in wcout
+ std::wcout.imbue (locale);
+
+ std::wcout << "Wide character classification in "
+ << locale.name ().c_str () << " locale.\n";
+
+
+ // number of mismatched classifications between C and C++
+ // (expect zero for 100% conforming implementation)
+ int mismatch_count = 0;
+
+ // iterate over all characters in the extended ASCII range
+ // printing out the value of each along with its character
+ // class using the letters A, a, C, D, G, L, P, p, S, U,
+ // and X to denote each of the C/C++ classes corresponding
+ // to the C and C++ classification functions
+ for (std::wint_t wi = 0; wi < std::wint_t (256); ++wi) {
+
+ // convert the wint_t to wchar_t
+ const wchar_t wc (wi);
+
+ char cxx_class [11]; // C++ classification letters
+ char c_class [11]; // C classification letters
+
+ std::size_t i = 0;
+
+ // assign the appropriate letter for the C++ classification
+ cxx_class [i++] = (std::isalnum)(wc, locale) ? 'A' : '-';
+ cxx_class [i++] = (std::isalpha)(wc, locale) ? 'a' : '-';
+ cxx_class [i++] = (std::iscntrl)(wc, locale) ? 'C' : '-';
+ cxx_class [i++] = (std::isdigit)(wc, locale) ? 'D' : '-';
+ cxx_class [i++] = (std::isgraph)(wc, locale) ? 'G' : '-';
+ cxx_class [i++] = (std::islower)(wc, locale) ? 'L' : '-';
+ cxx_class [i++] = (std::isprint)(wc, locale) ? 'P' : '-';
+ cxx_class [i++] = (std::ispunct)(wc, locale) ? 'p' : '-';
+ cxx_class [i++] = (std::isspace)(wc, locale) ? 'S' : '-';
+ cxx_class [i++] = (std::isupper)(wc, locale) ? 'U' : '-';
+ cxx_class [i++] = (std::isxdigit)(wc, locale) ? 'X' : '-';
+
+ i = 0;
+
+ // assign the appropriate letter for the C classification
+ c_class [i++] = (std::iswalnum)(wc) ? 'A' : '-';
+ c_class [i++] = (std::iswalpha)(wc) ? 'a' : '-';
+ c_class [i++] = (std::iswcntrl)(wc) ? 'C' : '-';
+ c_class [i++] = (std::iswdigit)(wc) ? 'D' : '-';
+ c_class [i++] = (std::iswgraph)(wc) ? 'G' : '-';
+ c_class [i++] = (std::iswlower)(wc) ? 'L' : '-';
+ c_class [i++] = (std::iswprint)(wc) ? 'P' : '-';
+ c_class [i++] = (std::iswpunct)(wc) ? 'p' : '-';
+ c_class [i++] = (std::iswspace)(wc) ? 'S' : '-';
+ c_class [i++] = (std::iswupper)(wc) ? 'U' : '-';
+ c_class [i++] = (std::iswxdigit)(wc) ? 'X' : '-';
+
+ // print the value of the character and its glyph only when
+ // it's printable, otherwise print a space
+ std::wcout << " '\\" << std::setw (3)
+ << std::setfill (L'0') << std::oct << wi
+ << "' ('" << ((std::isprint)(wc, locale) ? wc : L' ')
+ << "') ";
+
+ bool mismatch = false;
+
+ // print out the letters denoting each character class
+ for (i = 0; i != sizeof cxx_class; ++i) {
+
+ if (cxx_class [i] == c_class [i])
+ std::wcout << cxx_class [i] << ' ';
+ else {
+ std::wcout << cxx_class [i] << ':' << c_class [i] << ' ';
+ mismatch = true;
+ }
+ }
+
+ if (mismatch) {
+ std::wcout << " *** C/C++ mismatch ***";
+
+ // increment the number of mimatched character classes
+ ++mismatch_count;
+ }
+
+ std::wcout << '\n';
+ }
+
+ return mismatch_count ? 1 : 0;
+}
View
@@ -107,7 +107,12 @@
# endif
# ifdef __GNUC__
- // use the gcc extension to #include the compiler's limits.h
+ // use the gcc extension to #include the compiler's <limits.h>
+# include_next <limits.h>
+
+ // include the same file again to get it to #include the system
+ // <limits.h> (presumably residing /usr/include/)
+# define _GCC_NEXT_LIMITS_H
# include_next <limits.h>
# else
# include _RWSTD_ANSI_C_LIMITS_H
View
@@ -48,4 +48,8 @@ using std::longjmp;
# include _RWSTD_ANSI_C_SETJMP_H
#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
+#ifndef setjmp
+# define setjmp(env) setjmp (env)
+#endif
+
#endif // _RWSTD_SETJMP_H_INCLUDED
View
@@ -58,6 +58,10 @@ __rw_bitset (unsigned long*, _RWSTD_SIZE_T,
_RWSTD_SIZE_T, _RWSTD_SIZE_T,
const char*, const char*);
+#ifdef __SUNPRO_CC
+# pragma no_side_effect (__rw_bitset)
+#endif // Sun C++
+
#ifndef _RWSTD_NO_WCHAR_T
_RWSTD_SPECIALIZED_FUNCTION
@@ -68,6 +72,9 @@ __rw_bitset (unsigned long*, _RWSTD_SIZE_T,
_RWSTD_SIZE_T, _RWSTD_SIZE_T,
const char*, const char*);
+# ifdef __SUNPRO_CC
+# pragma no_side_effect (__rw_bitset)
+# endif // Sun C++
#endif // _RWSTD_NO_WCHAR_T
// helper, implements bitset::count()
@@ -81,6 +88,10 @@ __rw_shl (unsigned long*, _RWSTD_SIZE_T, _RWSTD_SIZE_T) _THROWS (());
_RWSTD_EXPORT void
__rw_shr (unsigned long*, _RWSTD_SIZE_T, _RWSTD_SIZE_T) _THROWS (());
+#ifdef __SUNPRO_CC
+# pragma no_side_effect (__rw_bit_count, __rw_shl, __rw_shr)
+#endif // Sun C++
+
} // namespace __rw
View
@@ -22,7 +22,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2006 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -35,7 +35,26 @@ _RWSTD_NAMESPACE (std) {
template <class _InternT, class _ExternT, class _StateT>
_RW::__rw_facet_id codecvt<_InternT, _ExternT, _StateT>::id;
+
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _InternT, class _ExternT, class _StateT>
+/* virtual */ codecvt<_InternT, _ExternT, _StateT>::
+~codecvt () /* nothrow */
+{
+ // no-op
+}
+
#endif // _RWSTD_NO_EXT_CODECVT_PRIMARY
+// outlined to avoid generating a vtable in each translation unit
+// that uses the class
+template <class _InternT, class _ExternT, class _StateT>
+/* virtual */ codecvt_byname<_InternT, _ExternT, _StateT>::
+~codecvt_byname () /* nothrow */
+{
+ // no-op
+}
+
} // namespace std
Oops, something went wrong.

0 comments on commit c4d2976

Please sign in to comment.