stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r660567 - in /stdcxx/branches/4.3.x: bin/ etc/config/ etc/config/src/ examples/manual/ examples/manual/in/ examples/manual/out/ tests/algorithms/ tests/include/ tests/localization/ tests/numerics/ tests/src/ tests/strings/
Date Tue, 27 May 2008 15:50:41 GMT
Author: sebor
Date: Tue May 27 08:50:30 2008
New Revision: 660567

URL: http://svn.apache.org/viewvc?rev=660567&view=rev
Log:
2008-05-27  Martin Sebor  <sebor@roguewave.com>

	Merged revisions 656686, 650706, 653284, 650748, 650698, 657220,
	652585, 653294, 653285, 654156, 653965, 659601, 653966, 652922,
	654664, 657235, 652954, 654286, 659189, 659187, and 656767 from
	branches/4.2.x.

	2008-05-15  Eric Lemings <eric.lemings@roguewave.com>

	STDCXX-871
	* tests/src/printf.h: Remove documentation-only header.
	* tests/include/rw_printf.h: Incorporate documentation comments
	from deleted header.

	2008-04-22  Martin Sebor  <sebor@roguewave.com>

	* test/numerics/26.valarray.cassign.cpp (run_test): Disabled tests
	exercising valarray specializations on a user-defined type for 4.2.1
	and prior since they are known to fail to compile due to STDCXX-512.

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

	STDCXX-910
	* tests/src/locale.cpp (rw_localedef): Used __FILE__ to try to get
	the value of TOPDIR when the environment variable is unset or empty.
	(_rw_all_locales): Same.

	2008-04-22  Martin Sebor  <sebor@roguewave.com>

	* tests/src/opt_diags.cpp (_rw_match_name): Asserted (obviously
	holding) preconditions to shut up bogus HP aCC 6 warning 20200:
	Potential null pointer dereference.

	2008-04-22  Martin Sebor  <sebor@roguewave.com>

	STDCXX-754
	* tests/src/cmdopt.cpp (rw_vsetopts): Handled malloc() failure.
	Added an assertion to silence a bogus HP aCC 6/cadvise warning
	#20200-D: Potential null pointer dereference. Unfortunately,
	with the one gone another bogus one pops up...

	2008-05-16  Travis Vitek  <vitek@roguewave.com>

	STDCXX-938
	* tests/src/alarm.cpp [SIG_DFL]: Fix apparent typo in definition of
	SIG_DFL which would have resulted in macro redefinition warnings if
	both SIG_DFL and SIG_IGN were not defined in signal.h
	(rw_sig_dfl): Change pointer constant to avoid crash when using
	rw_alarm().
        (rw_sig_ign): Ditto.
	(rw_sig_hold): Ditto.
	(rw_sig_restore): Ditto.

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

	STDCXX-842
	* tests/localization/22.locale.codecvt.out.cpp: Reserve space
	for null terminator.

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

	Merged rev 653293 (fixing STDCXX-695 of which STDCXX-788 is a dupe)
	from trunk.

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

	STDCXX-788
	* 22.locale.num.put.cpp (do_test): Cast narrow character to unsigned
	char before converting it to the generic charT to avoid potential sign
	extension and to silence HP aCC 6 remark #4271-D: type conversion may
	lose sign.
	(long_test): Cast macro argument to unsigned type before shifting it
	left to avoid an arithmetic overflow and to silence HP aCC 6 remark
	#4300-D: Overflow while computing constant in left shift operation.

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

	* tests/localization/22.locale.time.put.cpp (do_test): Used casts
	to safely convert a plain char argument to the generic charT before
	passing it to the tested function to silence HP aCC remark #4271-D:
	type conversion may lose sign.
	(make_LC_TIME): Handled fopen() failure to silence warning #20200-D:
	Potential null pointer dereference is detected.

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

	* tests/localization/22.locale.num.get.cpp: Reapply r644435 accidentally
	reverted in r653965.

	2008-05-06  Travis Vitek  <vitek@roguewave.com>

	* tests/localization/22.locale.num.get.cpp: Revert r657262
	and apply a simpler fix.
	(test_flt_uflow): Make val static to avoid cadvise warning.
	(test_dbl_uflow): Ditto.
	(test_ldbl_uflow): Ditto.

	2008-05-23  Farid Zaripov  <farid_zaripov@epam.com>

	Merged r648347 from trunk

	2008-04-15  Eric Lemings  <eric.lemings@roguewave.com>
	* tests/strings/21.cwctype.cpp: Misplaced #endif directive.

	2008-05-06  Travis Vitek  <vitek@roguewave.com>

	* tests/algorithms/25.random.shuffle.cpp (test_random_shuffle): Break
	from loop on first assertion failure.

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

	* etc/config/src/WCTYPE_T.cpp [EDG eccp]: Suppressed EDG eccp error
	#450-D: the type "long long" is nonstandard when #including libc
	headers.
	* etc/config/src/WCTRANS_T.cpp: Same.
	* etc/config/src/MBSTATE_T.cpp: Same.
	* etc/config/src/WINT_T.cpp: Same.

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

	STDCXX-929
	* etc/config/gcc.config: Unconditionally checked code generated
	by the compiler to see if it's ILP32 or LP64.
	[HP-UX] (CXXFLAGS.wide, LDFLAGS.wide, LDSOFLAGS.wide): Removed
	assumption that -milp64 is the default on IPF.

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

	* etc/config/vacpp.config (use_tempinc): Corrected a typo introduced
	in rev 652954, and removed the object file produced by compiling the
	temporary source.

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

	* etc/config/vacpp.config (use_tempinc): Cd to TMPDIR before
	invoking the compiler to avoid trying to write into the CWD
	which may be read only.

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

	* examples/manual/failure.cpp (main): Demonstrated the (optional)
	extensions, classes std::ios::badbit_set, std::ios::eofbit_set,
	and std::ios::failbit_set.
	* examples/manual/in/failure.in: Added "interesting" input file.
	* examples/manual/out/failure.out: Set expected output.

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

	* bin/genxviews (process_results): Removed debugging output.

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

	* bin/genxviews: Added a column with the timestamp of the oldest
	log and the number of new logs since the last run of the script.
	Optimized away call to xbuildgen when no new logs have been added
	since the last run of the script.

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

	* bin/genxviews: Changed the svn:keywords property to expand
	all three of HeadURL, Id, and Revision.
	* bin/xbuildgen: Same.
	* bin/duration: Same.

Added:
    stdcxx/branches/4.3.x/examples/manual/in/failure.in
      - copied unchanged from r656875, stdcxx/branches/4.2.x/examples/manual/in/failure.in
Modified:
    stdcxx/branches/4.3.x/bin/buildntest   (contents, props changed)
    stdcxx/branches/4.3.x/bin/genxviews
    stdcxx/branches/4.3.x/etc/config/gcc.config
    stdcxx/branches/4.3.x/etc/config/src/MBSTATE_T.cpp
    stdcxx/branches/4.3.x/etc/config/src/WCTRANS_T.cpp
    stdcxx/branches/4.3.x/etc/config/src/WCTYPE_T.cpp
    stdcxx/branches/4.3.x/etc/config/src/WINT_T.cpp
    stdcxx/branches/4.3.x/etc/config/vacpp.config
    stdcxx/branches/4.3.x/examples/manual/failure.cpp
    stdcxx/branches/4.3.x/examples/manual/out/failure.out
    stdcxx/branches/4.3.x/tests/algorithms/25.random.shuffle.cpp
    stdcxx/branches/4.3.x/tests/include/rw_printf.h
    stdcxx/branches/4.3.x/tests/localization/22.locale.codecvt.out.cpp
    stdcxx/branches/4.3.x/tests/localization/22.locale.num.get.cpp
    stdcxx/branches/4.3.x/tests/localization/22.locale.num.put.cpp
    stdcxx/branches/4.3.x/tests/localization/22.locale.time.put.cpp
    stdcxx/branches/4.3.x/tests/numerics/26.valarray.cassign.cpp
    stdcxx/branches/4.3.x/tests/src/alarm.cpp
    stdcxx/branches/4.3.x/tests/src/cmdopt.cpp
    stdcxx/branches/4.3.x/tests/src/locale.cpp
    stdcxx/branches/4.3.x/tests/src/opt_diags.cpp
    stdcxx/branches/4.3.x/tests/strings/21.cwctype.cpp

Modified: stdcxx/branches/4.3.x/bin/buildntest
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/bin/buildntest?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/bin/buildntest (original)
+++ stdcxx/branches/4.3.x/bin/buildntest Tue May 27 08:50:30 2008
@@ -353,12 +353,12 @@
 echo "### running $0 $* [$#]"
 
 # script's revision number
-myrev='$Revision: 656702 $'
+myrev='$Revision$'
 myrev=${myrev#'$Revision: '}   # strip leading text
 myrev=${myrev%' $'}            # strip trailing text
 
 # URL to this version of the script in the repository
-myurl='$HeadURL: https://svn.apache.org/repos/asf/stdcxx/branches/4.2.x/bin/buildntest $'
+myurl='$HeadURL$'
 myurl=${myurl#'$HeadURL: '}   # strip leading text
 myurl=${myurl%' $'}           # strip trailing text
 myurl="$myurl?view=markup&rev=$myrev"

Propchange: stdcxx/branches/4.3.x/bin/buildntest
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Tue May 27 08:50:30 2008
@@ -1 +1 @@
-Id
+HeadURL Id Revision

Modified: stdcxx/branches/4.3.x/bin/genxviews
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/bin/genxviews?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/bin/genxviews (original)
+++ stdcxx/branches/4.3.x/bin/genxviews Tue May 27 08:50:30 2008
@@ -205,12 +205,14 @@
           <th>Operating System</td>
           <th>Architecture</td>
           <th>Compiler</td>
-          <th>Build Results</td>
-          <th>Logs</td>
-          <th>Time<br>(sec)</td>
+          <th title="Cross-build result page">Build Results</td>
+          <th title="Total number of logs">Logs</td>
+          <th title="Number of logs added since the last run">New</td>
+          <th title="Timestamp of oldest log">Age</td>
+          <th title="Time to process all logs">Time<br>(sec)</td>
         </tr>
-        </thead>
-        <tbody>
+      </thead>
+      <tbody>
 EOF
 
 
@@ -228,10 +230,10 @@
     fi
 
     cat<<EOF | output
-          <tr>
-            <td>$osname</td>
-            <td>$arch</td>
-            <td>$compiler</td>
+        <tr>
+          <td>$osname</td>
+          <td>$arch</td>
+          <td>$compiler</td>
 EOF
 
     # build types:
@@ -247,6 +249,8 @@
     suffixes="a A d D s S"
 
     unset buildlogs
+    unset oldest
+
     count=0
 
     for b in $btypes; do
@@ -261,8 +265,16 @@
         done
     done
 
+    if [ -e $outdir/$xfile ]; then
+        # count the number of logs that are newer than the cross-build file
+        newlogs=`find $logdir/ -name "$alllogs" -newer $outdir/$xfile | wc -l`
+    else
+        # cross-build file doesn't exist yet, all logs are considered new
+        newlogs=$count
+    fi
+
     if [ $verbose -ne 0 ]; then
-        echo "$myname: found $count logs: $buildlogs"
+        echo "$myname: found $count logs ($newlogs new): $buildlogs"
     fi
 
     # create a title for the page
@@ -273,16 +285,26 @@
 
     if [ "$buildlogs" = "" ]; then
         # format missing logs in italics
-        output "            <td><i>$xfile</i></td>"
+        output "          <td><i>$xfile</i></td>"
     else
-        if [ $verbose -ne 0 ]; then
-            echo "$myname: $XBUILDGEN $verarg -s -o$outdir/$xfile -T\"$title\" $buildlogs"
-        fi
+        output "          <td><a href=\"$xfile\">$xfile</a></td>"
+
+        oldest=`  cd $logdir && ls -lrt $buildlogs | head -n 1 \
+                | awk '{ print $6 " " $7 " " $8 }'`
 
-        output "            <td><a href=\"$xfile\">$xfile</a></td>"
+        if [ $newlogs -gt 0 ]; then
 
-        if [ $dryrun -eq 0 ]; then
-            $XBUILDGEN $verarg -s -o$outdir/$xfile -T"$title" $buildlogs
+            # only invoken xbuildgen when there are new logs to proecess
+            # otherwise simply point at the previously generated cross
+            # build file
+
+            if [ $verbose -ne 0 ]; then
+                echo "$myname: $XBUILDGEN $verarg -s -o$outdir/$xfile -T\"$title\" $buildlogs"
+            fi
+
+            if [ $dryrun -eq 0 ]; then
+                $XBUILDGEN $verarg -s -o$outdir/$xfile -T"$title" $buildlogs
+            fi
         fi
     fi
 
@@ -297,9 +319,11 @@
     duration=`expr $end - $duration`
 
     cat<<EOF | output
-        <td>$count</td>
-        <td>$duration</td>
-    </tr>
+          <td>$count</td>
+          <td>$newlogs</td>
+          <td>$oldest</td>
+          <td>$duration</td>
+        </tr>
 EOF
 }
 

Modified: stdcxx/branches/4.3.x/etc/config/gcc.config
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/etc/config/gcc.config?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/etc/config/gcc.config (original)
+++ stdcxx/branches/4.3.x/etc/config/gcc.config Tue May 27 08:50:30 2008
@@ -273,45 +273,47 @@
 SINGL_CPPFLAGS =
 SINGL_LDFLAGS  =
 
-# (try to) determine the architecture via the (non-standard) -p option
-# the option is recognized on at least HP-UX, IRIX, and Linux (are there
-# any other systems running on IA64?)
-arch=$(shell uname -p 2>/dev/null)
+# gcc can generate 32-bit or 64-bit code by default, depending
+# on how it's configured
+# determine whether the default compiler invocation produces
+# wide (64-bit) or narrow (32-bit) code and set compiler,
+# linker, and other options accordingly
+wide = $(shell    cd /tmp; tmpfile=stdcxx-longsize-$$; export tmpfile;  \
+                  echo "int main() { return 8 == sizeof (long); }"      \
+                       > $$tmpfile.c                                    \
+               && $(CXX) $$tmpfile.c >/dev/null 2>&1 -o $$tmpfile;      \
+               ./$$tmpfile; echo $$?; rm -f $$tmpfile.c $$tmpfile)
+
+ifeq ($(wide),0)
+    # narrow (32-bit) mode is implicit
+    # use wide (64-bit) flags to explicitly enable LP64 mode
+
+    ifeq ($(OSNAME),HP-UX)
+        # -milp32 and -mlp64 are options specific to HP-UX
+        CXXFLAGS.wide    = -mlp64
+        LDFLAGS.wide     = -mlp64
+        LDSOFLAGS.wide   = -mlp64
+        ARFLAGS.wide     =
+    else
+        CXXFLAGS.wide    = -m64
+        LDFLAGS.wide     = -m64
+        LDSOFLAGS.wide   = -m64
+        ARFLAGS.wide     =
+    endif
+
+else
+    # wide (64-bit) mode is implicit
+    # use narrow (32-bit) flags to explicitly enable ILP32 mode
 
-ifeq ($(arch),ia64)
-    # LP64 is the default (implicit) setting on IA64
     ifeq ($(OSNAME),HP-UX)
-        # -milp32, -mlp64, etc. are options specific to HP-UX
         CXXFLAGS.narrow  = -milp32
         LDFLAGS.narrow   = -milp32
         LDSOFLAGS.narrow = -milp32
         ARFLAGS.narrow   =
-    endif
-else
-    # determine whether the default compiler invocation produces
-    # wide (64-bit) or narrow (32-bit) code and set compiler,
-    # linker, and other flags accordingly
-    wide = $(shell tmpfile=/tmp/longsize-$$; export tmpfile;           \
-                   echo "int main() { return 8 == sizeof (long); }"    \
-                        > $$tmpfile.c                                  \
-                   && $(CXX) $$tmpfile.c >/dev/null 2>&1 -o $$tmpfile; \
-                   $$tmpfile; echo $$?; rm -f $$tmpfile.c $$tmpfile)
-
-    ifeq ($(wide),0)
-        # wide (64-bit) flags
-        CXXFLAGS.wide  = -m64
-        LDFLAGS.wide   = -m64
-        LDSOFLAGS.wide = -m64
-        ARFLAGS.wide   =
-
-        # narrow (32-bit) mode is implicit
     else
-        # narrow (32-bit) flags
         CXXFLAGS.narrow  = -m32
         LDFLAGS.narrow   = -m32
         LDSOFLAGS.narrow = -m32
         ARFLAGS.narrow   =
-
-        # wide (64-bit) mode is implicit
     endif
 endif

Modified: stdcxx/branches/4.3.x/etc/config/src/MBSTATE_T.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/etc/config/src/MBSTATE_T.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/etc/config/src/MBSTATE_T.cpp (original)
+++ stdcxx/branches/4.3.x/etc/config/src/MBSTATE_T.cpp Tue May 27 08:50:30 2008
@@ -18,12 +18,24 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1999-2007 Rogue Wave Software, Inc.
+ * Copyright 1999-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
 #include "config.h"
 
+#if    defined (__EDG__)                \
+    && !defined (__DECCXX)              \
+    && !defined (__HP_aCC)              \
+    && !defined (__INTEL_COMPILER)      \
+    && !defined (_SGI_COMPILER_VERSION)
+   // disable error #450-D: the type "long long" is nonstandard
+   // when using the vanilla EDG eccp in strict mode (i.e., w/o
+   // long long support)
+#  pragma diag_suppress 450
+#endif   // EDG eccp on Linux
+
+
 // defined to get the correct definition of mbstate_t, available on HPUX;
 // once we get the correct size of the struct, _RWSTD_NO_MBSTATE_T is 
 // defined in rw/_config.h and we (and the users of the library) are left 

Modified: stdcxx/branches/4.3.x/etc/config/src/WCTRANS_T.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/etc/config/src/WCTRANS_T.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/etc/config/src/WCTRANS_T.cpp (original)
+++ stdcxx/branches/4.3.x/etc/config/src/WCTRANS_T.cpp Tue May 27 08:50:30 2008
@@ -18,12 +18,24 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1999-2007 Rogue Wave Software, Inc.
+ * Copyright 1999-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
 #include "config.h"
 
+#if    defined (__EDG__)                \
+    && !defined (__DECCXX)              \
+    && !defined (__HP_aCC)              \
+    && !defined (__INTEL_COMPILER)      \
+    && !defined (_SGI_COMPILER_VERSION)
+   // disable error #450-D: the type "long long" is nonstandard
+   // when using the vanilla EDG eccp in strict mode (i.e., w/o
+   // long long support)
+#  pragma diag_suppress 450
+#endif   // EDG eccp on Linux
+
+
 #ifndef _RWSTD_NO_WCHAR_H
 #  include <wchar.h>
 #endif   // _RWSTD_NO_WCHAR_H

Modified: stdcxx/branches/4.3.x/etc/config/src/WCTYPE_T.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/etc/config/src/WCTYPE_T.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/etc/config/src/WCTYPE_T.cpp (original)
+++ stdcxx/branches/4.3.x/etc/config/src/WCTYPE_T.cpp Tue May 27 08:50:30 2008
@@ -18,12 +18,25 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1999-2007 Rogue Wave Software, Inc.
+ * Copyright 1999-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
 #include "config.h"
 
+
+#if    defined (__EDG__)                \
+    && !defined (__DECCXX)              \
+    && !defined (__HP_aCC)              \
+    && !defined (__INTEL_COMPILER)      \
+    && !defined (_SGI_COMPILER_VERSION)
+   // disable error #450-D: the type "long long" is nonstandard
+   // when using the vanilla EDG eccp in strict mode (i.e., w/o
+   // long long support)
+#  pragma diag_suppress 450
+#endif   // EDG eccp on Linux
+
+
 #ifndef _RWSTD_NO_WCHAR_H
 #  include <wchar.h>
 #endif   // _RWSTD_NO_WCHAR_H

Modified: stdcxx/branches/4.3.x/etc/config/src/WINT_T.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/etc/config/src/WINT_T.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/etc/config/src/WINT_T.cpp (original)
+++ stdcxx/branches/4.3.x/etc/config/src/WINT_T.cpp Tue May 27 08:50:30 2008
@@ -18,12 +18,24 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1999-2007 Rogue Wave Software, Inc.
+ * Copyright 1999-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
 #include "config.h"
 
+#if    defined (__EDG__)                \
+    && !defined (__DECCXX)              \
+    && !defined (__HP_aCC)              \
+    && !defined (__INTEL_COMPILER)      \
+    && !defined (_SGI_COMPILER_VERSION)
+   // disable error #450-D: the type "long long" is nonstandard
+   // when using the vanilla EDG eccp in strict mode (i.e., w/o
+   // long long support)
+#  pragma diag_suppress 450
+#endif   // EDG eccp on Linux
+
+
 #ifndef _RWSTD_NO_WCHAR_H
 #  include <wchar.h>
 #endif   // _RWSTD_NO_WCHAR_H

Modified: stdcxx/branches/4.3.x/etc/config/vacpp.config
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/etc/config/vacpp.config?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/etc/config/vacpp.config (original)
+++ stdcxx/branches/4.3.x/etc/config/vacpp.config Tue May 27 08:50:30 2008
@@ -241,10 +241,11 @@
 
 
 # check if the -qtemplateregistry option is recognized
-use_tempinc=$(shell    echo "int i;" >/tmp/foo.$$$$.c              \
+use_tempinc=$(shell    cd $${TMPDIR:=/tmp}                         \
+                    && echo "int i;" >foo.$$$$.c                   \
                     && $(CXX) -c -qmaxerr=1:w -qtemplateregistry   \
-                              /tmp/foo.$$$$.c >/dev/null 2>&1;     \
-                    echo $$?; rm /tmp/foo.$$$$.c)
+                              foo.$$$$.c >/dev/null 2>&1;          \
+                    echo $$?; rm -f foo.$$$$.c foo.$$$$.o)
 
 # template repository/registry name override
 

Modified: stdcxx/branches/4.3.x/examples/manual/failure.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/examples/manual/failure.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/examples/manual/failure.cpp (original)
+++ stdcxx/branches/4.3.x/examples/manual/failure.cpp Tue May 27 08:50:30 2008
@@ -1,6 +1,7 @@
 /**************************************************************************
  *
- * failure.cpp - Example program demonstrating ios::failure.
+ * failure.cpp - Example program demonstrating the use of ios::failure
+ *               and its extendsions provided by this implementation.
  *
  * $Id$
  *
@@ -22,7 +23,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -31,39 +32,78 @@
 
 #include <examples.h>
 
+
 #ifndef _RWSTD_NO_EXCEPTIONS
 
 int main ()
 {
-   try {
-       // Enable exceptions in cin.
-       std::cin.exceptions (std::ios::eofbit);
-
-       // Clear all bits and set eofbit.
-       std::cin.clear (std::ios::eofbit);
-   }
-   catch (const std::ios::failure &e) {
-       std::cout << "Caught an exception: " << e.what () << std::endl;
-   }
-   catch (const std::exception &e) {
-       std::cout << "Caught an exception: " << e.what () << std::endl;
-
-       return 1;   // Indicate failure.
-   }
-   catch (...) {
-       std::cout << "Caught an unknown exception" << std::endl;
-
-       return 1;   // Indicate failure.
-   }
+    const std::ios::iostate allbits =
+        std::ios::badbit | std::ios::eofbit | std::ios::failbit;
+                
+    // Enable all exceptions in cin.
+    std::cin.exceptions (allbits);
+
+    while (!std::cin.eof ()) {
+
+        // Clear state bits.
+        std::cin.clear ();
+
+        try {
+            short i;
+            char  ch;
+
+            // Try to extract a character and an integer.
+            std::cin >> ch >> i;
+
+            std::cout << ch << ' ' << i << '\n';
+        }
+
+#ifndef _RWSTD_NO_EXT_FAILURE
+
+        // Classes badbit_set, eofbit_set, and failbit_set are
+        // derived from failure and are optional extensions of
+        // this implementation.
+
+        catch (const std::ios::badbit_set &e) {
+            std::cout << "Caught std::ios::badbit_set: "
+                      << e.what () << '\n';
+        }
+        catch (const std::ios::eofbit_set &e) {
+            std::cout << "Caught std::ios::eofbit_set: "
+                      << e.what () << '\n';
+        }
+        catch (const std::ios::failbit_set &e) {
+            std::cout << "Caught std::ios::failbit_set: "
+                      << e.what () << '\n';
+        }
+
+#endif   // _RWSTD_NO_EXT_FAILURE
+
+        catch (const std::ios::failure &e) {
+            std::cout << "Caught std::ios::failure: "
+                      << e.what () << '\n';
+        }
+        catch (const std::exception &e) {
+            std::cout << "Caught std::exception: "
+                      << e.what () << '\n';
+
+            return 1;   // Indicate error.
+        }
+        catch (...) {
+            std::cout << "Caught an unknown exception\n";
+
+            return 1;   // Indicate error.
+        }
+    }
 
-   return 0;
+    return 0;
 }
 
-#else
+#else   // if defined (_RWSTD_NO_EXCEPTIONS)
 
 int main ()
 {
-    std::cout << "Exceptions not supported." << std::endl;
+    std::cout << "Exceptions not supported\n";
 
     return 0;
 }

Modified: stdcxx/branches/4.3.x/examples/manual/out/failure.out
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/examples/manual/out/failure.out?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/examples/manual/out/failure.out (original)
+++ stdcxx/branches/4.3.x/examples/manual/out/failure.out Tue May 27 08:50:30 2008
@@ -1 +1,5 @@
-Caught an exception: std::cin: stream object has set ios::eofbit
+a 1234
+Caught std::ios::failbit_set: std::cin: stream object has set ios::failbit
+c 2345
+Caught std::ios::failbit_set: std::cin: stream object has set ios::failbit
+Caught std::ios::failure: std::cin: stream object has set failbit, eofbit

Modified: stdcxx/branches/4.3.x/tests/algorithms/25.random.shuffle.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/algorithms/25.random.shuffle.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/algorithms/25.random.shuffle.cpp (original)
+++ stdcxx/branches/4.3.x/tests/algorithms/25.random.shuffle.cpp Tue May 27 08:50:30 2008
@@ -307,14 +307,12 @@
     };
 
     for (std::size_t i = 0; i != sizeof array / sizeof *array; ++i) {
-        const bool success = array [i] == result [i];
-        if (!success) {
-            rw_assert (0, 0, line, 
-                       "randomly shuffled sequence failed to match "
-                       "the expected result (data portability failure) "
-                       "%d != %d at %zu",
-                       array [i], result [i], i + 1);
-        }
+        if (!rw_assert (array [i] == result [i], 0, line, 
+                        "randomly shuffled sequence failed to match "
+                        "the expected result (data portability failure) "
+                        "%d != %d at %zu",
+                        array [i], result [i], i + 1))
+            break;
     }
 
 #else

Modified: stdcxx/branches/4.3.x/tests/include/rw_printf.h
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/include/rw_printf.h?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/include/rw_printf.h (original)
+++ stdcxx/branches/4.3.x/tests/include/rw_printf.h Tue May 27 08:50:30 2008
@@ -160,4 +160,186 @@
 rw_asnprintf (char** pbuf, _RWSTD_SIZE_T *pbufsize, const char *fmt, ...);
 
 
+/**
+ * @page rwtest-fmtspec Formated Output Directives and Conversion Specifiers
+ *
+ * The RWTest library supports all formatted output directives specified
+ * by the C99 standard as well as many other directive extensions.  Only
+ * deviations, extensions, and other implmementation-defined behavior are
+ * described below.  Consult your system and/or compiler documentation
+ * for specifications of the standard formatting output directives.
+ *
+ * Unless specified otherwise, the following caveats apply to all
+ * directives and conversions.  Directives that accept a pointer argument
+ * will convert a null pointer into the string literal <tt>(null)</tt>.
+ *
+ *
+ * @section rwtest-fmtspec-c89 C89 Directives
+ *
+ * @subsection rwtest-fmtspec-c89-ptr Pointer \%p \%\#p
+ *
+ * The argument is a pointer to \c void.  The value of the pointer is
+ * converted to a sequence of hexadecimal digits.  The number of
+ * converted digits depends on the size of the \c void* type.  The
+ * "alternate form" expressed by \c \%\#p immediately precedes converted
+ * digits with a \c 0x prefix.
+ *
+ *
+ * @section rwtest-fmtspec-c99 C99 Directives
+ *
+ * No known deviations or implementation-defined behavior.
+ *
+ *
+ * @section rwtest-fmtspec-ext RWTest Extensions
+ *
+ * @subsection rwtest-fmtspec-ext-bool Boolean \%b
+ *
+ * The argument is a value convertible to \c bool type.  If the value
+ * of the argument is nonzero, the value is converted to the string
+ * literal \c true.  Otherwise, the value converts to \c false.
+ *
+ * @subsection rwtest-fmtspec-ext-esc-c Escaped Character \%{c} \%{\#c}
+ *
+ * The argument is an integer value converted to <tt>unsigned char</tt>
+ * type.  For non-printable characters, the resulting output is formatted
+ * as the corresponding escape sequence.  (The value for a horizontal
+ * tab character for example is formatted as the string literal
+ * <tt>\\t</tt> and a zero value may be formatted as the string literal
+ * <tt>\\x00</tt>.  In the alternate form, the resulting output is
+ * immediately surrounded with a single quotation mark <tt>'</tt>.
+ *
+ * @subsection rwtest-fmtspec-ext-esc-lc Escaped Wide Character \%{lc} \%{\#lc}
+ *
+ * Similar to the escaped character directive <tt>%{c}</tt> and quoted
+ * escaped character directive <tt>%{\#c}</tt> respectively, except
+ * that the argument is a value of <tt>wchar_t</tt> type.
+ *
+ * @subsection rwtest-fmtspec-ext-s Quoted Character String \%{\#s}
+ *
+ * Similar to the character string directive <tt>%s</tt> except that the
+ * resulting output is surrounded with a double quotation mark <tt>"</tt>.
+ *
+ * @subsection rwtest-fmtspec-ext-ls Quoted Wide Character String \%{\#ls}
+ *
+ * Similar to the quoted character string directive <tt>%{\#s}</tt>
+ * except that the argument is a pointer to a null-terminate sequence of
+ * <tt>wchar_t</tt> type.
+ *
+ * @subsection rwtest-fmtspec-ext-err Error Code \%m \%{\#m}
+ *
+ * The argument is an integer value representing a system-dependent error
+ * code.  In the first form, the value is interpreted as an argument of
+ * the \c strerror() function.  The formatted result is the return value
+ * of this function using this parameter value.  In the second form, the
+ * formatted result is a character sequence representing the
+ * corresponding error name (e.g. \c ENOMEM) if applicable or equivalent
+ * numeric sequence in decimal notation otherwise.
+ *
+ * @subsection rwtest-fmtspec-ext-sig Signal \%K
+ *
+ * The argument is an integer value representing a system-dependent
+ * signal.  The resulting output is a character sequence representing
+ * the name of corresponding signal (e.g. \c SIGABRT) if
+ * applicable or equivalent numeric sequence in decimal notation
+ * otherwise.
+ *
+ * @subsection rwtest-fmtspec-ext-bits Bitset \%{b}
+ *
+ * The argument is a pointer to an array of \c char.  NOT YET COMPLETE
+ *
+ * @subsection rwtest-fmtspec-ext-Ai Integer Array \%{Ao} \%{Ad} \%{Ax}
+ *
+ * The argument is a pointer to an array of integer type.  The resulting
+ * output is formatted as a string of comma-separated integer values.
+ * The notation of each integer value is specified by <tt>o</tt> for
+ * octal, <tt>d</tt> for decimal, or <tt>x</tt> for hexadcimal.  An
+ * optional field width specifies the size of elements in the array
+ * (defaults to 1).  An optional precision specifies the length of the
+ * array.  In the alternate form, the resulting output for octal and
+ * hexidecimal integer values are prefixed with string literals
+ * <tt>0</tt> and <tt>0x</tt> respectively.
+ *
+ * @subsection rwtest-fmtspec-ext-Is Stream State \%{Is} \%{\#Is}
+ *
+ * The argument is a value of type <tt>std::ios_base::iostate</tt>.  In
+ * the plain form, the resulting ouput is formatted as a sequence of one
+ * or more unqualified names corresponding to the \c iostate enumerators,
+ * separated by the OR operator (<tt>|</tt>).  In the extended form, the
+ * resulting output is prefixed with the string literal
+ * <tt>std::ios_base::</tt> indicating the qualfied namespace.
+ *
+ * @subsection rwtest-fmtspec-ext-Io Open Mode \%{Io} \%{\#Io}
+ *
+ * Similar to the <tt>%{Is}</tt> directive except the argument is a
+ * value of the <tt>std::ios_base::openmode</tt> enumeration type and
+ * names in the resulting output correspond to enumerators of this type.
+ *
+ * @subsection rwtest-fmtspec-ext-Iw Seek Direction \%{Iw} \%{\#Iw}
+ *
+ * The argument is a value of type <tt>std::ios_base::seekdir</tt>.  In
+ * the plain form, the resulting ouput is formatted as the unqualified
+ * name corresponding to one of the \c seekdir enumerators.  In the
+ * extended form, the enumerator is qualified with the enclosing
+ * namespace.
+ *
+ * @subsection rwtest-fmtspec-ext-If Format Flag \%{If} \%{\#Iw}
+ *
+ * Similar to the <tt>%{Is}</tt> directive except the argument is a
+ * value of the <tt>std::ios_base::fmtflags</tt> enumeration type and
+ * names in the resulting output correspond to enumerators of this type.
+ *
+ * @subsection rwtest-fmtspec-ext-Lc Locate Category \%{Lc} \%{\#Lc}
+ *
+ * The argument is an integer type representing a constant defined by
+ * the C <tt>&lt;locale.h&gt;</tt> header (identified by an <tt>LC_</tt>
+ * prefix) or a <tt>std::locale::category</tt> constant defined by
+ * the C++ <tt>&lt;locale&gt;</tt> header.  The resulting output is
+ * formatted as a character string representing the name of the C or C++
+ * constant enclosed in square brackets (<tt>[</tt>) and <tt>]</tt>).
+ * In the alternate form, the formatted output for C++ constants is
+ * prefixed with the string literal <tt>std::locale::</tt> indicating
+ * the qualified namespace.
+ *
+ * @subsection rwtest-fmtspec-ext-LC Character Classifiers \%{LC} \%{\#LC}
+ *
+ * The argument is an integer type representing enumerators of the
+ * <tt>std::ctype_base::mask</tt> enumeration.  The resulting output is
+ * formatted as a character string representing the name of the
+ * enumerator enclosed in square brackets (<tt>[</tt>) and <tt>]</tt>).
+ * In the alternate form, the enumerator is prefixed with the string
+ * literal <tt>std::ctype_base::</tt> indicating the qualified
+ * namespace.
+ *
+ * @subsection rwtest-fmtspec-ext-pid Process Identifier \%{P}
+ *
+ * The argument is a value of the portable \c rw_pid_t type.  The
+ * resulting output is formatted as a numeric sequence of digits
+ * representing the corresponding process identifier.  The \c P
+ * specifier may be preceded by optional width, justification, and
+ * precision qualifiers.
+ * 
+ * @subsection rwtest-fmtspec-ext-str String \%{S}
+ *
+ * The argument is a pointer to an object of the \c std::string class.
+ * If the pointer is null, the resulting output is the string literal
+ * <tt>(null)</tt>.  Otherwise, the pointer \c P is converted by calling
+ * the \c P->c_str() function and the result is formatted identical to
+ * the <tt>%s</tt> character string directive.
+ *
+ * @subsection rwtest-fmtspec-ext-tm Time Structure \%{t} \%{\#t}
+ *
+ * The argument is a pointer to a \c tm structure.  If the pointer is
+ * null, the resulting output is the string literal \c (null).  In the
+ * plain form, the resulting output for a valid pointer is formatted
+ * similar (but not necessarily identical) to the return value of the
+ * \c asctime() function.  If the value of any structure member is
+ * outside its valid range, the resulting output is formatting using the
+ * alternate form.  In the alternate form, the resulting output is
+ * formatted as a comma-separated sequence of members enclosed in braces
+ * where each member is of the format "name=value [range]".  The
+ * "[range]" is only shown if the value is not in the valid range for
+ * the respective member.
+ *
+ */
+
 #endif   // RW_PRINTF_H_INCLUDED

Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.codecvt.out.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.codecvt.out.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/localization/22.locale.codecvt.out.cpp (original)
+++ stdcxx/branches/4.3.x/tests/localization/22.locale.codecvt.out.cpp Tue May 27 08:50:30 2008
@@ -197,7 +197,7 @@
 struct WideCode
 {
     wchar_t wchar;
-    char    mbchar [MB_LEN_MAX];
+    char    mbchar [MB_LEN_MAX + 1];
 };
 
 typedef WideCode mb_char_array_t [MB_LEN_MAX];

Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.num.get.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.num.get.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/localization/22.locale.num.get.cpp (original)
+++ stdcxx/branches/4.3.x/tests/localization/22.locale.num.get.cpp Tue May 27 08:50:30 2008
@@ -235,6 +235,13 @@
 
 /**************************************************************************/
 
+// if non-zero expected to point to a maximum valid value
+// of type T that's being tested below (used for floating
+// point ranges)
+// on function return, the pointed to value is overwritten
+// with the actual extracted value
+void *pmax = 0;
+
 
 enum IterType { iter_pointer, iter_istreambuf, iter_input };
 
@@ -244,7 +251,6 @@
              const char *cname,           // name of character type
              IterType    itype,           // type of input iterator
              const char *iname,           // name of input iterator
-             void       *pmax,
              nativeT     val,             // value expected to be extracted
              const char *str,             // input sequence
              int         eat_expect = -1, // number of consumed characters
@@ -438,7 +444,6 @@
              const char *cname,           // name of character type
              IterType    itype,           // iterator type
              const char *iname,           // name of iterator type
-             void       *pmax,
              nativeT     val,             // value expected to be extracted
              const char *str,             // input sequence
              int         eat_expect = -1, // number of consumed characters
@@ -449,15 +454,15 @@
     switch (ctype) {
     case narrow_char:
         return do_test (lineno, (char*)0, cname, itype, iname,
-                        pmax, val, str, eat_expect, flags, err_expect, grouping);
+                        val, str, eat_expect, flags, err_expect, grouping);
     case wide_char:
         return do_test (lineno, (wchar_t*)0, cname, itype, iname,
-                        pmax, val, str, eat_expect, flags, err_expect, grouping);
+                        val, str, eat_expect, flags, err_expect, grouping);
     case user_char:
         break;
 #if 0   // disabled
         return do_test (lineno, (UserChar*)0, cname, itype, iname,
-                        pmax, val, str, eat_expect, flags, err_expect, grouping);
+                        val, str, eat_expect, flags, err_expect, grouping);
 #endif   // disabled
     }
 
@@ -497,8 +502,7 @@
 /*************************************************************************/
 
 #define TEST   do_test
-#define T      __LINE__, ctype, cname, itype, iname, 0
-#define T_MAX  __LINE__, ctype, cname, itype, iname, &val
+#define T      __LINE__, ctype, cname, itype, iname
 
 
 template <class numT>
@@ -2441,7 +2445,8 @@
              cname, iname);
 
     // exercise bahvior on underflow
-    float val = 0;
+    static float val = 0;
+    pmax = &val;
 
     // on underflow, get() follows C99 requirements on strtof()
     // i.e., it stores a value in the range [0, +/-FLT_MIN]
@@ -2452,34 +2457,35 @@
     //     normalized positive number in the return type; whether
     //     errno acquires the value ERANGE is implementation-defined.
 
-    TEST (T_MAX, (val = FLT_MIN, 0.0f), "1.111111e-9999", 14, 0, Eof);
+    TEST (T, (val = FLT_MIN, 0.0f), "1.111111e-9999", 14, 0, Eof);
     rw_assert (!(val < 0.0), 0, __LINE__,
                "correct sign after positive underflow");
 
-    TEST (T_MAX, (val = 0.0f, -FLT_MIN), "-1.111111e-9999", 15, 0, Eof);
+    TEST (T, (val = 0.0f, -FLT_MIN), "-1.111111e-9999", 15, 0, Eof);
     rw_assert (!(val > 0.0), 0, __LINE__,
                "correct sign after negative underflow");
 
     if (1.234567e-39 < FLT_MIN) {
-        TEST (T_MAX, (val = FLT_MIN, 0.0f),   "1.234567e-39", 12, 0, Eof);
-        TEST (T_MAX, (val = 0.0f, -FLT_MIN), "-1.234567e-39", 13, 0, Eof);
+        TEST (T, (val = FLT_MIN, 0.0f),   "1.234567e-39", 12, 0, Eof);
+        TEST (T, (val = 0.0f, -FLT_MIN), "-1.234567e-39", 13, 0, Eof);
     }
 
     if (1.234567e-49 < FLT_MIN) {
-        TEST (T_MAX, (val = FLT_MIN, 0.0f),   "1.234567e-49", 12, 0, Eof);
-        TEST (T_MAX, (val = 0.0f, -FLT_MIN), "-1.234567e-49", 13, 0, Eof);
+        TEST (T, (val = FLT_MIN, 0.0f),   "1.234567e-49", 12, 0, Eof);
+        TEST (T, (val = 0.0f, -FLT_MIN), "-1.234567e-49", 13, 0, Eof);
     }
 
     if (1.234567e-99 < FLT_MIN) {
-        TEST (T_MAX, (val = FLT_MIN, 0.0f),   "1.234567e-99", 12, 0, Eof);
-        TEST (T_MAX, (val = 0.0f, -FLT_MIN), "-1.234567e-99", 13, 0, Eof);
+        TEST (T, (val = FLT_MIN, 0.0f),   "1.234567e-99", 12, 0, Eof);
+        TEST (T, (val = 0.0f, -FLT_MIN), "-1.234567e-99", 13, 0, Eof);
     }
 
     // exercise facet's behavior on underflow:
     //   parsing succeeds (fail is clear), +/-min is stored
-    TEST (T_MAX,  FLT_MIN, _RWSTD_STRSTR ( _RWSTD_DBL_MIN), -1, 0, Eof);
-    TEST (T_MAX, -FLT_MIN, _RWSTD_STRSTR (-_RWSTD_DBL_MIN), -1, 0, Eof);
+    TEST (T,  FLT_MIN, _RWSTD_STRSTR ( _RWSTD_DBL_MIN), -1, 0, Eof);
+    TEST (T, -FLT_MIN, _RWSTD_STRSTR (-_RWSTD_DBL_MIN), -1, 0, Eof);
 
+    pmax = 0;   // reset before next test
 
 
     rw_info (0, 0, 0, "std::num_get<%s, %s>::get (..., float&) on overflow",
@@ -2610,7 +2616,8 @@
              cname, iname);
 
     // exercise bahvior on underflow
-    double val = DBL_MIN;
+    static double val = DBL_MIN;
+    pmax = &val;
 
     // on underflow, get() follows C99 requirements on strtod()
     // i.e., it stores a value in the range [0, +/-DBL_MIN]
@@ -2621,24 +2628,25 @@
     //     normalized positive number in the return type; whether
     //     errno acquires the value ERANGE is implementation-defined.
 
-    TEST (T_MAX, (val = DBL_MIN, 0.0),   "1.111111e-9999", 14, 0, Eof);
-    TEST (T_MAX, (val = 0.0, -DBL_MIN), "-1.111111e-9999", 15, 0, Eof);
+    TEST (T, (val = DBL_MIN, 0.0),   "1.111111e-9999", 14, 0, Eof);
+    TEST (T, (val = 0.0, -DBL_MIN), "-1.111111e-9999", 15, 0, Eof);
 
     if (1.23456789e-309L < DBL_MIN) {
-        TEST (T_MAX, (val = DBL_MIN, 0.0),   "1.23456789e-309", 15, 0, Eof);
-        TEST (T_MAX, (val = 0.0, -DBL_MIN), "-1.23456789e-309", 16, 0, Eof);
+        TEST (T, (val = DBL_MIN, 0.0),   "1.23456789e-309", 15, 0, Eof);
+        TEST (T, (val = 0.0, -DBL_MIN), "-1.23456789e-309", 16, 0, Eof);
     }
 
     if (1.234567e-409L < DBL_MIN) {
-        TEST (T_MAX, (val = DBL_MIN, 0.0),   "1.23456789e-409", 15, 0, Eof);
-        TEST (T_MAX, (val = 0.0, -DBL_MIN), "-1.23456789e-409", 16, 0, Eof);
+        TEST (T, (val = DBL_MIN, 0.0),   "1.23456789e-409", 15, 0, Eof);
+        TEST (T, (val = 0.0, -DBL_MIN), "-1.23456789e-409", 16, 0, Eof);
     }
 
     if (1.234567e-999L < DBL_MIN) {
-        TEST (T_MAX, (val = DBL_MIN, 0.0),   "1.23456789e-999", 15, 0, Eof);
-        TEST (T_MAX, (val = 0.0, -DBL_MIN), "-1.23456789e-999", 16, 0, Eof);
+        TEST (T, (val = DBL_MIN, 0.0),   "1.23456789e-999", 15, 0, Eof);
+        TEST (T, (val = 0.0, -DBL_MIN), "-1.23456789e-999", 16, 0, Eof);
     }
 
+    pmax = 0;   // reset before next test
 
 
 #  ifdef _RWSTD_LDBL_MAX
@@ -2731,7 +2739,8 @@
              cname, iname);
 
     // exercise bahvior on underflow
-    long double val = LDBL_MIN;
+    static long double val = LDBL_MIN;
+    pmax = &val;
 
     // on underflow, get() follows C99 requirements on strtold()
     // i.e., it stores a value in the range [0, +/-LDBL__MIN]
@@ -2742,22 +2751,23 @@
     //     normalized positive number in the return type; whether
     //     errno acquires the value ERANGE is implementation-defined.
 
-    TEST (T_MAX, (val = LDBL_MIN, 0.0L),   "1.987654321e-99999", 18, 0, Eof);
-    TEST (T_MAX, (val = 0.0L, -LDBL_MIN), "-1.987654321e-99999", 19, 0, Eof);
+    TEST (T, (val = LDBL_MIN, 0.0L),   "1.987654321e-99999", 18, 0, Eof);
+    TEST (T, (val = 0.0L, -LDBL_MIN), "-1.987654321e-99999", 19, 0, Eof);
 
     const char fmt[] = "%Lg";
 
     long double ld = 0.0;
     if (1 == std::sscanf ("3.456789e-4932", fmt, &ld) && ld < LDBL_MIN) {
-        TEST (T_MAX, (val = LDBL_MIN, 0.0L),   "3.456789e-4932", 14, 0, Eof);
-        TEST (T_MAX, (val = 0.0L, -LDBL_MIN), "-3.456789e-4932", 15, 0, Eof);
+        TEST (T, (val = LDBL_MIN, 0.0L),   "3.456789e-4932", 14, 0, Eof);
+        TEST (T, (val = 0.0L, -LDBL_MIN), "-3.456789e-4932", 15, 0, Eof);
     }
 
     if (1 == std::sscanf ("3.456789e-9999", fmt, &ld) && ld < LDBL_MIN) {
-        TEST (T_MAX, (val = LDBL_MIN, 0.0L),   "3.456789e-9999", 14, 0, Eof);
-        TEST (T_MAX, (val = 0.0L, -LDBL_MIN), "-3.456789e-9999", 15, 0, Eof);
+        TEST (T, (val = LDBL_MIN, 0.0L),   "3.456789e-9999", 14, 0, Eof);
+        TEST (T, (val = 0.0L, -LDBL_MIN), "-3.456789e-9999", 15, 0, Eof);
     }
 
+    pmax = 0;   // reset before next test
 
 
 #  ifdef _RWSTD_LDBL_MAX

Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.num.put.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.num.put.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/localization/22.locale.num.put.cpp (original)
+++ stdcxx/branches/4.3.x/tests/localization/22.locale.num.put.cpp Tue May 27 08:50:30 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2001-2006 Rogue Wave Software.
+ * Copyright 2001-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -328,7 +328,12 @@
 
 #endif   // _RWSTD_LDBL_MAX_10_EXP
 
-    const charT* const bufend = np.put (buf, ios, fill, val);
+    // cast the narrow fill character to unsigned char before
+    // converting it to charT to avoid potential sign extension
+    typedef unsigned char UChar;
+    const charT wfill = charT (UChar (fill));
+
+    const charT* const bufend = np.put (buf, ios, wfill, val);
 
     // verify 22.2.2.2.2, p21
     if (ios.width ()) {
@@ -1171,7 +1176,7 @@
 
     // locale 3.0 extension
 
-#define BASE(n)   ((n)  << _RWSTD_IOS_BASEOFF)
+#define BASE(n)   int (unsigned (n)  << _RWSTD_IOS_BASEOFF)
 
     // bases 0 and 10 are both base 10
     // base 1 is roman (values 1 through 4999)

Modified: stdcxx/branches/4.3.x/tests/localization/22.locale.time.put.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/localization/22.locale.time.put.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/localization/22.locale.time.put.cpp (original)
+++ stdcxx/branches/4.3.x/tests/localization/22.locale.time.put.cpp Tue May 27 08:50:30 2008
@@ -405,10 +405,15 @@
 
     std::ostreambuf_iterator<charT> it (&sb);
 
+    // convert the narrow fill character to the generic charT
+    // being careful to avoid (potential) sign extension
+    typedef unsigned char UChar;
+    const charT wfill = charT (UChar (fill));
+
     if (patend - pat == 2 && '%' == pat [0]) {
 
         // format character, no modifier
-        *tp.put (it, ios, fill, tmb, char (wpat [1])) = charT ();
+        *tp.put (it, ios, wfill, tmb, char (wpat [1])) = charT ();
 
         const bool success = 0 == rw_strncmp (buf, result);
 
@@ -425,7 +430,7 @@
     else if (patend - pat == 3 && '%' == pat [0]) {
 
         // format character preceded by a format modifier
-        *tp.put (it, ios, fill, tmb, char (wpat [2]), char (wpat [1])) =
+        *tp.put (it, ios, wfill, tmb, char (wpat [2]), char (wpat [1])) =
             charT ();
 
         const bool success = 0 == rw_strncmp (buf, result);
@@ -442,7 +447,7 @@
     sb.pubsetp (buf, buf + sizeof buf / sizeof *buf);
 
     // format string
-    *tp.put (it, ios, fill, tmb, wpat, wpat + (patend - pat)) = charT ();
+    *tp.put (it, ios, wfill, tmb, wpat, wpat + (patend - pat)) = charT ();
 
     const bool success = 0 == rw_strncmp (buf, result);
 
@@ -507,6 +512,8 @@
         return 0;
 
     std::FILE *fout = std::fopen (srcfname, "w");
+    if (0 == fout)
+        return 0;
 
     std::fprintf (fout, "LC_TIME\n");
 
@@ -643,6 +650,9 @@
         return 0;
 
     fout = std::fopen (cmfname, "w");
+    if (0 == fout)
+        return 0;
+
     pcs_write (fout, 0);
 
     std::fclose (fout);

Modified: stdcxx/branches/4.3.x/tests/numerics/26.valarray.cassign.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/numerics/26.valarray.cassign.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/numerics/26.valarray.cassign.cpp (original)
+++ stdcxx/branches/4.3.x/tests/numerics/26.valarray.cassign.cpp Tue May 27 08:50:30 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright (C) 2007 Rogue Wave Software, Inc.
+ * Copyright (C) 2007-2008 Rogue Wave Software, Inc.
  *
  **************************************************************************/
 
@@ -805,15 +805,15 @@
     TEST (int);
     TEST (double);
 
-#if 0x04020000 >= _RWSTD_VER
+#if 0x04020100 >= _RWSTD_VER
 
-    // test fails to compile with stdcxx 4.2.0 and prior due to
+    // test fails to compile with stdcxx 4.2.1 and prior due to
     // STDCXX-512: http://issues.apache.org/jira/browse/STDCXX-512
     rw_warn (0, 0, __LINE__,
              "test of UserClass disabled in stdcxx 4.2.0 and prior "
              "due to STDCXX-512");
 
-#else   // stdcxx > 4.2.0
+#else   // stdcxx >= 4.2.1
 
     TEST (UserClass);
 

Modified: stdcxx/branches/4.3.x/tests/src/alarm.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/alarm.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/src/alarm.cpp (original)
+++ stdcxx/branches/4.3.x/tests/src/alarm.cpp Tue May 27 08:50:30 2008
@@ -44,16 +44,16 @@
 // exported/imported
 
 /* extern _TEST_EXPORT */ rw_signal_handler_t* const
-rw_sig_dfl = (rw_signal_handler_t*)-1;
+rw_sig_dfl = (rw_signal_handler_t*)0;
 
 /* extern _TEST_EXPORT */ rw_signal_handler_t* const
-rw_sig_ign = (rw_signal_handler_t*)-2;
+rw_sig_ign = (rw_signal_handler_t*)1;
 
 /* extern _TEST_EXPORT */ rw_signal_handler_t* const
-rw_sig_hold = (rw_signal_handler_t*)-3;
+rw_sig_hold = (rw_signal_handler_t*)2;
 
 /* extern _TEST_EXPORT */ rw_signal_handler_t* const
-rw_sig_restore = (rw_signal_handler_t*)-4;
+rw_sig_restore = (rw_signal_handler_t*)3;
 
 
 // may point to a user-defined handler for the alarm
@@ -133,7 +133,7 @@
 #  endif
 
 #  ifndef SIG_DFL
-#    define SIG_IGN (rw_signal_handler_t*)0
+#    define SIG_DFL (rw_signal_handler_t*)0
 #  endif   // SIG_DFL
 
 #  ifndef SIG_IGN

Modified: stdcxx/branches/4.3.x/tests/src/cmdopt.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/cmdopt.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/src/cmdopt.cpp (original)
+++ stdcxx/branches/4.3.x/tests/src/cmdopt.cpp Tue May 27 08:50:30 2008
@@ -20,7 +20,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2005-2006 Rogue Wave Software.
+ * Copyright 2005-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -518,6 +518,8 @@
                 lopt = lastopt->loptbuf_;
             else {
                 lopt = (char*)malloc (optlen + 1);
+                if (0 == lopt)
+                    return -1;   // error
                 lastopt->lopt_ = lopt;
             }
 
@@ -534,6 +536,8 @@
 
         int arg_is_callback = true;
 
+        RW_ASSERT (0 != next);
+
         if ('#' == *next) {
             // examples of option specification:
             //   --foo#     option takes an optional numeric argument

Modified: stdcxx/branches/4.3.x/tests/src/locale.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/locale.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/src/locale.cpp (original)
+++ stdcxx/branches/4.3.x/tests/src/locale.cpp Tue May 27 08:50:30 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2001-2007 Rogue Wave Software, Inc.
+ * Copyright 2001-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -215,8 +215,22 @@
 
     // otherwise, try to create the locale database
 
+    // fallback for when TOPDIR is unset or empty
+    char topdir_path_buf [] = __FILE__;
+
     // use TOPDIR to determine the root of the source tree
-    const char* const topdir = getenv (TOPDIR);
+    const char* topdir = getenv (TOPDIR);
+    if (!topdir || !*topdir) {
+
+        // try to get TOPDIR from __FILE__
+        char* const slash = strrchr (topdir_path_buf, _RWSTD_PATH_SEP);
+
+        if (slash) {
+            slash [-1] = '\0';
+            topdir     = topdir_path_buf;
+        }
+    }
+
     if (!topdir || !*topdir) {
         rw_error (0, __FILE__, __LINE__,
                   "the environment variable %s is %s",
@@ -1097,8 +1111,22 @@
         _rw_lookup_table_t countries_map;
         _rw_lookup_table_t encodings_map;
 
+        // fallback for when TOPDIR is unset or empty
+        char topdir_path_buf [] = __FILE__;
+
         // use TOPDIR to determine the root of the source tree
-        const char* const topdir = getenv (TOPDIR);
+        const char* topdir = getenv (TOPDIR);
+        if (!topdir || !*topdir) {
+
+            // try to get TOPDIR from __FILE__
+            char* const slash = strrchr (topdir_path_buf, _RWSTD_PATH_SEP);
+
+            if (slash) {
+                slash [-1] = '\0';
+                topdir     = topdir_path_buf;
+            }
+        }
+
         if (!topdir || !*topdir) {
             rw_error (0, __FILE__, __LINE__,
                       "the environment variable %s is %s",

Modified: stdcxx/branches/4.3.x/tests/src/opt_diags.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/src/opt_diags.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/src/opt_diags.cpp (original)
+++ stdcxx/branches/4.3.x/tests/src/opt_diags.cpp Tue May 27 08:50:30 2008
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2008 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -282,6 +282,8 @@
             break;
         }
 
+        RW_ASSERT (0 != end);
+
         if (':' == *end || '\0' == *end) {
             parg = end + (0 != *end);
             end  = strpbrk (parg, ":,");
@@ -299,6 +301,8 @@
                 break;
             }
 
+            RW_ASSERT (0 != end);
+
             if (':' == *end || '\0' == *end) {
                 parg = end + ('\0' != *end);
                 end  = strpbrk (parg, ":,");
@@ -317,6 +321,8 @@
                     break;
                 }
 
+                RW_ASSERT (0 != end);
+
                 if (':' == *end || '\0' == *end) {
                     parg = end + (0 != *end);
                     end  = strpbrk (parg, ":,");

Modified: stdcxx/branches/4.3.x/tests/strings/21.cwctype.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.3.x/tests/strings/21.cwctype.cpp?rev=660567&r1=660566&r2=660567&view=diff
==============================================================================
--- stdcxx/branches/4.3.x/tests/strings/21.cwctype.cpp (original)
+++ stdcxx/branches/4.3.x/tests/strings/21.cwctype.cpp Tue May 27 08:50:30 2008
@@ -82,7 +82,6 @@
     "iswlower",
 #else
     "",
-#endif
 
 #ifdef iswprint
 #  undef iswprint
@@ -119,6 +118,8 @@
     "",
 #endif
 
+#endif
+
 #ifdef tolower
 #  undef tolower
     "tolower",



Mime
View raw message