components/stdcxx/patches/058-NO_INT_TRAPS.cpp.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Wed, 29 Aug 2012 11:05:56 -0700
changeset 957 255465c5756f
parent 402 94ae4d75524c
permissions -rw-r--r--
Close of build 04.

--- stdcxx-4.2.1/etc/config/src/NO_INT_TRAPS.cpp	2008-04-24 20:25:44.000000000 -0400
+++ stdcxx-4.2.1/etc/config/src/NO_INT_TRAPS.cpp	2011-01-11 21:21:17.842689459 -0500
@@ -43,12 +43,15 @@
     // test expects to be called with no command line arguments
     // i.e., (argc < 2) is expected to hold
 
+	int result[2];
+
+#if defined(__SUNPRO_CC)
+	result[0] = result[1] = 1;
+#else
     // argc used to try to foil optimizers
     int_zero = get_int (argc);
     int_one  = get_int (argc);
 
-    int result [2];
-
     TRY {
         // use both division and modulo to try to foil optimizers
         result [0] = int_one / int_zero;
@@ -57,6 +60,7 @@
     EXCEPT (1) {
         return 1;
     }
+#endif
 
     // NEGATIVE test: successful exit status indicates a failure
     return argc < 2 ? result [0] : result [1];