gcc50/csu: Skip depends step to avoid possible race
[dragonfly.git] / contrib / gcc-4.4 / libstdc++-v3 / src / functexcept.cc
1 // Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
2 //
3 // This file is part of the GNU ISO C++ Library.  This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 3, or (at your option)
7 // any later version.
8
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 // GNU General Public License for more details.
13
14 // Under Section 7 of GPL version 3, you are granted additional
15 // permissions described in the GCC Runtime Library Exception, version
16 // 3.1, as published by the Free Software Foundation.
17
18 // You should have received a copy of the GNU General Public License and
19 // a copy of the GCC Runtime Library Exception along with this program;
20 // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
21 // <http://www.gnu.org/licenses/>.
22
23 #include <bits/functexcept.h>
24 #include <cstdlib>
25 #include <exception>
26 #include <stdexcept>
27 #include <system_error>
28 #include <new>
29 #include <typeinfo>
30 #include <ios>
31
32 #ifdef _GLIBCXX_USE_NLS
33 # include <libintl.h>
34 # define _(msgid)   gettext (msgid)
35 #else
36 # define _(msgid)   (msgid)
37 #endif
38
39 _GLIBCXX_BEGIN_NAMESPACE(std)
40
41 #if __EXCEPTIONS
42   void
43   __throw_bad_exception(void)
44   { throw bad_exception(); }
45
46   void
47   __throw_bad_alloc(void)
48   { throw bad_alloc(); }
49
50   void
51   __throw_bad_cast(void)
52   { throw bad_cast(); }
53
54   void
55   __throw_bad_typeid(void)
56   { throw bad_typeid(); }
57
58   void
59   __throw_logic_error(const char* __s)
60   { throw logic_error(_(__s)); }
61
62   void
63   __throw_domain_error(const char* __s)
64   { throw domain_error(_(__s)); }
65
66   void
67   __throw_invalid_argument(const char* __s)
68   { throw invalid_argument(_(__s)); }
69
70   void
71   __throw_length_error(const char* __s)
72   { throw length_error(_(__s)); }
73
74   void
75   __throw_out_of_range(const char* __s)
76   { throw out_of_range(_(__s)); }
77
78   void
79   __throw_runtime_error(const char* __s)
80   { throw runtime_error(_(__s)); }
81
82   void
83   __throw_range_error(const char* __s)
84   { throw range_error(_(__s)); }
85
86   void
87   __throw_overflow_error(const char* __s)
88   { throw overflow_error(_(__s)); }
89
90   void
91   __throw_underflow_error(const char* __s)
92   { throw underflow_error(_(__s)); }
93
94   void
95   __throw_ios_failure(const char* __s)
96   { throw ios_base::failure(_(__s)); }
97
98   void
99   __throw_system_error(int __i)
100   { throw system_error(error_code(__i, generic_category())); }
101 #else
102   void
103   __throw_bad_exception(void)
104   { std::abort(); }
105
106   void
107   __throw_bad_alloc(void)
108   { std::abort(); }
109
110   void
111   __throw_bad_cast(void)
112   { std::abort(); }
113
114   void
115   __throw_bad_typeid(void)
116   { std::abort(); }
117
118   void
119   __throw_logic_error(const char*)
120   { std::abort(); }
121
122   void
123   __throw_domain_error(const char*)
124   { std::abort(); }
125
126   void
127   __throw_invalid_argument(const char*)
128   { std::abort(); }
129
130   void
131   __throw_length_error(const char*)
132   { std::abort(); }
133
134   void
135   __throw_out_of_range(const char*)
136   { std::abort(); }
137
138   void
139   __throw_runtime_error(const char*)
140   { std::abort(); }
141
142   void
143   __throw_range_error(const char*)
144   { std::abort(); }
145
146   void
147   __throw_overflow_error(const char*)
148   { std::abort(); }
149
150   void
151   __throw_underflow_error(const char*)
152   { std::abort(); }
153
154   void
155   __throw_ios_failure(const char*)
156   { std::abort(); }
157
158   void
159   __throw_system_error(int __i)
160   { std::abort(); }
161 #endif //__EXCEPTIONS
162
163 _GLIBCXX_END_NAMESPACE