aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-12-23 22:44:15 -0800
committerGerrit Code Review <noreply-gerritcodereview@google.com>2012-12-23 22:44:16 -0800
commitf18429e3d6bf0d955f66160644de0672f045872a (patch)
tree6881d4572f6f86e7271e3d1c4e1ade3bb117e4d1
parent8cfe752a64222225f3199da5feff6664628590c9 (diff)
parent91b1d7f8d7847f7b032a8a289b2bb5911c731fba (diff)
downloadstlport-jb-mr1-dev-plus-aosp.tar.gz
-rw-r--r--src/ios.cpp2
-rw-r--r--stlport/stl/_exception.h3
-rw-r--r--stlport/stl/_ios_base.h2
-rw-r--r--stlport/stl/_stdexcept.h4
-rw-r--r--stlport/stl/_stdexcept_base.h8
5 files changed, 12 insertions, 7 deletions
diff --git a/src/ios.cpp b/src/ios.cpp
index cb35e0b..7bbfecd 100644
--- a/src/ios.cpp
+++ b/src/ios.cpp
@@ -30,6 +30,7 @@ _STLP_BEGIN_NAMESPACE
//----------------------------------------------------------------------
// ios_base members
+#ifdef _STLP_USE_EXCEPTIONS
// class ios_base::failure, a subclass of exception. It's used solely
// for reporting errors.
@@ -38,6 +39,7 @@ ios_base::failure::failure(const string& s)
{}
ios_base::failure::~failure() _STLP_NOTHROW_INHERENTLY {}
+#endif
#if !defined (_STLP_STATIC_CONST_INIT_BUG) && !defined (_STLP_NO_STATIC_CONST_DEFINITION)
// Definitions of ios_base's formatting flags.
diff --git a/stlport/stl/_exception.h b/stlport/stl/_exception.h
index a0bf4ad..1dd7127 100644
--- a/stlport/stl/_exception.h
+++ b/stlport/stl/_exception.h
@@ -185,8 +185,11 @@ public:
# endif
};
+#ifdef _STLP_USE_EXCEPTIONS
// forward declaration
class __Named_exception;
+#endif
+
_STLP_END_NAMESPACE
#endif
diff --git a/stlport/stl/_ios_base.h b/stlport/stl/_ios_base.h
index c9e10ad..8c7a65b 100644
--- a/stlport/stl/_ios_base.h
+++ b/stlport/stl/_ios_base.h
@@ -48,11 +48,13 @@ _STLP_BEGIN_NAMESPACE
class _STLP_CLASS_DECLSPEC ios_base {
public:
+# ifdef _STLP_USE_EXCEPTIONS
class _STLP_CLASS_DECLSPEC failure : public __Named_exception {
public:
explicit failure(const string&);
virtual ~failure() _STLP_NOTHROW_INHERENTLY;
};
+#endif
typedef int fmtflags;
typedef int iostate;
diff --git a/stlport/stl/_stdexcept.h b/stlport/stl/_stdexcept.h
index dba5d01..ac24160 100644
--- a/stlport/stl/_stdexcept.h
+++ b/stlport/stl/_stdexcept.h
@@ -25,7 +25,7 @@
#if !defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE)
-# if defined(_STLP_USE_EXCEPTIONS) || 1
+# if defined(_STLP_USE_EXCEPTIONS)
_STLP_BEGIN_NAMESPACE
@@ -103,7 +103,7 @@ public:
_STLP_END_NAMESPACE
-# endif
+# endif /* _STLP_USE_EXCEPTIONS */
#endif
#endif /* _STLP_INTERNAL_STDEXCEPT */
diff --git a/stlport/stl/_stdexcept_base.h b/stlport/stl/_stdexcept_base.h
index 993f2e9..bac2c17 100644
--- a/stlport/stl/_stdexcept_base.h
+++ b/stlport/stl/_stdexcept_base.h
@@ -25,9 +25,7 @@
# include <stl/_exception.h>
# endif
-# if defined(_STLP_USE_EXCEPTIONS) || 1
-/* TODO: use same conditions on fwd def of __Named_exception
- in _exception.h and its use in _ios_base.h */
+# if defined(_STLP_USE_EXCEPTIONS)
# ifndef _STLP_INTERNAL_CSTRING
# include <stl/_cstring.h>
@@ -93,7 +91,7 @@ private:
_STLP_END_NAMESPACE
-# endif /* Not o32, and no exceptions */
-#endif /* _STLP_STDEXCEPT_SEEN */
+# endif /* _STLP_USE_EXCEPTIONS */
+#endif
#endif /* _STLP_INTERNAL_STDEXCEPT_BASE */