--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/meta-packages/history/SUNWlibstdcxx4.p5m Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,27 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+
+set name=pkg.fmri value=pkg:/[email protected],5.11-0.133
+set name=pkg.renamed value=true
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+depend fmri=pkg:/library/c++/[email protected] type=require
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Makefile Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,273 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+include ../../make-rules/shared-macros.mk
+
+PATH=$(dir $(CC)):/usr/gnu/bin:/usr/bin
+
+COMPONENT_NAME= stdcxx
+COMPONENT_VERSION= 4.2.1
+COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_PROJECT_URL= http://stdcxx.apache.org/
+COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
+COMPONENT_ARCHIVE_HASH= sha1:38efa30958222b2733f22098b3db09161d2e6c8c
+COMPONENT_ARCHIVE_URL= http://www.apache.org/dist/stdcxx/$(COMPONENT_ARCHIVE)
+
+include ../../make-rules/prep.mk
+include ../../make-rules/configure.mk
+include ../../make-rules/ips.mk
+
+ISA_PATCH_DIR_32 = $(WS_TOP)/components/stdcxx/isa_patches/$(MACH)
+ISA_PATCH_DIR_64 = $(WS_TOP)/components/stdcxx/isa_patches/$(MACH64)
+ISA_PATCH_DIR = $(ISA_PATCH_DIR_$(BITS))
+
+ISA_PATCHES_$(MACH) = \
+ $(ISA_PATCH_DIR)/1034-sunpro.config.$(MACH).patch \
+ $(ISA_PATCH_DIR)/1035-GNUmakefile.tst.$(MACH).patch \
+ $(ISA_PATCH_DIR)/1036-GNUmakefile.rwt.$(MACH).patch \
+ $(ISA_PATCH_DIR)/1037-GNUmakefile.lib.$(MACH).patch \
+ $(ISA_PATCH_DIR)/1038-GNUmakefile.ph.$(MACH).patch \
+ $(ISA_PATCH_DIR)/1039-GNUmakefile.exm.$(MACH).patch \
+ $(ISA_PATCH_DIR)/1040-GNUmakefile.cfg.$(MACH).patch \
+ $(ISA_PATCH_DIR)/1041-GNUmakefile.bin.$(MACH).patch
+
+ISA_PATCHES_$(MACH64) = \
+ $(ISA_PATCH_DIR)/1034-sunpro.config.$(MACH64).patch \
+ $(ISA_PATCH_DIR)/1035-GNUmakefile.tst.$(MACH64).patch \
+ $(ISA_PATCH_DIR)/1036-GNUmakefile.rwt.$(MACH64).patch \
+ $(ISA_PATCH_DIR)/1037-GNUmakefile.lib.$(MACH64).patch \
+ $(ISA_PATCH_DIR)/1038-GNUmakefile.ph.$(MACH64).patch \
+ $(ISA_PATCH_DIR)/1039-GNUmakefile.exm.$(MACH64).patch \
+ $(ISA_PATCH_DIR)/1040-GNUmakefile.cfg.$(MACH64).patch \
+ $(ISA_PATCH_DIR)/1041-GNUmakefile.bin.$(MACH64).patch
+
+ISA_PATCHES_32 = $(ISA_PATCHES_$(MACH))
+ISA_PATCHES_64 = $(ISA_PATCHES_$(MACH64))
+ISA_PATCHES = $(ISA_PATCHES_$(BITS))
+
+PATCH_LEVEL = 1
+
+TOPDIR = $(COMPONENT_DIR)/$(COMPONENT_SRC)
+LOCAL_BUILDDIR = $(TOPDIR)/build
+MARG = -m$(BITS)
+PICFLAG = -KPIC -DPIC
+
+# Please see the README file in this directory for a detailed explanation
+# about these flags, what they do, and why we need them.
+FLAGS_sparc = -m32 -xarch=sparcvis -xmemalign=8i
+FLAGS_sparcv9 = -m64 -xarch=sparcvis -xmemalign=16i
+FLAGS_i386 = -m32 -xarch=386
+FLAGS_amd64 = -m64 -xarch=generic
+CFLAGS_sparc = -Xc -features=extinl -xvis=yes
+CFLAGS_sparc += -xregs=no%appl -xbuiltin=%none -xO4 $(PICFLAG)
+CFLAGS_i386 = -Xc -features=extinl -xregs=no%frameptr
+CFLAGS_i386 += -xO3 -xbuiltin=%none $(PICFLAG)
+
+CFLAGS_32 = $(FLAGS_$(MACH)) $(CFLAGS_$(MACH))
+CFLAGS_64 = $(FLAGS_$(MACH64)) $(CFLAGS_$(MACH))
+
+CXXFLAGS_sparc = -xvis=yes -xregs=no%appl -xO4
+CXXFLAGS_sparc += -xbuiltin=%none $(PICFLAG)
+CXXFLAGS_i386 = -xregs=no%frameptr -xO3 -xbuiltin=%none $(PICFLAG)
+CFLAGS_GENERIC += -xc99=%all
+CFLAGS_GENERIC += -mt -D_REENTRANT -DNDEBUG
+CFLAGS_GENERIC += -D__EXTENSIONS__ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+CFLAGS_GENERIC += -D_XPG6 -D_XOPEN_SOURCE=600 -D_POSIX_PTHREAD_SEMANTICS
+CFLAGS_GENERIC += -D_POSIX_C_SOURCE=200112L -D__XOPEN_OR_POSIX
+CFLAGS_GENERIC += -D_STRICT_STDC -D_STRICT_STDC__ -D_STDC_C99 -D_ISOC99_SOURCE
+CFLAGS_GENERIC += -D_IN_BUILD_STDCXX
+CFLAGS_GENERIC += $(CFLAGS_$(BITS))
+CFLAGS = $(CFLAGS_GENERIC)
+
+CXXFLAGS_GENERIC = -library=Cstd -library=Crun -norunpath
+CXXFLAGS_GENERIC += -Qoption ccfe ++boolflag:sunwcch=false
+CXXFLAGS_GENERIC += -Qoption ccfe +d2,-xgeninl=system
+CXXFLAGS_GENERIC += -Qoption ccfe -expand=10000
+CXXFLAGS_GENERIC += -features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
+CXXFLAGS_GENERIC += -instances=global
+CXXFLAGS_GENERIC += -template=geninlinefuncs
+CXXFLAGS_GENERIC += -verbose=template
+CXXFLAGS_GENERIC += $(CXXFLAGS_$(MACH))
+CXXFLAGS_GENERIC += -xlang=c99
+CXXFLAGS_GENERIC += -xbuiltin=%none
+CXXFLAGS_GENERIC += -xinline=
+CXXFLAGS_GENERIC += -xlibmieee
+CXXFLAGS_GENERIC += -xustr=ascii_utf16_ushort
+CXXFLAGS_GENERIC += -z ignore $(PICFLAG)
+CXXFLAGS_GENERIC += -mt -D_REENTRANT -DNDEBUG
+CXXFLAGS_GENERIC += -D_IN_BUILD_STDCXX
+CXXFLAGS_GENERIC += -D__EXTENSIONS__
+CXXFLAGS_GENERIC += -D_LARGEFILE_SOURCE
+CXXFLAGS_GENERIC += -D_FILE_OFFSET_BITS=64
+CXXFLAGS_GENERIC += -D_XOPEN_SOURCE=500
+CXXFLAGS_GENERIC += -D_XPG5
+CXXFLAGS_GENERIC += -D_POSIX_PTHREAD_SEMANTICS -s
+CXXFLAGS_GENERIC += +w2 -errtags -erroff=hidef
+
+CXXFLAGS_32 = $(FLAGS_$(MACH))
+CXXFLAGS_64 = $(FLAGS_$(MACH64))
+
+CXXFLAGS = $(CXXFLAGS_$(BITS)) $(CXXFLAGS_$(MACH)) $(CXXFLAGS_GENERIC)
+
+CPPFLAGS = -I$(TOPDIR)/include/ansi
+CPPFLAGS += -I$(TOPDIR)/include/tr1
+CPPFLAGS += -I$(TOPDIR)/include
+
+# -mt will automatically pass -lthread unless we pass -lpthread
+# on link line. -lthread causes regressions. see man CC(1) and -mt.
+# -lumem must be passed before -lc.
+LDFLAGS = -lpthread -lumem -lm -lc -s -z ignore
+
+# We cannot have -B direct
+LD_OPTIONS = -M /usr/lib/ld/map.noexstk -M /usr/lib/ld/map.noexdata
+LD_OPTIONS += -M /usr/lib/ld/map.pagealign
+LD_OPTIONS += -lpthread -lumem -lm -lc -s -z ignore
+
+# If I name it NLSPATH, gmake insists on getting its value from the
+# running environment. Also, it all has to be on one line. += prepends
+# a whitespace.
+BUILD_NLSPATH = :%N.cat:/usr/lib/locale/%L/%N.cat:/usr/share/locale/%L/%N.cat:$(BUILD_DIR_$(BITS))/lib/rwstderr.cat
+
+CONFIGURE_ENV = CC="$(CC)"
+CONFIGURE_ENV += CXX="$(CXX)"
+CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
+CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
+CONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
+CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
+CONFIGURE_ENV += LD_OPTIONS="$(LD_OPTIONS)"
+CONFIGURE_ENV += LD="$(CXX) $(CXXFLAGS) $(LDFLAGS)"
+CONFIGURE_ENV += MAKE="$(MAKE)"
+CONFIGURE_ENV += TOPDIR="$(TOPDIR)"
+CONFIGURE_ENV += MAKEFLAGS=""
+
+CONFIGURE_OPTIONS = $(MARG)
+CONFIGURE_OPTIONS += -topdir=$(TOPDIR)
+CONFIGURE_OPTIONS += -builddir=$(LOCAL_BUILDDIR)
+
+GCP = /usr/gnu/bin/cp
+
+COMPONENT_BUILD_ENV = MAKEFLAGS=""
+COMPONENT_BUILD_ENV += MAKELEVEL=""
+COMPONENT_BUILD_ENV += SHELL="/bin/bash"
+COMPONENT_BUILD_ENV += NLSPATH="$(BUILD_NLSPATH)"
+
+PKG_PROTO_DIRS += $(COMPONENT_DIR)/$(COMPONENT_SRC)-32
+PKG_PROTO_DIRS += $(COMPONENT_DIR)/$(COMPONENT_SRC)-64
+
+COMPONENT_PREP_ACTION = \
+ ( if test -f $(TOPDIR)/.unpacked ; then \
+ cd $(TOPDIR) ; \
+ else $(UNPACK) $(UNPACK_ARGS) $(COMPONENT_ARCHIVE) ; \
+ $(TOUCH) $(TOPDIR)/.unpacked ; \
+ cd $(TOPDIR) ; \
+ fi ; \
+ list='$(ISA_PATCHES)' ; for f in $$list ; do \
+ $(GPATCH) $(GPATCH_FLAGS) <$$f ; \
+ done )
+
+COMPONENT_PRE_CONFIGURE_ACTION = \
+ ( if test -f $(TOPDIR)/.unpacked ; then \
+ cd $(TOPDIR) ; \
+ else $(UNPACK) $(UNPACK_ARGS) $(COMPONENT_ARCHIVE) ; \
+ $(TOUCH) $(TOPDIR)/.unpacked ; \
+ cd $(TOPDIR) ; \
+ list1='$(ISA_PATCHES)' ; for f in $$list1 ; do \
+ $(GPATCH) $(GPATCH_FLAGS) <$$f ; \
+ done ; \
+ list2='$(PATCHES)' ; for f in $$list2 ; do \
+ $(GPATCH) $(GPATCH_FLAGS) <$(COMPONENT_DIR)/$$f ; \
+ done ; \
+ $(TOUCH) $(TOPDIR)/.patched ; \
+ fi ; \
+ $(CP) -Rp $(COMPONENT_DIR)/Solaris . ; \
+ $(CP) -p ./Solaris/configure . ; \
+ $(TOUCH) -acm ./configure ; \
+ $(CHMOD) 0755 ./configure )
+
+COMPONENT_POST_CONFIGURE_ACTION = \
+ ( $(CLONEY) $(TOPDIR) $(@D) ; \
+ find ./$(COMPONENT_SRC) -type f -name "*.~1~" \
+ -exec chmod 0644 {} \; > /dev/null 2>&1 )
+
+COMPONENT_POST_BUILD_ACTION = \
+ ( cd $(BUILD_DIR_$(BITS))/build ; \
+ $(GMAKE) locales ; \
+ cd $(TOPDIR) ; \
+ $(CP) -p $(COMPONENT_DIR)/Solaris/fix_nls_symlinks.sh . ; \
+ $(CHMOD) 0755 fix_nls_symlinks.sh ; \
+ $(SHELL) ./fix_nls_symlinks.sh ; \
+ cd $(COMPONENT_DIR) ; \
+ $(GCP) -rpd $(COMPONENT_SRC) $(COMPONENT_SRC)-$(BITS) ; \
+ $(RM) -rf $(COMPONENT_SRC) )
+
+build: $(BUILD_32) $(BUILD_64)
+
+install: $(BUILD_DIR_32)/.built $(BUILD_DIR_64)/.built
+ $(CP) $(COMPONENT_DIR)/Solaris/install.sh $(COMPONENT_DIR)/
+ $(CHMOD) 0755 $(COMPONENT_DIR)/install.sh
+ $(MKDIR) $(PROTO_DIR)/usr
+ ( $(SHELL) $(COMPONENT_DIR)/install.sh \
+ -prefix=$(PROTO_DIR)/usr \
+ -builddir=$(BUILD_DIR_32) \
+ -componentdir=$(COMPONENT_DIR) \
+ -componentsrc=$(COMPONENT_SRC) \
+ -srcdir=$(TOPDIR)-32 )
+ ( $(SHELL) $(COMPONENT_DIR)/install.sh \
+ -prefix=$(PROTO_DIR)/usr \
+ -builddir=$(BUILD_DIR_64) \
+ -componentdir=$(COMPONENT_DIR) \
+ -componentsrc=$(COMPONENT_SRC) \
+ -srcdir=$(TOPDIR)-64 \
+ -mach64=$(MACH64) )
+ test -d $(TOPDIR) || $(MKDIR) $(TOPDIR)
+
+test:
+ test -d $(BUILD_DIR_32) || echo "$(BUILD_DIR_32) does not exist!"
+ test -d $(BUILD_DIR_64) || echo "$(BUILD_DIR_64) does not exist!"
+ $(CP) -p $(COMPONENT_DIR)/Solaris/prep_build_area.sh \
+ $(COMPONENT_DIR)/
+ $(CHMOD) 0755 $(COMPONENT_DIR)/prep_build_area.sh
+ $(SHELL) $(COMPONENT_DIR)/prep_build_area.sh -m32 \
+ -builddir=$(BUILD_DIR_32) \
+ -srcdir=$(TOPDIR)-32
+ $(SHELL) $(COMPONENT_DIR)/prep_build_area.sh -m64 \
+ -builddir=$(BUILD_DIR_64) \
+ -srcdir=$(TOPDIR)-64
+ ( cd $(BUILD_DIR_32)/build/tests ; \
+ $(CP) -p $(COMPONENT_DIR)/Solaris/run_tests.sh . ; \
+ $(CHMOD) 0755 run_tests.sh ; \
+ $(SHELL) ./run_tests.sh > \
+ $(COMPONENT_DIR)/runtests-$(MACH).out 2>&1 )
+ ( cd $(BUILD_DIR_64)/build/tests ; \
+ $(CP) -p $(COMPONENT_DIR)/Solaris/run_tests.sh . ; \
+ $(CHMOD) 0755 run_tests.sh ; \
+ $(SHELL) ./run_tests.sh > \
+ $(COMPONENT_DIR)/runtests-$(MACH64).out 2>&1 )
+
+clean::
+ $(RM) -r $(COMPONENT_SRC) $(COMPONENT_SRC)-32 $(COMPONENT_SRC)-64
+ $(RM) -f *.sed *.out
+
+BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
+
+include ../../make-rules/depend.mk
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/README Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,135 @@
+Explanation of some unusual compiler flags used when building the
+Apache Standard C++ Library:
+
+1. CFLAGS
+
+All the -D_STRICT_STDC -D_STRICT_STDC__ -D_STDC_C99 -D_ISOC99_SOURCE:
+
+Since we are building a Standard conforming library, compliance with
+Strict Standard C is assumed and expected.
+
+However, the Apache Standard C++ Library provides some extensions to
+the C++ Standard, by allowing some C99 functions. Visibility of C99
+is enabled by passing -D_XPG6 -D_XOPEN_SOURCE=600 in CFLAGS. However,
+Standard C++ disallows _XPG6 and _XOPEN_SOURCE=600, and only allows
+_XPG5 and _XOPEN_SOURCE=500, so for CXXFLAGS we raise _XPG5 and
+_XOPEN_SOURCE=500.
+
+2. CXXFLAGS
+
+-library=no%Cstd :
+
+do *NOT*, under any circumstances, use the Solaris libCstd.so.1.
+
+-library=Crun :
+
+Use the Solaris libCrun.so.1. This library is very important: it provides
+the symbols for the Standard C++ exception classes, and it also provides
+the Solaris C++ run-time support.
+
+-Qoption ccfe ++boolflag:sunwcch=false :
+
+do *NOT*, under any circumstances, use the default Studio 12 header
+files for the libCstd.so.1 Solaris C++ Library. This flag is very
+important. We must build the Apache C++ Library using its own header
+files, and we must ignore any other C++ header files.
+
+-Qoption ccfe +d2,-xgeninl=system :
+
+The +d2,-xgeninl=system options causes functions that are generated
+inline also to be generated also as closed functions in the object file.
+By default, a function that is always inlined is not actually generated
+unless its address is needed.
+
+-Qoption ccfe -expand=10000 :
+
+The C++ front end decides whether to inline a function in part depending
+on a complexity measure. The -expand=N option, where N is a decimal number,
+sets the complexity limit. Functions of greater complexity are not inlined
+by the front end. The default limit is in the range 100-500 depending on
+the optimization level. Setting the limit to 10,000 effectively allows
+inlining of all but the largest functions.
+
+We use these options when building our system libraries for two reasons:
+
+2.1. We want to allow maximum inlining of functions to improve runtime
+performance. The size of a library (especially a shared library) is not
+usually important, so we trade size for speed.
+
+2.2. A library function defined as inline in a standard header will be
+inlined in user code, unless inlining is disabled or the function address
+is taken. If library functions get defined in user code, the program can
+wind up with circular dependencies among the various program parts.
+
+Explanation:
+
+Suppose library function F is defined as inline, but the library uses the
+address of F. Function F will be generated as a closed function in the
+library. If user code also needs the address of F, it will be generated in
+user code. The linker picks the first definition of F it sees, which will
+be in user code in this case, and discards any others. The library then
+calls F in user code instead of the one inside the library. If F is used
+as part of initializing the library, then the library has an initialization
+dependency on the main program. The main program always has an
+initialization dependency on the library. You can wind up with strange
+program failures, since you cannot satisfy the circular dependency.
+
+To prevent this possibility, we generate F unconditionally as a closed
+function in the library. When a user function needs the address of F,
+the compiler first checks to see whether F is defined in the library.
+If so, it just generates a reference to F instead of generating a definition
+of F. There is then only one copy of F in the entire program, and it is in
+the library.
+
+-features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic :
+
+We want to enable specific and Standard-mandated C++ Compiler features,
+and we want to be explicit about them, just in case the default C++
+Compiler default features change in the future. This way, we are guaranteed
+that the Library builds in a consistent way, independent of any future
+updates to the C++ Compiler.
+
+-template=geninlinefuncs :
+
+Instantiate inline member functions for the explicitly instantiated
+class template which were not generated previously.
+
+-verbose=template :
+
+Be verbose about template instantiations. This is useful for tracking
+what the compiler is doing when instantiating templates, and for debugging,
+in case we end up with undefined class template symbols.
+
+-xlang=c99 :
+
+Assume non-standard compatibility with C99. Allows C programming language
+behavior for objects which were compiled either with the c99 driver, or
+with the cc -xc99=%all driver, and are being linked with the Library.
+
+-xbuiltin=%none :
+
+No builtins whatsoever.
+
+-xinline= :
+
+(nothing after the '=').
+
+We've already told the compiler frontend (with the -Qoption ccfe flags)
+how to inline, and what the inlining limits are. Therefore, do not make any
+other heuristic decisions about inlining (i.e. assume nothing is inlined).
+
+-xlibmieee :
+
+Cause strict conformance to the IEEE 754 Standard for math routines in
+exceptional cases. The C++ Standard implicitly mandates IEEE 754
+(cf. see libstdcxx4.3lib man page).
+
+3. LDFLAGS
+
+-lumem :
+
+The PAE Group and myself have tested the performance of the Apache Standard
+C++ Library, and determined that linking with libumem provides the best
+malloc(3C) performance. libmtmalloc.so.1 was spending a lot of time chasing
+pointers.
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/atomic-cxx.d Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,11 @@
+# 1 "$(TOPDIR)/src/atomic-cxx.S"
+# 1 "$(TOPDIR)/src/atomic.s" 1
+# 25 "$(TOPDIR)/src/atomic.s"
+# 27 "$(TOPDIR)/src/atomic.s"
+# 33 "$(TOPDIR)/src/atomic.s"
+# 35 "$(TOPDIR)/src/atomic.s"
+# 41 "$(TOPDIR)/src/atomic.s"
+# 46 "$(TOPDIR)/src/atomic.s"
+# 1 "$(TOPDIR)/src/sparc/atomic.s" 1
+# 48 "$(TOPDIR)/src/atomic.s" 2
+# 23 "$(TOPDIR)/src/atomic-cxx.S" 2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/configure Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,361 @@
+#!/bin/bash
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+#
+unset MAKEFLAGS
+unset MAKELEVEL
+
+export BUILDTYPE=""
+export BUILDMODE=""
+export CONFIG="sunpro.config"
+export TOPLEVELDIR=""
+export BUILDDIR=""
+export LDSOFLAGS="${LDFLAGS}"
+export CXXOPTS="${CXXFLAGS}"
+export LDOPTS="${LDFLAGS}"
+export LD="${CXX} ${CXXFLAGS} ${LDFLAGS}"
+
+UNKNOWN_ARG=yes
+PRINT_HELP=no
+
+check_args() {
+ while [ "$#" -gt 0 ] ; do
+ UNKNOWN_ARG=no
+ case "$1" in
+ -m32)
+ BUILDTYPE="8d"
+ BUILDMODE="shared,pthreads"
+ ;;
+ -m64)
+ BUILDTYPE="8D"
+ BUILDMODE="shared,pthreads"
+ ;;
+ -topdir=*)
+ TOPLEVELDIR=`echo $1 | sed "s,^-topdir=\(.*\),\1,"`
+ ;;
+ -builddir=*)
+ BUILDDIR=`echo $1 | sed "s,^-builddir=\(.*\),\1,"`
+ ;;
+ *)
+ UNKNOWN_ARG=yes
+ ;;
+ esac
+
+ if [ "$UNKNOWN_ARG" = "yes" ] ; then
+ echo "$1: Invalid argument"
+ PRINT_HELP=yes
+ shift
+ continue
+ fi
+ shift
+ done
+
+ export BUILDTYPE BUILDMODE TOPLEVELDIR
+ export BUILDDIR="${TOPLEVELDIR}/build"
+ export LD_LIBRARY_PATH="${BUILDDIR}/lib:${LD_LIBRARY_PATH}"
+
+ echo "BUILDTYPE: ${BUILDTYPE}"
+ echo "TOPLEVELDIR: ${TOPLEVELDIR}"
+ echo "BUILDDIR: ${BUILDDIR}"
+
+ cd ${TOPLEVELDIR}
+ if [ -f config.done ] ; then
+ rm -f config.done
+ fi
+
+ if [ "x${BUILDTYPE}" = "x" ] || [ "x${TOPLEVELDIR}" = "x" ] ; then
+ PRINT_HELP=yes
+ fi
+
+ if [ "$PRINT_HELP" = "yes" ] || [ "$UNKNOWN_ARG" = "yes" ] ; then
+ echo "Usage: `basename $0` [ -m32 | -m64 ] --topdir=[ \$(top_srcdir) ]"
+ exit 1
+ fi
+}
+
+check_directories() {
+ if [ ! -d Solaris ] ; then
+ echo "Expected directory Solaris not found."
+ echo "Make sure this directory exists in the stdcxx toplevel."
+ echo ""
+ exit 1
+ fi
+}
+
+check_buildtype() {
+ if [ "x${BUILDTYPE}" = "x" ] ; then
+ echo "\$BUILDTYPE [ 8d | 8D ] is not set."
+ echo ""
+ exit 1
+ fi
+ echo "BUILDTYPE: ${BUILDTYPE}."
+ echo "BUILDMODE: ${BUILDMODE}."
+}
+
+check_compiler_flags() {
+ if [ "x${CC}" = "x" ] ; then
+ echo "\$CC is not set."
+ echo ""
+ exit 1
+ fi
+ echo "CC: ${CC}."
+ export CC=`echo ${CC}`
+
+ if [ "x${CXX}" = "x" ] ; then
+ echo "\$CXX is not set."
+ echo ""
+ exit 1
+ fi
+ echo "CXX: ${CXX}."
+ export CXX=`echo ${CXX}`
+
+ if [ "x${CFLAGS}" = "x" ] ; then
+ echo "\$CFLAGS is not set."
+ echo ""
+ exit 1
+ fi
+ echo "CFLAGS: ${CFLAGS}."
+
+ if [ "x${CPPFLAGS}" = "x" ] ; then
+ echo "\$CPPFLAGS is not set."
+ echo ""
+ exit 1
+ fi
+ echo "CPPFLAGS: ${CPPFLAGS}."
+
+ if [ "x${CXXFLAGS}" = "x" ] ; then
+ echo "\$CXXFLAGS is not set. Make sure you have set -library=no%Cstd."
+ echo ""
+ exit 1
+ fi
+ echo "CXXFLAGS: ${CXXFLAGS}."
+
+ if [ "x${LDFLAGS}" = "x" ] ; then
+ echo "\$LDFLAGS is not set."
+ echo ""
+ exit 1
+ fi
+ echo "LDFLAGS: ${LDFLAGS}."
+}
+
+check_gnu_make() {
+ if [ "x${MAKE}" = "x" ] ; then
+ echo "\$MAKE is not set. Please use GNU make to build stdcxx."
+ echo ""
+ exit 1
+ fi
+ gnumake=`${MAKE} --version | grep -- "GNU"`
+ if [ "x${gnumake}" = "x" ] ; then
+ echo "\$MAKE is not GNU make. stdcxx requires GNU make."
+ exit 1
+ fi
+ echo "MAKE: ${MAKE}."
+}
+
+fix_ansi_dir() {
+ cd ${TOPLEVELDIR}
+
+ for file in \
+ wctype.h \
+ wchar.h \
+ time.h \
+ string.h \
+ stdlib.h \
+ stdio.h \
+ stddef.h \
+ stdarg.h \
+ signal.h \
+ setjmp.h \
+ math.h \
+ locale.h \
+ limits.h \
+ float.h \
+ errno.h \
+ ctype.h \
+ assert.h \
+ _cwctype.h \
+ _cwchar.h \
+ _ctime.h \
+ _cstring.h \
+ _cstdlib.h \
+ _cstdio.h \
+ _cstddef.h \
+ _cstdarg.h \
+ _csignal.h \
+ _csetjmp.h \
+ _cmath.h \
+ _clocale.h \
+ _cfloat.h \
+ _cerrno.h \
+ _cctype.h \
+ _cassert.h
+do
+ if [ -f ./include/ansi/$file ] ; then
+ rm -f ./include/ansi/$file
+ fi
+done
+
+for file in \
+ stdint.h
+do
+ if [ -f ./include/tr1/$file ] ; then
+ rm -f ./include/tr1/$file
+ fi
+done
+
+for file in \
+ cstdint
+do
+ if [ -f ./include/tr1/${file} ] ; then
+ cp -fp ./include/tr1/${file} ./include/ansi/
+ fi
+done
+}
+
+make_config() {
+ echo "Configuring ..." `pwd`
+ rm -rf ${BUILDDIR}
+ echo
+ echo "MAKEFLAGS: ${MAKEFLAGS}"
+ echo "MAKELEVEL: ${MAKELEVEL}"
+ unset MAKEFLAGS
+ unset MAKELEVEL
+ export LIBDIR="${TOPLEVELDIR}/lib"
+ rm -rf ${LIBDIR}
+ mkdir -p ${LIBDIR}
+
+ for file in \
+ "collapse_static_locals.lib" \
+ "collapse_template_statics.lib" \
+ "collapse_template_locals.lib" \
+ "extern_inline.lib" \
+ "lib_exceptions.lib"
+ do
+ echo "${CXX} ${CPPFLAGS} ${CXXFLAGS} -c ${TOPLEVELDIR}/etc/config/src/${file}.cpp -o ${LIBDIR}/${file}.o"
+ ${CXX} ${CPPFLAGS} ${CXXFLAGS} -c ${TOPLEVELDIR}/etc/config/src/${file}.cpp -o ${LIBDIR}/${file}.o
+ echo "${CXX} ${CXXFLAGS} ${LDFLAGS} -G -hlib${file}.so ${LIBDIR}/${file}.o -o ${LIBDIR}/lib${file}.so"
+ ${CXX} ${CXXFLAGS} ${LDFLAGS} -G -h${file}.so ${LIBDIR}/${file}.o -o ${LIBDIR}/lib${file}.so
+ done
+
+ unset LIBDIR
+ export LD_OPTIONS="-L${TOPLEVELDIR}/lib -R${TOPLEVELDIR}/lib"
+ export LD_OPTIONS="${LD_OPTIONS} -L${BUILDDIR}/include -R${BUILDDIR}/include"
+
+ echo $MAKE SHELL=/bin/bash CC=${CC} CXX=${CXX} LD_OPTIONS="${LD_OPTIONS}" LDFLAGS="${LDFLAGS} ${LD_OPTIONS}" TOPDIR=${TOPLEVELDIR} BUILDTYPE=${BUILDTYPE} BUILDMODE=${BUILDMODE} CONFIG=${CONFIG} config
+ ${MAKE} SHELL=/bin/bash CC="${CC}" CXX="${CXX}" LD_OPTIONS="${LD_OPTIONS}" LDFLAGS="${LDFLAGS} ${LD_OPTIONS}" TOPDIR="${TOPLEVELDIR}" BUILDTYPE="${BUILDTYPE}" BUILDMODE="${BUILDMODE}" CONFIG="${CONFIG}" config
+ unset LD_OPTIONS
+ echo "Configuration finished."
+}
+
+post_config() {
+ echo "Performing post-configuration updates ... "
+ if [ ! -f ../Solaris/atomic-cxx.d ] ; then
+ echo "atomic-cxx.d not found!"
+ echo "Post-configuration FAILED!!!"
+ exit 1
+ fi
+ mkdir -p build/lib/.depend
+ cp -fp ../Solaris/atomic-cxx.d build/lib/.depend/
+ touch -acm build/lib/.depend/atomic-cxx.d
+ cd ${BUILDDIR}/include
+ if [ -f config.h ] ; then
+ mv config.h config.h.orig
+ touch config.h
+ unamep=`uname -p`
+ is64bit=`echo ${CXXFLAGS} | grep -- "-m64"`
+ export HEADER_GUARD="__STDCXX"
+ export HEADER_FILE="stdcxx"
+ if [ "x${unamep}" = "xsparc" ] ; then
+ if [ "x${is64bit}" = "x" ] ; then
+ export HEADER_GUARD="${HEADER_GUARD}_SPARC_H"
+ export HEADER_FILE="${HEADER_FILE}_sparc.h"
+ else
+ export HEADER_GUARD="${HEADER_GUARD}_SPARCV9_H"
+ export HEADER_FILE="${HEADER_FILE}_sparcv9.h"
+ fi
+ else
+ if [ "x${is64bit}" = "x" ] ; then
+ export HEADER_GUARD="${HEADER_GUARD}_I386_H"
+ export HEADER_FILE="${HEADER_FILE}_i386.h"
+ else
+ export HEADER_GUARD="${HEADER_GUARD}_AMD64_H"
+ export HEADER_FILE="${HEADER_FILE}_amd64.h"
+ fi
+ fi
+
+ echo "#ifndef ${HEADER_GUARD}" >> config.h
+ echo "#define ${HEADER_GUARD}" >> config.h
+ echo "" >> config.h
+ echo "#include <sys/types.h>" >> config.h
+ echo "#include <inttypes.h>" >> config.h
+ echo "#include <limits.h>" >> config.h
+ echo "" >> config.h
+ echo "#ifndef _RWSTD_REENTRANT" >> config.h
+ echo "#define _RWSTD_REENTRANT" >> config.h
+ echo "#endif" >> config.h
+ echo "" >> config.h
+ cat config.h.orig >> config.h
+ echo "" >> config.h
+ echo "#endif /* ${HEADER_GUARD} */" >> config.h
+ echo "" >> config.h
+
+ mv config.h "${HEADER_FILE}"
+ if [ -f "${TOPLEVELDIR}/../Solaris/rwconfig_std.h" ] ; then
+ cp -fp "${TOPLEVELDIR}/../Solaris/rwconfig_std.h" .
+ chmod 0644 rwconfig_std.h
+ touch -acm rwconfig_std.h
+ ln -sf rwconfig_std.h config.h
+ cd ${TOPLEVELDIR}
+ echo "Removing configuration phase core files [expected]."
+ find . -type f -name "core" -exec rm -f {} \; -print
+ echo "Post-configuration succeeded."
+ else
+ echo "Standard configuration file ${TOPLEVELDIR}/../Solaris/rwconfig_std.h not found!"
+ echo "Post-configuration FAILED!!!"
+ exit 1
+ fi
+ else
+ echo "Initial configuration file 'config.h' has not been created."
+ echo "Post-configuration FAILED!!!"
+ exit 1
+ fi
+}
+
+finish() {
+ echo "stdcxx has been configured. You can now type '$MAKE' to build."
+ echo ""
+ cd ${TOPLEVELDIR}
+ touch config.done
+ exit 0
+}
+
+check_args $@
+check_directories
+check_buildtype
+check_compiler_flags
+check_gnu_make
+fix_ansi_dir
+make_config
+post_config
+finish
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/fix_nls_symlinks.sh Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,231 @@
+#!/bin/bash
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)fix_nls_symlinks.sh 1.1 09/08/07 SMI"
+#
+
+if [ ! -f ../Solaris/readlink.sh ] ; then
+ echo "readlink.sh script not found!"
+ exit 1
+fi
+
+if [ -d build/nls ] ; then
+ cp -fp ../Solaris/readlink.sh build/nls/
+ cd build/nls
+
+ if [ ! -f readlink.sh ] ; then
+ echo "readlink.sh script not found in the nls directory!"
+ exit 1
+ fi
+
+ chmod 0755 readlink.sh
+
+ for file in \
+ "af_ZA.ISO-8859-1" \
+ "ar_AE.ISO-8859-6" \
+ "ar_BH.ISO-8859-6" \
+ "ar_DZ.ISO-8859-6" \
+ "ar_EG.ISO-8859-6" \
+ "ar_IN.UTF-8" \
+ "ar_IQ.ISO-8859-6" \
+ "ar_JO.ISO-8859-6" \
+ "ar_KW.ISO-8859-6" \
+ "ar_LB.ISO-8859-6" \
+ "ar_LY.ISO-8859-6" \
+ "ar_MA.ISO-8859-6" \
+ "ar_OM.ISO-8859-6" \
+ "ar_QA.ISO-8859-6" \
+ "ar_SA.ISO-8859-6" \
+ "ar_SD.ISO-8859-6" \
+ "ar_SY.ISO-8859-6" \
+ "ar_TN.ISO-8859-6" \
+ "ar_YE.ISO-8859-6" \
+ "be_BY.CP1251" \
+ "bg_BG.CP1251" \
+ "br_FR.ISO-8859-1" \
+ "bs_BA.ISO-8859-2" \
+ "ca_ES.ISO-8859-1" \
+ "ca_ES.ISO-8859-15@euro" \
+ "cs_CZ.ISO-8859-2" \
+ "cy_GB.ISO-8859-14" \
+ "da_DK.ISO-8859-1" \
+ "de_AT.ISO-8859-1" \
+ "de_AT.ISO-8859-15@euro" \
+ "de_BE.ISO-8859-1" \
+ "de_BE.ISO-8859-15@euro" \
+ "de_CH.ISO-8859-1" \
+ "de_DE.ISO-8859-1" \
+ "de_DE.UTF-8" \
+ "de_DE.ISO-8859-15@euro" \
+ "de_LU.ISO-8859-1" \
+ "de_LU.ISO-8859-15@euro" \
+ "el_GR.ISO-8859-7" \
+ "en_AU.ISO-8859-1" \
+ "en_BW.ISO-8859-1" \
+ "en_CA.ISO-8859-1" \
+ "en_DK.ISO-8859-1" \
+ "en_GB.ISO-8859-1" \
+ "en_HK.ISO-8859-1" \
+ "en_IE.ISO-8859-1" \
+ "en_IE.ISO-8859-15@euro" \
+ "en_IN.UTF-8" \
+ "en_NZ.ISO-8859-1" \
+ "en_PH.ISO-8859-1" \
+ "en_SG.ISO-8859-1" \
+ "en_US.ISO-8859-1" \
+ "en_US.ANSI_X3.4-1968" \
+ "en_US.UTF-8" \
+ "en_ZA.ISO-8859-1" \
+ "en_ZW.ISO-8859-1" \
+ "es_AR.ISO-8859-1" \
+ "es_BO.ISO-8859-1" \
+ "es_CL.ISO-8859-1" \
+ "es_CO.ISO-8859-1" \
+ "es_CR.ISO-8859-1" \
+ "es_DO.ISO-8859-1" \
+ "es_EC.ISO-8859-1" \
+ "es_ES.ISO-8859-1" \
+ "es_ES.ISO-8859-15@euro" \
+ "es_GT.ISO-8859-1" \
+ "es_HN.ISO-8859-1" \
+ "es_MX.ISO-8859-1" \
+ "es_NI.ISO-8859-1" \
+ "es_PA.ISO-8859-1" \
+ "es_PE.ISO-8859-1" \
+ "es_PR.ISO-8859-1" \
+ "es_PY.ISO-8859-1" \
+ "es_SV.ISO-8859-1" \
+ "es_US.ISO-8859-1" \
+ "es_UY.ISO-8859-1" \
+ "es_VE.ISO-8859-1" \
+ "et_EE.ISO-8859-1" \
+ "eu_ES.ISO-8859-1" \
+ "eu_ES.ISO-8859-15@euro" \
+ "fa_IR.UTF-8" \
+ "fi_FI.ISO-8859-1" \
+ "fi_FI.ISO-8859-15@euro" \
+ "fo_FO.ISO-8859-1" \
+ "fr_BE.ISO-8859-1" \
+ "fr_BE.ISO-8859-15@euro" \
+ "fr_CA.ISO-8859-1" \
+ "fr_CH.ISO-8859-1" \
+ "fr_FR.ISO-8859-1" \
+ "fr_FR.UTF-8" \
+ "fr_FR.ISO-8859-15@euro" \
+ "fr_LU.ISO-8859-1" \
+ "fr_LU.ISO-8859-15@euro" \
+ "ga_IE.ISO-8859-1" \
+ "ga_IE.ISO-8859-15@euro" \
+ "gl_ES.ISO-8859-1" \
+ "gl_ES.ISO-8859-15@euro" \
+ "gv_GB.ISO-8859-1" \
+ "he_IL.ISO-8859-8" \
+ "hi_IN.UTF-8" \
+ "hr_HR.ISO-8859-2" \
+ "hu_HU.ISO-8859-2" \
+ "id_ID.ISO-8859-1" \
+ "is_IS.ISO-8859-1" \
+ "it_CH.ISO-8859-1" \
+ "it_IT.ISO-8859-1" \
+ "it_IT.ISO-8859-15@euro" \
+ "iw_IL.ISO-8859-8" \
+ "ja_JP.EUC-JP" \
+ "ja_JP.UTF-8" \
+ "ja_JP.Shift_JIS" \
+ "ka_GE.GEORGIAN-PS" \
+ "kl_GL.ISO-8859-1" \
+ "ko_KR.EUC-KR" \
+ "ko_KR.UTF-8" \
+ "kw_GB.ISO-8859-1" \
+ "lt_LT.ISO-8859-13" \
+ "lv_LV.ISO-8859-13" \
+ "mi_NZ.ISO-8859-13" \
+ "mk_MK.ISO-8859-5" \
+ "mr_IN.UTF-8" \
+ "ms_MY.ISO-8859-1" \
+ "mt_MT.ISO-8859-3" \
+ "nl_BE.ISO-8859-1" \
+ "nl_BE.ISO-8859-15@euro" \
+ "nl_NL.ISO-8859-1" \
+ "nl_NL.ISO-8859-15@euro" \
+ "nn_NO.ISO-8859-1" \
+ "no_NO.ISO-8859-1" \
+ "oc_FR.ISO-8859-1" \
+ "pl_PL.ISO-8859-2" \
+ "pt_BR.ISO-8859-1" \
+ "pt_PT.ISO-8859-1" \
+ "pt_PT.ISO-8859-15@euro" \
+ "ro_RO.ISO-8859-2" \
+ "ru_RU.ISO-8859-5" \
+ "ru_RU.KOI8-R" \
+ "ru_RU.UTF-8" \
+ "ru_UA.KOI8-U" \
+ "sk_SK.ISO-8859-2" \
+ "sl_SI.ISO-8859-2" \
+ "sq_AL.ISO-8859-1" \
+ "sr_YU.ISO-8859-2" \
+ "sr_YU.ISO-8859-5@cyrillic" \
+ "sv_FI.ISO-8859-1" \
+ "sv_FI.ISO-8859-15@euro" \
+ "sv_SE.ISO-8859-1" \
+ "ta_IN.UTF-8" \
+ "te_IN.UTF-8" \
+ "tg_TJ.KOI8-T" \
+ "th_TH.TIS-620" \
+ "tl_PH.ISO-8859-1" \
+ "tr_TR.ISO-8859-9" \
+ "uk_UA.KOI8-U" \
+ "ur_PK.UTF-8" \
+ "uz_UZ.ISO-8859-1" \
+ "vi_VN.UTF-8" \
+ "yi_US.CP1255" \
+ "zh_CN.GB2312" \
+ "zh_CN.GB18030" \
+ "zh_CN.GBK" \
+ "zh_CN.UTF-8" \
+ "zh_HK.BIG5-HKSCS" \
+ "zh_TW.BIG5" \
+ "zh_TW.EUC-TW"
+ do
+ cd ${file}
+ if [ -L "LC_CTYPE" ] ; then
+ echo "Fixing symlink for ${file}."
+ filename=`../readlink.sh "LC_CTYPE"`
+ linkname=`basename ${filename}`
+ if [ -f "../${linkname}" ] ; then
+ rm LC_CTYPE
+ ln -sf "../${linkname}" "LC_CTYPE"
+ fi
+ fi
+ cd - > /dev/null 2>&1
+ done
+else
+ echo "\$(topdir)/build/nls directory was not found!"
+ echo "This scriptmust be run from the toplevel build directory."
+ exit 1
+fi
+
+exit 0
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/install.sh Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,480 @@
+#!/bin/bash
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+#
+
+export PREFIX=""
+export SRCDIR=""
+export MACH64=""
+export BUILDDIR=""
+export COMPONENTDIR=""
+export COMPONENTSRC=""
+export LIBDIR=""
+export INCDIR=""
+export DOCDIR=""
+export MAN3LIBDIR=""
+export IS_64_BIT="no"
+export unamep=`uname -p`
+export SED="/usr/gnu/bin/sed"
+export CP="/usr/gnu/bin/cp"
+
+UNKNOWN_ARG=yes
+PRINT_HELP=no
+
+while [ "$#" -gt 0 ] ; do
+ UNKNOWN_ARG=no
+ case "$1" in
+ -prefix=*)
+ export PREFIX=`echo $1 | ${SED} "s,^-prefix=\(.*\),\1,"`
+ ;;
+ -builddir=*)
+ export BUILDDIR=`echo $1 | ${SED} "s,^-builddir=\(.*\),\1,"`
+ ;;
+ -componentdir=*)
+ export COMPONENTDIR=`echo $1 | ${SED} "s,^-componentdir=\(.*\),\1,"`
+ ;;
+ -componentsrc=*)
+ export COMPONENTSRC=`echo $1 | ${SED} "s,^-componentsrc=\(.*\),\1,"`
+ ;;
+ -srcdir=*)
+ export SRCDIR=`echo $1 | ${SED} "s,^-srcdir=\(.*\),\1,"`
+ ;;
+ -mach64=*)
+ export MACH64=`echo $1 | ${SED} "s,^-mach64=\(.*\),\1,"`
+ export IS_64_BIT="yes"
+ ;;
+ *)
+ UNKNOWN_ARG=yes
+ ;;
+ esac
+
+ if [ "$UNKNOWN_ARG" = "yes" ] ; then
+ echo "$1: Invalid argument"
+ PRINT_HELP=yes
+ shift
+ continue
+ fi
+ shift
+done
+
+if [ "x${PREFIX}" = "x" ] || [ "x${SRCDIR}" = "x" ] || [ "x${BUILDDIR}" = "x" ] || [ "x${COMPONENTDIR}" = "x" ] ; then
+ PRINT_HELP=yes
+fi
+
+if [ "$PRINT_HELP" = "yes" ] || [ "$UNKNOWN_ARG" = "yes" ] ; then
+ echo "Usage: `basename $0` -prefix=[ installation prefix ]"
+ echo " -builddir=[ \$(blddir) ]"
+ echo " -componentdir=[ toplevel component directory ]"
+ echo " -topdir=[ \$(top_blddir) ]"
+ echo " -srcdir=[ \$(top_srcdir) ]"
+ echo " [ -mach64=[ 64-bit ISA suffix ] ]"
+ echo ""
+ exit 1
+fi
+
+if [ "x${MACH64}" = "x" ] ; then
+ export LIBDIR="${PREFIX}/lib"
+else
+ export LIBDIR="${PREFIX}/lib/${MACH64}"
+fi
+
+export INCDIR="${PREFIX}/include"
+export NLSDIR="${PREFIX}/share/stdcxx4/locale"
+export DOCDIR="${PREFIX}/share/doc/stdcxx4/html"
+export MAN3LIBDIR="${PREFIX}/share/man/man3lib"
+export PKGCONFIGDIR="${LIBDIR}/pkgconfig"
+
+mkdir -p ${INCDIR} ${LIBDIR} ${NLSDIR} ${DOCDIR} ${MAN3LIBDIR} ${PKGCONFIGDIR}
+
+if [ -f ${BUILDDIR}/.installed ] ; then
+ rm -f ${BUILDDIR}/.installed
+fi
+
+cd ${BUILDDIR}/build/lib
+${CP} -fp libstdcxx4.so.4.2.1 ${LIBDIR}/
+cd ${LIBDIR}
+elfedit -e 'dyn:delete RUNPATH' libstdcxx4.so.4.2.1
+elfedit -e 'dyn:delete RPATH' libstdcxx4.so.4.2.1
+chmod 0755 libstdcxx4.so.4.2.1
+
+if [ -L libstdcxx4.so.4 ] ; then
+ rm libstdcxx4.so.4
+fi
+
+if [ -L libstdcxx4.so ] ; then
+ rm libstdcxx4.so
+fi
+
+ln -sf libstdcxx4.so.4.2.1 libstdcxx4.so.4
+ln -sf libstdcxx4.so.4.2.1 libstdcxx4.so
+
+cd ${COMPONENTDIR}
+
+export TOPINCLUDE="${SRCDIR}/build/include"
+export HEADER_FILE="stdcxx"
+
+if [ "x${unamep}" = "xsparc" ] ; then
+ if [ "x${IS_64_BIT}" = "xno" ] ; then
+ export HEADER_FILE="${HEADER_FILE}_sparc.h"
+ else
+ export HEADER_FILE="${HEADER_FILE}_sparcv9.h"
+ fi
+else
+ if [ "x${IS_64_BIT}" = "xno" ] ; then
+ export HEADER_FILE="${HEADER_FILE}_i386.h"
+ else
+ export HEADER_FILE="${HEADER_FILE}_amd64.h"
+ fi
+fi
+
+if [ ! -f ${TOPINCLUDE}/${HEADER_FILE} ] ; then
+ echo "Platform-specific configuration file ${TOPINCLUDE}/${HEADER_FILE} missing or not found!"
+ echo "This installation of libstdcxx is incomplete and broken!"
+ exit 1
+else
+ echo "Installing platform-specific configuration file ${TOPINCLUDE}/${HEADER_FILE}."
+
+ if [ -f "${COMPONENTDIR}/${HEADER_FILE}.sed" ] ; then
+ rm -f "${COMPONENTDIR}/${HEADER_FILE}.sed"
+ fi
+
+ ${SED} -e "s#${COMPONENTDIR}/${COMPONENTSRC}/include#/usr/include/stdcxx4#g" ${TOPINCLUDE}/${HEADER_FILE} > "${COMPONENTDIR}/${HEADER_FILE}.sed"
+
+ if [ ! -d ${INCDIR}/stdcxx4/rw/config ] ; then
+ mkdir -p ${INCDIR}/stdcxx4/rw/config
+ fi
+
+ ${CP} -fp "${COMPONENTDIR}/${HEADER_FILE}.sed" \
+ ${INCDIR}/stdcxx4/rw/config/${HEADER_FILE}
+ if [ -f ${INCDIR}/stdcxx4/rw/config/rwconfig_std.h ] ; then
+ rm -f ${INCDIR}/stdcxx4/rw/config/rwconfig_std.h
+ fi
+ ${CP} -fp ${COMPONENTDIR}/Solaris/rwconfig_std.h ${INCDIR}/stdcxx4/rw/config/
+fi
+
+
+if [ -f rwconfig_std.h.sed ] ; then
+ rm -f rwconfig_std.h.sed
+fi
+
+if [ "x${MACH64}" = "x" ] ; then
+ cd ${SRCDIR}
+ if [ -f include/tr1/cstdint ] ; then
+ ${CP} -fp include/tr1/cstdint include/ansi/
+ fi
+
+ ${CP} -Rdf include/* ${INCDIR}/stdcxx4/
+ ${CP} -fp ${COMPONENTDIR}/Solaris/libstdcxx4.pc ${PKGCONFIGDIR}/
+
+ cd ${INCDIR}/stdcxx4/
+ find . -type f -exec chmod 0644 {} \; > /dev/null 2>&1
+ find . -type f -name "*.~1~" -exec rm -f {} \; > /dev/null 2>&1
+ find . -type f -name "*.~2~" -exec rm -f {} \; > /dev/null 2>&1
+ find . -type f -name "*.~3~" -exec rm -f {} \; > /dev/null 2>&1
+
+ cd ${SRCDIR}/doc
+
+ for file in \
+ "banner.gif" \
+ "index.html" \
+ "rw.css" \
+ "rwbanner.css" \
+ "stdlibref" \
+ "stdlibug"
+ do
+ if [ -f ${file} ] ; then
+ ${CP} -fp ${file} ${DOCDIR}/${file}
+ chmod 0644 ${DOCDIR}/${file}
+ fi
+
+ # Copy directories recursively, preserving symbolic links.
+ if [ -d ${file} ] ; then
+ ${CP} -rfP ${file} ${DOCDIR}/
+ chmod 0755 ${DOCDIR}/${file}
+ fi
+ done
+
+ cd ${DOCDIR}
+
+ find . -type f -name "*.html" -exec chmod 0644 {} \; > /dev/null 2>&1
+ find . -type f -name "*.gif" -exec chmod 0644 {} \; > /dev/null 2>&1
+ find . -type f -name "*.css" -exec chmod 0644 {} \; > /dev/null 2>&1
+
+ cd ${COMPONENTDIR}
+fi
+
+if [ "x${MACH64}" != "x" ] ; then
+
+ cd ${SRCDIR}/build/nls
+
+ for file in \
+ "ANSI_X3.4-1968" \
+ "BIG5" \
+ "BIG5-HKSCS" \
+ "CP1251" \
+ "CP1255" \
+ "EUC-JP" \
+ "EUC-KR" \
+ "EUC-TW" \
+ "GB18030" \
+ "GB2312" \
+ "GBK" \
+ "GEORGIAN-PS" \
+ "ISO-8859-1" \
+ "ISO-8859-13" \
+ "ISO-8859-14" \
+ "ISO-8859-15" \
+ "ISO-8859-2" \
+ "ISO-8859-3" \
+ "ISO-8859-5" \
+ "ISO-8859-6" \
+ "ISO-8859-7" \
+ "ISO-8859-8" \
+ "ISO-8859-9" \
+ "KOI8-R" \
+ "KOI8-T" \
+ "KOI8-U" \
+ "Shift_JIS" \
+ "TIS-620" \
+ "UTF-8" \
+ "af_ZA.ISO-8859-1" \
+ "ar_AE.ISO-8859-6" \
+ "ar_BH.ISO-8859-6" \
+ "ar_DZ.ISO-8859-6" \
+ "ar_EG.ISO-8859-6" \
+ "ar_IN.UTF-8" \
+ "ar_IQ.ISO-8859-6" \
+ "ar_JO.ISO-8859-6" \
+ "ar_KW.ISO-8859-6" \
+ "ar_LB.ISO-8859-6" \
+ "ar_LY.ISO-8859-6" \
+ "ar_MA.ISO-8859-6" \
+ "ar_OM.ISO-8859-6" \
+ "ar_QA.ISO-8859-6" \
+ "ar_SA.ISO-8859-6" \
+ "ar_SD.ISO-8859-6" \
+ "ar_SY.ISO-8859-6" \
+ "ar_TN.ISO-8859-6" \
+ "ar_YE.ISO-8859-6" \
+ "be_BY.CP1251" \
+ "bg_BG.CP1251" \
+ "br_FR.ISO-8859-1" \
+ "bs_BA.ISO-8859-2" \
+ "ca_ES.ISO-8859-1" \
+ "ca_ES.ISO-8859-15@euro" \
+ "cs_CZ.ISO-8859-2" \
+ "cy_GB.ISO-8859-14" \
+ "da_DK.ISO-8859-1" \
+ "de_AT.ISO-8859-1" \
+ "de_AT.ISO-8859-15@euro" \
+ "de_BE.ISO-8859-1" \
+ "de_BE.ISO-8859-15@euro" \
+ "de_CH.ISO-8859-1" \
+ "de_DE.ISO-8859-1" \
+ "de_DE.ISO-8859-15@euro" \
+ "de_DE.UTF-8" \
+ "de_LU.ISO-8859-1" \
+ "de_LU.ISO-8859-15@euro" \
+ "el_GR.ISO-8859-7" \
+ "en_AU.ISO-8859-1" \
+ "en_BW.ISO-8859-1" \
+ "en_CA.ISO-8859-1" \
+ "en_DK.ISO-8859-1" \
+ "en_GB.ISO-8859-1" \
+ "en_HK.ISO-8859-1" \
+ "en_IE.ISO-8859-1" \
+ "en_IE.ISO-8859-15@euro" \
+ "en_IN.UTF-8" \
+ "en_NZ.ISO-8859-1" \
+ "en_PH.ISO-8859-1" \
+ "en_SG.ISO-8859-1" \
+ "en_US.ANSI_X3.4-1968" \
+ "en_US.ISO-8859-1" \
+ "en_US.UTF-8" \
+ "en_ZA.ISO-8859-1" \
+ "en_ZW.ISO-8859-1" \
+ "es_AR.ISO-8859-1" \
+ "es_BO.ISO-8859-1" \
+ "es_CL.ISO-8859-1" \
+ "es_CO.ISO-8859-1" \
+ "es_CR.ISO-8859-1" \
+ "es_DO.ISO-8859-1" \
+ "es_EC.ISO-8859-1" \
+ "es_ES.ISO-8859-1" \
+ "es_ES.ISO-8859-15@euro" \
+ "es_GT.ISO-8859-1" \
+ "es_HN.ISO-8859-1" \
+ "es_MX.ISO-8859-1" \
+ "es_NI.ISO-8859-1" \
+ "es_PA.ISO-8859-1" \
+ "es_PE.ISO-8859-1" \
+ "es_PR.ISO-8859-1" \
+ "es_PY.ISO-8859-1" \
+ "es_SV.ISO-8859-1" \
+ "es_US.ISO-8859-1" \
+ "es_UY.ISO-8859-1" \
+ "es_VE.ISO-8859-1" \
+ "et_EE.ISO-8859-1" \
+ "eu_ES.ISO-8859-1" \
+ "eu_ES.ISO-8859-15@euro" \
+ "fa_IR.UTF-8" \
+ "fi_FI.ISO-8859-1" \
+ "fi_FI.ISO-8859-15@euro" \
+ "fo_FO.ISO-8859-1" \
+ "fr_BE.ISO-8859-1" \
+ "fr_BE.ISO-8859-15@euro" \
+ "fr_CA.ISO-8859-1" \
+ "fr_CH.ISO-8859-1" \
+ "fr_FR.ISO-8859-1" \
+ "fr_FR.ISO-8859-15@euro" \
+ "fr_FR.UTF-8" \
+ "fr_LU.ISO-8859-1" \
+ "fr_LU.ISO-8859-15@euro" \
+ "ga_IE.ISO-8859-1" \
+ "ga_IE.ISO-8859-15@euro" \
+ "gl_ES.ISO-8859-1" \
+ "gl_ES.ISO-8859-15@euro" \
+ "gv_GB.ISO-8859-1" \
+ "he_IL.ISO-8859-8" \
+ "hi_IN.UTF-8" \
+ "hr_HR.ISO-8859-2" \
+ "hu_HU.ISO-8859-2" \
+ "i18n.ctype.ANSI_X3.4-1968" \
+ "i18n.ctype.BIG5" \
+ "i18n.ctype.BIG5-HKSCS" \
+ "i18n.ctype.CP1251" \
+ "i18n.ctype.CP1255" \
+ "i18n.ctype.EUC-JP" \
+ "i18n.ctype.EUC-KR" \
+ "i18n.ctype.EUC-TW" \
+ "i18n.ctype.GB18030" \
+ "i18n.ctype.GB2312" \
+ "i18n.ctype.GBK" \
+ "i18n.ctype.GEORGIAN-PS" \
+ "i18n.ctype.ISO-8859-1" \
+ "i18n.ctype.ISO-8859-13" \
+ "i18n.ctype.ISO-8859-14" \
+ "i18n.ctype.ISO-8859-15" \
+ "i18n.ctype.ISO-8859-2" \
+ "i18n.ctype.ISO-8859-3" \
+ "i18n.ctype.ISO-8859-5" \
+ "i18n.ctype.ISO-8859-6" \
+ "i18n.ctype.ISO-8859-7" \
+ "i18n.ctype.ISO-8859-8" \
+ "i18n.ctype.KOI8-R" \
+ "i18n.ctype.KOI8-T" \
+ "i18n.ctype.KOI8-U" \
+ "i18n.ctype.Shift_JIS" \
+ "i18n.ctype.TIS-620" \
+ "i18n.ctype.UTF-8" \
+ "i18n.ctype.CP1255" \
+ "id_ID.ISO-8859-1" \
+ "is_IS.ISO-8859-1" \
+ "it_CH.ISO-8859-1" \
+ "it_IT.ISO-8859-1" \
+ "it_IT.ISO-8859-15@euro" \
+ "iw_IL.ISO-8859-8" \
+ "ja_JP.EUC-JP" \
+ "ja_JP.Shift_JIS" \
+ "ja_JP.UTF-8" \
+ "ka_GE.GEORGIAN-PS" \
+ "kl_GL.ISO-8859-1" \
+ "ko_KR.EUC-KR" \
+ "ko_KR.UTF-8" \
+ "kw_GB.ISO-8859-1" \
+ "lt_LT.ISO-8859-13" \
+ "lv_LV.ISO-8859-13" \
+ "mi_NZ.ISO-8859-13" \
+ "mk_MK.ISO-8859-5" \
+ "mr_IN.UTF-8" \
+ "ms_MY.ISO-8859-1" \
+ "mt_MT.ISO-8859-3" \
+ "nl_BE.ISO-8859-1" \
+ "nl_BE.ISO-8859-15@euro" \
+ "nl_NL.ISO-8859-1" \
+ "nl_NL.ISO-8859-15@euro" \
+ "nn_NO.ISO-8859-1" \
+ "no_NO.ISO-8859-1" \
+ "oc_FR.ISO-8859-1" \
+ "pl_PL.ISO-8859-2" \
+ "pt_BR.ISO-8859-1" \
+ "pt_PT.ISO-8859-1" \
+ "pt_PT.ISO-8859-15@euro" \
+ "ro_RO.ISO-8859-2" \
+ "ru_RU.ISO-8859-5" \
+ "ru_RU.KOI8-R" \
+ "ru_RU.UTF-8" \
+ "ru_UA.KOI8-U" \
+ "sk_SK.ISO-8859-2" \
+ "sl_SI.ISO-8859-2" \
+ "sq_AL.ISO-8859-1" \
+ "sr_YU.ISO-8859-2" \
+ "sr_YU.ISO-8859-5@cyrillic" \
+ "sv_FI.ISO-8859-1" \
+ "sv_FI.ISO-8859-15@euro" \
+ "sv_SE.ISO-8859-1" \
+ "ta_IN.UTF-8" \
+ "te_IN.UTF-8" \
+ "tg_TJ.KOI8-T" \
+ "th_TH.TIS-620" \
+ "tl_PH.ISO-8859-1" \
+ "tr_TR.ISO-8859-9" \
+ "uk_UA.KOI8-U" \
+ "ur_PK.UTF-8" \
+ "uz_UZ.ISO-8859-1" \
+ "vi_VN.UTF-8" \
+ "yi_US.CP1255" \
+ "zh_CN.GB18030" \
+ "zh_CN.GB2312" \
+ "zh_CN.GBK" \
+ "zh_CN.UTF-8" \
+ "zh_HK.BIG5-HKSCS" \
+ "zh_TW.BIG5" \
+ "zh_TW.EUC-TW"
+ do
+ if [ -f ${file} ] ; then
+ ${CP} -fp ${file} ${NLSDIR}/${file}
+ chmod 0644 ${NLSDIR}/${file}
+ fi
+
+ if [ -d $file ] ; then
+ ${CP} -rd ${file} ${NLSDIR}/
+ chmod 0755 ${NLSDIR}/${file}
+ fi
+ done
+
+ cd ${COMPONENTDIR}
+ ${SED} -e "s#\${prefix}/lib#\${prefix}/lib/${MACH64}#g" ${COMPONENTDIR}/Solaris/libstdcxx4.pc > libstdcxx4.pc.sed
+ if [ -s libstdcxx4.pc.sed ] ; then
+ ${CP} -fp libstdcxx4.pc.sed ${PKGCONFIGDIR}/libstdcxx4.pc
+ rm -f libstdcxx4.pc.sed
+ fi
+fi
+
+cd ${COMPONENTDIR}
+${CP} -fp ${COMPONENTDIR}/Solaris/libstdcxx4.3lib ${MAN3LIBDIR}/libstdcxx4.3lib
+
+echo "Proto area installation of stdcxx completed successfully."
+touch ${BUILDDIR}/.installed
+
+exit 0
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/libstdcxx4.3lib Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,146 @@
+'\" te
+.\" Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+.\" Copyright 1989 AT&T
+.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
+.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
+.TH libstdcxx4 3lib "14 January 2011" "SunOS 5.11" "Apache Standard C++ Library"
+\fBApache Standard C++ Library\fR
+.SH NAME
+.PP
+libstdcxx4 [ libstdcxx4.so.4 ]
+.SH SUMMARY
+.PP
+An ISO/IEC 14882:1998 and ISO/IEC 14882:2003 -- International Standard for Information Systems -- Programming Language C++, Section 25.2.8 Compliant Implementation of the Standard C++ Library.
+.SH SYNOPSIS
+.PP
+The Apache C++ Standard Library implements sections 17 through 27 and Annexes C, D, and E of the C++ Standard. The C++ Standard contains the following libraries:
+.RS
+.PP
+The Language support library
+.PP
+The Diagnostics library
+.PP
+The General utilities library
+.PP
+The Strings library
+.PP
+The Localization library
+.PP
+The Containers library
+.PP
+The Iterators library
+.PP
+The Algorithms library
+.PP
+The Numerics library
+.PP
+The Input/Output library
+.RE
+.SH Standards Conformance
+.PP
+This implementation of the C++ Standard Library conforms to \fIISO/IEC 14882:2003 -- International Standard for Information Systems -- Programming Language C++\fR. In addition, this implementation conforms to a subset of the requirements of the following standards:
+.PP
+In some cases, this implementation of the C++ Standard Library provides extensions to enhance functionality and usability. These extensions are highlighted in the HTML documentation where they occur.
+.RS
+.PP
+ISO/IEC 9899 Programming languages -- C
+.PP
+ISO/IEC 10967-1 Information technology -- Language independent arithmetic -- Part 1: Integer and floating point arithmetic
+.PP
+ISO/IEC 10646-1 Information technology -- Universal Multiple-Octet Coded Character Set (UCS)
+.PP
+ISO/IEC 559 (same as IEEE 754) Binary floating-point arithmetic for microprocessor systems
+.PP
+ISO/IEC 9945-1 (same as IEEE Std 1003.1) Information technology -- Portable Operating System Interface (POSIX)
+.PP
+ISO 8601 Data elements and interchange formats -- Information interchange -- Representation of dates and times
+.PP
+ISO/IEC 8859-1 through -7 Information technology -- 8-bit single-byte coded graphic character sets -- Parts 1 - 7
+.PP
+ISO/IEC 2022 Information technology -- Character code structure and extension techniques
+.PP
+.RE
+.RE
+.PP
+These libraries are described in detail in the HTML documentation to be found under file:///usr/share/doc/stdcxx4/html/. The names of public header files provided by this implementation are the same as the Standard header files.
+.PP
+This manual page is provided as an introductory index to help you find components for programming tasks as described in the Standard. If you are reading the HTML documentation, click the name of a library to go to its description in this chapter. Click the name of a header file or component to go to its entry in the Library's \fIReference Guide\fR.
+.SH DESCRIPTION
+.PP
+.sp
+.in +2
+.nf
+.LP
+.nf
+.SH Sun Studio 12:
+.RE
+.nf
+CPPFLAGS = \(gapkg-config --cflags-only-I libstdcxx4\(ga
+.nf
+CXXFLAGS = \(gapkg-config --cflags-only-other libstdcxx4\(ga
+.nf
+LDFLAGS = \(gapkg-config --libs libstdcxx4\(ga
+.fi
+.in -2
+.sp
+.in +2
+.SH Sun Studio 12 Update 1 or later:
+.RE
+.nf
+CXXFLAGS = -library=stdcxx4
+.nf
+LDFLAGS = -library=stdcxx4
+.fi
+.in -2
+.PP
+.SH Makefile:
+.RE
+.nf
+\fR&.cpp.o:\fR
+.in +4
+CC $(CPPFLAGS) $(CXXFLAGS) $< -o $@
+.SH NOTES
+.PP
+The Apache Standard C++ Library is not source, or binary compatible, with either the STLport4 Library, or with the Solaris libCstd.so.1 Library. Combining symbols from more than one implementation of the Standard C++ Library into the same executable address space will result in severe software malfunctions, including crashes and run-time failures. It is a fatal software construction error to voluntarily, or inadvertently, combine symbols from more than one implementation of the Standard C++ Library, within the same executable address space.
+.PP
+This implementation of the C++ Standard Library incorporates the following updates to the ISO:14882:2003 Standard: JTC1/SC22/WC21 LWG Issue #197, JTC1/SC22/WC21 LWG Issue #432 and JTC1/SC22/WC21 LWG Issue #562. For detailed information about these updates, please visit the following URLs:
+.sp
+.nf
+http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-closed.html#197
+http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#432
+http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#562
+.fi
+.PP
+Source for libstdcxx4 is available on http://opensolaris.org.
+
+.SH ATTRIBUTES
+.sp
+.LP
+See \fBattributes\fR(5) for descriptions of the following attributes:
+.sp
+
+.sp
+.TS
+tab() box;
+cw(2.75i) |cw(2.75i)
+lw(2.75i) |lw(2.75i)
+.
+ATTRIBUTE TYPEATTRIBUTE VALUE
+_
+Availabilitylibrary/c++/stdcxx
+_
+Interface StabilityCommitted
+_
+MT-LevelSafe
+.TE
+
+
+.SH SEE ALSO
+.sp
+.LP
+ISO/IEC 14882:2003 -- International Standard for Information Systems -- Programming Language C++
+.sp
+.LP
+setlocale(3C), catopen(3C), catclose(3C), locale(5), standards(5).
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/libstdcxx4.pc Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,36 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+#
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+cppflags=-I${includedir}/stdcxx4/ansi -I${includedir}/stdcxx4/tr1 -I${includedir}/stdcxx4
+cflags_only= -mt -D_REENTRANT
+
+Name: libstdcxx4
+Description: Apache Standard C++ Library
+Version: 4.2.1
+Libs: -L${libdir} -lc -lm -lCrun -lstdcxx4
+Cflags: -I${includedir}/stdcxx4/ansi -I${includedir}/stdcxx4/tr1 -I${includedir}/stdcxx4 "-library=no%Cstd -features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic -instances=global -template=geninlinefuncs -verbose=template -xlang=c99 -Qoption ccfe ++boolflag:sunwcch=false -mt -D_REENTRANT -D__EXTENSIONS__ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=500 -D_XPG5 -D_POSIX_PTHREAD_SEMANTICS"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/make_regress_tests.sh Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,204 @@
+#!/bin/bash
+#
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+#
+
+unset LD_LIBRARY_PATH
+unset LD_LIBRARY_PATH_32
+unset LD_LIBRARY_PATH_64
+unset LD_PRELOAD
+unset LD_PRELOAD_32
+unset LD_PRELOAD_64
+
+export TOPDIR="../../"
+export DO_CLEANUP="no"
+export DO_MAKE="no"
+
+UNKNOWN_ARG=no
+PRINT_HELP=no
+
+check_args() {
+ while [ "$#" -gt 0 ] ; do
+ UNKNOWN_ARG=no
+ case "$1" in
+ --cleanup)
+ DO_CLEANUP=yes
+ ;;
+ --make)
+ DO_MAKE=yes
+ ;;
+ *)
+ UNKNOWN_ARG=yes
+ ;;
+ esac
+
+ if [ "${UNKNOWN_ARG}" = "yes" ] ; then
+ echo "$1: Invalid argument"
+ PRINT_HELP=yes
+ shift
+ continue
+ fi
+
+ shift
+ done
+
+ export DO_CLEANUP DO_MAKE TOPDIR
+
+ if [ "$PRINT_HELP" = "yes" ] || [ "$UNKNOWN_ARG" = "yes" ] ; then
+ echo "Usage: `basename $0` [ --cleanup ] [ --make ]"
+ exit 1
+ fi
+}
+
+run_make() {
+ if [ "${DO_MAKE}" = "no" ] ; then
+ return
+ fi
+
+ for file in \
+ "18.limits.stdcxx-436" \
+ "18.limits.traps.stdcxx-624" \
+ "20.specialized.stdcxx-390" \
+ "21.string.append.stdcxx-438" \
+ "21.string.io.stdcxx-206" \
+ "21.string.io.stdcxx-250" \
+ "21.string.replace.stdcxx-175" \
+ "21.string.stdcxx-162" \
+ "21.string.stdcxx-231" \
+ "21.string.stdcxx-466" \
+ "22.locale.codecvt.stdcxx-435" \
+ "22.locale.cons.stdcxx-485" \
+ "22.locale.messages.stdcxx-542" \
+ "22.locale.money.get.stdcxx-62" \
+ "22.locale.num.put.stdcxx-2" \
+ "22.locale.stdcxx-554" \
+ "23.associative.stdcxx-16" \
+ "23.bitset.cons.stdcxx-297" \
+ "23.deque.special.stdcxx-127" \
+ "23.list.cons.stdcxx-268" \
+ "23.list.insert.stdcxx-331" \
+ "23.list.special.stdcxx-334" \
+ "23.set.stdcxx-216" \
+ "23.vector.bool.stdcxx-235" \
+ "23.vector.stdcxx-611" \
+ "24.istream.iterator.cons.stdcxx-645" \
+ "24.istream.iterator.ops.stdcxx-321" \
+ "24.operations.stdcxx-234" \
+ "26.valarray.binary.stdcxx-237" \
+ "26.valarray.members.stdcxx-313" \
+ "26.valarray.members.stdcxx-318" \
+ "26.valarray.sub.stdcxx-224" \
+ "26.valarray.sub.stdcxx-309" \
+ "26.valarray.sub.stdcxx-448" \
+ "26.valarray.transcend.stdcxx-315" \
+ "26.valarray.unary.stdcxx-314" \
+ "27.basic.ios.copyfmt.stdcxx-766" \
+ "27.basic.ios.tie.stdcxx-804" \
+ "27.cstdio.stdcxx-195" \
+ "27.filebuf.members.stdcxx-308" \
+ "27.filebuf.virtuals.stdcxx-522" \
+ "27.ostream.unformatted.stdcxx-626" \
+ "27.streambuf.imbue.stdcxx-307" \
+ "27.stringbuf.members.stdcxx-427" \
+ "27.stringbuf.overflow.stdcxx-795" \
+ "27.stringbuf.str.stdcxx-514" \
+ "27.stringbuf.xsputn.stdcxx-515" \
+ "27.stringbuf.xsputn.stdcxx-576"
+ do
+ if [ -f "${file}.o" ] ; then
+ rm -f ${file}.o
+ fi
+ if [ -f "${file}" ] ; then
+ rm -f ${file}
+ fi
+
+ gmake ${file}
+ done
+}
+
+do_cleanup() {
+ if [ "${DO_CLEANUP}" = "no" ] ; then
+ return
+ fi
+
+ for file in \
+ "18.limits.stdcxx-436" \
+ "18.limits.traps.stdcxx-624" \
+ "20.specialized.stdcxx-390" \
+ "21.string.append.stdcxx-438" \
+ "21.string.io.stdcxx-206" \
+ "21.string.io.stdcxx-250" \
+ "21.string.replace.stdcxx-175" \
+ "21.string.stdcxx-162" \
+ "21.string.stdcxx-231" \
+ "21.string.stdcxx-466" \
+ "22.locale.codecvt.stdcxx-435" \
+ "22.locale.cons.stdcxx-485" \
+ "22.locale.messages.stdcxx-542" \
+ "22.locale.money.get.stdcxx-62" \
+ "22.locale.num.put.stdcxx-2" \
+ "22.locale.stdcxx-554" \
+ "23.associative.stdcxx-16" \
+ "23.bitset.cons.stdcxx-297" \
+ "23.deque.special.stdcxx-127" \
+ "23.list.cons.stdcxx-268" \
+ "23.list.insert.stdcxx-331" \
+ "23.list.special.stdcxx-334" \
+ "23.set.stdcxx-216" \
+ "23.vector.bool.stdcxx-235" \
+ "23.vector.stdcxx-611" \
+ "24.istream.iterator.cons.stdcxx-645" \
+ "24.istream.iterator.ops.stdcxx-321" \
+ "24.operations.stdcxx-234" \
+ "26.valarray.binary.stdcxx-237" \
+ "26.valarray.members.stdcxx-313" \
+ "26.valarray.members.stdcxx-318" \
+ "26.valarray.sub.stdcxx-224" \
+ "26.valarray.sub.stdcxx-309" \
+ "26.valarray.sub.stdcxx-448" \
+ "26.valarray.transcend.stdcxx-315" \
+ "26.valarray.unary.stdcxx-314" \
+ "27.basic.ios.copyfmt.stdcxx-766" \
+ "27.basic.ios.tie.stdcxx-804" \
+ "27.cstdio.stdcxx-195" \
+ "27.filebuf.members.stdcxx-308" \
+ "27.filebuf.virtuals.stdcxx-522" \
+ "27.ostream.unformatted.stdcxx-626" \
+ "27.streambuf.imbue.stdcxx-307" \
+ "27.stringbuf.members.stdcxx-427" \
+ "27.stringbuf.overflow.stdcxx-795" \
+ "27.stringbuf.str.stdcxx-514" \
+ "27.stringbuf.xsputn.stdcxx-515" \
+ "27.stringbuf.xsputn.stdcxx-576"
+ do
+ rm -f "${file}"
+ done
+}
+
+check_args $@
+run_make
+do_cleanup
+
+exit 0
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/prep_build_area.sh Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,153 @@
+#!/bin/bash
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+export SRCDIR=""
+export BUILDDIR=""
+export MACH64=""
+export IS_64_BIT="no"
+export MACH=`uname -p`
+export MACH64=""
+export UNKNOWN_ARG="no"
+export PRINT_HELP="no"
+export PATH="/usr/gnu/bin:${PATH}"
+unset TOPDIR
+
+check_args() {
+ while [ "$#" -gt 0 ] ; do
+ UNKNOWN_ARG=no
+ case "$1" in
+ -m32)
+ IS_64_BIT="no"
+ ;;
+ -m64)
+ IS_64_BIT="yes"
+ ;;
+ -srcdir=*)
+ SRCDIR=`echo $1 | sed "s,^-srcdir=\(.*\),\1,"`
+ ;;
+ -builddir=*)
+ BUILDDIR=`echo $1 | sed "s,^-builddir=\(.*\),\1,"`
+ ;;
+ *)
+ UNKNOWN_ARG="yes"
+ ;;
+ esac
+
+ if [ "$UNKNOWN_ARG" = "yes" ] ; then
+ echo "$1: Invalid argument"
+ PRINT_HELP="yes"
+ shift
+ continue
+ fi
+ shift
+ done
+
+ export IS_64_BIT SRCDIR BUILDDIR
+
+ if [ "x${SRCDIR}" = "x" ] || [ "x${BUILDDIR}" = "x" ] ; then
+ PRINT_HELP="yes"
+ fi
+
+ if [ "${PRINT_HELP}" = "yes" ] ; then
+ echo "Usage: `basename $0` [ -m32 | -m64 ]"
+ echo " [ -srcdir=<source directory> ]"
+ echo " [ -builddir=<build directory> ]"
+ echo ""
+ exit 1
+ fi
+
+ if [ "${MACH}" = "sparc" ] ; then
+ MACH64="sparcv9"
+ else
+ MACH64="amd64"
+ fi
+
+ export MACH MACH64
+}
+
+clean_symlinks() {
+ if [ ! -d ${BUILDDIR} ] ; then
+ echo "build directory ${BUILDDIR} not found or unreadable!"
+ exit 1
+ fi
+
+ if [ ! -d ${SRCDIR} ] ; then
+ echo "source directory ${SRCDIR} not found or unreadable!"
+ exit 1
+ fi
+
+ cd ${BUILDDIR}/etc/nls
+
+ for file in \
+ languages \
+ encodings \
+ countries \
+ gen_list
+do
+ if [ -L ${file} ] ; then
+ rm ${file}
+ fi
+done
+
+ cd ${BUILDDIR}/build
+
+ if [ -d nls ] ; then
+ rm -rf nls
+ fi
+}
+
+create_symlinks() {
+ cd ${BUILDDIR}/etc/nls
+
+ for file in \
+ languages \
+ encodings \
+ countries \
+ gen_list
+do
+ if [ ! -L ${file} ] ; then
+ if [ -f ${SRCDIR}/etc/nls/${file} ] ; then
+ ln -sf ${SRCDIR}/etc/nls/${file}
+ else
+ echo "source file ${SRCDIR}/etc/nls/${file} not found or unreadable!"
+ fi
+ fi
+done
+
+ cd ${BUILDDIR}/build
+
+ if [ -L nls ] ; then
+ rm nls
+ fi
+
+ ln -sf ${SRCDIR}/build/nls
+}
+
+check_args $@
+clean_symlinks
+create_symlinks
+
+exit 0
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/readlink.sh Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)readlink.sh 1.1 09/08/07 SMI"
+#
+
+/usr/bin/perl -le 'print readlink shift' $1
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/run_examples.sh Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,490 @@
+#!/bin/bash
+#
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+#
+
+unset LD_LIBRARY_PATH
+unset LD_LIBRARY_PATH_32
+unset LD_LIBRARY_PATH_64
+unset LD_PRELOAD
+unset LD_PRELOAD_32
+unset LD_PRELOAD_64
+
+export TOPDIR="../../"
+export DO_CLEANUP="no"
+export INDEX_HTML="index.html"
+export LD_LIBRARY_PATH="../lib"
+export LD_LIBRARY_PATH_32="../lib"
+export LD_LIBRARY_PATH_64="../lib"
+
+UNKNOWN_ARG=no
+PRINT_HELP=no
+
+check_args() {
+ while [ "$#" -gt 0 ] ; do
+ UNKNOWN_ARG=no
+ case "$1" in
+ --topdir=*)
+ TOPDIR=`echo $1 | sed "s,^--topdir=\(.*\),\1,"`
+ ;;
+ --cleanup)
+ DO_CLEANUP=yes
+ ;;
+ --help)
+ PRINT_HELP=yes
+ ;;
+ *)
+ UNKNOWN_ARG=yes
+ ;;
+ esac
+
+ if [ "${UNKNOWN_ARG}" = "yes" ] ; then
+ echo "$1: Invalid argument"
+ PRINT_HELP=yes
+ shift
+ continue
+ fi
+
+ shift
+ done
+
+ export TOPDIR DO_CLEANUP
+
+ if [ "$PRINT_HELP" = "yes" ] || [ "$UNKNOWN_ARG" = "yes" ] ; then
+ echo "Usage [1]: `basename $0` [ --topdir=\$(top_srcdir) ]"
+ echo "Usage [2]: `basename $0` [ --cleanup ]"
+ exit 1
+ fi
+}
+
+setup_index_html() {
+ cat /dev/null > ${INDEX_HTML}
+}
+
+run_examples() {
+ if [ "${DO_CLEANUP}" = "yes" ] ; then
+ return
+ fi
+
+ for file in \
+ "accumulate" \
+ "adj_diff" \
+ "advance" \
+ "alg1" \
+ "alg2" \
+ "alg3" \
+ "alg4" \
+ "alg5" \
+ "alg6" \
+ "alg7" \
+ "auto_ptr" \
+ "binary_search" \
+ "binders" \
+ "bitset" \
+ "codecvt" \
+ "codecvt1" \
+ "collate" \
+ "complex" \
+ "complx" \
+ "copyex" \
+ "count" \
+ "ctype" \
+ "deque" \
+ "distance" \
+ "dynatype" \
+ "equal" \
+ "equal_range" \
+ "failure" \
+ "filebuf" \
+ "fill" \
+ "find" \
+ "find_end" \
+ "find_first_of" \
+ "fmtflags_manip" \
+ "for_each" \
+ "fstream" \
+ "funct_ob" \
+ "generate" \
+ "graph" \
+ "gslice" \
+ "gslice_array" \
+ "has_facet" \
+ "heap_ops" \
+ "icecream" \
+ "ifstream" \
+ "includes" \
+ "indirect_array" \
+ "inner_product" \
+ "insert_iterator" \
+ "insert_wchar" \
+ "isalnum" \
+ "istream1" \
+ "istreambuf_iterator" \
+ "istringstream" \
+ "istrstream" \
+ "lex_compare" \
+ "limits" \
+ "list" \
+ "locale" \
+ "map" \
+ "mask_array" \
+ "max" \
+ "max_elem" \
+ "mbsrtowcs" \
+ "memfunc" \
+ "memfunref" \
+ "merge" \
+ "messages" \
+ "mismatch" \
+ "money_get" \
+ "moneypunct" \
+ "moneyput" \
+ "multimap" \
+ "multiset" \
+ "mutex" \
+ "negator" \
+ "nthelem" \
+ "num_get" \
+ "numpunct" \
+ "num_put" \
+ "ostream" \
+ "ostreambuf_iterator" \
+ "partial_sort" \
+ "partial_sum" \
+ "partition" \
+ "permutation" \
+ "pnt2fnct" \
+ "priority_queue" \
+ "queue" \
+ "radix" \
+ "random_shuffle" \
+ "remove" \
+ "replace" \
+ "reverse" \
+ "reverse_iterator" \
+ "rotate" \
+ "rwexcept" \
+ "search" \
+ "set_diff" \
+ "setex" \
+ "set_intr" \
+ "set_sym_diff" \
+ "set_union" \
+ "sieve" \
+ "slice" \
+ "slice_array" \
+ "sort" \
+ "stack" \
+ "stdexcept" \
+ "stringbuf" \
+ "strstream" \
+ "strstreambuf" \
+ "swap" \
+ "tele" \
+ "teller" \
+ "time_get" \
+ "time_put" \
+ "toupper" \
+ "transform" \
+ "ul_bound" \
+ "unique" \
+ "use_facet" \
+ "valarray" \
+ "vector" \
+ "widwork" \
+ "wostream" \
+ "wstringstream"
+ do
+ echo "------------------------------------------------------------"
+ if [ -f ${file} ] ; then
+ echo -n "Running example program ${file} ..."
+ logfile="${file}.out"
+ ./${file} > ${logfile} 2>&1
+ ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ echo "SUCCESS."
+ else
+ echo "FAIL."
+ fi
+ echo "<a href=\"${file}.out\">${file}.out</a>" >> ${INDEX_HTML}
+ echo "</br>" >> ${INDEX_HTML}
+ else
+ echo "Example program ${file} not found. Skipping."
+ fi
+ echo "------------------------------------------------------------"
+ done
+}
+
+run_examples_with_input() {
+ if [ "${DO_CLEANUP}" = "yes" ] ; then
+ return
+ fi
+
+ echo "------------------------------------------------------------"
+ echo -n "Running example program spell ... "
+ echo spelltest | ./spell > ./spell.out 2>&1
+ ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ echo "SUCCESS."
+ else
+ echo "FAIL."
+ fi
+ echo "------------------------------------------------------------"
+ echo "<a href=\"spell.out\">spell.out</a>" >> ${INDEX_HTML}
+ echo "</br>" >> ${INDEX_HTML}
+
+ echo "------------------------------------------------------------"
+ echo -n "Running example program stocks ... "
+ echo y y q | ./stocks >> ./stocks.out 2>&1
+ ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ echo "SUCCESS."
+ else
+ echo "FAIL."
+ fi
+ echo "------------------------------------------------------------"
+ echo "<a href=\"stocks.out\">stocks.out</a>" >> ${INDEX_HTML}
+ echo "</br>" >> ${INDEX_HTML}
+
+ echo "------------------------------------------------------------"
+ echo -n "Running example program calc ... "
+ echo '5 1 2 + 4 * 3 - +' p q | ./calc >> ./calc.out 2>&1
+ ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ echo "SUCCESS."
+ else
+ echo "FAIL."
+ fi
+ echo "------------------------------------------------------------"
+ echo "<a href=\"calc.out\">calc.out</a>" >> ${INDEX_HTML}
+ echo "</br>" >> ${INDEX_HTML}
+
+ echo "------------------------------------------------------------"
+ echo -n "Running example program concord ... "
+ echo 'this is a line of text' | ./concord >> ./concord.out 2>&1
+ ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ echo "SUCCESS."
+ else
+ echo "FAIL."
+ fi
+ echo "------------------------------------------------------------"
+ echo "<a href=\"concord.out\">concord.out</a>" >> ${INDEX_HTML}
+ echo "</br>" >> ${INDEX_HTML}
+
+ echo "------------------------------------------------------------"
+ echo -n "Running example program money_manip ... "
+ echo '1234.56' | ./money_manip >> ./money_manip.out 2>&1
+ ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ echo "SUCCESS."
+ else
+ echo "FAIL."
+ fi
+ echo "------------------------------------------------------------"
+ echo "<a href=\"money_manip.out\">money_manip.out</a>" >> ${INDEX_HTML}
+ echo "</br>" >> ${INDEX_HTML}
+
+ echo "------------------------------------------------------------"
+ echo -n "Running example program string ... "
+ echo 'This is a test string' | ./string >> ./string.out 2>&1
+ ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ echo "SUCCESS."
+ else
+ echo "FAIL."
+ fi
+ echo "------------------------------------------------------------"
+ echo "<a href=\"string.out\">string.out</a>" >> ${INDEX_HTML}
+ echo "</br>" >> ${INDEX_HTML}
+
+ echo "------------------------------------------------------------"
+ echo -n "Running example program time_manip ... "
+ echo 'Thu Sep 17 13:23:53 2009' | ./time_manip >> ./time_manip.out 2>&1
+ ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ echo "SUCCESS."
+ else
+ echo "FAIL."
+ fi
+ echo "------------------------------------------------------------"
+ echo "<a href=\"time_manip.out\">time_manip.out</a>" >> ${INDEX_HTML}
+ echo "</br>" >> ${INDEX_HTML}
+}
+
+do_cleanup() {
+ if [ "${DO_CLEANUP}" = "no" ] ; then
+ return
+ fi
+
+ for file in \
+ "accumulate" \
+ "adj_diff" \
+ "advance" \
+ "alg1" \
+ "alg2" \
+ "alg3" \
+ "alg4" \
+ "alg5" \
+ "alg6" \
+ "alg7" \
+ "auto_ptr" \
+ "binary_search" \
+ "binders" \
+ "bitset" \
+ "calc" \
+ "codecvt" \
+ "codecvt1" \
+ "collate" \
+ "complex" \
+ "complx" \
+ "concord" \
+ "copyex" \
+ "count" \
+ "ctype" \
+ "deque" \
+ "distance" \
+ "dynatype" \
+ "equal" \
+ "equal_range" \
+ "failure" \
+ "filebuf" \
+ "fill" \
+ "find" \
+ "find_end" \
+ "find_first_of" \
+ "fmtflags_manip" \
+ "for_each" \
+ "fstream" \
+ "funct_ob" \
+ "generate" \
+ "graph" \
+ "gslice" \
+ "gslice_array" \
+ "has_facet" \
+ "heap_ops" \
+ "icecream" \
+ "ifstream" \
+ "includes" \
+ "indirect_array" \
+ "inner_product" \
+ "insert_iterator" \
+ "insert_wchar" \
+ "isalnum" \
+ "istream1" \
+ "istreambuf_iterator" \
+ "istringstream" \
+ "istrstream" \
+ "lex_compare" \
+ "limits" \
+ "list" \
+ "locale" \
+ "map" \
+ "mask_array" \
+ "max" \
+ "max_elem" \
+ "mbsrtowcs" \
+ "memfunc" \
+ "memfunref" \
+ "merge" \
+ "messages" \
+ "mismatch" \
+ "money_get" \
+ "moneypunct" \
+ "moneyput" \
+ "money_manip" \
+ "multimap" \
+ "multiset" \
+ "mutex" \
+ "negator" \
+ "nthelem" \
+ "num_get" \
+ "numpunct" \
+ "num_put" \
+ "ostream" \
+ "ostreambuf_iterator" \
+ "partial_sort" \
+ "partial_sum" \
+ "partition" \
+ "permutation" \
+ "pnt2fnct" \
+ "priority_queue" \
+ "queue" \
+ "radix" \
+ "random_shuffle" \
+ "remove" \
+ "replace" \
+ "reverse" \
+ "reverse_iterator" \
+ "rotate" \
+ "rwexcept" \
+ "search" \
+ "set_diff" \
+ "setex" \
+ "set_intr" \
+ "set_sym_diff" \
+ "set_union" \
+ "sieve" \
+ "slice" \
+ "slice_array" \
+ "sort" \
+ "spell" \
+ "stack" \
+ "stdexcept" \
+ "stocks" \
+ "string" \
+ "stringbuf" \
+ "strstream" \
+ "strstreambuf" \
+ "swap" \
+ "tele" \
+ "teller" \
+ "time_get" \
+ "time_manip" \
+ "time_put" \
+ "toupper" \
+ "transform" \
+ "ul_bound" \
+ "unique" \
+ "use_facet" \
+ "valarray" \
+ "vector" \
+ "widwork" \
+ "wostream" \
+ "wstringstream"
+ do
+ rm -f "${file}.out"
+ done
+
+ rm -f core
+}
+
+check_args $@
+run_examples
+run_examples_with_input
+do_cleanup
+
+exit 0
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/run_regress_tests.sh Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,222 @@
+#!/bin/bash
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+#
+
+unset LD_LIBRARY_PATH
+unset LD_LIBRARY_PATH_32
+unset LD_LIBRARY_PATH_64
+unset LD_PRELOAD
+unset LD_PRELOAD_32
+unset LD_PRELOAD_64
+
+export TOPDIR="../../"
+export DO_CLEANUP="no"
+export DO_RUN="no"
+export LD_LIBRARY_PATH="../lib"
+export LD_LIBRARY_PATH_32="../lib"
+export LD_LIBRARY_PATH_64="../lib"
+
+UNKNOWN_ARG=no
+PRINT_HELP=no
+
+check_args() {
+ while [ "$#" -gt 0 ] ; do
+ UNKNOWN_ARG=no
+ case "$1" in
+ --cleanup)
+ DO_CLEANUP=yes
+ ;;
+ --run)
+ DO_RUN=yes
+ ;;
+ *)
+ UNKNOWN_ARG=yes
+ ;;
+ esac
+
+ if [ "${UNKNOWN_ARG}" = "yes" ] ; then
+ echo "$1: Invalid argument"
+ PRINT_HELP=yes
+ shift
+ continue
+ fi
+
+ shift
+ done
+
+ export DO_CLEANUP DO_RUN TOPDIR
+
+ if [ "$PRINT_HELP" = "yes" ] || [ "$UNKNOWN_ARG" = "yes" ] ; then
+ echo "Usage: `basename $0` [ --cleanup ] [ --run ]"
+ exit 1
+ fi
+}
+
+run_tests() {
+ if [ "${DO_RUN}" = "no" ] ; then
+ return
+ fi
+
+ for file in \
+ "18.limits.stdcxx-436" \
+ "18.limits.traps.stdcxx-624" \
+ "20.specialized.stdcxx-390" \
+ "21.string.append.stdcxx-438" \
+ "21.string.io.stdcxx-206" \
+ "21.string.io.stdcxx-250" \
+ "21.string.replace.stdcxx-175" \
+ "21.string.stdcxx-162" \
+ "21.string.stdcxx-231" \
+ "21.string.stdcxx-466" \
+ "22.locale.codecvt.stdcxx-435" \
+ "22.locale.cons.stdcxx-485" \
+ "22.locale.messages.stdcxx-542" \
+ "22.locale.money.get.stdcxx-62" \
+ "22.locale.num.put.stdcxx-2" \
+ "22.locale.stdcxx-554" \
+ "23.associative.stdcxx-16" \
+ "23.bitset.cons.stdcxx-297" \
+ "23.deque.special.stdcxx-127" \
+ "23.list.cons.stdcxx-268" \
+ "23.list.insert.stdcxx-331" \
+ "23.list.special.stdcxx-334" \
+ "23.set.stdcxx-216" \
+ "23.vector.bool.stdcxx-235" \
+ "23.vector.stdcxx-611" \
+ "24.istream.iterator.cons.stdcxx-645" \
+ "24.istream.iterator.ops.stdcxx-321" \
+ "24.operations.stdcxx-234" \
+ "26.valarray.binary.stdcxx-237" \
+ "26.valarray.members.stdcxx-313" \
+ "26.valarray.members.stdcxx-318" \
+ "26.valarray.sub.stdcxx-224" \
+ "26.valarray.sub.stdcxx-309" \
+ "26.valarray.sub.stdcxx-448" \
+ "26.valarray.transcend.stdcxx-315" \
+ "26.valarray.unary.stdcxx-314" \
+ "27.basic.ios.copyfmt.stdcxx-766" \
+ "27.basic.ios.tie.stdcxx-804" \
+ "27.cstdio.stdcxx-195" \
+ "27.filebuf.members.stdcxx-308" \
+ "27.filebuf.virtuals.stdcxx-522" \
+ "27.ostream.unformatted.stdcxx-626" \
+ "27.streambuf.imbue.stdcxx-307" \
+ "27.stringbuf.members.stdcxx-427" \
+ "27.stringbuf.overflow.stdcxx-795" \
+ "27.stringbuf.str.stdcxx-514" \
+ "27.stringbuf.xsputn.stdcxx-515" \
+ "27.stringbuf.xsputn.stdcxx-576"
+ do
+ echo "------------------------------------------------------------"
+ if [ -f ${file} ] ; then
+ echo -n "Running regression test ${file} ... "
+ ./${file} > ${file}.out 2>&1
+ ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ echo "SUCCESS."
+ else
+ echo "FAIL."
+ fi
+ pat=`cat ${file}.out | egrep 'ASSERTION|ERROR|FATAL'`
+ if [ "x${pat}" != "x" ] ; then
+ echo "############################################################"
+ tail -9 ${file}.out | egrep 'ASSERTION|ERROR|FATAL' | egrep '%'
+ echo "############################################################"
+ fi
+ else
+ echo "Test program ${file} not found. Skipping."
+ fi
+ echo "------------------------------------------------------------"
+ done
+}
+
+do_cleanup() {
+ if [ "${DO_CLEANUP}" = "no" ] ; then
+ return
+ fi
+
+ for file in \
+ "18.limits.stdcxx-436" \
+ "18.limits.traps.stdcxx-624" \
+ "20.specialized.stdcxx-390" \
+ "21.string.append.stdcxx-438" \
+ "21.string.io.stdcxx-206" \
+ "21.string.io.stdcxx-250" \
+ "21.string.replace.stdcxx-175" \
+ "21.string.stdcxx-162" \
+ "21.string.stdcxx-231" \
+ "21.string.stdcxx-466" \
+ "22.locale.codecvt.stdcxx-435" \
+ "22.locale.cons.stdcxx-485" \
+ "22.locale.messages.stdcxx-542" \
+ "22.locale.money.get.stdcxx-62" \
+ "22.locale.num.put.stdcxx-2" \
+ "22.locale.stdcxx-554" \
+ "23.associative.stdcxx-16" \
+ "23.bitset.cons.stdcxx-297" \
+ "23.deque.special.stdcxx-127" \
+ "23.list.cons.stdcxx-268" \
+ "23.list.insert.stdcxx-331" \
+ "23.list.special.stdcxx-334" \
+ "23.set.stdcxx-216" \
+ "23.vector.bool.stdcxx-235" \
+ "23.vector.stdcxx-611" \
+ "24.istream.iterator.cons.stdcxx-645" \
+ "24.istream.iterator.ops.stdcxx-321" \
+ "24.operations.stdcxx-234" \
+ "26.valarray.binary.stdcxx-237" \
+ "26.valarray.members.stdcxx-313" \
+ "26.valarray.members.stdcxx-318" \
+ "26.valarray.sub.stdcxx-224" \
+ "26.valarray.sub.stdcxx-309" \
+ "26.valarray.sub.stdcxx-448" \
+ "26.valarray.transcend.stdcxx-315" \
+ "26.valarray.unary.stdcxx-314" \
+ "27.basic.ios.copyfmt.stdcxx-766" \
+ "27.basic.ios.tie.stdcxx-804" \
+ "27.cstdio.stdcxx-195" \
+ "27.filebuf.members.stdcxx-308" \
+ "27.filebuf.virtuals.stdcxx-522" \
+ "27.ostream.unformatted.stdcxx-626" \
+ "27.streambuf.imbue.stdcxx-307" \
+ "27.stringbuf.members.stdcxx-427" \
+ "27.stringbuf.overflow.stdcxx-795" \
+ "27.stringbuf.str.stdcxx-514" \
+ "27.stringbuf.xsputn.stdcxx-515" \
+ "27.stringbuf.xsputn.stdcxx-576"
+ do
+ rm -f "${file}.out"
+ done
+
+ if [ -f core ] ; then
+ rm -f core
+ fi
+}
+
+check_args $@
+run_tests
+do_cleanup
+
+exit 0
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/run_tests.sh Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,569 @@
+#!/bin/bash
+#
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+#
+#
+unset LD_LIBRARY_PATH
+unset LD_LIBRARY_PATH_32
+unset LD_LIBRARY_PATH_64
+unset LD_PRELOAD
+unset LD_PRELOAD_32
+unset LD_PRELOAD_64
+
+export NLSPATH=""
+export TOPDIR="../../"
+export NTHREADS=2
+export NLOOPS=100
+export DO_CLEANUP="no"
+export INDEX_HTML="index.html"
+export LD_LIBRARY_PATH="../lib"
+export LD_LIBRARY_PATH_32="../lib"
+export LD_LIBRARY_PATH_64="../lib"
+
+UNKNOWN_ARG=no
+PRINT_HELP=no
+
+check_args() {
+ while [ "$#" -gt 0 ] ; do
+ UNKNOWN_ARG=no
+ case "$1" in
+ --nthreads=*)
+ NTHREADS=`echo $1 | sed "s,^--nthreads=\(.*\),\1,"`
+ ;;
+ --nloops=*)
+ NLOOPS=`echo $1 | sed "s,^--nloops=\(.*\),\1,"`
+ ;;
+ --topdir=*)
+ TOPDIR=`echo $1 | sed "s,^--topdir=\(.*\),\1,"`
+ ;;
+ --cleanup)
+ DO_CLEANUP=yes
+ ;;
+ --help)
+ PRINT_HELP=yes
+ ;;
+ *)
+ UNKNOWN_ARG=yes
+ ;;
+ esac
+
+ if [ "${UNKNOWN_ARG}" = "yes" ] ; then
+ echo "$1: Invalid argument"
+ PRINT_HELP=yes
+ shift
+ continue
+ fi
+
+ shift
+ done
+
+ export NTHREADS NLOOPS TOPDIR DO_CLEANUP
+
+ if [ "$PRINT_HELP" = "yes" ] || [ "$UNKNOWN_ARG" = "yes" ] ; then
+ echo "Usage [1]: `basename $0` [ --nthreads=<number-of-threads> ] [ --nloops=<number-of-loops> ] [ --topdir=\$(top_srcdir) ]"
+ echo "Usage [2]: `basename $0` [ --cleanup ]"
+ echo "Please set --nloops and --nthreads to something reasonable."
+ exit 1
+ fi
+}
+
+check_environment() {
+ HERE="`pwd`"
+
+ cd ${TOPDIR}/build/lib
+
+ if [ ! -f rwstderr.cat ] ; then
+ echo "Message catalog 'rwstderr.cat' missing or not found!"
+ echo "Some tests will not perform correctly."
+ return
+ fi
+
+ if [ ! -f rwstderr ] ; then
+ cp -fp rwstderr.cat rwstderr
+ fi
+
+ export NLSPATH="`pwd`/rwstderr"
+
+ cd ${HERE}
+}
+
+setup_index_html() {
+ cat /dev/null > ${INDEX_HTML}
+}
+
+run_single_threaded_tests() {
+ if [ "${DO_CLEANUP}" = "yes" ] ; then
+ return
+ fi
+
+ echo "------------------------------------------------------------"
+ echo "Test programs atomic_add and atomic_xchg take a very long"
+ echo "time to run. Please be patient."
+ echo "------------------------------------------------------------"
+
+ for file in \
+ "0.alloc" \
+ "0.braceexp" \
+ "0.char" \
+ "0.cmdopts" \
+ "0.ctype" \
+ "0.fnmatch" \
+ "0.inputiter" \
+ "0.new" \
+ "0.outputiter" \
+ "0.printf" \
+ "0.process" \
+ "0.strncmp" \
+ "0.valcmp" \
+ "17.extensions" \
+ "17.names" \
+ "18.csetjmp" \
+ "18.exception" \
+ "18.limits.cvqual" \
+ "18.limits.traps" \
+ "18.numeric.special.float" \
+ "18.numeric.special.int" \
+ "18.setjmp" \
+ "18.support.dynamic" \
+ "18.support.rtti" \
+ "19.cerrno" \
+ "19.std.exceptions" \
+ "20.auto.ptr" \
+ "20.function.objects" \
+ "20.operators" \
+ "20.pairs" \
+ "20.specialized" \
+ "20.temp.buffer" \
+ "21.cctype" \
+ "21.cwchar" \
+ "21.cwctype" \
+ "21.string.access" \
+ "21.string.append" \
+ "21.string.assign" \
+ "21.string.capacity" \
+ "21.string.compare" \
+ "21.string.cons" \
+ "21.string.copy" \
+ "21.string.erase" \
+ "21.string.exceptions" \
+ "21.string.find" \
+ "21.string.find.first.not.of" \
+ "21.string.find.first.of" \
+ "21.string.find.last.not.of" \
+ "21.string.find.last.of" \
+ "21.string.insert" \
+ "21.string.io" \
+ "21.string.iterators" \
+ "21.string.operators" \
+ "21.string.op.plus" \
+ "21.string.op.plus.equal" \
+ "21.string.replace" \
+ "21.string.replace.stdcxx-170" \
+ "21.string.rfind" \
+ "21.string.substr" \
+ "21.string.swap" \
+ "22.locale.codecvt.length" \
+ "22.locale.codecvt.out" \
+ "22.locale.ctype" \
+ "22.locale.ctype.is" \
+ "22.locale.ctype.narrow" \
+ "22.locale.ctype.scan" \
+ "22.locale.ctype.tolower" \
+ "22.locale.ctype.toupper" \
+ "22.locale.ctype.widen" \
+ "22.locale.messages" \
+ "22.locale.money.get" \
+ "22.locale.moneypunct" \
+ "22.locale.money.put" \
+ "22.locale.num.get" \
+ "22.locale.numpunct" \
+ "22.locale.num.put" \
+ "22.locale.time.get" \
+ "22.locale.time.put" \
+ "23.bitset" \
+ "23.bitset.cons" \
+ "23.deque.iterators" \
+ "23.deque.modifiers" \
+ "23.deque.special" \
+ "23.list.assign" \
+ "23.list.capacity" \
+ "23.list.cons" \
+ "23.list.erase" \
+ "23.list.insert" \
+ "23.list.iterators" \
+ "23.list.special" \
+ "23.vector.allocator" \
+ "23.vector.capacity" \
+ "23.vector.cons" \
+ "23.vector.modifiers" \
+ "24.istream.iterator" \
+ "25.adjacent.find" \
+ "25.binary.search" \
+ "25.copy" \
+ "25.equal" \
+ "25.equal.range" \
+ "25.fill" \
+ "25.find" \
+ "25.find.end" \
+ "25.find.first" \
+ "25.for.each" \
+ "25.generate" \
+ "25.heap" \
+ "25.includes" \
+ "25.lex.comparison" \
+ "25.libc" \
+ "25.lower.bound" \
+ "25.merge" \
+ "25.min.max" \
+ "25.mismatch" \
+ "25.nth.element" \
+ "25.partial.sort" \
+ "25.partitions" \
+ "25.permutation" \
+ "25.random.shuffle" \
+ "25.remove" \
+ "25.replace" \
+ "25.reverse" \
+ "25.rotate" \
+ "25.search" \
+ "25.set.difference" \
+ "25.set.intersection" \
+ "25.set.sym.difference" \
+ "25.set.union" \
+ "25.sort" \
+ "25.swap" \
+ "25.transform" \
+ "25.unique" \
+ "25.upper.bound" \
+ "26.accumulate" \
+ "26.adjacent.diff" \
+ "26.class.gslice" \
+ "26.c.math" \
+ "26.gslice.array.cassign" \
+ "26.indirect.array" \
+ "26.inner.product" \
+ "26.mask.array" \
+ "26.partial.sum" \
+ "26.valarray.cassign" \
+ "26.valarray.cons" \
+ "26.valarray.transcend" \
+ "27.filebuf.codecvt" \
+ "27.forward" \
+ "27.istream.fmat.arith" \
+ "27.istream.manip" \
+ "27.istream.readsome" \
+ "27.istream.sentry" \
+ "27.istream.unformatted.get" \
+ "27.objects" \
+ "27.ostream" \
+ "27.stringbuf.virtuals" \
+ "2.smartptr.shared" \
+ "2.smartptr.weak" \
+ "8.cstdint"
+ do
+ echo "------------------------------------------------------------"
+ if [ -f ${file} ] ; then
+ echo -n "Running test program ${file} ... "
+ logfile="${file}.out"
+ ./${file} > ${logfile} 2>&1
+ ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ echo "SUCCESS."
+ else
+ echo "FAIL."
+ fi
+ echo "<a href=\"${file}.out\">${file}.out</a>" >> ${INDEX_HTML}
+ echo "</br>" >> ${INDEX_HTML}
+ pat=`cat ${file}.out | egrep 'ASSERTION|ERROR|FATAL'`
+ if [ "x${pat}" != "x" ] ; then
+ echo "############################################################"
+ tail -9 ${file}.out | egrep 'ASSERTION|ERROR|FATAL' | egrep '%'
+ echo "############################################################"
+ fi
+ else
+ echo "Test program ${file} not found. Skipping."
+ fi
+ echo "------------------------------------------------------------"
+ done
+}
+
+run_mt_tests() {
+ if [ "${DO_CLEANUP}" = "yes" ] ; then
+ return
+ fi
+
+ for file in \
+ "19.exceptions.mt" \
+ "20.temp.buffer.mt" \
+ "21.string.cons.mt" \
+ "21.string.push_back.mt" \
+ "22.locale.codecvt.mt" \
+ "22.locale.cons.mt" \
+ "22.locale.ctype.mt" \
+ "22.locale.globals.mt" \
+ "22.locale.messages.mt" \
+ "22.locale.money.get.mt" \
+ "22.locale.moneypunct.mt" \
+ "22.locale.money.put.mt" \
+ "22.locale.num.get.mt" \
+ "22.locale.numpunct.mt" \
+ "22.locale.num.put.mt" \
+ "22.locale.statics.mt" \
+ "22.locale.time.get.mt" \
+ "22.locale.time.put.mt" \
+ "atomic_add" \
+ "atomic_xchg"
+ do
+ echo "------------------------------------------------------------"
+ if [ -f ${file} ] ; then
+ echo -n "Running test program ${file} ... "
+ logfile="${file}.out"
+ if [ "x${file}" = "x22.locale.num.put.mt" ] ; then
+ ./${file} --nthreads=2 --nloops=10 --nlocales=8 > ${logfile} 2>&1
+ else
+ ./${file} --nthreads=${NTHREADS} --nloops=${NLOOPS} > ${logfile} 2>&1
+ fi
+ ret=$?
+ if [ ${ret} -eq 0 ] ; then
+ echo "SUCCESS."
+ else
+ echo "FAIL."
+ fi
+ echo "<a href=\"${file}.out\">${file}.out</a>" >> ${INDEX_HTML}
+ echo "</br>" >> ${INDEX_HTML}
+ pat=`cat ${file}.out | egrep 'ASSERTION|ERROR|FATAL'`
+ if [ "x${pat}" != "x" ] ; then
+ echo "############################################################"
+ tail -9 ${file}.out | egrep 'ASSERTION|ERROR|FATAL' | egrep '%'
+ echo "############################################################"
+ fi
+ else
+ echo "Test program ${file} not found. Skipping."
+ fi
+ echo "------------------------------------------------------------"
+ done
+}
+
+do_cleanup() {
+ if [ "${DO_CLEANUP}" = "no" ] ; then
+ return
+ fi
+
+ for file in \
+ "0.alloc" \
+ "0.braceexp" \
+ "0.char" \
+ "0.cmdopts" \
+ "0.ctype" \
+ "0.fnmatch" \
+ "0.inputiter" \
+ "0.new" \
+ "0.outputiter" \
+ "0.printf" \
+ "0.process" \
+ "0.strncmp" \
+ "0.valcmp" \
+ "17.extensions" \
+ "17.names" \
+ "18.csetjmp" \
+ "18.exception" \
+ "18.limits.cvqual" \
+ "18.limits.traps" \
+ "18.numeric.special.float" \
+ "18.numeric.special.int" \
+ "18.setjmp" \
+ "18.support.dynamic" \
+ "18.support.rtti" \
+ "19.cerrno" \
+ "19.exceptions.mt" \
+ "19.std.exceptions" \
+ "20.auto.ptr" \
+ "20.function.objects" \
+ "20.operators" \
+ "20.pairs" \
+ "20.specialized" \
+ "20.temp.buffer" \
+ "20.temp.buffer.mt" \
+ "21.cctype" \
+ "21.cwchar" \
+ "21.cwctype" \
+ "21.string.access" \
+ "21.string.append" \
+ "21.string.assign" \
+ "21.string.capacity" \
+ "21.string.compare" \
+ "21.string.cons" \
+ "21.string.cons.mt" \
+ "21.string.copy" \
+ "21.string.erase" \
+ "21.string.exceptions" \
+ "21.string.find" \
+ "21.string.find.first.not.of" \
+ "21.string.find.first.of" \
+ "21.string.find.last.not.of" \
+ "21.string.find.last.of" \
+ "21.string.insert" \
+ "21.string.io" \
+ "21.string.iterators" \
+ "21.string.operators" \
+ "21.string.op.plus" \
+ "21.string.op.plus.equal" \
+ "21.string.push_back.mt" \
+ "21.string.replace" \
+ "21.string.replace.stdcxx-170" \
+ "21.string.rfind" \
+ "21.string.substr" \
+ "21.string.swap" \
+ "22.locale.codecvt.length" \
+ "22.locale.codecvt.mt" \
+ "22.locale.codecvt.out" \
+ "22.locale.cons.mt" \
+ "22.locale.ctype" \
+ "22.locale.ctype.is" \
+ "22.locale.ctype.mt" \
+ "22.locale.ctype.narrow" \
+ "22.locale.ctype.scan" \
+ "22.locale.ctype.tolower" \
+ "22.locale.ctype.toupper" \
+ "22.locale.ctype.widen" \
+ "22.locale.globals.mt" \
+ "22.locale.messages" \
+ "22.locale.messages.mt" \
+ "22.locale.money.get" \
+ "22.locale.money.get.mt" \
+ "22.locale.moneypunct" \
+ "22.locale.moneypunct.mt" \
+ "22.locale.money.put" \
+ "22.locale.money.put.mt" \
+ "22.locale.num.get" \
+ "22.locale.num.get.mt" \
+ "22.locale.numpunct" \
+ "22.locale.numpunct.mt" \
+ "22.locale.num.put" \
+ "22.locale.num.put.mt" \
+ "22.locale.statics.mt" \
+ "22.locale.time.get" \
+ "22.locale.time.get.mt" \
+ "22.locale.time.put" \
+ "22.locale.time.put.mt" \
+ "23.bitset" \
+ "23.bitset.cons" \
+ "23.deque.iterators" \
+ "23.deque.modifiers" \
+ "23.deque.special" \
+ "23.list.assign" \
+ "23.list.capacity" \
+ "23.list.cons" \
+ "23.list.erase" \
+ "23.list.insert" \
+ "23.list.iterators" \
+ "23.list.special" \
+ "23.vector.allocator" \
+ "23.vector.capacity" \
+ "23.vector.cons" \
+ "23.vector.modifiers" \
+ "24.istream.iterator" \
+ "25.adjacent.find" \
+ "25.binary.search" \
+ "25.copy" \
+ "25.equal" \
+ "25.equal.range" \
+ "25.fill" \
+ "25.find" \
+ "25.find.end" \
+ "25.find.first" \
+ "25.for.each" \
+ "25.generate" \
+ "25.heap" \
+ "25.includes" \
+ "25.lex.comparison" \
+ "25.libc" \
+ "25.lower.bound" \
+ "25.merge" \
+ "25.min.max" \
+ "25.mismatch" \
+ "25.nth.element" \
+ "25.partial.sort" \
+ "25.partitions" \
+ "25.permutation" \
+ "25.random.shuffle" \
+ "25.remove" \
+ "25.replace" \
+ "25.reverse" \
+ "25.rotate" \
+ "25.search" \
+ "25.set.difference" \
+ "25.set.intersection" \
+ "25.set.sym.difference" \
+ "25.set.union" \
+ "25.sort" \
+ "25.swap" \
+ "25.transform" \
+ "25.unique" \
+ "25.upper.bound" \
+ "26.accumulate" \
+ "26.adjacent.diff" \
+ "26.class.gslice" \
+ "26.c.math" \
+ "26.gslice.array.cassign" \
+ "26.indirect.array" \
+ "26.inner.product" \
+ "26.mask.array" \
+ "26.partial.sum" \
+ "26.valarray.cassign" \
+ "26.valarray.cons" \
+ "26.valarray.transcend" \
+ "26.valarray.transcend.out" \
+ "27.filebuf.codecvt" \
+ "27.forward" \
+ "27.istream.fmat.arith" \
+ "27.istream.manip" \
+ "27.istream.readsome" \
+ "27.istream.sentry" \
+ "27.istream.unformatted.get" \
+ "27.objects" \
+ "27.ostream" \
+ "27.stringbuf.virtuals" \
+ "2.smartptr.shared" \
+ "2.smartptr.weak" \
+ "8.cstdint" \
+ "atomic_add" \
+ "atomic_xchg"
+ do
+ rm -f "${file}.out"
+ done
+
+ rm -f ${INDEX_HTML}
+ rm -f core
+}
+
+check_args $@
+check_environment
+setup_index_html
+run_single_threaded_tests
+run_mt_tests
+do_cleanup
+
+exit 0
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/Solaris/rwconfig_std.h Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,50 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ */
+
+#ifndef __STDCXX_CONFIG_H
+#define __STDCXX_CONFIG_H
+
+#if defined(__i386) || defined(__amd64)
+
+#if defined(__amd64)
+#include "stdcxx_amd64.h"
+#else
+#include "stdcxx_i386.h"
+#endif
+
+#elif defined(__sparc) || defined(__sparcv9)
+
+#if defined(__sparcv9)
+#include "stdcxx_sparcv9.h"
+#else
+#include "stdcxx_sparc.h"
+#endif
+
+#else
+#error "Unknown Solaris ISA."
+#endif
+
+#endif /* __STDCXX_CONFIG_H */
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/amd64/1034-sunpro.config.amd64.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,43 @@
+--- stdcxx-4.2.1/etc/config/sunpro.config 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/sunpro.config 2009-03-30 11:28:21.364489000 -0400
+@@ -26,7 +26,7 @@
+ #
+ ########################################################################
+
+-CXX = CC
++SHELL = /bin/bash
+
+ # extract the "C++ m.n" substring from version string (whcih changes
+ # from one release of the compiler to another)
+@@ -59,10 +59,10 @@
+
+ PICFLAGS = -KPIC
+ LDSOFLAGS =
+-CXXFLAGS = -library=%none
++CXXFLAGS = -library=no%Cstd -library=Crun -features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic -instances=global -template=geninlinefuncs -verbose=template -xlang=c99 $(XREGS) $(XMEMALIGN) -xlibmieee -xbuiltin=%none -norunpath -xinline= -Qoption ccfe +d2,-xgeninl=system -Qoption ccfe -expand=10000 -Qoption ccfe ++boolflag:sunwcch=false -mt -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_PTHREAD_SEMANTICS -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 -D_XPG5 -D_RWSTD_NO_REPLACEABLE_NEW_DELETE -D_RWSTD_NO_EXT_OPERATOR_NEW -D_IN_BUILD_STDCXX -m64 -xarch=generic -xO3 -s +w2 -errtags -erroff=hidef
+ CXXPRELINK =
+-CPPFLAGS =
+-LDFLAGS = -library=%none
++CPPFLAGS = -I$(TOPDIR)/include/ansi -I$(TOPDIR)/include/tr1 -I$(TOPDIR)/include
++LDFLAGS = -library=no%Cstd -library=Crun -m64 -xarch=generic -lpthread -lumem -lm -lc -z ignore
+ LDSOFLAGS = -G
+
+ # use CC to invoke the compiler (needed to pick up template
+@@ -77,7 +77,7 @@
+ DEBUG_CXXFLAGS = -g
+ DEBUG_CPPFLAGS =
+
+-OPTMZ_CXXFLAGS = -O
++OPTMZ_CXXFLAGS = -xO3
+ OPTMZ_CPPFLAGS =
+
+ # shared/static library options
+@@ -124,7 +124,7 @@
+ ifeq ($(shell expr $(CCMAJOR) \>= 5 \& $(CCMINOR) \>= 9),1)
+
+ # starting with Sun C++ 5.9, the compiler prefers the generic
+- # -m32 and -m64 options to the architecture specific -xarch
++ # -m32 and -m64 options to the architecture specific -xarch
+ # options some of which have been deprecated
+ wide_flags = -m64
+ narrow_flags = -m32
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/amd64/1035-GNUmakefile.tst.amd64.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,27 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.tst 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.tst 2009-03-30 11:15:57.061730000 -0400
+@@ -48,6 +48,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ # tests & rwtest library directories
+@@ -67,6 +77,7 @@
+
+ # do not compile these sources
+ OMIT_SRCS += $(notdir $(wildcard $(TESTDIR)/src/*.cpp)) 22_locale.cpp
++OMIT_SRCS += $(notdir $(wildcard $(TESTDIR)/regress/*.cpp)) 26.valarray.binary.stdcxx-237.cpp
+
+ # override setting from makefile.in (tests only)
+ CATFILE = rwstdmessages.cat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/amd64/1036-GNUmakefile.rwt.amd64.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.rwt 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.rwt 2009-03-30 11:15:53.971233000 -0400
+@@ -33,6 +33,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ # Generated when make is run in TOPDIR
+ include ../makefile.in
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/amd64/1037-GNUmakefile.lib.amd64.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,36 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.lib 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.lib 2009-03-30 11:15:47.741351000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=no%appl
++ XMEMALIGN := -xmemalign=8s
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+
+@@ -112,6 +122,8 @@
+ $(LIBLINK): $(LIB)
+ @echo "ln -sf $< $@" >> $(LOGFILE)
+ ln -sf $< $@
++ @echo "ln -sf $< $(LIBSONAME)" >> $(LOGFILE)
++ ln -sf $< $(LIBSONAME)
+
+ else
+
+@@ -138,6 +150,7 @@
+ if [ $(LIBLINK) != $(LIB) ]; then \
+ rm $(PREFIX)/lib/$(LIBLINK); \
+ ln -s $(LIB) $(PREFIX)/lib/$(LIBLINK); \
++ ln -s $(LIB) $(PREFIX)/lib/$(LIBSONAME); \
+ fi
+ mkdir -p $(PREFIX)/etc
+ cp $(CATFILE) $(PREFIX)/etc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/amd64/1038-GNUmakefile.ph.amd64.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,21 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.ph 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.ph 2009-03-30 11:15:50.711606000 -0400
+@@ -24,8 +24,17 @@
+ #
+ ########################################################################
+
+-include ../makefile.in
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
+
++include ../makefile.in
+
+ ########################################################################
+ # if PHDIR isn't set, don't try to build anything
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/amd64/1039-GNUmakefile.exm.amd64.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.exm 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.exm 2009-03-30 11:15:44.701196000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ EXMDIR = $(TOPDIR)/examples
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/amd64/1040-GNUmakefile.cfg.amd64.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,75 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.cfg 2008-04-24 17:25:50.000000000 -0700
++++ stdcxx-4.2.1/etc/config/GNUmakefile.cfg 2009-07-25 14:57:02.019814635 -0700
+@@ -54,13 +54,22 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ SRCDIR = $(TOPDIR)/etc/config/src
+ VPATH = $(SRCDIR)
+
+ CPPFLAGS += -I.
+-CPPFLAGS := $(filter-out -I$(TOPDIR)/include/ansi,$(CPPFLAGS))
+
+ CXXFLAGS += $(WARNFLAGS)
+
+@@ -74,12 +83,13 @@
+ DASH_H = -H
+
+ CCNAME = $(CXX)-$(CCVER)
+-LOGFILE = config.log
++LOGFILE = $(TOPDIR)/config.log
+
+ # can't use LDOPTS when working with HP aCC, it's used by the linker
+ ifneq ($(CXX),aCC)
+ LOPT = LDOPTS
+ LDFLAGS += $(LDOPTS)
++ LDFLAGS += -R$(TOPDIR)/build/include
+ else
+ LOPT = _LDOPTS
+ LDFLAGS += $(_LDOPTS)
+@@ -113,9 +123,9 @@
+ # $(2): executable file name
+ # $(3): additional linker flags (optional)
+ define link
+- command="$(LD) $(1) $(LDFLAGS) $(3) -o $(2)"; \
++ command="$(CXX) $(CXXFLAGS) $(1) $(LDFLAGS) $(LDOPTS) $(3) -o $(2)"; \
+ echo "$$command" >>$(LOGFILE); \
+- $(LD) $(1) $(LDFLAGS) $(3) -o $(2) >>$(LOGFILE) 2>&1
++ $(CXX) $(CXXFLAGS) $(1) $(LDFLAGS) $(LDOPTS) $(3) -o $(2) >>$(LOGFILE) 2>&1
+ endef
+
+ # helper function to compile and link a file and log results
+@@ -127,10 +137,10 @@
+ # $(5): additional linker flags (optional)
+ define compile_then_link
+ command="$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(4) -c $(1) -o $(2)" \
+- "&& $(LD) $(2) $(LDFLAGS) $(5) -o $(3)"; \
++ "&& $(CXX) $(CXXFLAGS) $(2) $(LDFLAGS) $(LDOPTS) $(5) -o $(3)"; \
+ echo "$$command" >>$(LOGFILE); \
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(4) -c $(1) -o $(2) >>$(LOGFILE) 2>&1 \
+- && $(LD) $(2) $(LDFLAGS) $(5) -o $(3) >>$(LOGFILE) 2>&1
++ && $(CXX) $(CXXFLAGS) $(2) $(LDFLAGS) $(LDOPTS) $(5) -o $(3) >>$(LOGFILE) 2>&1
+ endef
+
+ # helper function to prelink a file and log results
+@@ -181,7 +191,7 @@
+ if [ $$? -eq 0 ] ; then \
+ opts=`sed -n "s/^[^A-Z_a-z0-9]*LDOPTS *= *\(.*\)/\1/p" \
+ $$src`; \
+- targets="$$file.o $$file run RUN=$$file $(LOPT)=$$opts"; \
++ targets="$$file.o $$file run RUN=$$file LDOPTS=$$opts $(LOPT)=$$opts"; \
+ elif [ `echo $$file | grep "\.lib"` ] ; then \
+ targets="$$file$(LIBSUFFIX)" ; \
+ elif [ `echo $$file | grep "\.sh"` ] ; then \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/amd64/1041-GNUmakefile.bin.amd64.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.bin 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.bin 2009-03-30 11:15:41.612721000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ SRCDIRS = $(TOPDIR)/util
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/i386/1034-sunpro.config.i386.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,34 @@
+--- stdcxx-4.2.1/etc/config/sunpro.config 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/sunpro.config 2009-03-30 11:17:58.959880000 -0400
+@@ -26,7 +26,7 @@
+ #
+ ########################################################################
+
+-CXX = CC
++SHELL = /bin/bash
+
+ # extract the "C++ m.n" substring from version string (whcih changes
+ # from one release of the compiler to another)
+@@ -59,10 +59,10 @@
+
+ PICFLAGS = -KPIC
+ LDSOFLAGS =
+-CXXFLAGS = -library=%none
++CXXFLAGS = -library=no%Cstd -library=Crun -features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic -instances=global -template=geninlinefuncs -verbose=template -xlang=c99 $(XREGS) $(XMEMALIGN) -xlibmieee -xbuiltin=%none -norunpath -xinline= -Qoption ccfe +d2,-xgeninl=system -Qoption ccfe -expand=10000 -Qoption ccfe ++boolflag:sunwcch=false -mt -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_PTHREAD_SEMANTICS -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 -D_XPG5 -D_RWSTD_NO_REPLACEABLE_NEW_DELETE -D_RWSTD_NO_EXT_OPERATOR_NEW -D_IN_BUILD_STDCXX -m32 -xarch=generic -xO3 -s +w2 -errtags -erroff=hidef
+ CXXPRELINK =
+-CPPFLAGS =
+-LDFLAGS = -library=%none
++CPPFLAGS = -I$(BUILDDIR)/include/ansi -I$(BUILDDIR)/include/tr1 -I$(BUILDDIR)/include -I$(TOPDIR)/include/ansi -I$(TOPDIR)/include/tr1 -I$(TOPDIR)/include
++LDFLAGS = -library=no%Cstd -library=Crun -m32 -xarch=generic -lpthread -lumem -lm -lc -z ignore
+ LDSOFLAGS = -G
+
+ # use CC to invoke the compiler (needed to pick up template
+@@ -77,7 +77,7 @@
+ DEBUG_CXXFLAGS = -g
+ DEBUG_CPPFLAGS =
+
+-OPTMZ_CXXFLAGS = -O
++OPTMZ_CXXFLAGS = -xO3
+ OPTMZ_CPPFLAGS =
+
+ # shared/static library options
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/i386/1035-GNUmakefile.tst.i386.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,27 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.tst 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.tst 2009-03-30 11:15:57.061730000 -0400
+@@ -48,6 +48,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ # tests & rwtest library directories
+@@ -67,6 +77,7 @@
+
+ # do not compile these sources
+ OMIT_SRCS += $(notdir $(wildcard $(TESTDIR)/src/*.cpp)) 22_locale.cpp
++OMIT_SRCS += $(notdir $(wildcard $(TESTDIR)/regress/*.cpp)) 26.valarray.binary.stdcxx-237.cpp
+
+ # override setting from makefile.in (tests only)
+ CATFILE = rwstdmessages.cat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/i386/1036-GNUmakefile.rwt.i386.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.rwt 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.rwt 2009-03-30 11:15:53.971233000 -0400
+@@ -33,6 +33,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ # Generated when make is run in TOPDIR
+ include ../makefile.in
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/i386/1037-GNUmakefile.lib.i386.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,36 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.lib 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.lib 2009-03-30 11:15:47.741351000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=no%appl
++ XMEMALIGN := -xmemalign=8s
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+
+@@ -112,6 +122,8 @@
+ $(LIBLINK): $(LIB)
+ @echo "ln -sf $< $@" >> $(LOGFILE)
+ ln -sf $< $@
++ @echo "ln -sf $< $(LIBSONAME)" >> $(LOGFILE)
++ ln -sf $< $(LIBSONAME)
+
+ else
+
+@@ -138,6 +150,7 @@
+ if [ $(LIBLINK) != $(LIB) ]; then \
+ rm $(PREFIX)/lib/$(LIBLINK); \
+ ln -s $(LIB) $(PREFIX)/lib/$(LIBLINK); \
++ ln -s $(LIB) $(PREFIX)/lib/$(LIBSONAME); \
+ fi
+ mkdir -p $(PREFIX)/etc
+ cp $(CATFILE) $(PREFIX)/etc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/i386/1038-GNUmakefile.ph.i386.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,21 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.ph 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.ph 2009-03-30 11:15:50.711606000 -0400
+@@ -24,8 +24,17 @@
+ #
+ ########################################################################
+
+-include ../makefile.in
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
+
++include ../makefile.in
+
+ ########################################################################
+ # if PHDIR isn't set, don't try to build anything
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/i386/1039-GNUmakefile.exm.i386.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.exm 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.exm 2009-03-30 11:15:44.701196000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ EXMDIR = $(TOPDIR)/examples
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/i386/1040-GNUmakefile.cfg.i386.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,75 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.cfg 2008-04-24 17:25:50.000000000 -0700
++++ stdcxx-4.2.1/etc/config/GNUmakefile.cfg 2009-07-25 14:57:02.019814635 -0700
+@@ -54,13 +54,22 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ SRCDIR = $(TOPDIR)/etc/config/src
+ VPATH = $(SRCDIR)
+
+ CPPFLAGS += -I.
+-CPPFLAGS := $(filter-out -I$(TOPDIR)/include/ansi,$(CPPFLAGS))
+
+ CXXFLAGS += $(WARNFLAGS)
+
+@@ -74,12 +83,13 @@
+ DASH_H = -H
+
+ CCNAME = $(CXX)-$(CCVER)
+-LOGFILE = config.log
++LOGFILE = $(TOPDIR)/config.log
+
+ # can't use LDOPTS when working with HP aCC, it's used by the linker
+ ifneq ($(CXX),aCC)
+ LOPT = LDOPTS
+ LDFLAGS += $(LDOPTS)
++ LDFLAGS += -R$(TOPDIR)/build/include
+ else
+ LOPT = _LDOPTS
+ LDFLAGS += $(_LDOPTS)
+@@ -113,9 +123,9 @@
+ # $(2): executable file name
+ # $(3): additional linker flags (optional)
+ define link
+- command="$(LD) $(1) $(LDFLAGS) $(3) -o $(2)"; \
++ command="$(CXX) $(CXXFLAGS) $(1) $(LDFLAGS) $(LDOPTS) $(3) -o $(2)"; \
+ echo "$$command" >>$(LOGFILE); \
+- $(LD) $(1) $(LDFLAGS) $(3) -o $(2) >>$(LOGFILE) 2>&1
++ $(CXX) $(CXXFLAGS) $(1) $(LDFLAGS) $(LDOPTS) $(3) -o $(2) >>$(LOGFILE) 2>&1
+ endef
+
+ # helper function to compile and link a file and log results
+@@ -127,10 +137,10 @@
+ # $(5): additional linker flags (optional)
+ define compile_then_link
+ command="$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(4) -c $(1) -o $(2)" \
+- "&& $(LD) $(2) $(LDFLAGS) $(5) -o $(3)"; \
++ "&& $(CXX) $(CXXFLAGS) $(2) $(LDFLAGS) $(LDOPTS) $(5) -o $(3)"; \
+ echo "$$command" >>$(LOGFILE); \
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(4) -c $(1) -o $(2) >>$(LOGFILE) 2>&1 \
+- && $(LD) $(2) $(LDFLAGS) $(5) -o $(3) >>$(LOGFILE) 2>&1
++ && $(CXX) $(CXXFLAGS) $(2) $(LDFLAGS) $(LDOPTS) $(5) -o $(3) >>$(LOGFILE) 2>&1
+ endef
+
+ # helper function to prelink a file and log results
+@@ -181,7 +191,7 @@
+ if [ $$? -eq 0 ] ; then \
+ opts=`sed -n "s/^[^A-Z_a-z0-9]*LDOPTS *= *\(.*\)/\1/p" \
+ $$src`; \
+- targets="$$file.o $$file run RUN=$$file $(LOPT)=$$opts"; \
++ targets="$$file.o $$file run RUN=$$file LDOPTS=$$opts $(LOPT)=$$opts"; \
+ elif [ `echo $$file | grep "\.lib"` ] ; then \
+ targets="$$file$(LIBSUFFIX)" ; \
+ elif [ `echo $$file | grep "\.sh"` ] ; then \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/i386/1041-GNUmakefile.bin.i386.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.bin 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.bin 2009-03-30 11:15:41.612721000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ SRCDIRS = $(TOPDIR)/util
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparc/1034-sunpro.config.sparc.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,43 @@
+--- stdcxx-4.2.1/etc/config/sunpro.config 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/sunpro.config 2009-03-29 15:37:31.543081000 -0400
+@@ -26,7 +26,7 @@
+ #
+ ########################################################################
+
+-CXX = CC
++SHELL = /bin/bash
+
+ # extract the "C++ m.n" substring from version string (whcih changes
+ # from one release of the compiler to another)
+@@ -59,10 +59,10 @@
+
+ PICFLAGS = -KPIC
+ LDSOFLAGS =
+-CXXFLAGS = -library=%none
++CXXFLAGS = -library=no%Cstd -library=Crun -features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic -instances=global -template=geninlinefuncs -verbose=template -xlang=c99 $(XREGS) -xvis=yes $(XMEMALIGN) -xlibmieee -xbuiltin=%none -xinline= -norunpath -Qoption ccfe +d2,-xgeninl=system -Qoption ccfe -expand=10000 -Qoption ccfe ++boolflag:sunwcch=false -Qoption iropt -xwrap_int -mt -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_PTHREAD_SEMANTICS -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 -D_XPG5 -D_RWSTD_NO_REPLACEABLE_NEW_DELETE -D_RWSTD_NO_EXT_OPERATOR_NEW -D_IN_BUILD_STDCXX -m32 -xtarget=ultra2 -xarch=sparcvis -xchip=ultra2 -xO4 -s +w2 -errtags -erroff=hidef
+ CXXPRELINK =
+-CPPFLAGS =
+-LDFLAGS = -library=%none
++CPPFLAGS = -I$(TOPDIR)/include/ansi -I$(TOPDIR)/include/tr1 -I$(TOPDIR)/include
++LDFLAGS = -library=no%Cstd -library=Crun -m32 -xtarget=ultra2 -xarch=sparcvis -xchip=ultra2 -lpthread -lumem -lm -lc -z ignore
+ LDSOFLAGS = -G
+
+ # use CC to invoke the compiler (needed to pick up template
+@@ -77,7 +77,7 @@
+ DEBUG_CXXFLAGS = -g
+ DEBUG_CPPFLAGS =
+
+-OPTMZ_CXXFLAGS = -O
++OPTMZ_CXXFLAGS = -xO4
+ OPTMZ_CPPFLAGS =
+
+ # shared/static library options
+@@ -124,7 +124,7 @@
+ ifeq ($(shell expr $(CCMAJOR) \>= 5 \& $(CCMINOR) \>= 9),1)
+
+ # starting with Sun C++ 5.9, the compiler prefers the generic
+- # -m32 and -m64 options to the architecture specific -xarch
++ # -m32 and -m64 options to the architecture specific -xarch
+ # options some of which have been deprecated
+ wide_flags = -m64
+ narrow_flags = -m32
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparc/1035-GNUmakefile.tst.sparc.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,27 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.tst 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.tst 2009-03-30 11:15:57.061730000 -0400
+@@ -48,6 +48,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ # tests & rwtest library directories
+@@ -67,6 +77,7 @@
+
+ # do not compile these sources
+ OMIT_SRCS += $(notdir $(wildcard $(TESTDIR)/src/*.cpp)) 22_locale.cpp
++OMIT_SRCS += $(notdir $(wildcard $(TESTDIR)/regress/*.cpp)) 26.valarray.binary.stdcxx-237.cpp
+
+ # override setting from makefile.in (tests only)
+ CATFILE = rwstdmessages.cat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparc/1036-GNUmakefile.rwt.sparc.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.rwt 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.rwt 2009-03-30 11:15:53.971233000 -0400
+@@ -33,6 +33,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ # Generated when make is run in TOPDIR
+ include ../makefile.in
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparc/1037-GNUmakefile.lib.sparc.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,36 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.lib 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.lib 2009-03-30 11:15:47.741351000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=no%appl
++ XMEMALIGN := -xmemalign=8s -misalign
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+
+@@ -112,6 +122,8 @@
+ $(LIBLINK): $(LIB)
+ @echo "ln -sf $< $@" >> $(LOGFILE)
+ ln -sf $< $@
++ @echo "ln -sf $< $(LIBSONAME)" >> $(LOGFILE)
++ ln -sf $< $(LIBSONAME)
+
+ else
+
+@@ -138,6 +150,7 @@
+ if [ $(LIBLINK) != $(LIB) ]; then \
+ rm $(PREFIX)/lib/$(LIBLINK); \
+ ln -s $(LIB) $(PREFIX)/lib/$(LIBLINK); \
++ ln -s $(LIB) $(PREFIX)/lib/$(LIBSONAME); \
+ fi
+ mkdir -p $(PREFIX)/etc
+ cp $(CATFILE) $(PREFIX)/etc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparc/1038-GNUmakefile.ph.sparc.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,21 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.ph 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.ph 2009-03-30 11:15:50.711606000 -0400
+@@ -24,8 +24,17 @@
+ #
+ ########################################################################
+
+-include ../makefile.in
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
+
++include ../makefile.in
+
+ ########################################################################
+ # if PHDIR isn't set, don't try to build anything
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparc/1039-GNUmakefile.exm.sparc.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.exm 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.exm 2009-03-30 11:15:44.701196000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ EXMDIR = $(TOPDIR)/examples
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparc/1040-GNUmakefile.cfg.sparc.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,75 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.cfg 2008-04-24 17:25:50.000000000 -0700
++++ stdcxx-4.2.1/etc/config/GNUmakefile.cfg 2009-07-25 14:57:02.019814635 -0700
+@@ -54,13 +54,22 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ SRCDIR = $(TOPDIR)/etc/config/src
+ VPATH = $(SRCDIR)
+
+ CPPFLAGS += -I.
+-CPPFLAGS := $(filter-out -I$(TOPDIR)/include/ansi,$(CPPFLAGS))
+
+ CXXFLAGS += $(WARNFLAGS)
+
+@@ -74,12 +83,13 @@
+ DASH_H = -H
+
+ CCNAME = $(CXX)-$(CCVER)
+-LOGFILE = config.log
++LOGFILE = $(TOPDIR)/config.log
+
+ # can't use LDOPTS when working with HP aCC, it's used by the linker
+ ifneq ($(CXX),aCC)
+ LOPT = LDOPTS
+ LDFLAGS += $(LDOPTS)
++ LDFLAGS += -R$(TOPDIR)/build/include
+ else
+ LOPT = _LDOPTS
+ LDFLAGS += $(_LDOPTS)
+@@ -113,9 +123,9 @@
+ # $(2): executable file name
+ # $(3): additional linker flags (optional)
+ define link
+- command="$(LD) $(1) $(LDFLAGS) $(3) -o $(2)"; \
++ command="$(CXX) $(CXXFLAGS) $(1) $(LDFLAGS) $(LDOPTS) $(3) -o $(2)"; \
+ echo "$$command" >>$(LOGFILE); \
+- $(LD) $(1) $(LDFLAGS) $(3) -o $(2) >>$(LOGFILE) 2>&1
++ $(CXX) $(CXXFLAGS) $(1) $(LDFLAGS) $(LDOPTS) $(3) -o $(2) >>$(LOGFILE) 2>&1
+ endef
+
+ # helper function to compile and link a file and log results
+@@ -127,10 +137,10 @@
+ # $(5): additional linker flags (optional)
+ define compile_then_link
+ command="$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(4) -c $(1) -o $(2)" \
+- "&& $(LD) $(2) $(LDFLAGS) $(5) -o $(3)"; \
++ "&& $(CXX) $(CXXFLAGS) $(2) $(LDFLAGS) $(LDOPTS) $(5) -o $(3)"; \
+ echo "$$command" >>$(LOGFILE); \
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(4) -c $(1) -o $(2) >>$(LOGFILE) 2>&1 \
+- && $(LD) $(2) $(LDFLAGS) $(5) -o $(3) >>$(LOGFILE) 2>&1
++ && $(CXX) $(CXXFLAGS) $(2) $(LDFLAGS) $(LDOPTS) $(5) -o $(3) >>$(LOGFILE) 2>&1
+ endef
+
+ # helper function to prelink a file and log results
+@@ -181,7 +191,7 @@
+ if [ $$? -eq 0 ] ; then \
+ opts=`sed -n "s/^[^A-Z_a-z0-9]*LDOPTS *= *\(.*\)/\1/p" \
+ $$src`; \
+- targets="$$file.o $$file run RUN=$$file $(LOPT)=$$opts"; \
++ targets="$$file.o $$file run RUN=$$file LDOPTS=$$opts $(LOPT)=$$opts"; \
+ elif [ `echo $$file | grep "\.lib"` ] ; then \
+ targets="$$file$(LIBSUFFIX)" ; \
+ elif [ `echo $$file | grep "\.sh"` ] ; then \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparc/1041-GNUmakefile.bin.sparc.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.bin 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.bin 2009-03-30 11:15:41.612721000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=8i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ SRCDIRS = $(TOPDIR)/util
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparcv9/1034-sunpro.config.sparcv9.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,43 @@
+--- stdcxx-4.2.1/etc/config/sunpro.config 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/sunpro.config 2009-03-29 18:32:16.095641000 -0400
+@@ -26,7 +26,7 @@
+ #
+ ########################################################################
+
+-CXX = CC
++SHELL = /bin/bash
+
+ # extract the "C++ m.n" substring from version string (whcih changes
+ # from one release of the compiler to another)
+@@ -59,10 +59,10 @@
+
+ PICFLAGS = -KPIC
+ LDSOFLAGS =
+-CXXFLAGS = -library=%none
++CXXFLAGS = -library=no%Cstd -library=Crun -features=except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic -instances=global -template=geninlinefuncs -verbose=template -xlang=c99 $(XREGS) -xvis=yes $(XMEMALIGN) -xlibmieee -xbuiltin=%none -xinline= -norunpath -Qoption ccfe +d2,-xgeninl=system -Qoption ccfe -expand=10000 -Qoption ccfe ++boolflag:sunwcch=false -Qoption iropt -xwrap_int -mt -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_PTHREAD_SEMANTICS -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 -D_XPG5 -D_RWSTD_NO_REPLACEABLE_NEW_DELETE -D_RWSTD_NO_EXT_OPERATOR_NEW -D_IN_BUILD_STDCXX -m64 -xtarget=ultra2 -xarch=sparcvis -xchip=ultra2 -xO4 -s +w2 -errtags -erroff=hidef
+ CXXPRELINK =
+-CPPFLAGS =
+-LDFLAGS = -library=%none
++CPPFLAGS = -I$(TOPDIR)/include/ansi -I$(TOPDIR)/include/tr1 -I$(TOPDIR)/include
++LDFLAGS = -library=no%Cstd -library=Crun -m64 -xtarget=ultra2 -xarch=sparcvis -xchip=ultra2 -lpthread -lumem -lm -lc -z ignore
+ LDSOFLAGS = -G
+
+ # use CC to invoke the compiler (needed to pick up template
+@@ -77,7 +77,7 @@
+ DEBUG_CXXFLAGS = -g
+ DEBUG_CPPFLAGS =
+
+-OPTMZ_CXXFLAGS = -O
++OPTMZ_CXXFLAGS = -xO4
+ OPTMZ_CPPFLAGS =
+
+ # shared/static library options
+@@ -124,7 +124,7 @@
+ ifeq ($(shell expr $(CCMAJOR) \>= 5 \& $(CCMINOR) \>= 9),1)
+
+ # starting with Sun C++ 5.9, the compiler prefers the generic
+- # -m32 and -m64 options to the architecture specific -xarch
++ # -m32 and -m64 options to the architecture specific -xarch
+ # options some of which have been deprecated
+ wide_flags = -m64
+ narrow_flags = -m32
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparcv9/1035-GNUmakefile.tst.sparcv9.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,27 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.tst 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.tst 2009-03-30 11:15:57.061730000 -0400
+@@ -48,6 +48,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=16i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ # tests & rwtest library directories
+@@ -67,6 +77,7 @@
+
+ # do not compile these sources
+ OMIT_SRCS += $(notdir $(wildcard $(TESTDIR)/src/*.cpp)) 22_locale.cpp
++OMIT_SRCS += $(notdir $(wildcard $(TESTDIR)/regress/*.cpp)) 26.valarray.binary.stdcxx-237.cpp
+
+ # override setting from makefile.in (tests only)
+ CATFILE = rwstdmessages.cat
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparcv9/1036-GNUmakefile.rwt.sparcv9.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.rwt 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.rwt 2009-03-30 11:15:53.971233000 -0400
+@@ -33,6 +33,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=16i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ # Generated when make is run in TOPDIR
+ include ../makefile.in
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparcv9/1037-GNUmakefile.lib.sparcv9.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,36 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.lib 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.lib 2009-03-30 11:15:47.741351000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=no%appl
++ XMEMALIGN := -xmemalign=16s
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+
+@@ -112,6 +122,8 @@
+ $(LIBLINK): $(LIB)
+ @echo "ln -sf $< $@" >> $(LOGFILE)
+ ln -sf $< $@
++ @echo "ln -sf $< $(LIBSONAME)" >> $(LOGFILE)
++ ln -sf $< $(LIBSONAME)
+
+ else
+
+@@ -138,6 +150,7 @@
+ if [ $(LIBLINK) != $(LIB) ]; then \
+ rm $(PREFIX)/lib/$(LIBLINK); \
+ ln -s $(LIB) $(PREFIX)/lib/$(LIBLINK); \
++ ln -s $(LIB) $(PREFIX)/lib/$(LIBSONAME); \
+ fi
+ mkdir -p $(PREFIX)/etc
+ cp $(CATFILE) $(PREFIX)/etc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparcv9/1038-GNUmakefile.ph.sparcv9.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,21 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.ph 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.ph 2009-03-30 11:15:50.711606000 -0400
+@@ -24,8 +24,17 @@
+ #
+ ########################################################################
+
+-include ../makefile.in
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=16i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
+
++include ../makefile.in
+
+ ########################################################################
+ # if PHDIR isn't set, don't try to build anything
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparcv9/1039-GNUmakefile.exm.sparcv9.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.exm 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.exm 2009-03-30 11:15:44.701196000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=16i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ EXMDIR = $(TOPDIR)/examples
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparcv9/1040-GNUmakefile.cfg.sparcv9.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,75 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.cfg 2008-04-24 17:25:50.000000000 -0700
++++ stdcxx-4.2.1/etc/config/GNUmakefile.cfg 2009-07-25 14:57:02.019814635 -0700
+@@ -54,13 +54,22 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=16i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ SRCDIR = $(TOPDIR)/etc/config/src
+ VPATH = $(SRCDIR)
+
+ CPPFLAGS += -I.
+-CPPFLAGS := $(filter-out -I$(TOPDIR)/include/ansi,$(CPPFLAGS))
+
+ CXXFLAGS += $(WARNFLAGS)
+
+@@ -74,12 +83,13 @@
+ DASH_H = -H
+
+ CCNAME = $(CXX)-$(CCVER)
+-LOGFILE = config.log
++LOGFILE = $(TOPDIR)/config.log
+
+ # can't use LDOPTS when working with HP aCC, it's used by the linker
+ ifneq ($(CXX),aCC)
+ LOPT = LDOPTS
+ LDFLAGS += $(LDOPTS)
++ LDFLAGS += -R$(TOPDIR)/build/include
+ else
+ LOPT = _LDOPTS
+ LDFLAGS += $(_LDOPTS)
+@@ -113,9 +123,9 @@
+ # $(2): executable file name
+ # $(3): additional linker flags (optional)
+ define link
+- command="$(LD) $(1) $(LDFLAGS) $(3) -o $(2)"; \
++ command="$(CXX) $(CXXFLAGS) $(1) $(LDFLAGS) $(LDOPTS) $(3) -o $(2)"; \
+ echo "$$command" >>$(LOGFILE); \
+- $(LD) $(1) $(LDFLAGS) $(3) -o $(2) >>$(LOGFILE) 2>&1
++ $(CXX) $(CXXFLAGS) $(1) $(LDFLAGS) $(LDOPTS) $(3) -o $(2) >>$(LOGFILE) 2>&1
+ endef
+
+ # helper function to compile and link a file and log results
+@@ -127,10 +137,10 @@
+ # $(5): additional linker flags (optional)
+ define compile_then_link
+ command="$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(4) -c $(1) -o $(2)" \
+- "&& $(LD) $(2) $(LDFLAGS) $(5) -o $(3)"; \
++ "&& $(CXX) $(CXXFLAGS) $(2) $(LDFLAGS) $(LDOPTS) $(5) -o $(3)"; \
+ echo "$$command" >>$(LOGFILE); \
+ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(4) -c $(1) -o $(2) >>$(LOGFILE) 2>&1 \
+- && $(LD) $(2) $(LDFLAGS) $(5) -o $(3) >>$(LOGFILE) 2>&1
++ && $(CXX) $(CXXFLAGS) $(2) $(LDFLAGS) $(LDOPTS) $(5) -o $(3) >>$(LOGFILE) 2>&1
+ endef
+
+ # helper function to prelink a file and log results
+@@ -181,7 +191,7 @@
+ if [ $$? -eq 0 ] ; then \
+ opts=`sed -n "s/^[^A-Z_a-z0-9]*LDOPTS *= *\(.*\)/\1/p" \
+ $$src`; \
+- targets="$$file.o $$file run RUN=$$file $(LOPT)=$$opts"; \
++ targets="$$file.o $$file run RUN=$$file LDOPTS=$$opts $(LOPT)=$$opts"; \
+ elif [ `echo $$file | grep "\.lib"` ] ; then \
+ targets="$$file$(LIBSUFFIX)" ; \
+ elif [ `echo $$file | grep "\.sh"` ] ; then \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/isa_patches/sparcv9/1041-GNUmakefile.bin.sparcv9.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,19 @@
+--- stdcxx-4.2.1/etc/config/GNUmakefile.bin 2008-04-24 20:25:50.000000000 -0400
++++ stdcxx-4.2.1/etc/config/GNUmakefile.bin 2009-03-30 11:15:41.612721000 -0400
+@@ -26,6 +26,16 @@
+ #
+ ########################################################################
+
++arch := $(shell mach)
++
++ifeq ($(arch),sparc)
++ XREGS := -xregs=appl
++ XMEMALIGN := -xmemalign=16i
++else
++ XREGS := -xregs=no%frameptr
++ XMEMALIGN :=
++endif
++
+ include ../makefile.in
+
+ SRCDIRS = $(TOPDIR)/util
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/000-driver.cpp.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,11 @@
+--- stdcxx-4.2.1/tests/src/driver.cpp 2008-04-24 20:23:00.000000000 -0400
++++ stdcxx-4.2.1/tests/src/driver.cpp 2009-03-27 22:47:58.487126000 -0400
+@@ -301,6 +301,8 @@
+ RW_TEST_STR (__GLIBC__) "." \
+ RW_TEST_STR (__GLIBC_MINOR__)
+
++# elif defined (__SunOS_5_11)
++# define RW_TEST_OS "sunos-5.11"
+ # elif defined (__SunOS_5_10)
+ # define RW_TEST_OS "sunos-5.10"
+ # elif defined (__SunOS_5_9)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/001-22.locale.messages.cpp.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,41 @@
+--- stdcxx-4.2.1/tests/localization/22.locale.messages.cpp 2008-04-24 20:23:10.000000000 -0400
++++ stdcxx-4.2.1/tests/localization/22.locale.messages.cpp 2009-03-28 01:09:14.686728000 -0400
+@@ -51,6 +51,11 @@
+ # include <unistd.h> // for getcwd()
+ # endif
+ # include <fcntl.h> // for mode flags for _open
++#else
++# include <sys/types.h>
++# include <sys/stat.h>
++# include <unistd.h> // for getcwd()
++# include <fcntl.h> // for mode flags for _open
+ #endif // _RWSTD_NO_NEW_HEADER
+
+ #undef open
+@@ -695,7 +700,7 @@
+ std::messages_base::catalog cats [NCATS];
+
+ // detect descriptor leaks
+- const int fd1 = open (__FILE__, O_RDONLY);
++ const int fd1 = open (__FILE__, _RWSTD_O_RDONLY);
+
+ const std::locale loc = std::locale::classic ();
+
+@@ -731,7 +736,7 @@
+ close_catalog (msgs, cats [i], false, cname, __LINE__);
+ }
+
+- int fd2 = open (__FILE__, O_RDONLY);
++ int fd2 = open (__FILE__, _RWSTD_O_RDONLY);
+ rw_assert (fd2 - fd1 == 1, 0, __LINE__,
+ "messages<%s>::close() leaked %d file descriptors",
+ cname, fd2 - fd1 - 1);
+@@ -750,7 +755,7 @@
+ // close again fd2
+ close (fd2);
+
+- fd2 = open (__FILE__, O_RDONLY);
++ fd2 = open (__FILE__, _RWSTD_O_RDONLY);
+ rw_assert (fd2 - fd1 == 1, 0, __LINE__,
+ "messages<%s>::close() leaked %d file descriptors",
+ cname, fd2 - fd1 - 1);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/002-cstdint.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,425 @@
+--- stdcxx-4.2.1/include/tr1/cstdint 2008-04-24 20:23:49.000000000 -0400
++++ stdcxx-4.2.1/include/tr1/cstdint 2009-03-28 01:54:56.000000000 -0400
+@@ -1,359 +1,68 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cstdint - definition of integer types [tr.c99.cstdint]
+- *
+- * $Id: cstdint 590052 2007-10-30 12:44:14Z faridz $
+- *
+- ***************************************************************************
+- *
+- * 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 2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#ifndef _RWSTD_TR1_CSTDINT_INCLUDED
+-#define _RWSTD_TR1_CSTDINT_INCLUDED
+-
+-
+-#include <rw/_defs.h>
+-
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-_RWSTD_NAMESPACE (tr1) {
+-
+-#ifndef _RWSTD_BNO_TWOS_COMPLEMENT
+-# define _RWSTD_T_MIN(tmax) (-(tmax) - 1)
+-#else
+-# define _RWSTD_T_MIN(tmax) -(tmax)
+-#endif
+-
+-
+-/*** int8_t ***************************************************************/
+-
+-#ifdef _RWSTD_INT8_T
+-
+-// optional exact width types
+-typedef _RWSTD_INT8_T int8_t;
+-typedef _RWSTD_UINT8_T uint8_t;
+-
+-# define INT8_MAX 127
+-# define UINT8_MAX 255U
+-# define INT_LEAST8_MAX INT8_MAX
+-# define UINT_LEAST8_MAX UINT8_MAX
+-# define INT_FAST8_MAX INT8_MAX
+-# define UINT_FAST8_MAX UINT8_MAX
+-
+-#elif defined (_RWSTD_INT16_T)
+-
+-# define INT_LEAST8_MAX 32767
+-# define UINT_LEAST8_MAX 65535U
+-# define INT_FAST8_MAX 32767
+-# define UINT_FAST8_MAX 65535U
+-
+-#elif defined (_RWSTD_INT32_T)
+-
+-# if 4 == _RWSTD_INT_SIZE
+-# define INT_LEAST8_MAX _RWSTD_INT_MAX
+-# define UINT_LEAST8_MAX _RWSTD_UINT_MAX
+-# define INT_FAST8_MAX _RWSTD_INT_MAX
+-# define UINT_FAST8_MAX _RWSTD_UINT_MAX
+-# elif 4 == _RWSTD_LONG_SIZE
+-# define INT_LEAST8_MAX _RWSTD_LONG_MAX
+-# define UINT_LEAST8_MAX _RWSTD_ULONG_MAX
+-# define INT_FAST8_MAX _RWSTD_LONG_MAX
+-# define UINT_FAST8_MAX _RWSTD_ULONG_MAX
+-# endif
+-
+-#elif defined (_RWSTD_INT64_T)
+-
+-# if 8 == _RWSTD_LONG_SIZE
+-# define INT_LEAST8_MAX _RWSTD_LONG_MAX
+-# define UINT_LEAST8_MAX _RWSTD_ULONG_MAX
+-# define INT_FAST8_MAX _RWSTD_LONG_MAX
+-# define UINT_FAST8_MAX _RWSTD_ULONG_MAX
+-# elif 8 == _RWSTD_LLONG_SIZE
+-# define INT_LEAST8_MAX _RWSTD_LLONG_MAX
+-# define UINT_LEAST8_MAX _RWSTD_ULLONG_MAX
+-# define INT_FAST8_MAX _RWSTD_LLONG_MAX
+-# define UINT_FAST8_MAX _RWSTD_ULLONG_MAX
+-# endif
+-
+-#else // fallback on int
+-
+-# define INT_LEAST8_MAX _RWSTD_INT_MAX
+-# define UINT_LEAST8_MAX _RWSTD_UINT_MAX
+-# define INT_FAST8_MAX _RWSTD_INT_MAX
+-# define UINT_FAST8_MAX _RWSTD_UINT_MAX
+-
+-#endif // _RWSTD_INT{8,16,32,64}_T
+-
+-
+-/*** int16_t **************************************************************/
+-
+-#ifdef _RWSTD_INT16_T
+-
+-// optional exact width types
+-typedef _RWSTD_INT16_T int16_t;
+-typedef _RWSTD_UINT16_T uint16_t;
+-
+-# define INT16_MAX 32767
+-# define UINT16_MAX 65535U
+-
+-# define INT_LEAST16_MAX INT16_MAX
+-# define UINT_LEAST16_MAX UINT16_MAX
+-# define INT_FAST16_MAX INT16_MAX
+-# define UINT_FAST16_MAX UINT16_MAX
+-
+-#elif defined (_RWSTD_INT32_T)
+-
+-# if 4 == _RWSTD_INT_SIZE
+-# define INT_LEAST16_MAX _RWSTD_INT_MAX
+-# define UINT_LEAST16_MAX _RWSTD_UINT_MAX
+-# define INT_FAST16_MAX _RWSTD_INT_MAX
+-# define UINT_FAST16_MAX _RWSTD_UINT_MAX
+-# elif 4 == _RWSTD_LONG_SIZE
+-# define INT_LEAST16_MAX _RWSTD_LONG_MAX
+-# define UINT_LEAST16_MAX _RWSTD_ULONG_MAX
+-# define INT_FAST16_MAX _RWSTD_LONG_MAX
+-# define UINT_FAST16_MAX _RWSTD_ULONG_MAX
+-# endif
+-
+-#elif defined (_RWSTD_INT64_T)
+-
+-# if 8 == _RWSTD_LONG_SIZE
+-# define INT_LEAST16_MAX _RWSTD_LONG_MAX
+-# define UINT_LEAST16_MAX _RWSTD_ULONG_MAX
+-# define INT_FAST16_MAX _RWSTD_LONG_MAX
+-# define UINT_FAST16_MAX _RWSTD_ULONG_MAX
+-# elif 8 == _RWSTD_LLONG_SIZE
+-# define INT_LEAST16_MAX _RWSTD_LLONG_MAX
+-# define UINT_LEAST16_MAX _RWSTD_ULLONG_MAX
+-# define INT_FAST16_MAX _RWSTD_LLONG_MAX
+-# define UINT_FAST16_MAX _RWSTD_ULLONG_MAX
+-# endif
+-
+-#else // fallback on int
+-
+-# define INT_LEAST16_MAX _RWSTD_INT_MAX
+-# define UINT_LEAST16_MAX _RWSTD_UINT_MAX
+-# define INT_FAST16_MAX _RWSTD_INT_MAX
+-# define UINT_FAST16_MAX _RWSTD_UINT_MAX
+-
+-#endif // _RWSTD_INT{16,32,64}_T
+-
+-
+-/*** int32_t **************************************************************/
+-
+-#ifdef _RWSTD_INT32_T
+-
+-// optional exact width types
+-typedef _RWSTD_INT32_T int32_t;
+-typedef _RWSTD_UINT32_T uint32_t;
+-
+-# if 4 == _RWSTD_INT_SIZE
+-# define INT32_MAX _RWSTD_INT_MAX
+-# define UINT32_MAX _RWSTD_UINT_MAX
+-# elif 4 == _RWSTD_LONG_SIZE
+-# define INT32_MAX _RWSTD_LONG_MAX
+-# define UINT32_MAX _RWSTD_LONG_MAX
+-# endif
+-
+-# define INT_LEAST32_MAX INT32_MAX
+-# define UINT_LEAST32_MAX UINT32_MAX
+-# define INT_FAST32_MAX INT32_MAX
+-# define UINT_FAST32_MAX UINT32_MAX
+-
+-#elif defined (_RWSTD_INT64_T)
+-
+-# if 8 == _RWSTD_LONG_SIZE
+-# define INT_LEAST32_MAX _RWSTD_LONG_MAX
+-# define UINT_LEAST32_MAX _RWSTD_ULONG_MAX
+-# define INT_FAST32_MAX _RWSTD_LONG_MAX
+-# define UINT_FAST32_MAX _RWSTD_ULONG_MAX
+-# elif 8 == _RWSTD_LLONG_SIZE
+-# define INT_LEAST32_MAX _RWSTD_LLONG_MAX
+-# define UINT_LEAST32_MAX _RWSTD_ULLONG_MAX
+-# define INT_FAST32_MAX _RWSTD_LLONG_MAX
+-# define UINT_FAST32_MAX _RWSTD_ULLONG_MAX
+-# endif
+-
+-#else // fallback on int
+-
+-# define INT32_MAX _RWSTD_INT_MAX
+-# define UINT32_MAX _RWSTD_UINT_MAX
+-# define INT_LEAST32_MAX _RWSTD_INT_MAX
+-# define UINT_LEAST32_MAX _RWSTD_UINT_MAX
+-# define INT_FAST32_MAX _RWSTD_INT_MAX
+-# define UINT_FAST32_MAX _RWSTD_UINT_MAX
+-
+-#endif // _RWSTD_INT{32,64}_T
+-
+-
+-/*** int64_t **************************************************************/
+-
+-#ifdef _RWSTD_INT64_T
+-
+-// optional exact width types
+-typedef _RWSTD_INT64_T int64_t;
+-typedef _RWSTD_UINT64_T uint64_t;
+-
+-// 7.18.2.5 of C99 requires that intmax_t be at least 64-bits wide
+-typedef _RWSTD_INT64_T intmax_t;
+-typedef _RWSTD_UINT64_T uintmax_t;
+-
+-# if 8 == _RWSTD_LONG_SIZE
+-# define INT64_MAX _RWSTD_LONG_MAX
+-# define UINT64_MAX _RWSTD_ULONG_MAX
+-# elif 8 == _RWSTD_LLONG_SIZE
+-# define INT64_MAX _RWSTD_LLONG_MAX
+-# define UINT64_MAX _RWSTD_ULLONG_MAX
+-# endif
+-
+-# define INT_LEAST64_MAX INT64_MAX
+-# define UINT_LEAST64_MAX UINT64_MAX
+-# define INT_FAST64_MAX INT64_MAX
+-# define UINT_FAST64_MAX UINT64_MAX
+-
+-#elif defined (_RWSTD_LONG_LONG) // fallback on long long
+-
+-// this possibly violates 7.18.2.5 of C99 which requires that intmax_t
+-// be at least 64-bits wide
+-typedef _RWSTD_LONG_LONG intmax_t;
+-typedef unsigned _RWSTD_LONG_LONG uintmax_t;
+-
+-#else // fallback on long
+-
+-// this likely violates 7.18.2.5 of C99 which requires that intmax_t
+-// be at least 64-bits wide
+-typedef long intmax_t;
+-typedef unsigned long uintmax_t;
+-
+-#endif // _RWSTD_INT{64,32,16}_T
+-
+-/*** intptr_t *************************************************************/
+-
+-#if 8 == _RWSTD_PTR_SIZE
+-
+-typedef _RWSTD_INT64_T intptr_t;
+-typedef _RWSTD_UINT64_T uintptr_t;
+-
+-# define INTPTR_MAX INT64_MAX
+-# define UINTPTR_MAX UINT64_MAX
+-
+-#elif 4 == _RWSTD_PTR_SIZE
+-
+-typedef _RWSTD_INT32_T intptr_t;
+-typedef _RWSTD_UINT32_T uintptr_t;
+-
+-# define INTPTR_MAX INT32_MAX
+-# define UINTPTR_MAX UINT32_MAX
+-
+-#elif 2 == _RWSTD_PTR_SIZE
+-
+-typedef _RWSTD_INT16_T intptr_t;
+-typedef _RWSTD_UINT16_T uintptr_t;
+-
+-# define INTPTR_MAX INT16_MAX
+-# define UINTPTR_MAX UINT16_MAX
+-
+-#else // fallback on long
+-
+-typedef long intptr_t;
+-typedef unsigned long uintptr_t;
+-
+-# define INTPTR_MAX _RWSTD_LONG_MAX
+-# define UINTPTR_MAX _RWSTD_LONG_MAX
+-
+-#endif // {8,16,32,64} == _RWSTD_PTR_SIZE
+-
+-/*** least and fast types *************************************************/
+-
+-typedef _RWSTD_INT_LEAST8_T int_least8_t;
+-typedef _RWSTD_UINT_LEAST8_T uint_least8_t;
+-typedef _RWSTD_INT_LEAST8_T int_fast8_t;
+-typedef _RWSTD_UINT_LEAST8_T uint_fast8_t;
+-
+-typedef _RWSTD_INT_LEAST16_T int_least16_t;
+-typedef _RWSTD_UINT_LEAST16_T uint_least16_t;
+-typedef _RWSTD_INT_LEAST16_T int_fast16_t;
+-typedef _RWSTD_UINT_LEAST16_T uint_fast16_t;
+-
+-typedef _RWSTD_INT_LEAST32_T int_least32_t;
+-typedef _RWSTD_UINT_LEAST32_T uint_least32_t;
+-typedef _RWSTD_INT_LEAST32_T int_fast32_t;
+-typedef _RWSTD_UINT_LEAST32_T uint_fast32_t;
+-
+-#ifdef _RWSTD_INT_LEAST64_T
+-
+-typedef _RWSTD_INT_LEAST64_T int_least64_t;
+-typedef _RWSTD_UINT_LEAST64_T uint_least64_t;
+-typedef _RWSTD_INT_LEAST64_T int_fast64_t;
+-typedef _RWSTD_UINT_LEAST64_T uint_fast64_t;
+-
+-#endif // _RWSTD_INT_LEAST64_T
+-
+-#ifdef _RWSTD_INT_LEAST128_T
+-
+-typedef _RWSTD_INT_LEAST128_T int_least128_t;
+-typedef _RWSTD_UINT_LEAST128_T uint_least128_t;
+-typedef _RWSTD_INT_LEAST128_T int_fast128_t;
+-typedef _RWSTD_UINT_LEAST128_T uint_fast128_t;
+-
+-#endif // _RWSTD_INT_LEAST128_T
+-
+-/*** other constants ******************************************************/
+-
+-#define PTRDIFF_MIN _RWSTD_PTRDIFF_MIN
+-#define PTRDIFF_MAX _RWSTD_PTRDIFF_MAX
+-
+-#define SIZE_MAX _RWSTD_SIZE_MAX
+-
+-#define WCHAR_MIN _RWSTD_WCHAR_MIN
+-#define WCHAR_MAX _RWSTD_WCHAR_MAX
+-
+-#define WINT_MIN _RWSTD_WINT_MIN
+-#define WINT_MAX _RWSTD_WINT_MAX
+-
+-#define SIG_ATOMIC_MIN _RWSTD_SIG_ATOMIC_MIN
+-#define SIG_ATOMIC_MAX _RWSTD_SIG_ATOMIC_MAX
+-
+-/*** computed _MIN constants **********************************************/
+-
+-#define INT8_MIN _RWSTD_T_MIN (INT8_MAX)
+-#define INT16_MIN _RWSTD_T_MIN (INT16_MAX)
+-#define INT32_MIN _RWSTD_T_MIN (INT32_MAX)
+-#define INT64_MIN _RWSTD_T_MIN (INT64_MAX)
+-
+-#define INT_LEAST8_MIN _RWSTD_T_MIN (INT_LEAST8_MAX)
+-#define INT_LEAST16_MIN _RWSTD_T_MIN (INT_LEAST16_MAX)
+-#define INT_LEAST32_MIN _RWSTD_T_MIN (INT_LEAST32_MAX)
+-#define INT_LEAST64_MIN _RWSTD_T_MIN (INT_LEAST64_MAX)
+-
+-#define INT_FAST8_MIN _RWSTD_T_MIN (INT_FAST8_MAX)
+-#define INT_FAST16_MIN _RWSTD_T_MIN (INT_FAST16_MAX)
+-#define INT_FAST32_MIN _RWSTD_T_MIN (INT_FAST32_MAX)
+-#define INT_FAST64_MIN _RWSTD_T_MIN (INT_FAST64_MAX)
+-
+-} // namespace tr1
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
++ *
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
++ *
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
++ *
++ * CDDL HEADER END
++ *
++ *
++ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
++ *
++ * ident "@(#)cstdint.2.diff 1.1 09/08/21 SMI"
++ */
++
++#ifndef _STDINT_H
++
++#include <stdint.h>
++
++namespace std {
++ namespace tr1 {
++ using ::int8_t;
++ using ::int16_t;
++ using ::int32_t;
++ using ::int64_t;
++ using ::uint8_t;
++ using ::uint16_t;
++ using ::uint32_t;
++ using ::uint64_t;
++ using ::int_fast8_t;
++ using ::int_fast16_t;
++ using ::int_fast32_t;
++ using ::int_fast64_t;
++ using ::int_least8_t;
++ using ::int_least16_t;
++ using ::int_least32_t;
++ using ::int_least64_t;
++ using ::intmax_t;
++ using ::intptr_t;
++ using ::uint_fast8_t;
++ using ::uint_fast16_t;
++ using ::uint_fast32_t;
++ using ::uint_fast64_t;
++ using ::uint_least8_t;
++ using ::uint_least16_t;
++ using ::uint_least32_t;
++ using ::uint_least64_t;
++ using ::uintmax_t;
++ using ::uintptr_t;
++ }
++}
+
+-} // namespace std
+
++#endif /* _STDINT_H */
+
+-#endif // _RWSTD_TR1_CSTDINT_INCLUDED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/003-_config.h.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,14 @@
+--- stdcxx-4.2.1/include/rw/_config.h 2008-04-24 20:23:43.000000000 -0400
++++ stdcxx-4.2.1/include/rw/_config.h 2009-03-28 00:35:53.000000000 -0400
+@@ -33,7 +33,11 @@
+ #define _RWSTD_RW_CONFIG_H_INCLUDED
+
+ // include generated configuration header
++#if defined(_IN_BUILD_STDCXX)
+ #include <config.h>
++#else
++#include <rw/config/rwconfig_std.h>
++#endif
+
+ /*** library version numbers and ids **************************************/
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/004-cassert.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,63 @@
+--- stdcxx-4.2.1/include/ansi/cassert 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/cassert 2009-03-12 16:35:36.000000000 -0400
+@@ -1,36 +1,34 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cassert - C++ Standard library interface to the ANSI C header assert.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: cassert 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
++ * ident "@(#)cassert.4.diff 1.1 09/08/21 SMI"
++ */
++
++#ifndef _ASSERT_H
++
++#include <assert.h>
+
+-#include <rw/_defs.h>
++#endif /* _ASSERT_H */
+
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_cassert.h>
+-#else
+-# include _RWSTD_ANSI_C_ASSERT_H
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/005-cctype.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,146 @@
+--- stdcxx-4.2.1/include/ansi/cctype 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/cctype 2009-03-12 16:35:36.000000000 -0400
+@@ -1,121 +1,34 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cctype - C++ Standard library interface to the ANSI C header ctype.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: cctype 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_cctype.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 2
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_CTYPE_H
+-
+-// 17.4.1.2, p6 - masking macros are not allowed
+-#undef isalnum
+-#undef isalpha
+-#undef iscntrl
+-#undef isdigit
+-#undef isgraph
+-#undef islower
+-#undef isprint
+-#undef ispunct
+-#undef isspace
+-#undef isupper
+-#undef isxdigit
+-#undef tolower
+-#undef toupper
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 2
+-# undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 2
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CCTYPE_INCLUDED
+-#define _RWSTD_CCTYPE_INCLUDED
+-
+-#include _RWSTD_ANSI_C_CTYPE_H
+-
+-// 17.4.1.2, p6 - masking macros are not allowed
+-#undef isalnum
+-#undef isalpha
+-#undef iscntrl
+-#undef isdigit
+-#undef isgraph
+-#undef islower
+-#undef isprint
+-#undef ispunct
+-#undef isspace
+-#undef isupper
+-#undef isxdigit
+-#undef tolower
+-#undef toupper
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_HONOR_STD) && \
+- !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-namespace std {
+-
+- // 7.3 of C89
+- using ::isalnum;
+- using ::isalpha;
+- using ::iscntrl;
+- using ::isdigit;
+- using ::isgraph;
+- using ::islower;
+- using ::isprint;
+- using ::ispunct;
+- using ::isspace;
+- using ::isupper;
+- using ::isxdigit;
+- using ::tolower;
+- using ::toupper;
+-
+-} // std
++ * ident "@(#)cctype.5.diff 1.1 09/08/21 SMI"
++ */
+
+-#endif // !_RWSTD_NO_NAMESPACE && !_RWSTD_NO_HONOR_STD && !_RWSTD_NO_USING_LIBC_IN_STD
++#ifndef _CTYPE_H
+
+-#endif // _RWSTD_CCTYPE_INCLUDED
++#include <ctype.h>
+
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++#endif /* _CTYPE_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/006-cerrno.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,112 @@
+--- stdcxx-4.2.1/include/ansi/cerrno 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/cerrno 2009-03-12 16:35:36.000000000 -0400
+@@ -1,86 +1,35 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cerrno - C++ Standard library interface to the ANSI C header errno.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: cerrno 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_cerrno.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 3
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_ERRNO_H
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 3
+-# undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 3
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CERRNO_INCLUDED
+-#define _RWSTD_CERRNO_INCLUDED
+-
+-#if !defined (errno) \
+- || !defined (EDOM) || !defined (ERANGE) || !defined (EAGAIN)
+-# include _RWSTD_ANSI_C_ERRNO_H
+-#endif // errno ...
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-namespace std {
+-
+-// 17.4.1.2, p5 - errno may be a macro
+-#ifndef errno
+-using ::errno;
+-
+- // lwg issue 310 - errno shall be a macro
+-# define errno errno
+-#endif // errno
+-
+-} // std
++ * ident "@(#)cerrno.6.diff 1.1 09/08/21 SMI"
++ */
+
+-#endif // !_RWSTD_NO_NAMESPACE && !_RWSTD_NO_USING_LIBC_IN_STD
++#ifndef _ERRNO_H
+
+-#endif // _RWSTD_CERRNO_INCLUDED
++#include <sys/feature_tests.h>
++#include <errno.h>
+
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++#endif /* _ERRNO_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/007-cfloat.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,103 @@
+--- stdcxx-4.2.1/include/ansi/cfloat 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/cfloat 2009-03-12 16:35:36.000000000 -0400
+@@ -1,77 +1,35 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cfloat - C++ Standard library interface to the ANSI C header float.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: cfloat 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_cfloat.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 4
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_FLOAT_H
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 4
+-# undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 4
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-# ifndef _RWSTD_CFLOAT_INCLUDED
+-# define _RWSTD_CFLOAT_INCLUDED
+-
+-#include _RWSTD_ANSI_C_FLOAT_H
+-
+-# endif // _RWSTD_CFLOAT_INCLUDED
+-
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++ * ident "@(#)cfloat.7.diff 1.1 09/08/21 SMI"
++ */
+
+-# if defined (__EDG__) && defined (__linux__) && !defined (__INTEL_COMPILER)
++#ifndef _FLOAT_H
+
+- // avoid relying on dubious gcc extensions
+-# undef LDBL_MIN
+-# undef LDBL_MAX
+-# define LDBL_MIN _RWSTD_LDBL_MIN
+-# define LDBL_MAX _RWSTD_LDBL_MAX
++#include <sys/feature_tests.h>
++#include <float.h>
+
+-# endif // __EDG__ && __linux__ && !__INTEL_COMPILER
++#endif /* _FLOAT_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/008-ciso646.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,64 @@
+--- stdcxx-4.2.1/include/ansi/ciso646 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/ciso646 2009-03-12 16:35:36.000000000 -0400
+@@ -1,32 +1,39 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * ciso646 - C++ Standard library interface to the ANSI C header iso646.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: ciso646 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
++ * ident "@(#)ciso646.8.diff 1.1 09/08/21 SMI"
++ */
++
++#ifndef _ISO_646_H
++#define _ISO_646_H
++
++#include <iso646.h>
++
++#ifndef __STDC_ISO_10646__
++#define __STDC_ISO_10646__
++#endif
+
+-#include <rw/_defs.h>
++#endif /* _ISO_646_H */
+
+-#include _RWSTD_ANSI_C_ISO646_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/009-climits.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,150 @@
+--- stdcxx-4.2.1/include/ansi/climits 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/climits 2009-03-12 16:35:36.000000000 -0400
+@@ -1,124 +1,35 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * climits - C++ Standard library interface to the ANSI C header limits.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: climits 648752 2008-04-16 17:01:56Z faridz $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2008 Rogue Wave Software, Inc.
+- *
+- **************************************************************************/
+-
+-#ifndef _RWSTD_CLIMITS_INCLUDED
+-#define _RWSTD_CLIMITS_INCLUDED
+-
+-#include <rw/_defs.h>
+-
+-
+-#if !defined (_RWSTD_NO_PURE_C_HEADERS) || defined (_RWSTD_NO_LIMITS_H)
+-
+-// 18.2.2, p1
+-#ifndef CHAR_BIT
+-# define CHAR_BIT _RWSTD_CHAR_BIT
+-#endif // CHAR_BIT
+-
+-#ifndef CHAR_MAX
+-# define CHAR_MAX _RWSTD_CHAR_MAX
+-#endif // CHAR_MAX
+-
+-#ifndef CHAR_MIN
+-# define CHAR_MIN _RWSTD_CHAR_MIN
+-#endif // CHAR_MIN
+-
+-#ifndef SCHAR_MAX
+-# define SCHAR_MAX _RWSTD_SCHAR_MAX
+-#endif // SCHAR_MAX
+-
+-#ifndef SCHAR_MIN
+-# define SCHAR_MIN _RWSTD_SCHAR_MIN
+-#endif // SCHAR_MIN
+-
+-#ifndef UCHAR_MAX
+-# define UCHAR_MAX _RWSTD_UCHAR_MAX
+-#endif // UCHAR_MAX
+-
+-#ifndef SHRT_MAX
+-# define SHRT_MAX _RWSTD_SHRT_MAX
+-#endif // SHRT_MAX
+-
+-#ifndef SHRT_MIN
+-# define SHRT_MIN _RWSTD_SHRT_MIN
+-#endif // SHRT_MIN
+-
+-#ifndef USHRT_MAX
+-# define USHRT_MAX _RWSTD_USHRT_MAX
+-#endif // USHRT_MAX
+-
+-#ifndef INT_MAX
+-# define INT_MAX _RWSTD_INT_MAX
+-#endif // INT_MAX
+-
+-#ifndef INT_MIN
+-# define INT_MIN _RWSTD_INT_MIN
+-#endif // INT_MIN
+-
+-#ifndef UINT_MAX
+-# define UINT_MAX _RWSTD_UINT_MAX
+-#endif // UINT_MAX
+-
+-#ifndef LONG_MAX
+-# define LONG_MAX _RWSTD_LONG_MAX
+-#endif // LONG_MAX
+-
+-#ifndef LONG_MIN
+-# define LONG_MIN _RWSTD_LONG_MIN
+-#endif // LONG_MIN
+-
+-#ifndef ULONG_MAX
+-# define ULONG_MAX _RWSTD_ULONG_MAX
+-#endif // ULONG_MAX
+-
+-#ifndef MB_LEN_MAX
+-# define MB_LEN_MAX _RWSTD_MB_LEN_MAX
+-#endif // MB_LEN_MAX
+-
+-#else // if defined (_RWSTD_NO_PURE_C_HEADERS)
+-
+-# ifdef __GNUC__
+-# if __GNUC__ >= 3
+- // silence gcc warnings about #include_next below
+-# pragma GCC system_header
+-# endif // gcc >= 3
++ * ident "@(#)climits.9.diff 1.1 09/08/21 SMI"
++ */
+
+- // use the gcc extension to #include the compiler's limits.h
+-# include_next <limits.h>
+-# else
+-# include _RWSTD_ANSI_C_LIMITS_H
+-# endif // gcc
++#ifndef _LIMITS_H
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
++#include <sys/feature_tests.h>
++#include <limits.h>
+
+-#if (MB_LEN_MAX != _RWSTD_MB_LEN_MAX)
+-# undef MB_LEN_MAX
+-# define MB_LEN_MAX _RWSTD_MB_LEN_MAX
+-#endif // MB_LEN_MAX
++#endif /* _LIMITS_H */
+
+-#endif // _RWSTD_CLIMITS_INCLUDED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/010-clocale.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,107 @@
+--- stdcxx-4.2.1/include/ansi/clocale 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/clocale 2009-03-12 16:35:36.000000000 -0400
+@@ -1,82 +1,34 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * clocale - C++ Standard library interface to the ANSI C header locale.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: clocale 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_clocale.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 7
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_LOCALE_H
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 7
+-# undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 7
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CLOCALE_INCLUDED
+-#define _RWSTD_CLOCALE_INCLUDED
+-
+-#include _RWSTD_ANSI_C_LOCALE_H
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_HONOR_STD) && \
+- !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-namespace std {
+-
+- // 7.4 of C89
+- using ::lconv;
+-
+- using ::localeconv;
+- using ::setlocale;
+-
+-} // std
++ * ident "@(#)clocale.10.diff 1.1 09/08/21 SMI"
++ */
+
+-#endif // !_RWSTD_NO_NAMESPACE && !_RWSTD_NO_HONOR_STD && !_RWSTD_NO_USING_LIBC_IN_STD
++#ifndef _LOCALE_H
+
+-#endif // _RWSTD_CLOCALE_INCLUDED
++#include <locale.h>
+
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++#endif /* _LOCALE_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/011-cmath.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,1084 @@
+--- stdcxx-4.2.1/include/ansi/cmath 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/cmath 2009-03-12 16:35:36.000000000 -0400
+@@ -1,1053 +1,44 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cmath - C++ Standard library interface to the ANSI C header math.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: cmath 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#ifndef _RWSTD_CMATH_INCLUDED
+-#define _RWSTD_CMATH_INCLUDED
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_cmath.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-// avoid a conflicting exception structure on platforms where
+-// struct exception is defined unguarded in <math.h>
+-#ifndef _RWSTD_NO_MATH_EXCEPTION
+-# undef exception
+-# define exception _Math_exception
+-#endif // _RWSTD_NO_MATH_EXCEPTION
+-
+-#include _RWSTD_ANSI_C_MATH_H
+-
+-#undef exception
+-
+-} // namespace std
+-
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-// avoid a conflicting exception structure on platforms where
+-// struct exception is defined unguarded in <math.h>
+-#ifndef _RWSTD_NO_MATH_EXCEPTION
+-# undef exception
+-# define exception math_exception
+-#endif // _RWSTD_NO_MATH_EXCEPTION
+-
+-#include _RWSTD_ANSI_C_MATH_H
+-
+-#undef exception
+-#undef abs
+-#undef acos
+-#undef asin
+-#undef atan
+-#undef atan2
+-#undef cos
+-#undef exp
+-#undef fabs
+-#undef log
+-#undef log10
+-#undef sin
+-#undef sqrt
+-#undef tan
+-
+-
+-#ifndef _RWSTD_NO_ACOSF
+-# define _ACOSF(x) ::acosf (x)
+-#elif !defined (_RWSTD_NO_ACOSF_IN_LIBM)
+-# undef acosf
+-extern "C" float acosf (float);
+-# define _ACOSF(x) ::acosf (x)
+-#else
+-# define _ACOSF(x) ::acos (double (x))
+-#endif // _RWSTD_NO_ACOSF
+-
+-#ifndef _RWSTD_NO_ASINF
+-# define _ASINF(x) ::asinf (x)
+-#elif !defined (_RWSTD_NO_ASINF_IN_LIBM)
+-# undef asinf
+-extern "C" float asinf (float);
+-# define _ASINF(x) ::asinf (x)
+-#else
+-# define _ASINF(x) ::asin (double (x))
+-#endif // _RWSTD_NO_ASINF
+-
+-#ifndef _RWSTD_NO_ATANF
+-# define _ATANF(x) ::atanf (x)
+-#elif !defined (_RWSTD_NO_ATANF_IN_LIBM)
+-# undef atanf
+-extern "C" float atanf (float);
+-# define _ATANF(x) ::atanf (x)
+-#else
+-# define _ATANF(x) ::atan (double (x))
+-#endif // _RWSTD_NO_ATANF
+-
+-#ifndef _RWSTD_NO_ATAN2F
+-# define _ATAN2F(x, y) ::atan2f (x, y)
+-#elif !defined (_RWSTD_NO_ATAN2F_IN_LIBM)
+-# undef atan2f
+-extern "C" float atan2f (float, float);
+-# define _ATAN2F(x, y) ::atan2f (x, y)
+-#else
+-# define _ATAN2F(x, y) ::atan2 (double (x), double (y))
+-#endif // _RWSTD_NO_ATAN2F
+-
+-#ifndef _RWSTD_NO_CEILF
+-# define _CEILF(x) ::ceilf (x)
+-#elif !defined (_RWSTD_NO_CEILF_IN_LIBM)
+-# undef ceilf
+-extern "C" float ceilf (float);
+-# define _CEILF(x) ::ceilf (x)
+-#else
+-# define _CEILF(x) ::ceil (double (x))
+-#endif // _RWSTD_NO_CEILF
+-
+-#ifndef _RWSTD_NO_COSF
+-# define _COSF(x) ::cosf (x)
+-#elif !defined (_RWSTD_NO_COSF_IN_LIBM)
+-# undef cosf
+-extern "C" float cosf (float);
+-# define _COSF(x) ::cosf (x)
+-#else
+-# define _COSF(x) ::cos (double (x))
+-#endif // _RWSTD_NO_COSF
+-
+-#ifndef _RWSTD_NO_COSHF
+-# define _COSHF(x) ::coshf (x)
+-#elif !defined (_RWSTD_NO_COSHF_IN_LIBM)
+-# undef coshf
+-extern "C" float coshf (float);
+-# define _COSHF(x) ::coshf (x)
+-#else
+-# define _COSHF(x) ::cosh (double (x))
+-#endif // _RWSTD_NO_COSHF
+-
+-#ifndef _RWSTD_NO_EXPF
+-# define _EXPF(x) ::expf (x)
+-#elif !defined (_RWSTD_NO_EXPF_IN_LIBM)
+-# undef expf
+-extern "C" float expf (float);
+-# define _EXPF(x) ::expf (x)
+-#else
+-# define _EXPF(x) ::exp (double (x))
+-#endif // _RWSTD_NO_EXPF
+-
+-#ifndef _RWSTD_NO_FABSF
+-# define _FABSF(x) fabsf (x)
+-#elif !defined (_RWSTD_NO_FABSF_IN_LIBM)
+-# undef fabsf
+-extern "C" float fabsf (float);
+-# define _FABSF(x) ::fabsf (x)
+-#else
+-# define _FABSF(x) ::fabs (double (x))
+-#endif // _RWSTD_NO_FABSF
+-
+-#ifndef _RWSTD_NO_FLOORF
+-# define _FLOORF(x) ::floorf (x)
+-#elif !defined (_RWSTD_NO_FLOORF_IN_LIBM)
+-# undef floorf
+-extern "C" float floorf (float);
+-# define _FLOORF(x) ::floorf (x)
+-#else
+-# define _FLOORF(x) ::floor (double (x))
+-#endif // _RWSTD_NO_FLOORF
+-
+-#ifndef _RWSTD_NO_FMODF
+-# define _FMODF(x, y) ::fmodf (x, y)
+-#elif !defined (_RWSTD_NO_FMODF_IN_LIBM)
+-# undef fmodf
+-extern "C" float fmodf (float, float);
+-# define _FMODF(x, y) ::fmodf (x, y)
+-#else
+-# define _FMODF(x, y) ::fmod (double (x), double (y))
+-#endif // _RWSTD_NO_FMODF
+-
+-#ifndef _RWSTD_NO_FREXPF
+-# define _FREXPF(x, y) ::frexpf (x, y)
+-#elif !defined (_RWSTD_NO_FREXPF_IN_LIBM)
+-# undef frexpf
+-extern "C" float frexpf (float, int*);
+-# define _FREXPF(x, y) ::frexpf (x, y)
+-#else
+-# define _FREXPF(x, y) ::frexp (double (x), y)
+-#endif // _RWSTD_NO_FREXPF
+-
+-#ifndef _RWSTD_NO_LDEXPF
+-# define _LDEXPF(x, y) ::ldexpf (x, y)
+-#elif !defined (_RWSTD_NO_LDEXPF_IN_LIBM)
+-# undef ldexpf
+-extern "C" float ldexpf (float, int);
+-# define _LDEXPF(x, y) ::ldexpf (x, y)
+-#else
+-# define _LDEXPF(x, y) ::ldexp (double (x), y)
+-#endif // _RWSTD_NO_LDEXPF
+-
+-#ifndef _RWSTD_NO_LOGF
+-# define _LOGF(x) ::logf (x)
+-#elif !defined (_RWSTD_NO_LOGF_IN_LIBM)
+-# undef logf
+-extern "C" float logf (float);
+-# define _LOGF(x) ::logf (x)
+-#else
+-# define _LOGF(x) ::log (double (x))
+-#endif // _RWSTD_NO_LOGF
+-
+-#ifndef _RWSTD_NO_LOG10F
+-# define _LOG10F(x) ::log10f (x)
+-#elif !defined (_RWSTD_NO_LOG10F_IN_LIBM)
+-# undef log10f
+-extern "C" float log10f (float);
+-# define _LOG10F(x) ::log10f (x)
+-#else
+-# define _LOG10F(x) ::log10 (double (x))
+-#endif // _RWSTD_NO_LOG10F
+-
+-#ifndef _RWSTD_NO_MODFF
+-# define _MODFF(x, y) ::modff (x, y)
+-#elif !defined (_RWSTD_NO_MODFF_IN_LIBM)
+-# undef modff
+-extern "C" float modff (float, float*);
+-# define _MODFF(x, y) ::modff (x, y)
+-#else
+-
+-inline float __rw_modff (float __x, float *__y)
+-{
+- double __tmp = *__y;
+-
+- __x = ::modf (__x, &__tmp);
+-
+- *__y = __tmp;
+-
+- return __x;
+-}
+-
+-# define _MODFF(x, y) __rw_modff (x, y)
+-#endif // _RWSTD_NO_MODFF
+-
+-#ifndef _RWSTD_NO_POWF
+-# define _POWF(x, y) ::powf (x, y)
+-#elif !defined (_RWSTD_NO_POWF_IN_LIBM)
+-# undef powf
+-extern "C" float powf (float, float);
+-# define _POWF(x, y) ::powf (x, y)
+-#else
+-# define _POWF(x, y) ::pow (double (x), double (y))
+-#endif // _RWSTD_NO_POWF
+-
+-#ifndef _RWSTD_NO_SINF
+-# define _SINF(x) ::sinf (x)
+-#elif !defined (_RWSTD_NO_SINF_IN_LIBM)
+-# undef sinf
+-extern "C" float sinf (float);
+-# define _SINF(x) ::sinf (x)
+-#else
+-# define _SINF(x) ::sin (double (x))
+-#endif // _RWSTD_NO_SINF
+-
+-#ifndef _RWSTD_NO_SINHF
+-# define _SINHF(x) ::sinhf (x)
+-#elif !defined (_RWSTD_NO_SINHF_IN_LIBM)
+-# undef sinhf
+-extern "C" float sinhf (float);
+-# define _SINHF(x) ::sinhf (x)
+-#else
+-# define _SINHF(x) ::sinh (double (x))
+-#endif // _RWSTD_NO_SINHF
+-
+-#ifndef _RWSTD_NO_SQRTF
+-# define _SQRTF(x) ::sqrtf (x)
+-#elif !defined (_RWSTD_NO_SQRTF_IN_LIBM)
+-# undef sqrtf
+-extern "C" float sqrtf (float);
+-# define _SQRTF(x) ::sqrtf (x)
+-#else
+-# define _SQRTF(x) ::sqrt (double (x))
+-#endif // _RWSTD_NO_SQRTF
+-
+-#ifndef _RWSTD_NO_TANF
+-# define _TANF(x) ::tanf (x)
+-#elif !defined (_RWSTD_NO_TANF_IN_LIBM)
+-# undef tanf
+-extern "C" float tanf (float);
+-# define _TANF(x) ::tanf (x)
+-#else
+-# define _TANF(x) ::tan (double (x))
+-#endif // _RWSTD_NO_TANF
+-
+-#ifndef _RWSTD_NO_TANHF
+-# define _TANHF(x) ::tanhf (x)
+-#elif !defined (_RWSTD_NO_TANHF_IN_LIBM)
+-# undef tanhf
+-extern "C" float tanhf (float);
+-# define _TANHF(x) ::tanhf (x)
+-#else
+-# define _TANHF(x) ::tanh (double (x))
+-#endif // _RWSTD_NO_TANHF
+-
+-
+-#ifndef _RWSTD_NO_ACOSL
+-# define _ACOSL(x) ::acosl (x)
+-#elif !defined (_RWSTD_NO_ACOSL_IN_LIBM)
+-# undef acosl
+-extern "C" long double acosl (long double);
+-# define _ACOSL(x) ::acosl (x)
+-#else
+-# define _ACOSL(x) ::acos (double (x))
+-#endif // _RWSTD_NO_ACOSL
+-
+-#ifndef _RWSTD_NO_ASINL
+-# define _ASINL(x) ::asinl (x)
+-#elif !defined (_RWSTD_NO_ASINL_IN_LIBM)
+-# undef asinl
+-extern "C" long double asinl (long double);
+-# define _ASINL(x) ::asinl (x)
+-#else
+-# define _ASINL(x) ::asin (double (x))
+-#endif // _RWSTD_NO_ASINL
+-
+-#ifndef _RWSTD_NO_ATANL
+-# define _ATANL(x) ::atanl (x)
+-#elif !defined (_RWSTD_NO_ATANL_IN_LIBM)
+-# undef atanl
+-extern "C" long double atanl (long double);
+-# define _ATANL(x) ::atanl (x)
+-#else
+-# define _ATANL(x) ::atan (double (x))
+-#endif // _RWSTD_NO_ATANL
+-
+-#ifndef _RWSTD_NO_ATAN2L
+-# define _ATAN2L(x, y) ::atan2l (x, y)
+-#elif !defined (_RWSTD_NO_ATAN2L_IN_LIBM)
+-# undef atan2l
+-extern "C" long double atan2l (long double, long double);
+-# define _ATAN2L(x, y) ::atan2l (x, y)
+-#else
+-# define _ATAN2L(x, y) ::atan2 (double (x), double (y))
+-#endif // _RWSTD_NO_ATAN2L
+-
+-#ifndef _RWSTD_NO_CEILL
+-# define _CEILL(x) ::ceill (x)
+-#elif !defined (_RWSTD_NO_CEILL_IN_LIBM)
+-# undef ceill
+-extern "C" double ceill (double);
+-# define _CEILL(x) ::ceill (x)
+-#else
+-# define _CEILL(x) ::ceil (double (x))
+-#endif // _RWSTD_NO_CEILL
+-
+-#ifndef _RWSTD_NO_COSL
+-# define _COSL(x) ::cosl (x)
+-#elif !defined (_RWSTD_NO_COSL_IN_LIBM)
+-# undef cosl
+-extern "C" long double cosl (long double);
+-# define _COSL(x) ::cosl (x)
+-#else
+-# define _COSL(x) ::cos (double (x))
+-#endif // _RWSTD_NO_COSL
+-
+-#ifndef _RWSTD_NO_COSHL
+-# define _COSHL(x) ::coshl (x)
+-#elif !defined (_RWSTD_NO_COSHL_IN_LIBM)
+-# undef coshl
+-extern "C" long double coshl (long double);
+-# define _COSHL(x) ::coshl (x)
+-#else
+-# define _COSHL(x) ::cosh (double (x))
+-#endif // _RWSTD_NO_COSHL
+-
+-#ifndef _RWSTD_NO_EXPL
+-# define _EXPL(x) ::expl (x)
+-#elif !defined (_RWSTD_NO_EXPL_IN_LIBM)
+-# undef expl
+-extern "C" long double expl (long double);
+-# define _EXPL(x) ::expl (x)
+-#else
+-# define _EXPL(x) ::exp (double (x))
+-#endif // _RWSTD_NO_EXPL
+-
+-#ifndef _RWSTD_NO_FABSL
+-# define _FABSL(x) ::fabsl (x)
+-#elif !defined (_RWSTD_NO_FABSL_IN_LIBM)
+-# undef fabsl
+-extern "C" long double fabsl (long double);
+-# define _FABSL(x) ::fabsl (x)
+-#else
+-# define _FABSL(x) ::fabs (double (x))
+-#endif // _RWSTD_NO_FABSL
+-
+-#ifndef _RWSTD_NO_FLOORL
+-# define _FLOORL(x) ::floorl (x)
+-#elif !defined (_RWSTD_NO_FLOORL_IN_LIBM)
+-# undef floorl
+-extern "C" long double floorl (long double);
+-# define _FLOORL(x) ::floorl (x)
+-#else
+-# define _FLOORL(x) ::floor (double (x))
+-#endif // _RWSTD_NO_FLOORL
+-
+-#ifndef _RWSTD_NO_FMODL
+-# define _FMODL(x, y) ::fmodl (x, y)
+-#elif !defined (_RWSTD_NO_FMODL_IN_LIBM)
+-# undef fmodl
+-extern "C" long double fmodl (long double, long double);
+-# define _FMODL(x, y) ::fmodl (x, y)
+-#else
+-# define _FMODL(x, y) ::fmod (double (x), double (y))
+-#endif // _RWSTD_NO_FMODL
+-
+-#ifndef _RWSTD_NO_FREXPL
+-# define _FREXPL(x, y) ::frexpl (x, y)
+-#elif !defined (_RWSTD_NO_FREXPL_IN_LIBM)
+-# undef frexpl
+-extern "C" long double frexpl (long double, int*);
+-# define _FREXPL(x, y) ::frexpl (x, y)
+-#else
+-# define _FREXPL(x, y) ::frexp (double (x), y)
+-#endif // _RWSTD_NO_FREXPL
+-
+-#ifndef _RWSTD_NO_LDEXPL
+-# define _LDEXPL(x, y) ::ldexpl (x, y)
+-#elif !defined (_RWSTD_NO_LDEXPL_IN_LIBM)
+-# undef ldexpl
+-extern "C" long double ldexpl (long double, int);
+-# define _LDEXPL(x, y) ::ldexpl (x, y)
+-#else
+-# define _LDEXPL(x, y) ::ldexp (double (x), y)
+-#endif // _RWSTD_NO_LDEXPL
+-
+-#ifndef _RWSTD_NO_LOGL
+-# define _LOGL(x) ::logl (x)
+-#elif !defined (_RWSTD_NO_LOGL_IN_LIBM)
+-# undef logl
+-extern "C" long double logl (long double);
+-# define _LOGL(x) ::logl (x)
+-#else
+-# define _LOGL(x) ::log (double (x))
+-#endif // _RWSTD_NO_LOGL
+-
+-#ifndef _RWSTD_NO_LOG10L
+-# define _LOG10L(x) ::log10l (x)
+-#elif !defined (_RWSTD_NO_LOG10L_IN_LIBM)
+-# undef log10l
+-extern "C" long double log10l (long double);
+-# define _LOG10L(x) ::log10l (x)
+-#else
+-# define _LOG10L(x) ::log10 (double (x))
+-#endif // _RWSTD_NO_LOG10L
+-
+-#ifndef _RWSTD_NO_MODFL
+-# define _MODFL(x, y) ::modfl (x, y)
+-#elif !defined (_RWSTD_NO_MODFL_IN_LIBM)
+-# undef modfl
+-extern "C" long double modfl (long double, long double*);
+-# define _MODFL(x, y) ::modfl (x, y)
+-#else
+-
+-inline long double __rw_modfl (long double __x, long double *__y)
+-{
+- double __tmp = *__y;
+-
+- __x = ::modf (__x, &__tmp);
+-
+- *__y = __tmp;
+-
+- return __x;
+-}
+-
+-# define _MODFL(x, y) __rw_modfl (x, y)
+-#endif // _RWSTD_NO_MODFL
+-
+-#ifndef _RWSTD_NO_POWL
+-# define _POWL(x, y) ::powl (x, y)
+-#elif !defined (_RWSTD_NO_POWL_IN_LIBM)
+-# undef powl
+-extern "C" long double powl (long double, long double);
+-# define _POWL(x, y) ::powl (x, y)
+-#else
+-# define _POWL(x, y) ::pow (double (x), double (y))
+-#endif // _RWSTD_NO_POWL
+-
+-#ifndef _RWSTD_NO_SINL
+-# define _SINL(x) ::sinl (x)
+-#elif !defined (_RWSTD_NO_SINL_IN_LIBM)
+-# undef sinl
+-extern "C" long double sinl (long double);
+-# define _SINL(x) ::sinl (x)
+-#else
+-# define _SINL(x) ::sin (double (x))
+-#endif // _RWSTD_NO_SINL
+-
+-#ifndef _RWSTD_NO_SINHL
+-# define _SINHL(x) ::sinhl (x)
+-#elif !defined (_RWSTD_NO_SINHL_IN_LIBM)
+-# undef sinhl
+-extern "C" long double sinhl (long double);
+-# define _SINHL(x) ::sinhl (x)
+-#else
+-# define _SINHL(x) ::sinh (double (x))
+-#endif // _RWSTD_NO_SINHL
+-
+-#ifndef _RWSTD_NO_SQRTL
+-# define _SQRTL(x) ::sqrtl (x)
+-#elif !defined (_RWSTD_NO_SQRTL_IN_LIBM)
+-# undef sqrtl
+-extern "C" long double sqrtl (long double);
+-# define _SQRTL(x) ::sqrtl (x)
+-#else
+-# define _SQRTL(x) ::sqrt (double (x))
+-#endif // _RWSTD_NO_SQRTL
+-
+-#ifndef _RWSTD_NO_TANL
+-# define _TANL(x) ::tanl (x)
+-#elif !defined (_RWSTD_NO_TANL_IN_LIBM)
+-# undef tanl
+-extern "C" long double tanl (long double);
+-# define _TANL(x) ::tanl (x)
+-#else
+-# define _TANL(x) ::tan (double (x))
+-#endif // _RWSTD_NO_TANL
+-
+-#ifndef _RWSTD_NO_TANHL
+-# define _TANHL(x) ::tanhl (x)
+-#elif !defined (_RWSTD_NO_TANHL_IN_LIBM)
+-# undef tanhl
+-extern "C" long double tanhl (long double);
+-# define _TANHL(x) ::tanhl (x)
+-#else
+-# define _TANHL(x) ::tanh (double (x))
+-#endif // _RWSTD_NO_TANHL
+-
+-
+-#if !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-_RWSTD_NAMESPACE (std) {
+-#endif // !_RWSTD_NO_USING_LIBC_IN_STD
+-
+-// float overloads
+-#if defined (_RWSTD_NO_ABS_FLT)
+-inline float abs (float __x)
+-{
+- return _FABSF (__x);
+-}
+-# undef _RWSTD_NO_ABS_FLT
+-# else
+-_USING (::abs);
+-#endif // _RWSTD_NO_ABS_FLT
+-
+-#if defined (_RWSTD_NO_ACOS_FLT)
+-inline float acos (float __x)
+-{
+- return _ACOSF (__x);
+-}
+-#endif // _RWSTD_NO_ACOS_FLT
+-
+-#if defined (_RWSTD_NO_ASIN_FLT)
+-inline float asin (float __x)
+-{
+- return _ASINF (__x);
+-}
+-#endif // _RWSTD_NO_ASIN_FLT
+-
+-#if defined (_RWSTD_NO_ATAN_FLT)
+-inline float atan (float __x)
+-{
+- return _ATANF (__x);
+-}
+-#endif // _RWSTD_NO_ATAN_FLT
+-
+-
+-#if defined (_RWSTD_NO_ATAN2_FLT)
+-inline float atan2 (float __x, float __y)
+-{
+- return _ATAN2F (__x, __y);
+-}
+-#endif // _RWSTD_NO_ATAN2_FLT
+-
+-
+-#if defined (_RWSTD_NO_CEIL_FLT)
+-inline float ceil (float __x)
+-{
+- return _CEILF (__x);
+-}
+-#endif // _RWSTD_NO_CEIL_FLT
+-
+-
+-#if defined (_RWSTD_NO_COS_FLT)
+-inline float cos (float __x)
+-{
+- return _COSF (__x);
+-}
+-#endif // _RWSTD_NO_COS_FLT
+-
+-
+-#if defined (_RWSTD_NO_COSH_FLT)
+-inline float cosh (float __x)
+-{
+- return _COSHF (__x);
+-}
+-#endif // _RWSTD_NO_COSH_FLT
+-
+-
+-#if defined (_RWSTD_NO_EXP_FLT)
+-inline float exp (float __x)
+-{
+- return _EXPF (__x);
+-}
+-#endif // _RWSTD_NO_EXP_FLT
+-
+-
+-#if defined (_RWSTD_NO_FABS_FLT)
+-inline float fabs (float __x)
+-{
+- return _FABSF (__x);
+-}
+-# undef _RWSTD_NO_FABS_FLT
+-#endif // _RWSTD_NO_FABS_FLT
+-
+-
+-#if defined (_RWSTD_NO_FLOOR_FLT)
+-inline float floor (float __x)
+-{
+- return _FLOORF (__x);
+-}
+-#endif // _RWSTD_NO_FLOOR_FLT
+-
+-
+-#if defined (_RWSTD_NO_FMOD_FLT)
+-inline float fmod (float __x, float __y)
+-{
+- return _FMODF (__x, __y);
+-}
+-#endif // _RWSTD_NO_FMOD_FLT
+-
+-
+-#if defined (_RWSTD_NO_FREXP_FLT)
+-inline float frexp (float __x, int *__e)
+-{
+- return _FREXPF (__x, __e);
+-}
+-#endif // _RWSTD_NO_FREXP_FLT
+-
+-
+-#if defined (_RWSTD_NO_LDEXP_FLT_INT)
+-inline float ldexp (float __x, int __e)
+-{
+- return _LDEXPF (__x, __e);
+-}
+-#endif // _RWSTD_NO_LDEXP_FLT_INT
++ * ident "@(#)cmath.11.diff 1.1 09/08/21 SMI"
++ */
+
++#ifndef _MATH_H
+
+-#if defined (_RWSTD_NO_LOG_FLT)
+-inline float log (float __x)
+-{
+- return _LOGF (__x);
+-}
+-#endif // _RWSTD_NO_LOG_FLT
++#include <sys/feature_tests.h>
+
++#if defined(__cplusplus) && defined(__SUNPRO_CC)
++# define __MATHERR_RENAME_EXCEPTION
++#endif
+
+-#if defined (_RWSTD_NO_LOG10_FLT)
+-inline float log10 (float __x)
+-{
+- return _LOG10F (__x);
+-}
+-#endif // _RWSTD_NO_LOG10_FLT
+-
+-
+-#if defined (_RWSTD_NO_MODF_FLT)
+-inline float modf (float __x, float *__y)
+-{
+- return _MODFF (__x, __y);
+-}
+-#endif // _RWSTD_NO_MODF_FLT
+-
+-
+-#ifdef _RWSTD_NO_POW_FLT
+-inline float pow (float __x, float __y)
+-{
+- return _POWF (__x, __y);
+-}
+-#endif // _RWSTD_NO_POW_FLT
+-
+-#ifdef _RWSTD_NO_POW_FLT_INT
+-inline float pow (float __x, int __y)
+-{
+- float __res = __y % 2 ? __x : 1;
+-
+- for (int __i = __y < 0 ? -__y : __y; __i >>= 1; ) {
+- __x *= __x;
+- if (__i % 2)
+- __res *= __x;
+- }
+-
+- return __y < 0 ? __res ? 1 / __res : -1 / __res : __y ? __res : 1;
+-}
+-#endif // _RWSTD_NO_POW_FLT_INT
+-
+-
+-#if defined (_RWSTD_NO_SIN_FLT)
+-inline float sin (float __x)
+-{
+- return _SINF (__x);
+-}
+-#endif // _RWSTD_NO_SIN_FLT
+-
+-
+-#if defined (_RWSTD_NO_SINH_FLT)
+-inline float sinh (float __x)
+-{
+- return _SINHF (__x);
+-}
+-#endif // _RWSTD_NO_SINH_FLT
+-
+-
+-#if defined (_RWSTD_NO_SQRT_FLT)
+-inline float sqrt (float __x)
+-{
+- return _SQRTF (__x);
+-}
+-#endif // _RWSTD_NO_SQRT_FLT
+-
+-
+-#if defined (_RWSTD_NO_TAN_FLT)
+-inline float tan (float __x)
+-{
+- return _TANF (__x);
+-}
+-#endif // _RWSTD_NO_TAN_FLT
+-
+-
+-#if defined (_RWSTD_NO_TANH_FLT)
+-inline float tanh (float __x)
+-{
+- return _TANHF (__x);
+-}
+-#endif // _RWSTD_NO_TANH_FLT
+-
+-
+-// double overloads
+-
+-
+-#if defined (_RWSTD_NO_ABS_DBL)
+-inline double abs (double __x)
+-{
+- return ::fabs (__x);
+-}
+-# undef _RWSTD_NO_ABS_DBL
+-# else
+-_USING (::abs);
+-#endif // _RWSTD_NO_ABS_DBL
+-
+-
+-#if defined (_RWSTD_NO_POW_DBL) && !defined (_RWSTD_NO_POW_IN_LIBM)
+-
+-extern "C" double pow (double, double);
+-
+-#endif // _RWSTD_NO_POW_DBL && !_RWSTD_NO_POW_IN_LIBM
+-
+-
+-#ifdef _RWSTD_NO_POW_DBL_INT
+-
+-inline double pow (double __x, int __y)
+-{
+- double __res = __y % 2 ? __x : 1;
+-
+- for (int __i = __y < 0 ? -__y : __y; __i >>= 1; ) {
+- __x *= __x;
+- if (__i % 2)
+- __res *= __x;
+- }
+-
+- return __y < 0 ? __res ? 1 / __res : -1 / __res : __y ? __res : 1;
+-}
+-
+-#endif // _RWSTD_NO_POW_DBL_INT
+-
+-
+-#ifndef _RWSTD_NO_LONG_DOUBLE
+-
+-// long double overloads
+-
+-
+-#if defined (_RWSTD_NO_ABS_LDBL)
+-inline long double abs (long double __x)
+-{
+- return _FABSL (__x);
+-}
+-# undef _RWSTD_NO_ABS_LDBL
+-# else
+-_USING (::abs);
+-#endif // _RWSTD_NO_ABS_LDBL
+-
+-
+-#if defined (_RWSTD_NO_ACOS_LDBL)
+-inline long double acos (long double __x)
+-{
+- return _ACOSL (__x);
+-}
+-#endif // _RWSTD_NO_ACOS_LDBL
+-
+-
+-#if defined (_RWSTD_NO_ASIN_LDBL)
+-inline long double asin (long double __x)
+-{
+- return _ASINL (__x);
+-}
+-#endif // _RWSTD_NO_ASIN_LDBL
+-
+-
+-#if defined (_RWSTD_NO_ATAN_LDBL)
+-inline long double atan (long double __x)
+-{
+- return _ATANL (__x);
+-}
+-#endif // _RWSTD_NO_ATAN_LDBL
+-
+-
+-#if defined (_RWSTD_NO_ATAN2_LDBL)
+-inline long double atan2 (long double __x, long double __y)
+-{
+- return _ATAN2L (__x, __y);
+-}
+-#endif // _RWSTD_NO_ATAN2_LDBL
+-
+-
+-#if defined (_RWSTD_NO_CEIL_LDBL)
+-inline long double ceil (long double __x)
+-{
+- return _CEILL (__x);
+-}
+-#endif // _RWSTD_NO_CEIL_LDBL
+-
+-
+-#if defined (_RWSTD_NO_COS_LDBL)
+-inline long double cos (long double __x)
+-{
+- return _COSL (__x);
+-}
+-#endif // _RWSTD_NO_COS_LDBL
+-
+-
+-#if defined (_RWSTD_NO_COSH_LDBL)
+-inline long double cosh (long double __x)
+-{
+- return _COSHL (__x);
+-}
+-#endif // _RWSTD_NO_COSH_LDBL
+-
+-
+-#if defined (_RWSTD_NO_EXP_LDBL)
+-inline long double exp (long double __x)
+-{
+- return _EXPL (__x);
+-}
+-#endif // _RWSTD_NO_EXP_LDBL
+-
+-
+-#if defined (_RWSTD_NO_FABS_LDBL)
+-inline long double fabs (long double __x)
+-{
+- return _FABSL (__x);
+-}
+-# undef _RWSTD_NO_FABS_LDBL
+-#endif // _RWSTD_NO_FABS_LDBL
+-
+-
+-#if defined (_RWSTD_NO_FLOOR_LDBL)
+-inline long double floor (long double __x)
+-{
+- return _FLOORL (__x);
+-}
+-#endif // _RWSTD_NO_FLOOR_LDBL
+-
+-
+-#if defined (_RWSTD_NO_FMOD_LDBL)
+-inline long double fmod (long double __x, long double __y)
+-{
+- return _FMODL (__x, __y);
+-}
+-#endif // _RWSTD_NO_FMOD_LDBL
+-
+-
+-#if defined (_RWSTD_NO_FREXP_LDBL)
+-inline long double frexp (long double __x, int *__e)
+-{
+- return _FREXPL (__x, __e);
+-}
+-#endif // _RWSTD_NO_FREXP_LDBL
+-
+-
+-#if defined (_RWSTD_NO_LDEXP_LDBL_INT)
+-inline long double ldexp (long double __x, int __e)
+-{
+- return _LDEXPL (__x, __e);
+-}
+-#endif // _RWSTD_NO_LDEXP_LDBL_INT
+-
+-
+-#if defined (_RWSTD_NO_LOG_LDBL)
+-inline long double log (long double __x)
+-{
+- return _LOGL (__x);
+-}
+-#endif // _RWSTD_NO_LOG_LDBL
+-
+-
+-#if defined (_RWSTD_NO_LOG10_LDBL)
+-inline long double log10 (long double __x)
+-{
+- return _LOG10L (__x);
+-}
+-#endif // _RWSTD_NO_LOG10_LDBL
+-
+-
+-#if defined (_RWSTD_NO_MODF_LDBL)
+-inline long double modf (long double __x, long double *__y)
+-{
+- return _MODFL (__x, __y);
+-}
+-#endif // _RWSTD_NO_MODF_LDBL
+-
+-
+-#ifdef _RWSTD_NO_POW_LDBL
+-inline long double pow (long double __x, long double __y)
+-{
+- return _POWL (__x, __y);
+-}
+-#endif // _RWSTD_NO_POW_LDBL
+-
+-
+-#ifdef _RWSTD_NO_POW_LDBL_INT
+-inline long double pow (long double __x, int __y)
+-{
+- long double __res = __y % 2 ? __x : 1;
+-
+- for (int __i = __y < 0 ? -__y : __y; __i >>= 1; ) {
+- __x *= __x;
+- if (__i % 2)
+- __res *= __x;
+- }
+-
+- return __y < 0 ? __res ? 1 / __res : -1 / __res : __y ? __res : 1;
+-}
+-#endif // _RWSTD_NO_POW_LDBL_INT
+-
+-
+-#if defined (_RWSTD_NO_SIN_LDBL)
+-inline long double sin (long double __x)
+-{
+- return _SINL (__x);
+-}
+-#endif // _RWSTD_NO_SIN_LDBL
+-
+-
+-#if defined (_RWSTD_NO_SINH_LDBL)
+-inline long double sinh (long double __x)
+-{
+- return _SINHL (__x);
+-}
+-#endif // _RWSTD_NO_SINH_LDBL
+-
+-
+-#if defined (_RWSTD_NO_SQRT_LDBL)
+-inline long double sqrt (long double __x)
+-{
+- return _SQRTL (__x);
+-}
+-#endif // _RWSTD_NO_SQRT_LDBL
+-
+-
+-#if defined (_RWSTD_NO_TAN_LDBL)
+-inline long double tan (long double __x)
+-{
+- return _TANL (__x);
+-}
+-#endif // _RWSTD_NO_TAN_LDBL
+-
+-
+-#if defined (_RWSTD_NO_TANH_LDBL)
+-inline long double tanh (long double __x)
+-{
+- return _TANHL (__x);
+-}
+-#endif // _RWSTD_NO_TANH_LDBL
+-
+-
+-#endif // _RWSTD_NO_LONG_DOUBLE
+-
+-
+-// using statements must come after the overloads.
+-// working around MSVC6 PR# 27677
+-#if !defined (_RWSTD_NO_HONOR_STD) && !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-_USING (::acos);
+-_USING (::asin);
+-_USING (::atan);
+-_USING (::atan2);
+-_USING (::ceil);
+-_USING (::cos);
+-_USING (::cosh);
+-_USING (::exp);
+-_USING (::fabs);
+-_USING (::floor);
+-_USING (::fmod);
+-_USING (::frexp);
+-_USING (::ldexp);
+-_USING (::log);
+-_USING (::log10);
+-_USING (::modf);
+-_USING (::pow);
+-_USING (::sin);
+-_USING (::sinh);
+-_USING (::sqrt);
+-_USING (::tan);
+-_USING (::tanh);
+-
+-#endif // !_RWSTD_NO_HONOR_STD && !_RWSTD_NO_USING_LIBC_IN_STD
+-
+-#if !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-} // namespace std
+-#endif // !_RWSTD_NO_USING_LIBC_IN_STD
+-
+-
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
+-
++#include <math.h>
+
+-// MSVC provides its own complex macro
+-#ifdef _MSC_VER
+-# ifdef complex
+-# undef complex
+-# endif
++#if defined(__cplusplus) && defined(__SUNPRO_CC)
++# undef __MATHERR_RENAME_EXCEPTION
+ #endif
+
++#endif /* _MATH_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
+-
+-#endif // _RWSTD_CMATH_INCLUDED
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/012-csetjmp.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,109 @@
+--- stdcxx-4.2.1/include/ansi/csetjmp 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/csetjmp 2009-03-12 16:35:36.000000000 -0400
+@@ -1,84 +1,34 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * csetjmp - C++ Standard library interface to the ANSI C header stddef.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: csetjmp 580483 2007-09-28 20:55:52Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_csetjmp.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 9
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_SETJMP_H
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 9
+-# undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 9
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CSETJMP_INCLUDED
+-#define _RWSTD_CSETJMP_INCLUDED
+-
+-#include _RWSTD_ANSI_C_SETJMP_H
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_HONOR_STD) && \
+- !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-namespace std {
+-
+-using ::jmp_buf;
+-
+-using ::longjmp;
+-
+-} // std
+-
+-#endif // !_RWSTD_NO_NAMESPACE && !_RWSTD_NO_HONOR_STD && !_RWSTD_NO_USING_LIBC_IN_STD
++ * ident "@(#)csetjmp.12.diff 1.1 09/08/21 SMI"
++ */
+
+-#endif // _RWSTD_CSETJMP_INCLUDED
++#ifndef _SETJMP_H
+
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++#include <setjmp.h>
+
+-#ifndef setjmp
+-# define setjmp(env) setjmp (env)
+-#endif
++#endif /* _SETJMP_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/013-csignal.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,105 @@
+--- stdcxx-4.2.1/include/ansi/csignal 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/csignal 2009-03-12 16:35:36.000000000 -0400
+@@ -1,80 +1,34 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * csignal - C++ Standard library interface to the ANSI C header signal.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: csignal 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_csignal.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 10
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_SIGNAL_H
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 10
+-# undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 10
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CSIGNAL_INCLUDED
+-#define _RWSTD_CSIGNAL_INCLUDED
+-
+-#include _RWSTD_ANSI_C_SIGNAL_H
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_HONOR_STD) && \
+- !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-namespace std {
+-
+- using ::sig_atomic_t;
+- using ::raise;
+- using ::signal;
+-
+-} // std
++ * ident "@(#)csignal.13.diff 1.1 09/08/21 SMI"
++ */
+
+-#endif // !_RWSTD_NO_NAMESPACE && !_RWSTD_NO_HONOR_STD && !_RWSTD_NO_USING_LIBC_IN_STD
++#ifndef _SIGNAL_H
+
+-#endif // _RWSTD_CSIGNAL_INCLUDED
++#include <signal.h>
+
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++#endif /* _SIGNAL_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/014-cstdarg.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,103 @@
+--- stdcxx-4.2.1/include/ansi/cstdarg 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/cstdarg 2009-03-12 16:35:36.000000000 -0400
+@@ -1,77 +1,35 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cstdarg - C++ Standard library interface to the ANSI C header stdarg.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: cstdarg 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_cstdarg.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 11
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_STDARG_H
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 11
+-# undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 11
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CSTDARG_INCLUDED
+-#define _RWSTD_CSTDARG_INCLUDED
+-
+-#include _RWSTD_ANSI_C_STDARG_H
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-namespace std {
+-
+- using ::va_list;
+-
+-} // std
++ * ident "@(#)cstdarg.14.diff 1.1 09/08/21 SMI"
++ */
+
+-#endif // !_RWSTD_NO_NAMESPACE && !defined (_RWSTD_NO_USING_LIBC_IN_STD)
++#ifndef _STDARG_H
+
+-#endif // _RWSTD_CSTDARG_INCLUDED
++#include <sys/feature_tests.h>
++#include <stdarg.h>
+
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++#endif /* _STDARG_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/015-cstddef.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,104 @@
+--- stdcxx-4.2.1/include/ansi/cstddef 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/cstddef 2009-03-12 16:35:36.000000000 -0400
+@@ -1,78 +1,35 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cstddef - C++ Standard library interface to the ANSI C header stddef.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: cstddef 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_cstddef.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 12
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_STDDEF_H
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 12
+-# undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 12
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CSTDDEF_INCLUDED
+-#define _RWSTD_CSTDDEF_INCLUDED
+-
+-#include _RWSTD_ANSI_C_STDDEF_H
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-namespace std {
+-
+- using ::size_t;
+- using ::ptrdiff_t;
+-
+-} // std
++ * ident "@(#)cstddef.15.diff 1.1 09/08/21 SMI"
++ */
+
+-#endif // !_RWSTD_NO_NAMESPACE && !_RWSTD_NO_USING_LIBC_IN_STD
++#ifndef _STDDEF_H
+
+-#endif // _RWSTD_CSTDDEF_INCLUDED
++#include <sys/feature_tests.h>
++#include <stddef.h>
+
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++#endif /* _STDDEF_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/016-cstdio.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,340 @@
+--- stdcxx-4.2.1/include/ansi/cstdio 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/cstdio 2009-03-12 16:35:36.000000000 -0400
+@@ -1,313 +1,38 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cstdio - C++ Standard library interface to the ANSI C header stdio.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: cstdio 609466 2008-01-06 23:18:56Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2007 Rogue Wave Software, Inc.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_cstdio.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 14
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_STDIO_H
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 14
+-# undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 14
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CSTDIO_INCLUDED
+-#define _RWSTD_CSTDIO_INCLUDED
+-
+-#include _RWSTD_ANSI_C_STDIO_H
+-
++ * ident "@(#)cstdio.16.diff 1.1 09/08/21 SMI"
++ */
+
+-// 27.8.2, p1, Table 94
+-#ifndef stdin
+-# define stdin stdin
+-#endif
++#ifndef _STDIO_H
+
+-#ifndef stdout
+-# define stdout stdout
+-#endif
+-
+-#ifndef stderr
+-# define stderr stderr
+-#endif
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_HONOR_STD) && \
+- !defined (_RWSTD_NO_USING_LIBC_IN_STD)
++#include <stdio.h>
+
+ namespace std {
++ extern "C" int fileno(FILE *);
++}
+
+- using ::size_t;
+- using ::FILE;
+-
+-#ifndef _RWSTD_NO_FPOS_T
+- using ::fpos_t;
+-#endif // _RWSTD_NO_FPOS_T
+-
+-#ifndef _RWSTD_NO_CLEARERR
+- using ::clearerr;
+-#endif // _RWSTD_NO_CLEARERR
+-
+-#ifndef _RWSTD_NO_FCLOSE
+- using ::fclose;
+-#endif // _RWSTD_NO_FCLOSE
+-
+-#ifndef _RWSTD_NO_FEOF
+- using ::feof;
+-#endif // _RWSTD_NO_FEOF
+-
+-#ifndef _RWSTD_NO_FERROR
+- using ::ferror;
+-#endif // _RWSTD_NO_FERROR
+-
+-#ifndef _RWSTD_NO_FFLUSH
+- using ::fflush;
+-#endif // _RWSTD_NO_FFLUSH
+-
+-#ifndef _RWSTD_NO_FGETC
+- using ::fgetc;
+-#endif // _RWSTD_NO_FGETC
+-
+-#ifndef _RWSTD_NO_FGETPOS
+- using ::fgetpos;
+-#endif // _RWSTD_NO_FGETPOS
+-
+-#ifndef _RWSTD_NO_FGETS
+- using ::fgets;
+-#endif // _RWSTD_NO_FGETS
+-
+-#ifndef _RWSTD_NO_FOPEN
+- using ::fopen;
+-#endif // _RWSTD_NO_FOPEN
+-
+-#ifndef _RWSTD_NO_FPRINTF
+- using ::fprintf;
+-#endif // _RWSTD_NO_FPRINTF
+-
+-#ifndef _RWSTD_NO_FPUTC
+- using ::fputc;
+-#endif // _RWSTD_NO_FPUTC
+-
+-#ifndef _RWSTD_NO_FPUTS
+- using ::fputs;
+-#endif // _RWSTD_NO_FPUTS
+-
+-#ifndef _RWSTD_NO_FREAD
+- using ::fread;
+-#endif // _RWSTD_NO_FREAD
+-
+-#ifndef _RWSTD_NO_FREOPEN
+- using ::freopen;
+-#endif // _RWSTD_NO_FREOPEN
+-
+-#ifndef _RWSTD_NO_FSCANF
+- using ::fscanf;
+-#endif // _RWSTD_NO_FSCANF
+-
+-#ifndef _RWSTD_NO_FSEEK
+- using ::fseek;
+-#endif // _RWSTD_NO_FSEEK
+-
+-#ifndef _RWSTD_NO_FSETPOS
+- using ::fsetpos;
+-#endif // _RWSTD_NO_FSETPOS
+-
+-#ifndef _RWSTD_NO_FTELL
+- using ::ftell;
+-#endif // _RWSTD_NO_FTELL
+-
+-#ifndef _RWSTD_NO_FWRITE
+- using ::fwrite;
+-#endif // _RWSTD_NO_FWRITE
+-
+-#ifndef _RWSTD_NO_GETC
+- using ::getc;
+-#endif // _RWSTD_NO_GETC
+-
+-#ifndef _RWSTD_NO_GETCHAR
+- using ::getchar;
+-#endif // _RWSTD_NO_GETCHAR
+-
+-#ifndef _RWSTD_NO_GETS
+- using ::gets;
+-#endif // _RWSTD_NO_GETS
+-
+-#ifndef _RWSTD_NO_PERROR
+- using ::perror;
+-#endif // _RWSTD_NO_PERROR
+-
+-#ifndef _RWSTD_NO_PRINTF
+- using ::printf;
+-#endif // _RWSTD_NO_PRINTF
+-
+-#ifndef _RWSTD_NO_PUTC
+- using ::putc;
+-#endif // _RWSTD_NO_PUTC
+-
+-#ifndef _RWSTD_NO_PUTCHAR
+- using ::putchar;
+-#endif // _RWSTD_NO_PUTCHAR
+-
+-#ifndef _RWSTD_NO_PUTS
+- using ::puts;
+-#endif // _RWSTD_NO_PUTS
+-
+-#ifndef _RWSTD_NO_REMOVE
+- using ::remove;
+-#endif // _RWSTD_NO_REMOVE
+-
+-#ifndef _RWSTD_NO_RENAME
+- using ::rename;
+-#endif // _RWSTD_NO_RENAME
+-
+-#ifndef _RWSTD_NO_REWIND
+- using ::rewind;
+-#endif // _RWSTD_NO_REWIND
+-
+-#ifndef _RWSTD_NO_SCANF
+- using ::scanf;
+-#endif // _RWSTD_NO_SCANF
+-
+-#ifndef _RWSTD_NO_SETBUF
+- using ::setbuf;
+-#endif // _RWSTD_NO_SETBUF
+-
+-#ifndef _RWSTD_NO_SETVBUF
+- using ::setvbuf;
+-#endif // _RWSTD_NO_SETVBUF
+-
+-#ifndef _RWSTD_NO_SPRINTF
+- using ::sprintf;
+-#endif // _RWSTD_NO_SPRINTF
+-
+-#ifndef _RWSTD_NO_SSCANF
+- using ::sscanf;
+-#endif // _RWSTD_NO_SSCANF
+-
+-#ifndef _RWSTD_NO_TMPFILE
+- using ::tmpfile;
+-#endif // _RWSTD_NO_TMPFILE
+-
+-#ifndef _RWSTD_NO_TMPNAM
+- using ::tmpnam;
+-#else
+-# ifndef _RWSTD_NO_TMPNAM_IN_LIBC
+- extern "C" char *tmpnam (char *);
+-# endif // _RWSTD_NO_TMPNAM_IN_LIBC
+-#endif // _RWSTD_NO_TMPNAM
+-
+-#ifndef _RWSTD_NO_UNGETC
+- using ::ungetc;
+-#endif // _RWSTD_NO_UNGETC
+-
+-#ifndef _RWSTD_NO_VFPRINTF
+- using ::vfprintf;
+-#endif // _RWSTD_NO_VFPRINTF
+-
+-#ifndef _RWSTD_NO_VPRINTF
+- using ::vprintf;
+-#endif // _RWSTD_NO_VPRINTF
+-
+-#ifndef _RWSTD_NO_VSPRINTF
+- using ::vsprintf;
+-#endif // _RWSTD_NO_VSPRINTF
+-
+-} // std
+-
+-
+-#ifdef _RWSTD_STRICT_ANSI
+-// undefine shadow macros in strict mode
+-# undef fpos_t
+-# undef remove
+-# undef rename
+-# undef tmpfile
+-# undef tmpnam
+-# undef fclose
+-# undef fflush
+-# undef fopen
+-# undef freopen
+-# undef setbuf
+-# undef setvbuf
+-# undef fprintf
+-# undef fscanf
+-# undef printf
+-# undef scanf
+-# undef sprintf
+-# undef sscanf
+-# undef vfprintf
+-# undef vprintf
+-# undef vsprintf
+-# undef fgetc
+-# undef fgets
+-# undef fputc
+-# undef fputs
+-# undef getc
+-# undef getchar
+-# undef gets
+-# undef putc
+-# undef putchar
+-# undef puts
+-# undef ungetc
+-# undef fread
+-# undef fwrite
+-# undef fgetpos
+-# undef fseek
+-# undef fsetpos
+-# undef ftell
+-# undef rewind
+-# undef clearerr
+-# undef feof
+-# undef ferror
+-# undef perror
+-#endif
+-
+-
+-#endif // !_NO_NAMESPACE && !__NO_HONOR_STD && !_NO_USING_LIBC_IN_STD
+-
+-#endif // _RWSTD_CSTDIO_INCLUDED
+-
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++#endif /* _STDIO_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/017-cstdlib.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,288 @@
+--- stdcxx-4.2.1/include/ansi/cstdlib 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/cstdlib 2009-03-12 16:35:36.000000000 -0400
+@@ -1,263 +1,34 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cstdlib - C++ Standard library interface to the ANSI C header stdlib.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: cstdlib 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_cstdlib.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 15
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_STDLIB_H
+-
+-#ifndef _RWSTD_CSTDLIB_INCLUDED
+-#define _RWSTD_CSTDLIB_INCLUDED
+-
+-
+-#ifdef _RWSTD_NO_ABS_LONG
+-
+-inline long abs (long __x)
+-{
+- return __x < 0L ? -__x : __x;
+-}
+-
+-#endif // _RWSTD_NO_ABS_LONG
+-
+-#ifdef _RWSTD_NO_DIV_LONG
+-# ifndef _RWSTD_NO_LDIV
+-
+-inline ldiv_t div (long __x, long __y)
+-{
+- return ldiv (__x, __y);
+-}
+-
+-# endif // _RWSTD_NO_LDIV
+-#endif // _RWSTD_NO_DIV_LONG
+-
+-
+-#endif // _RWSTD_CSTDLIB_INCLUDED
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 15
+-# undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 15
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CSTDLIB_INCLUDED
+-#define _RWSTD_CSTDLIB_INCLUDED
+-
+-#include _RWSTD_ANSI_C_STDLIB_H
+-
+-#undef ldiv
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_HONOR_STD) && \
+- !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-namespace std {
+-
+-
+-#ifdef _RWSTD_NO_ABS_UINT
+-
+-inline unsigned abs (unsigned __x)
+-{
+- return __x;
+-}
+-
+-#endif // _RWSTD_NO_ABS_UINT
+-
+-#ifdef _RWSTD_NO_ABS_LONG
+-
+-inline long abs (long __x)
+-{
+- return __x < 0L ? -__x : __x;
+-}
+-
+-#endif // _RWSTD_NO_ABS_LONG
+-
+-#ifdef _RWSTD_NO_ABS_ULONG
+-
+-inline unsigned long abs (unsigned long __x)
+-{
+- return __x;
+-}
+-
+-#endif // _RWSTD_NO_ABS_ULONG
+-
+-#ifdef _RWSTD_LONG_LONG
+-# ifdef _RWSTD_NO_ABS_LLONG
+-
+-inline _RWSTD_LONG_LONG abs (_RWSTD_LONG_LONG __x)
+-{
+- return __x < (_RWSTD_LONG_LONG)0 ? -__x : __x;
+-}
+-
+-# endif // _RWSTD_NO_ABS_LLONG
+-
+-# ifdef _RWSTD_NO_ABS_ULLONG
+-
+-inline unsigned _RWSTD_LONG_LONG abs (unsigned _RWSTD_LONG_LONG __x)
+-{
+- return __x;
+-}
+-
+-# endif // _RWSTD_NO_ABS_ULLONG
+-#endif // _RWSTD_LONG_LONG
+-
+-#ifdef _RWSTD_NO_DIV_LONG
+-# ifndef _RWSTD_NO_LDIV
+-
+- inline ldiv_t div (long __x, long __y)
+- {
+- return ldiv (__x, __y);
+- }
+-
+-# endif // _RWSTD_NO_LDIV
+-#endif // _RWSTD_NO_DIV_LONG
+-
+-#ifndef _RWSTD_NO_EXTERN_C_COMPATIBILITY
+-# ifndef _RWSTD_NO_EXTERN_C_OVERLOAD
+-
+- extern "C" {
+- typedef int (*__rw_compar_t)(const void*, const void*);
+- }
+-
+- extern "C++" {
+-
+- // 25.4, p3
+- inline void*
+- bsearch (const void *__key, const void *__base, size_t __n, size_t __size,
+- int (*__cmp)(const void*, const void*))
+- {
+- return ::bsearch (__key, __base, __n, __size,
+- _RWSTD_REINTERPRET_CAST (__rw_compar_t, __cmp));
+- }
+-
+- // 25.4, p4
+- inline void
+- qsort (void *__base, size_t __n, size_t __size,
+- int (*__cmp)(const void*, const void*))
+- {
+- return ::qsort (__base, __n, __size,
+- _RWSTD_REINTERPRET_CAST (__rw_compar_t, __cmp));
+- }
+-
+- } // extern "C++"
+-
+-# endif // _RWSTD_NO_EXTERN_C_OVERLOAD
+-#endif // _RWSTD_NO_EXTERN_C_COMPATIBILITY
+-
+- // using statements must come after the overloads.
+- // working around MSVC6 PR# 27677
+- using ::size_t;
+- using ::div_t;
+-
+-#ifndef _RWSTD_NO_LDIV
+- using ::ldiv_t;
+-#endif // _RWSTD_NO_LDIV
+-
+- using ::abort;
+-
+-#if defined (_RWSTD_NO_ABS) && defined (_RWSTD_NO_ABS_INT) \
+- || defined (__HP_aCC) \
+- && defined (_MATH_INCLUDED) && !defined (__MATH_INCLUDED)
+-
+-// hacking around an HP aCC quirk when using system headers
+-// in /usr/include without the compiler's wrappers (i.e.,
+-// when -I/usr/include is on the command line)
+-
+-} // namespace std
+-
+-extern "C" {
+-
+-inline int abs (int __x)
+-{
+- return __x < 0 ? -__x : __x;
+-}
+-
+-} // extern "C"
+-
+-namespace std {
+-
+-#endif // _RWSTD_NO_ABS && _RWSTD_NO_ABS_INT ...
+-
+- using ::abs;
+-
+- using ::atexit;
+- using ::atof;
+- using ::atoi;
+- using ::atol;
+- using ::bsearch;
+- using ::calloc;
+- using ::div;
+- using ::exit;
+- using ::free;
+- using ::getenv;
+- using ::labs;
+- using ::ldiv;
+- using ::malloc;
+- using ::mblen;
+- using ::mbstowcs;
+-
+-#ifndef _RWSTD_NO_MBTOWC
+- using ::mbtowc;
+-#endif // _RWSTD_NO_MBTOWC
+-
+- using ::qsort;
+- using ::rand;
+- using ::realloc;
+- using ::srand;
+- using ::strtod;
+- using ::strtol;
+- using ::strtoul;
+- using ::system;
+- using ::wcstombs;
+- using ::wctomb;
+-
+-} // namespace std
++ * ident "@(#)cstdlib.17.diff 1.1 09/08/21 SMI"
++ */
+
+-#endif // !_RWSTD_NO_NAMESPACE && !_RWSTD_NO_HONOR_STD && !_RWSTD_NO_USING_LIBC_IN_STD
++#ifndef _STDLIB_H
+
+-#endif // _RWSTD_CSTDLIB_INCLUDED
++#include <stdlib.h>
+
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++#endif /* _STDLIB_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/018-cstring.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,472 @@
+--- stdcxx-4.2.1/include/ansi/cstring 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/cstring 2009-03-12 16:35:36.000000000 -0400
+@@ -1,447 +1,34 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cstring - C++ Standard library interface to the ANSI C header string.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: cstring 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_cstring.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NO_NAMESPACE
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 15
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_STRING_H
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 15
+-#undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 15
+-
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#if 0
+-
+-const char* strchr (const char *__s, int __c);
+-const char* strpbrk (const char *__s1, const char *__s2);
+-const char* strrchr (const char *__s, int __c);
+-const char* strstr (const char *__s1, const char *__s2);
+-const void* memchr (const void *__p, int __c, size_t __n);
+-
+-#endif // 0/1
+-
+-
+-#ifndef _RWSTD_CSTRING_INCLUDED
+-#define _RWSTD_CSTRING_INCLUDED
+-
+-inline char* strchr (char *__s, int __c)
+-{
+- return strchr ((const char*)__s, __c);
+-}
+-
+-inline char* strpbrk (char *__s1, const char *__s2)
+-{
+- return strpbrk ((const char*)__s1, __s2);
+-}
+-
+-inline char* strrchr (char *__s, int __c)
+-{
+- return strrchr ((const char*)__s, __c);
+-}
+-
+-inline char* strstr (char *__s1, const char *__s2)
+-{
+- return strstr ((const char*)__s1, __s2);
+-}
+-
+-inline void* memchr (void *__p, int __c, size_t __n)
+-{
+- return memchr ((const void*)__p, __c, __n);
+-}
+-
+-#endif // _RWSTD_CSTRING_INCLUDED
+-
+-} // namespace std
+-
+-#else // if defined (_RWSTD_NO_NAMESPACE)
+-
+-
+-#include _RWSTD_ANSI_C_STRING_H
+-
+-
+-#endif // _RWSTD_NO_NAMESPACE
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CSTRING_INCLUDED
+-#define _RWSTD_CSTRING_INCLUDED
+-
+-#include _RWSTD_ANSI_C_STRING_H
+-
+-# undef index
+-# undef rindex
+-
+-# undef strcpy
+-# undef strcmp
+-
+-# undef strlen
+-# undef strchr
+-# undef strrchr
+-# undef strcat
+-# undef memchr
+-# undef memcpy
+-# undef memmove
+-# undef memcmp
+-# undef memset
+-
+-# undef memccpy
+-# undef strncat
+-# undef strncmp
+-# undef strncpy
+-
+-#ifndef NULL
+-# define NULL 0
+-#endif // NULL
+-
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_HONOR_STD) && \
+- !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-namespace std {
+-
+- using ::size_t;
+-
+-#ifndef _RWSTD_NO_MEMCHR
+- using ::memchr;
+-#elif !defined (_RWSTD_NO_MEMCHR_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" void* memchr (void*, int, size_t);
+-
+-inline const void* memchr (const void *__p, int __c, size_t __n)
+-{
+- return memchr (_RWSTD_CONST_CAST (void*, __p), __c, __n);
+-}
+-
+-namespace std {
+-
+-using ::memchr;
+-
+-# undef _RWSTD_NO_MEMCHR
+-
+-#else // if defined (_RWSTD_NO_MEMCHR)
+-#endif // _RWSTD_NO_MEMCHR
+-
+-#ifndef _RWSTD_NO_MEMCMP
+- using ::memcmp;
+-#elif !defined (_RWSTD_NO_MEMCMP_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" int memcmp (const void*, const void*, size_t);
+-
+-namespace std {
+-
+-using ::memcmp;
+-
+-# undef _RWSTD_NO_MEMCMP
+-
+-#else // if defined (_RWSTD_NO_MEMCMP)
+-
+-} // namespace std
+-
+-extern "C" {
+-
+-inline int memcmp (const void *__s1, const void *__s2, size_t __n)
+-{
+- const char *__ss1 = _RWSTD_REINTERPRET_CAST (const char*, __s1);
+- const char *__ss2 = _RWSTD_REINTERPRET_CAST (const char*, __s2);
+-
+- for (; __n; --__n, ++__ss1, ++__ss2)
+- if (*__ss1 != *__ss2)
+- return *__ss1 - *__ss2;
+- return 0;
+-}
+-
+-} // extern "C"
+-
+-namespace std {
+-
+-using ::memcmp;
+-
+-# undef _RWSTD_NO_MEMCMP
+-
+-#endif // _RWSTD_NO_MEMCMP
+-
+-#ifndef _RWSTD_NO_MEMCPY
+- using ::memcpy;
+-#elif !defined (_RWSTD_NO_MEMCPY_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" void* memcpy (void*, const void*, size_t);
+-
+-namespace std {
+-
+-using ::memcpy;
+-
+-# undef _RWSTD_NO_MEMCPY
+-
+-#else
+-#endif // _RWSTD_NO_MEMCPY
+-
+-#ifndef _RWSTD_NO_MEMMOVE
+- using ::memmove;
+-#elif !defined (_RWSTD_NO_MEMMOVE_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" void* memmove (void*, const void*, size_t);
+-
+-namespace std {
+-
+-using ::memmove;
+-
+-# undef _RWSTD_NO_MEMMOVE
+-
+-#else // if defined (_RWSTD_NO_MEMMOVE)
+-
+-} // namespace std
+-
+-extern "C" {
+-
+-inline void* memmove (void *__dest, const void *__src, size_t __n)
+-{
+- char *__d = _RWSTD_REINTERPRET_CAST (char*, __dest);
+- const char *__s = _RWSTD_REINTERPRET_CAST (const char*, __src);
+-
+- if (__d < __s || __d >= __s + __n)
+- memcpy (__d, __s, __n);
+- else {
+- // regions overlap
+- __d += __n;
+- __s += __n;
+- while (__n--)
+- *--__d = *--__s;
+- }
+- return __dest;
+-}
+-
+-} // extern "C"
+-
+-namespace std {
+-
+-using ::memmove;
+-
+-# undef _RWSTD_NO_MEMMOVE
+-
+-#endif // _RWSTD_NO_MEMMOVE
+-
+-#ifndef _RWSTD_NO_MEMSET
+- using ::memset;
+-#else // if defined (_RWSTD_NO_MEMSET)
+-#endif // _RWSTD_NO_MEMSET
+-
+-#ifndef _RWSTD_NO_STRCAT
+- using ::strcat;
+-#else // if defined (_RWSTD_NO_STRCAT)
+-#endif // _RWSTD_NO_STRCAT
+-
+-#ifndef _RWSTD_NO_STRCHR
+- using ::strchr;
+-#elif !defined (_RWSTD_NO_STRCHR_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" char* strchr (char*, int);
+-
+-inline const char* strchr (const char *__s, int __c)
+-{
+- return strchr (_RWSTD_CONST_CAST (char*, __s), __c);
+-}
+-
+-namespace std {
+-
+-using ::strchr;
+-
+-# undef _RWSTD_NO_STRCHR
+-
+-#else // if defined (_RWSTD_NO_STRCHR)
+-#endif // _RWSTD_NO_STRCHR
+-
+-#ifndef _RWSTD_NO_STRCMP
+- using ::strcmp;
+-#elif !defined (_RWSTD_NO_STRCMP_IN_LIBC)
+-#else // if defined (_RWSTD_NO_STRCMP)
+-#endif // _RWSTD_NO_STRCMP
+-
+-#ifndef _RWSTD_NO_STRCOLL
+- using ::strcoll;
+-#else // if defined (_RWSTD_NO_STRCOLL)
+-#endif // _RWSTD_NO_STRCOLL
+-
+-#ifndef _RWSTD_NO_STRCPY
+- using ::strcpy;
+-#else // if defined (_RWSTD_NO_STRCPY)
+-#endif // _RWSTD_NO_STRCPY
+-
+-#ifndef _RWSTD_NO_STRCSPN
+- using ::strcspn;
+-#else // if defined (_RWSTD_NO_STRCSPN)
+-#endif // _RWSTD_NO_STRCSPN
+-
+-#ifndef _RWSTD_NO_STRERROR
+- using ::strerror;
+-#else // if defined (_RWSTD_NO_STRERROR)
+-#endif // _RWSTD_NO_STRERROR
+-
+-#ifndef _RWSTD_NO_STRLEN
+- using ::strlen;
+-#else // if defined (_RWSTD_NO_STRLEN)
+-#endif // _RWSTD_NO_STRLEN
+-
+-#ifndef _RWSTD_NO_STRNCAT
+- using ::strncat;
+-#else // if defined (_RWSTD_NO_STRNCAT)
+-#endif // _RWSTD_NO_STRNCAT
+-
+-#ifndef _RWSTD_NO_STRNCMP
+- using ::strncmp;
+-#else // if defined (_RWSTD_NO_STRNCMP)
+-#endif // _RWSTD_NO_STRNCMP
+-
+-#ifndef _RWSTD_NO_STRNCPY
+- using ::strncpy;
+-#else // if defined (_RWSTD_NO_STRNCPY)
+-#endif // _RWSTD_NO_STRNCPY
+-
+-#ifndef _RWSTD_NO_STRPBRK
+- using ::strpbrk;
+-#elif !defined (_RWSTD_NO_STRPBRK_IN_LIBC)
+-
+-} // namespace std
+-
+- extern "C" char* strpbrk (char*, const char*);
+-
+- inline const char* strpbrk (const char *__s, const char *__pat)
+- {
+- return strpbrk (_RWSTD_CONST_CAST (char*, __s), __pat);
+- }
+-
+-namespace std {
+-
+-using ::strpbrk;
+-
+-# undef _RWSTD_NO_STRPBRK
+-
+-#else
+-#endif // _RWSTD_NO_STRPBRK
+-
+-#ifndef _RWSTD_NO_STRRCHR
+- using ::strrchr;
+-#elif !defined (_RWSTD_NO_STRRCHR_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" char* strrchr (char*, int);
+-
+-inline const char* strrchr (const char *__s, int __c)
+-{
+- return strrchr (_RWSTD_CONST_CAST (char*, __s), __c);
+-}
+-
+-namespace std {
+-
+-using ::strrchr;
+-
+-# undef _RWSTD_NO_STRRCHR
+-
+-#else // if defined (_RWSTD_NO_STRRCHR)
+-
+-#endif // _RWSTD_NO_STRRCHR
+-
+-#ifndef _RWSTD_NO_STRSPN
+- using ::strspn;
+-#else // if defined (_RWSTD_NO_STRSPN)
+-#endif // _RWSTD_NO_STRSPN
+-
+-#ifndef _RWSTD_NO_STRSTR
+- using ::strstr;
+-#elif !defined (_RWSTD_NO_STRSTR_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" char* strstr (char*, const char*);
+-
+-inline const char* strstr (const char *__s1, const char *__s2)
+-{
+- return strstr (_RWSTD_CONST_CAST (char*, __s1), __s2);
+-}
+-
+-namespace std {
+-
+-using ::strstr;
+-
+-# undef _RWSTD_NO_STRSTR
+-
+-#else // if defined (_RWSTD_NO_STRSTR)
+-#endif // _RWSTD_NO_STRSTR
+-
+-#ifndef _RWSTD_NO_STRTOK
+- using ::strtok;
+-#else // if defined (_RWSTD_NO_STRTOK)
+-#endif // _RWSTD_NO_STRTOK
+-
+-#ifndef _RWSTD_NO_STRXFRM
+- using ::strxfrm;
+-#else // if defined (_RWSTD_NO_STRXFRM)
+-#endif // _RWSTD_NO_STRXFRM
+-
+-} // std
++ * ident "@(#)cstring.18.diff 1.1 09/08/21 SMI"
++ */
+
+-#endif // !NO_NAMESPACE && !NO_HONOR_STD && !NO_USING_LIBC_IN_STD
++#ifndef _STRING_H
+
+-#endif // _RWSTD_CSTRING_INCLUDED
++#include <string.h>
+
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++#endif /* _STRING_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/019-ctime.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,116 @@
+--- stdcxx-4.2.1/include/ansi/ctime 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/ctime 2009-03-12 16:35:36.000000000 -0400
+@@ -1,91 +1,34 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * ctime - C++ Standard library interface to the ANSI C header time.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: ctime 550991 2007-06-26 23:58:07Z sebor $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1994-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_ctime.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 16
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_TIME_H
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 16
+-# undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 16
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CTIME_INCLUDED
+-#define _RWSTD_CTIME_INCLUDED
+-
+-#include _RWSTD_ANSI_C_TIME_H
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_HONOR_STD) && \
+- !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-namespace std {
+-
+- using ::size_t;
+- using ::clock_t;
+- using ::time_t;
+- using ::tm;
+-
+- using ::asctime;
+- using ::clock;
+- using ::ctime;
+- using ::difftime;
+- using ::gmtime;
+- using ::localtime;
+- using ::mktime;
+- using ::strftime;
+- using ::time;
+-
+-} // std
++ * ident "@(#)ctime.19.diff 1.1 09/08/21 SMI"
++ */
+
+-#endif // !_RWSTD_NO_NAMESPACE && !_RWSTD_NO_HONOR_STD && !_RWSTD_NO_USING_LIBC_IN_STD
++#ifndef _TIME_H
+
+-#endif // _RWSTD_CTIME_INCLUDED
++#include <time.h>
+
+-#endif // _RWSTD_NO_DEPRECATED_C_HEADERS
++#endif /* _TIME_H */
+
+-#endif // _RWSTD_NO_PURE_C_HEADERS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/stdcxx/patches/020-cwchar.patch Thu Jul 14 11:26:11 2011 -0700
@@ -0,0 +1,1397 @@
+--- stdcxx-4.2.1/include/ansi/cwchar 2008-04-24 20:23:56.000000000 -0400
++++ stdcxx-4.2.1/include/ansi/cwchar 2009-03-12 16:35:36.000000000 -0400
+@@ -1,1372 +1,34 @@
+ // -*- C++ -*-
+-/***************************************************************************
++/**
++ * CDDL HEADER START
+ *
+- * cwchar - C++ Standard library interface to the ANSI C header wchar.h
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
+ *
+- * $Id: cwchar 597425 2007-11-22 15:20:29Z faridz $
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
+ *
+- ***************************************************************************
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+- * 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
++ * CDDL HEADER END
+ *
+- * 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 2009 Sun Microsystems, Inc. All rights reserved.
++ * Use is subject to license terms.
+ *
+- * Copyright 1998-2006 Rogue Wave Software.
+- *
+- **************************************************************************/
+-
+-#include <rw/_defs.h>
+-
+-#ifndef _RWSTD_NO_PURE_C_HEADERS
+-# include <ansi/_cwchar.h>
+-#else
+-
+-#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
+-
+-#ifndef _RWSTD_NAMESPACE_STD_OPEN
+-#define _RWSTD_NAMESPACE_STD_OPEN 17
+-
+-_RWSTD_NAMESPACE (std) {
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN
+-
+-
+-#include _RWSTD_ANSI_C_WCHAR_H
+-
+-
+-#ifdef _RWSTD_STRICT_ANSI
+-// 17.4.1.2, p6 - masking macros are not allowed
+-# undef getwc
+-# undef putwc
+-#endif // _RWSTD_STRICT_ANSI
+-
+-
+-#if _RWSTD_NAMESPACE_STD_OPEN == 17
+-#undef _RWSTD_NAMESPACE_STD_OPEN
+-
+-} // namespace std
+-
+-#endif // _RWSTD_NAMESPACE_STD_OPEN == 17
+-
+-#else // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
+-
+-#ifndef _RWSTD_CWCHAR_INCLUDED
+-#define _RWSTD_CWCHAR_INCLUDED
+-
+-#include _RWSTD_ANSI_C_WCHAR_H
+-#include <rw/_mbstate.h>
+-
+-
+-// #define WEOF when not #defined (see also <cwctype>)
+-#if !defined WEOF
+-# ifndef _RWSTD_NO_WINT_T
+-# define WEOF _RWSTD_STATIC_CAST (_RWSTD_WINT_T, -1)
+-# else
+-# define WEOF (-1)
+-# endif
+-#endif // WEOF
+-
+-
+-#ifndef NULL
+-# define NULL 0
+-#endif // NULL
+-
+-
+-#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_HONOR_STD)
+-
+-
+-#ifndef WCHAR_MIN
+-# define WCHAR_MIN _RWSTD_WCHAR_MIN
+-#endif // WCHAR_MIN
+-
+-#ifndef WCHAR_MAX
+-# define WCHAR_MAX _RWSTD_WCHAR_MAX
+-#endif // WCHAR_MAX
+-
+-
+-#if !defined (_RWSTD_NO_USING_LIBC_IN_STD)
+-
+-namespace std {
+-
+-#ifndef _RWSTD_NO_SIZE_T
+-using ::size_t;
+-#elif defined (_RWSTD_SIZE_T)
+- typedef _RWSTD_SIZE_T size_t;
+-#endif // _RWSTD_NO_SIZE_T
+-
+-#ifdef _RWSTD_NO_STD_MBSTATE_T
+-
+-using ::mbstate_t;
+-
+-#endif // _RWSTD_NO_STD_MBSTATE_T
+-
+-#ifndef _RWSTD_NO_WINT_T
+-using ::wint_t;
+-#elif defined (_RWSTD_WINT_T)
+- typedef _RWSTD_WINT_T wint_t;
+-#endif // _RWSTD_NO_WINT_T
+-
+-#ifndef _RWSTD_NO_STRUCT_TM_IN_WCHAR_H
+-using ::tm;
+-#elif !defined (_RWSTD_NO_STRUCT_TM)
+-
+-} // namespace std
+-
+-#include _RWSTD_ANSI_C_TIME_H
+-
+-namespace std {
+-
+-using ::tm;
+-
+-#endif // NO_STRUCT_TM
+-
+-#ifndef _RWSTD_NO_BTOWC
+-using ::btowc;
+-#elif !defined (_RWSTD_NO_BTOWC_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" wint_t btowc (int);
+-
+-namespace std {
+-
+-using ::btowc;
+-
+-# undef _RWSTD_NO_BTOWC
+-#endif // _RWSTD_NO_BTOWC
+-
+-#ifndef _RWSTD_NO_FGETWC
+-using ::fgetwc;
+-#elif !defined (_RWSTD_NO_FGETWC_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" wint_t fgetwc (FILE*);
+-
+-namespace std {
+-
+-using ::fgetwc;
+-
+-# undef _RWSTD_NO_FGETWC
+-#endif // _RWSTD_NO_FGETWC[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_FGETWS
+-using ::fgetws;
+-#elif !defined (_RWSTD_NO_FGETWS_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" wchar_t fgetws (wchar_t*, int, FILE*);
+-
+-namespace std {
+-
+-using ::fgetws;
+-
+-# undef _RWSTD_NO_FGETWS
+-#endif // _RWSTD_NO_FGETWS[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_FPUTWC
+-using ::fputwc;
+-#elif !defined (_RWSTD_NO_FPUTWC_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" wint_t fputwc (wint_t, FILE*);
+-
+-namespace std {
+-
+-using ::fputwc;
+-
+-# undef _RWSTD_NO_FPUTWC
+-#endif // _RWSTD_NO_FPUTWC[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_FPUTWS
+-using ::fputws;
+-#elif !defined (_RWSTD_NO_FPUTWS_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" int fputws (const wchar_t*, FILE*);
+-
+-namespace std {
+-
+-using ::fputws;
+-
+-# undef _RWSTD_NO_FPUTWS
+-#endif // _RWSTD_NO_FPUTWS[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_FWIDE
+-using ::fwide;
+-#elif !defined (_RWSTD_NO_FWIDE_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" int fwide (FILE*, int);
+-
+-namespace std {
+-
+-using ::fwide;
+-
+-# undef _RWSTD_NO_FWIDE
+-#endif // _RWSTD_NO_FWIDE[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_FWPRINTF
+-using ::fwprintf;
+-#elif !defined (_RWSTD_NO_FWPRINTF_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" int fwprintf (FILE*, const wchar_t*, ...);
+-
+-namespace std {
+-
+-using ::fwprintf;
+-
+-# undef _RWSTD_NO_FWPRINTF
+-#endif // _RWSTD_NO_FWPRINTF[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_FWSCANF
+-using ::fwscanf;
+-#elif !defined (_RWSTD_NO_FWSCANF_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" int fwscanf (FILE*, const wchar_t*, ...);
+-
+-namespace std {
+-
+-using ::fwscanf;
+-
+-# undef _RWSTD_NO_FWSCANF
+-#endif // _RWSTD_NO_FWSCANF[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_GETWC
+-using ::getwc;
+-#elif !defined (_RWSTD_NO_GETWC_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" wint_t getwc (FILE*);
+-
+-namespace std {
+-
+-using ::getwc;
+-
+-# undef _RWSTD_NO_GETWC
+-#endif // _RWSTD_NO_GETWC[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_PUTWC
+-using ::putwc;
+-#elif !defined (_RWSTD_NO_PUTWC_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" wint_t putwc (wint_t, FILE*);
+-
+-namespace std {
+-
+-using ::putwc;
+-
+-# undef _RWSTD_NO_PUTWC
+-#endif // _RWSTD_NO_PUTWC[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_GETWCHAR
+-using ::getwchar;
+-#elif !defined (_RWSTD_NO_GETWCHAR_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" wint_t getwchar ();
+-
+-namespace std {
+-
+-using ::getwchar;
+-
+-# undef _RWSTD_NO_GETWCHAR
+-#endif // _RWSTD_NO_GETWCHAR[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_PUTWCHAR
+-using ::putwchar;
+-#elif !defined (_RWSTD_NO_PUTWCHAR_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" wint_t putwchar (wint_t);
+-
+-namespace std {
+-
+-using ::putwchar;
+-
+-# undef _RWSTD_NO_PUTWCHAR
+-#endif // _RWSTD_NO_PUTWCHAR[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_SWPRINTF
+-using ::swprintf;
+-#elif !defined (_RWSTD_NO_SWPRINTF_IN_LIBC)
+-
+-} // namespace std
+-
+-#if _MSC_VER < 1310 // MSVC < 7.1 or (better yet) not MSVC
+-
+-extern "C" {
+-
+-_RWSTD_DLLIMPORT int
+-swprintf (wchar_t*, size_t, const wchar_t*, ...);
+-
+-} // extern "C"
+-
+-#elif _MSC_VER == 1310 // MSVC 7.1
+-
+-// MSVC 8.0 defines the C++ overload of swprintf() inline
+-/* extern "C++" */ _RWSTD_DLLIMPORT int
+-swprintf (wchar_t*, size_t, const wchar_t*, ...);
+-
+-#else // MSVC 8.0 and above
+-
+-// MSVC 7.1 declares two overloads of swprintf()
+-/* extern "C++" */ int
+-swprintf (wchar_t*, size_t, const wchar_t*, ...);
+-
+-#endif // MSVC
+-
+-namespace std {
+-
+-using ::swprintf;
+-
+-# undef _RWSTD_NO_SWPRINTF
+-#endif // _RWSTD_NO_SWPRINTF[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_SWSCANF
+-using ::swscanf;
+-#elif !defined (_RWSTD_NO_SWSCANF_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" int swscanf (const wchar_t*, const wchar_t*, ...);
+-
+-namespace std {
+-
+-using ::swscanf;
+-
+-# undef _RWSTD_NO_SWSCANF
+-#endif // _RWSTD_NO_SWSCANF[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_UNGETWC
+-using ::ungetwc;
+-#elif !defined (_RWSTD_NO_UNGETWC_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" wint_t ungetwc (wint_t, FILE*);
+-
+-namespace std {
+-
+-using ::ungetwc;
+-
+-# undef _RWSTD_NO_UNGETWC
+-#endif // _RWSTD_NO_UNGETWC[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_VFWPRINTF
+-using ::vfwprintf;
+-#elif !defined (_RWSTD_NO_VFWPRINTF_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" int vfwprintf (FILE*, const wchar_t *format, _RWSTD_VA_LIST);
+-
+-namespace std {
+-
+-using ::vfwprintf;
+-
+-# undef _RWSTD_NO_VFWPRINTF
+-#endif // _RWSTD_NO_VFWPRINTF[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_VSWPRINTF
+-using ::vswprintf;
+-#elif !defined (_RWSTD_NO_VSWPRINTF_IN_LIBC)
+-
+-} // namespace std
+-
+-#if _MSC_VER < 1310 // MSVC < 7.1 or (better yet) not MSVC
+-
+-extern "C" {
+-
+-_RWSTD_DLLIMPORT int
+-vswprintf (wchar_t*, size_t, const wchar_t*, _RWSTD_VA_LIST);
+-
+-} // extern "C"
+-
+-#elif _MSC_VER == 1310 // MSVC 7.1
+-
+-// MSVC 7.1 declares two overloads of swprintf()
+-/* extern "C++" */ _RWSTD_DLLIMPORT int
+-swprintf (wchar_t*, size_t, const wchar_t*, ...);
+-
+-#else // MSVC 8.0 and above
+-
+-// MSVC 8.0 defines the C++ overload of vswprintf() inline
+-/* extern "C++" */ int
+-vswprintf (wchar_t*, size_t, const wchar_t*, _RWSTD_VA_LIST);
+-
+-#endif // MSVC
+-
+-namespace std {
+-
+-using ::vswprintf;
+-
+-# undef _RWSTD_NO_VSWPRINTF
+-#endif // _RWSTD_NO_VSWPRINTF[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_VWPRINTF
+-using ::vwprintf;
+-#elif !defined (_RWSTD_NO_VWPRINTF_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" int vwprintf (const wchar_t*, _RWSTD_VA_LIST);
+-
+-namespace std {
+-
+-using ::vwprintf;
+-
+-# undef _RWSTD_NO_VWPRINTF
+-#endif // _RWSTD_NO_VWPRINTF[_IN_LIBC]
+-
+-#ifndef _RWSTD_NO_WPRINTF
+-using ::wprintf;
+-#elif !defined (_RWSTD_NO_WPRINTF_IN_LIBC)
+-
+-} // namespace std
+-
+-extern "C" int wprintf (const wchar_t*, ...);
+-
+-namespace std {
+-
+-using ::wprintf;
+-