components/stdcxx/patches/024-exception.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/include/exception	2008-04-24 20:23:57.000000000 -0400
+++ stdcxx-4.2.1/include/exception	2007-05-03 05:51:01.000000000 -0400
@@ -1,190 +1,55 @@
-// -*- C++ -*-
-/***************************************************************************
- *
- * exception - declarations for the Standard Library exception class
- *
- * $Id: exception 620131 2008-02-09 14:57:25Z 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 1994-2006 Rogue Wave Software.
- * 
- **************************************************************************/
-
-#ifndef _RWSTD_EXCEPTION_INCLUDED
-#define _RWSTD_EXCEPTION_INCLUDED
-
-#include <rw/_defs.h>
-#include <rw/_error.h>
-
-
-#if 0 // def __HP_aCC
-// HP aCC on HP-UX has <exception.h> whose contents HP prefers to ours
-// #  include </opt/aCC/include/exception.h>
-#  include <exception.h>
-#else   // if defined (__HP_aCC)
-
-
-#if    !defined (_RWSTD_NO_STD_EXCEPTION) \
-    || !defined (_RWSTD_NO_RUNTIME_IN_STD)
-
-_RWSTD_NAMESPACE (std) {
-
-#endif   // _RWSTD_NO_STD_EXCEPTION || !_RWSTD_NO_RUNTIME_IN_STD
-
-
-// 18.6.1
-class _RWSTD_EXPORT exception     
-{
-public:
-    // 18.6.1, p2
-    exception () _THROWS (());
-
-    // 18.6.1, p4
-    exception (const exception&) _THROWS (());
-
-    // 18.6.1, p4
-    exception& operator= (const exception&) _THROWS (());
-
-    // 18.6.1, p6
-    virtual ~exception () _THROWS (());
-
-    // 18.6.1, p8
-    virtual const char* what () const _THROWS (());
-
-#if defined (_MSC_VER)
-
-private:
-
-    const char *_C_name;
-    int         _C_flag;
-
-#elif defined (__INTEL_COMPILER)
-
-private:
-
-    const char *_C_name;
-
-#endif   // _MSC_VER
-};
-
-
-#if    !defined (_RWSTD_NO_STD_EXCEPTION) \
-    || !defined (_RWSTD_NO_RUNTIME_IN_STD)
+/*
+        Copyright 02/24/06 Sun Microsystems, Inc. All Rights Reserved
+*/
+/* exception
 
-}   // namespace std
+   @(#)exception	1.4  02/24/06 16:08:17
 
-#else   // if _RWSTD_NO_STD_EXCEPTION && _RWSTD_NO_RUNTIME_IN_STD
+   Declaration for ISO standard exception interface
+*/
 
-#  ifndef _RWSTD_NO_NAMESPACE
+#if !defined(_EXCEPTION_HDR)
+#define _EXCEPTION_HDR
 
 namespace std {
 
-using ::exception;
-
-
-}   // namespace std
-
-#  endif   // _RWSTD_NO_NAMESPACE
-
-#endif   // _RWSTD_NO_STD_EXCEPTION, _RWSTD_NO_RUNTIME_IN_STD
-
-
-
-#if    !defined (_RWSTD_NO_STD_BAD_EXCEPTION) \
-    || !defined (_RWSTD_NO_RUNTIME_IN_STD)
-
-_RWSTD_NAMESPACE (std) {
-
-#endif   // _RWSTD_NO_STD_BAD_EXCEPTION || _RWSTD_NO_RUNTIME_IN_STD
-
-
-// 18.6.2.1
-class _RWSTD_EXPORT bad_exception: public _STD::exception
-{
+    class exception {
 public:
-    // 18.6.2.1, p2
-    bad_exception () _THROWS (());
-
-    // 18.6.2.1, p4
-    bad_exception (const bad_exception&) _THROWS (());
-
-    // 18.6.2.1, p4
-    bad_exception& operator= (const bad_exception&) _THROWS (());
-
-    virtual ~bad_exception () _THROWS (());
-
-    // 18.6.2.1, p5
-    virtual const char* what () const _THROWS (());
+	exception() throw() {}
+#pragma rarely_called(exception::exception)
+	exception(const exception&) throw() {}
+#pragma rarely_called(exception::exception)
+	exception& operator=(const exception&) throw() {return *this;}
+#pragma rarely_called(operator=)
+	virtual ~exception() throw() {}
+#pragma rarely_called(exception::~exception)
+	virtual const char* what() const throw();
+#pragma rarely_called(what)
 };
 
-#if    !defined (_RWSTD_NO_STD_BAD_EXCEPTION) \
-    || !defined (_RWSTD_NO_RUNTIME_IN_STD)
-
-}   // namespace std
-
-#else   // if _RWSTD_NO_STD_BAD_EXCEPTION && _RWSTD_NO_RUNTIME_IN_STD
-
-#  ifndef _RWSTD_NO_NAMESPACE
-
-namespace std {
-
-using ::bad_exception;
-
-
-}   // namespace std
-
-#  endif   // _RWSTD_NO_NAMESPACE
-
-#endif   // _RWSTD_NO_STD_BAD_EXCEPTION, _RWSTD_NO_RUNTIME_IN_STD
-
+    class bad_exception: public exception {
+    public:
+	bad_exception() throw() {}
+	bad_exception(const bad_exception&) throw() {}
+	bad_exception& operator=(const bad_exception&) throw() {return *this;}
+	~bad_exception() throw() {}
+	const char* what() const throw();
+    };
 
-_RWSTD_NAMESPACE (std) {
+    // Unexpected exception handling
 
-// 18.6.2.2
 typedef void (*unexpected_handler) ();
+    unexpected_handler set_unexpected(unexpected_handler) throw();
+    void unexpected();
 
-// 18.6.2.3
-_RWSTD_EXPORT extern unexpected_handler
-set_unexpected (unexpected_handler) _THROWS (());
-
-// 18.6.2.4
-_RWSTD_EXPORT extern void
-unexpected () _RWSTD_GNUC_ATTRIBUTE ((__noreturn__));
+    // Termination handling
 
-// 18.6.3.1
 typedef void (*terminate_handler) ();
+    terminate_handler set_terminate(terminate_handler) throw();
+    void terminate();
+#pragma does_not_return (terminate)
 
-// 18.6.3.2
-_RWSTD_EXPORT extern terminate_handler
-set_terminate (terminate_handler) _THROWS (());
-
-// 18.6.3.3
-_RWSTD_EXPORT extern void
-terminate () _RWSTD_GNUC_ATTRIBUTE ((__noreturn__));
-
-// 18.6.4
-_RWSTD_EXPORT extern bool
-uncaught_exception () _THROWS (());
-
-}   // namespace std
-
-#endif   // __HP_aCC
+    bool uncaught_exception() throw();
+}
 
-#endif   // _RWSTD_EXCEPTION_INCLUDED
+#endif	/* _EXCEPTION_HDR */