From d42790ccc00a70f00d10a3b8f17967a5b396bd4d Mon Sep 17 00:00:00 2001 From: kan Date: Thu, 12 Aug 2004 16:41:42 +0000 Subject: Remove files that are not part of GCC 3.4.x from the vendor branch. --- contrib/libstdc++/src/bitset.cc | 219 ------------------------- contrib/libstdc++/src/cmath.cc | 47 ------ contrib/libstdc++/src/fstream.cc | 202 ----------------------- contrib/libstdc++/src/globals.cc | 317 ------------------------------------ contrib/libstdc++/src/stl-inst.cc | 43 ----- contrib/libstdc++/src/vterminate.cc | 82 ---------- 6 files changed, 910 deletions(-) delete mode 100644 contrib/libstdc++/src/bitset.cc delete mode 100644 contrib/libstdc++/src/cmath.cc delete mode 100644 contrib/libstdc++/src/fstream.cc delete mode 100644 contrib/libstdc++/src/globals.cc delete mode 100644 contrib/libstdc++/src/stl-inst.cc delete mode 100644 contrib/libstdc++/src/vterminate.cc (limited to 'contrib/libstdc++/src') diff --git a/contrib/libstdc++/src/bitset.cc b/contrib/libstdc++/src/bitset.cc deleted file mode 100644 index 4849a6a..0000000 --- a/contrib/libstdc++/src/bitset.cc +++ /dev/null @@ -1,219 +0,0 @@ -// Bitset definitions -*- C++ -*- - -// Copyright (C) 2001, 2002 Free Software Foundation -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -/* - * Copyright (c) 1998 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - */ - -#include - -// -// Definitions of non-inline functions from the single-word version of -// _Base_bitset. -// - -std::size_t -std::_Base_bitset<1>::_M_do_find_first(std::size_t __not_found) const -{ - _WordT __thisword = _M_w; - - if ( __thisword != static_cast<_WordT>(0) ) { - // find byte within word - for (std::size_t __j = 0; __j < sizeof(_WordT); __j++ ) { - unsigned char __this_byte - = static_cast(__thisword & (~(unsigned char)0)); - if ( __this_byte ) - return __j * CHAR_BIT + _S_first_one[__this_byte]; - - __thisword >>= CHAR_BIT; - } - } - // not found, so return a value that indicates failure. - return __not_found; -} - -std::size_t -std::_Base_bitset<1>::_M_do_find_next(std::size_t __prev, - std::size_t __not_found) const -{ - // make bound inclusive - ++__prev; - - // check out of bounds - if ( __prev >= _GLIBCPP_BITSET_BITS_PER_WORD ) - return __not_found; - - // search first (and only) word - _WordT __thisword = _M_w; - - // mask off bits below bound - __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev); - - if ( __thisword != static_cast<_WordT>(0) ) { - // find byte within word - // get first byte into place - __thisword >>= _S_whichbyte(__prev) * CHAR_BIT; - for ( std::size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) { - unsigned char __this_byte - = static_cast(__thisword & (~(unsigned char)0)); - if ( __this_byte ) - return __j * CHAR_BIT + _S_first_one[__this_byte]; - - __thisword >>= CHAR_BIT; - } - } - - // not found, so return a value that indicates failure. - return __not_found; -} // end _M_do_find_next - - -// Lookup tables for find and count operations. In _S_bit_count, the value -// *at* an index is the number of bits set *in* that index. -unsigned char std::_S_bit_count[256] = -{ - 0, /* 0 */ 1, /* 1 */ 1, /* 2 */ 2, /* 3 */ 1, /* 4 */ - 2, /* 5 */ 2, /* 6 */ 3, /* 7 */ 1, /* 8 */ 2, /* 9 */ - 2, /* 10 */ 3, /* 11 */ 2, /* 12 */ 3, /* 13 */ 3, /* 14 */ - 4, /* 15 */ 1, /* 16 */ 2, /* 17 */ 2, /* 18 */ 3, /* 19 */ - 2, /* 20 */ 3, /* 21 */ 3, /* 22 */ 4, /* 23 */ 2, /* 24 */ - 3, /* 25 */ 3, /* 26 */ 4, /* 27 */ 3, /* 28 */ 4, /* 29 */ - 4, /* 30 */ 5, /* 31 */ 1, /* 32 */ 2, /* 33 */ 2, /* 34 */ - 3, /* 35 */ 2, /* 36 */ 3, /* 37 */ 3, /* 38 */ 4, /* 39 */ - 2, /* 40 */ 3, /* 41 */ 3, /* 42 */ 4, /* 43 */ 3, /* 44 */ - 4, /* 45 */ 4, /* 46 */ 5, /* 47 */ 2, /* 48 */ 3, /* 49 */ - 3, /* 50 */ 4, /* 51 */ 3, /* 52 */ 4, /* 53 */ 4, /* 54 */ - 5, /* 55 */ 3, /* 56 */ 4, /* 57 */ 4, /* 58 */ 5, /* 59 */ - 4, /* 60 */ 5, /* 61 */ 5, /* 62 */ 6, /* 63 */ 1, /* 64 */ - 2, /* 65 */ 2, /* 66 */ 3, /* 67 */ 2, /* 68 */ 3, /* 69 */ - 3, /* 70 */ 4, /* 71 */ 2, /* 72 */ 3, /* 73 */ 3, /* 74 */ - 4, /* 75 */ 3, /* 76 */ 4, /* 77 */ 4, /* 78 */ 5, /* 79 */ - 2, /* 80 */ 3, /* 81 */ 3, /* 82 */ 4, /* 83 */ 3, /* 84 */ - 4, /* 85 */ 4, /* 86 */ 5, /* 87 */ 3, /* 88 */ 4, /* 89 */ - 4, /* 90 */ 5, /* 91 */ 4, /* 92 */ 5, /* 93 */ 5, /* 94 */ - 6, /* 95 */ 2, /* 96 */ 3, /* 97 */ 3, /* 98 */ 4, /* 99 */ - 3, /* 100 */ 4, /* 101 */ 4, /* 102 */ 5, /* 103 */ 3, /* 104 */ - 4, /* 105 */ 4, /* 106 */ 5, /* 107 */ 4, /* 108 */ 5, /* 109 */ - 5, /* 110 */ 6, /* 111 */ 3, /* 112 */ 4, /* 113 */ 4, /* 114 */ - 5, /* 115 */ 4, /* 116 */ 5, /* 117 */ 5, /* 118 */ 6, /* 119 */ - 4, /* 120 */ 5, /* 121 */ 5, /* 122 */ 6, /* 123 */ 5, /* 124 */ - 6, /* 125 */ 6, /* 126 */ 7, /* 127 */ 1, /* 128 */ 2, /* 129 */ - 2, /* 130 */ 3, /* 131 */ 2, /* 132 */ 3, /* 133 */ 3, /* 134 */ - 4, /* 135 */ 2, /* 136 */ 3, /* 137 */ 3, /* 138 */ 4, /* 139 */ - 3, /* 140 */ 4, /* 141 */ 4, /* 142 */ 5, /* 143 */ 2, /* 144 */ - 3, /* 145 */ 3, /* 146 */ 4, /* 147 */ 3, /* 148 */ 4, /* 149 */ - 4, /* 150 */ 5, /* 151 */ 3, /* 152 */ 4, /* 153 */ 4, /* 154 */ - 5, /* 155 */ 4, /* 156 */ 5, /* 157 */ 5, /* 158 */ 6, /* 159 */ - 2, /* 160 */ 3, /* 161 */ 3, /* 162 */ 4, /* 163 */ 3, /* 164 */ - 4, /* 165 */ 4, /* 166 */ 5, /* 167 */ 3, /* 168 */ 4, /* 169 */ - 4, /* 170 */ 5, /* 171 */ 4, /* 172 */ 5, /* 173 */ 5, /* 174 */ - 6, /* 175 */ 3, /* 176 */ 4, /* 177 */ 4, /* 178 */ 5, /* 179 */ - 4, /* 180 */ 5, /* 181 */ 5, /* 182 */ 6, /* 183 */ 4, /* 184 */ - 5, /* 185 */ 5, /* 186 */ 6, /* 187 */ 5, /* 188 */ 6, /* 189 */ - 6, /* 190 */ 7, /* 191 */ 2, /* 192 */ 3, /* 193 */ 3, /* 194 */ - 4, /* 195 */ 3, /* 196 */ 4, /* 197 */ 4, /* 198 */ 5, /* 199 */ - 3, /* 200 */ 4, /* 201 */ 4, /* 202 */ 5, /* 203 */ 4, /* 204 */ - 5, /* 205 */ 5, /* 206 */ 6, /* 207 */ 3, /* 208 */ 4, /* 209 */ - 4, /* 210 */ 5, /* 211 */ 4, /* 212 */ 5, /* 213 */ 5, /* 214 */ - 6, /* 215 */ 4, /* 216 */ 5, /* 217 */ 5, /* 218 */ 6, /* 219 */ - 5, /* 220 */ 6, /* 221 */ 6, /* 222 */ 7, /* 223 */ 3, /* 224 */ - 4, /* 225 */ 4, /* 226 */ 5, /* 227 */ 4, /* 228 */ 5, /* 229 */ - 5, /* 230 */ 6, /* 231 */ 4, /* 232 */ 5, /* 233 */ 5, /* 234 */ - 6, /* 235 */ 5, /* 236 */ 6, /* 237 */ 6, /* 238 */ 7, /* 239 */ - 4, /* 240 */ 5, /* 241 */ 5, /* 242 */ 6, /* 243 */ 5, /* 244 */ - 6, /* 245 */ 6, /* 246 */ 7, /* 247 */ 5, /* 248 */ 6, /* 249 */ - 6, /* 250 */ 7, /* 251 */ 6, /* 252 */ 7, /* 253 */ 7, /* 254 */ - 8 /* 255 */ -}; // end _S_bit_count - -unsigned char std::_S_first_one[256] = -{ - 0, /* 0 */ 0, /* 1 */ 1, /* 2 */ 0, /* 3 */ 2, /* 4 */ - 0, /* 5 */ 1, /* 6 */ 0, /* 7 */ 3, /* 8 */ 0, /* 9 */ - 1, /* 10 */ 0, /* 11 */ 2, /* 12 */ 0, /* 13 */ 1, /* 14 */ - 0, /* 15 */ 4, /* 16 */ 0, /* 17 */ 1, /* 18 */ 0, /* 19 */ - 2, /* 20 */ 0, /* 21 */ 1, /* 22 */ 0, /* 23 */ 3, /* 24 */ - 0, /* 25 */ 1, /* 26 */ 0, /* 27 */ 2, /* 28 */ 0, /* 29 */ - 1, /* 30 */ 0, /* 31 */ 5, /* 32 */ 0, /* 33 */ 1, /* 34 */ - 0, /* 35 */ 2, /* 36 */ 0, /* 37 */ 1, /* 38 */ 0, /* 39 */ - 3, /* 40 */ 0, /* 41 */ 1, /* 42 */ 0, /* 43 */ 2, /* 44 */ - 0, /* 45 */ 1, /* 46 */ 0, /* 47 */ 4, /* 48 */ 0, /* 49 */ - 1, /* 50 */ 0, /* 51 */ 2, /* 52 */ 0, /* 53 */ 1, /* 54 */ - 0, /* 55 */ 3, /* 56 */ 0, /* 57 */ 1, /* 58 */ 0, /* 59 */ - 2, /* 60 */ 0, /* 61 */ 1, /* 62 */ 0, /* 63 */ 6, /* 64 */ - 0, /* 65 */ 1, /* 66 */ 0, /* 67 */ 2, /* 68 */ 0, /* 69 */ - 1, /* 70 */ 0, /* 71 */ 3, /* 72 */ 0, /* 73 */ 1, /* 74 */ - 0, /* 75 */ 2, /* 76 */ 0, /* 77 */ 1, /* 78 */ 0, /* 79 */ - 4, /* 80 */ 0, /* 81 */ 1, /* 82 */ 0, /* 83 */ 2, /* 84 */ - 0, /* 85 */ 1, /* 86 */ 0, /* 87 */ 3, /* 88 */ 0, /* 89 */ - 1, /* 90 */ 0, /* 91 */ 2, /* 92 */ 0, /* 93 */ 1, /* 94 */ - 0, /* 95 */ 5, /* 96 */ 0, /* 97 */ 1, /* 98 */ 0, /* 99 */ - 2, /* 100 */ 0, /* 101 */ 1, /* 102 */ 0, /* 103 */ 3, /* 104 */ - 0, /* 105 */ 1, /* 106 */ 0, /* 107 */ 2, /* 108 */ 0, /* 109 */ - 1, /* 110 */ 0, /* 111 */ 4, /* 112 */ 0, /* 113 */ 1, /* 114 */ - 0, /* 115 */ 2, /* 116 */ 0, /* 117 */ 1, /* 118 */ 0, /* 119 */ - 3, /* 120 */ 0, /* 121 */ 1, /* 122 */ 0, /* 123 */ 2, /* 124 */ - 0, /* 125 */ 1, /* 126 */ 0, /* 127 */ 7, /* 128 */ 0, /* 129 */ - 1, /* 130 */ 0, /* 131 */ 2, /* 132 */ 0, /* 133 */ 1, /* 134 */ - 0, /* 135 */ 3, /* 136 */ 0, /* 137 */ 1, /* 138 */ 0, /* 139 */ - 2, /* 140 */ 0, /* 141 */ 1, /* 142 */ 0, /* 143 */ 4, /* 144 */ - 0, /* 145 */ 1, /* 146 */ 0, /* 147 */ 2, /* 148 */ 0, /* 149 */ - 1, /* 150 */ 0, /* 151 */ 3, /* 152 */ 0, /* 153 */ 1, /* 154 */ - 0, /* 155 */ 2, /* 156 */ 0, /* 157 */ 1, /* 158 */ 0, /* 159 */ - 5, /* 160 */ 0, /* 161 */ 1, /* 162 */ 0, /* 163 */ 2, /* 164 */ - 0, /* 165 */ 1, /* 166 */ 0, /* 167 */ 3, /* 168 */ 0, /* 169 */ - 1, /* 170 */ 0, /* 171 */ 2, /* 172 */ 0, /* 173 */ 1, /* 174 */ - 0, /* 175 */ 4, /* 176 */ 0, /* 177 */ 1, /* 178 */ 0, /* 179 */ - 2, /* 180 */ 0, /* 181 */ 1, /* 182 */ 0, /* 183 */ 3, /* 184 */ - 0, /* 185 */ 1, /* 186 */ 0, /* 187 */ 2, /* 188 */ 0, /* 189 */ - 1, /* 190 */ 0, /* 191 */ 6, /* 192 */ 0, /* 193 */ 1, /* 194 */ - 0, /* 195 */ 2, /* 196 */ 0, /* 197 */ 1, /* 198 */ 0, /* 199 */ - 3, /* 200 */ 0, /* 201 */ 1, /* 202 */ 0, /* 203 */ 2, /* 204 */ - 0, /* 205 */ 1, /* 206 */ 0, /* 207 */ 4, /* 208 */ 0, /* 209 */ - 1, /* 210 */ 0, /* 211 */ 2, /* 212 */ 0, /* 213 */ 1, /* 214 */ - 0, /* 215 */ 3, /* 216 */ 0, /* 217 */ 1, /* 218 */ 0, /* 219 */ - 2, /* 220 */ 0, /* 221 */ 1, /* 222 */ 0, /* 223 */ 5, /* 224 */ - 0, /* 225 */ 1, /* 226 */ 0, /* 227 */ 2, /* 228 */ 0, /* 229 */ - 1, /* 230 */ 0, /* 231 */ 3, /* 232 */ 0, /* 233 */ 1, /* 234 */ - 0, /* 235 */ 2, /* 236 */ 0, /* 237 */ 1, /* 238 */ 0, /* 239 */ - 4, /* 240 */ 0, /* 241 */ 1, /* 242 */ 0, /* 243 */ 2, /* 244 */ - 0, /* 245 */ 1, /* 246 */ 0, /* 247 */ 3, /* 248 */ 0, /* 249 */ - 1, /* 250 */ 0, /* 251 */ 2, /* 252 */ 0, /* 253 */ 1, /* 254 */ - 0, /* 255 */ -}; // end _S_first_one - diff --git a/contrib/libstdc++/src/cmath.cc b/contrib/libstdc++/src/cmath.cc deleted file mode 100644 index 7a7433a..0000000 --- a/contrib/libstdc++/src/cmath.cc +++ /dev/null @@ -1,47 +0,0 @@ -// Explicit instantiation file for -*- C++ -*- math library. - -// Copyright (C) 2001 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - - -// These are explicit instantiations of the behind-the-scenes internal -// helper functions used in the math routines of libstdc++. - - -#include - -namespace std -{ - // This function is only declared/used in the cheaders=c_std case. - template float - __cmath_power(float, unsigned int); - template double - __cmath_power(double, unsigned int); - template long double - __cmath_power(long double, unsigned int); - -} // namespace std diff --git a/contrib/libstdc++/src/fstream.cc b/contrib/libstdc++/src/fstream.cc deleted file mode 100644 index 2a099d6..0000000 --- a/contrib/libstdc++/src/fstream.cc +++ /dev/null @@ -1,202 +0,0 @@ -// File based streams -*- C++ -*- - -// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003 -// Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -// -// ISO C++ 14882: 27.8 File-based streams -// - -#include - -namespace std -{ - template<> - basic_filebuf::int_type - basic_filebuf::_M_underflow_common(bool __bump) - { - int_type __ret = traits_type::eof(); - bool __testin = _M_mode & ios_base::in; - bool __testout = _M_mode & ios_base::out; - - if (__testin) - { - // Check for pback madness, and if so swich back to the - // normal buffers and jet outta here before expensive - // fileops happen... - if (_M_pback_init) - _M_pback_destroy(); - - if (_M_in_cur && _M_in_cur < _M_in_end) - { - __ret = traits_type::to_int_type(*_M_in_cur); - if (__bump) - _M_in_cur_move(1); - return __ret; - } - - // Sync internal and external buffers. - // NB: __testget -> __testput as _M_buf_unified here. - bool __testget = _M_in_cur && _M_in_beg < _M_in_cur; - bool __testinit = _M_is_indeterminate(); - if (__testget) - { - if (__testout) - _M_really_overflow(); - else if (_M_in_cur != _M_filepos) - _M_file.seekoff(_M_in_cur - _M_filepos, - ios_base::cur, ios_base::in); - } - - if (__testinit || __testget) - { - streamsize __elen = 0; - streamsize __ilen = 0; - __elen = _M_file.xsgetn(reinterpret_cast(_M_in_beg), - _M_buf_size); - __ilen = __elen; - - if (0 < __ilen) - { - _M_set_determinate(__ilen); - if (__testout) - _M_out_cur = _M_in_cur; - __ret = traits_type::to_int_type(*_M_in_cur); - if (__bump) - _M_in_cur_move(1); - else if (_M_buf_size == 1) - { - // If we are synced with stdio, we have to unget the - // character we just read so that the file pointer - // doesn't move. - _M_file.sys_ungetc(traits_type::to_int_type(*_M_in_cur)); - _M_set_indeterminate(); - } - } - } - } - _M_last_overflowed = false; - return __ret; - } - -#ifdef _GLIBCPP_USE_WCHAR_T - template<> - basic_filebuf::int_type - basic_filebuf::_M_underflow_common(bool __bump) - { - int_type __ret = traits_type::eof(); - bool __testin = _M_mode & ios_base::in; - bool __testout = _M_mode & ios_base::out; - - if (__testin) - { - // Check for pback madness, and if so swich back to the - // normal buffers and jet outta here before expensive - // fileops happen... - if (_M_pback_init) - _M_pback_destroy(); - - if (_M_in_cur && _M_in_cur < _M_in_end) - { - __ret = traits_type::to_int_type(*_M_in_cur); - if (__bump) - _M_in_cur_move(1); - return __ret; - } - - // Sync internal and external buffers. - // NB: __testget -> __testput as _M_buf_unified here. - bool __testget = _M_in_cur && _M_in_beg < _M_in_cur; - bool __testinit = _M_is_indeterminate(); - if (__testget) - { - if (__testout) - _M_really_overflow(); - else if (_M_in_cur != _M_filepos) - _M_file.seekoff(_M_in_cur - _M_filepos, - ios_base::cur, ios_base::in); - } - - if (__testinit || __testget) - { - const locale __loc = this->getloc(); - const __codecvt_type& __cvt = use_facet<__codecvt_type>(__loc); - - streamsize __elen = 0; - streamsize __ilen = 0; - if (__cvt.always_noconv()) - { - __elen = _M_file.xsgetn(reinterpret_cast(_M_in_beg), - _M_buf_size); - __ilen = __elen; - } - else - { - char* __buf = static_cast(__builtin_alloca(_M_buf_size)); - __elen = _M_file.xsgetn(__buf, _M_buf_size); - - const char* __eend; - char_type* __iend; - codecvt_base::result __r; - __r = __cvt.in(_M_state_cur, __buf, - __buf + __elen, __eend, _M_in_beg, - _M_in_beg + _M_buf_size, __iend); - if (__r == codecvt_base::ok) - __ilen = __iend - _M_in_beg; - else - { - // Unwind. - __ilen = 0; - _M_file.seekoff(-__elen, ios_base::cur, ios_base::in); - } - } - - if (0 < __ilen) - { - _M_set_determinate(__ilen); - if (__testout) - _M_out_cur = _M_in_cur; - __ret = traits_type::to_int_type(*_M_in_cur); - if (__bump) - _M_in_cur_move(1); - else if (_M_buf_size == 1) - { - // If we are synced with stdio, we have to unget the - // character we just read so that the file pointer - // doesn't move. - _M_file.sys_ungetc(traits_type::to_int_type(*_M_in_cur)); - _M_set_indeterminate(); - } - } - } - } - _M_last_overflowed = false; - return __ret; - } -#endif -} // namespace std diff --git a/contrib/libstdc++/src/globals.cc b/contrib/libstdc++/src/globals.cc deleted file mode 100644 index efbfdbe..0000000 --- a/contrib/libstdc++/src/globals.cc +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright (C) 2001, 2002 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -#include "bits/c++config.h" -#include "bits/gthr.h" -#include -#include -#include -#include -#include - -// On AIX, and perhaps other systems, library initialization order is -// not guaranteed. For example, the static initializers for the main -// program might run before the static initializers for this library. -// That means that we cannot rely on static initialization in the -// library; there is no guarantee that things will get initialized in -// time. This file contains definitions of all global variables that -// require initialization as arrays of characters. - -// Because declares the standard streams to be [io]stream -// types instead of say [io]fstream types, it is also necessary to -// allocate the actual file buffers in this file. -namespace __gnu_cxx -{ - using namespace std; - - typedef char fake_facet_name[sizeof(char*)] - __attribute__ ((aligned(__alignof__(char*)))); - fake_facet_name facet_name[6 + _GLIBCPP_NUM_CATEGORIES]; - - typedef char fake_locale_Impl[sizeof(locale::_Impl)] - __attribute__ ((aligned(__alignof__(locale::_Impl)))); - fake_locale_Impl c_locale_impl; - - - // NB: The asm directives renames these non-exported, namespace - // __gnu_cxx symbols into the mistakenly exported, namespace std - // symbols in GLIBCPP_3.2. - // The rename syntax is - // asm (".symver currentname,oldname@@GLIBCPP_3.2") - // At the same time, these new __gnu_cxx symbols are not exported. - // In the future, GLIBCXX_ABI > 5 should remove all uses of - // _GLIBCPP_ASM_SYMVER in this file. - typedef char fake_locale[sizeof(locale)] - __attribute__ ((aligned(__alignof__(locale)))); - fake_locale c_locale; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx8c_localeE, _ZSt8c_locale, GLIBCPP_3.2) - - // GLIBCXX_ABI > 5 will not need this symbol at all. - // It's here just as a placeholder, as the size of this exported - // object changed. The new symbol is not exported. - const int o = sizeof(locale::_Impl) - sizeof(char*[_GLIBCPP_NUM_CATEGORIES]); - typedef char fake_locale_Impl_compat[o] - __attribute__ ((aligned(__alignof__(o)))); - fake_locale_Impl_compat c_locale_impl_compat; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx20c_locale_impl_compatE, _ZSt13c_locale_impl, GLIBCPP_3.2) - - typedef char fake_facet_vec[sizeof(locale::facet*)] - __attribute__ ((aligned(__alignof__(locale::facet*)))); - fake_facet_vec facet_vec[_GLIBCPP_NUM_FACETS]; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9facet_vecE, _ZSt9facet_vec, GLIBCPP_3.2) - - // To support combined facets and caches in facet array - typedef char fake_facet_cache_vec[sizeof(locale::facet*)] - __attribute__ ((aligned(__alignof__(locale::facet*)))); - fake_facet_cache_vec facet_cache_vec[2 * _GLIBCPP_NUM_FACETS]; - - typedef char fake_ctype_c[sizeof(std::ctype)] - __attribute__ ((aligned(__alignof__(std::ctype)))); - fake_ctype_c ctype_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx7ctype_cE, _ZSt7ctype_c, GLIBCPP_3.2) - - typedef char fake_collate_c[sizeof(std::collate)] - __attribute__ ((aligned(__alignof__(std::collate)))); - fake_collate_c collate_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9collate_cE, _ZSt9collate_c, GLIBCPP_3.2) - - typedef char fake_numpunct_c[sizeof(numpunct)] - __attribute__ ((aligned(__alignof__(numpunct)))); - fake_numpunct_c numpunct_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10numpunct_cE, _ZSt10numpunct_c, GLIBCPP_3.2) - - typedef char fake_num_get_c[sizeof(num_get)] - __attribute__ ((aligned(__alignof__(num_get)))); - fake_num_get_c num_get_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9num_get_cE, _ZSt9num_get_c, GLIBCPP_3.2) - - typedef char fake_num_put_c[sizeof(num_put)] - __attribute__ ((aligned(__alignof__(num_put)))); - fake_num_put_c num_put_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9num_put_cE, _ZSt9num_put_c, GLIBCPP_3.2) - - typedef char fake_codecvt_c[sizeof(codecvt)] - __attribute__ ((aligned(__alignof__(codecvt)))); - fake_codecvt_c codecvt_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9codecvt_cE, _ZSt9codecvt_c, GLIBCPP_3.2) - - typedef char fake_moneypunct_c[sizeof(moneypunct)] - __attribute__ ((aligned(__alignof__(moneypunct)))); - fake_moneypunct_c moneypunct_tc; - fake_moneypunct_c moneypunct_fc; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx13moneypunct_tcE,\ - _ZSt13moneypunct_tc, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx13moneypunct_fcE,\ - _ZSt13moneypunct_fc, GLIBCPP_3.2) - - typedef char fake_money_get_c[sizeof(money_get)] - __attribute__ ((aligned(__alignof__(money_get)))); - fake_money_get_c money_get_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11money_get_cE, _ZSt11money_get_c, GLIBCPP_3.2) - - typedef char fake_money_put_c[sizeof(money_put)] - __attribute__ ((aligned(__alignof__(money_put)))); - fake_money_put_c money_put_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11money_put_cE, _ZSt11money_put_c, GLIBCPP_3.2) - - typedef char fake_timepunct_c[sizeof(__timepunct)] - __attribute__ ((aligned(__alignof__(__timepunct)))); - fake_timepunct_c timepunct_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11timepunct_cE, _ZSt11timepunct_c, GLIBCPP_3.2) - - typedef char fake_time_get_c[sizeof(time_get)] - __attribute__ ((aligned(__alignof__(time_get)))); - fake_time_get_c time_get_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10time_get_cE, _ZSt10time_get_c, GLIBCPP_3.2) - - typedef char fake_time_put_c[sizeof(time_put)] - __attribute__ ((aligned(__alignof__(time_put)))); - fake_time_put_c time_put_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10time_put_cE, _ZSt10time_put_c, GLIBCPP_3.2) - - typedef char fake_messages_c[sizeof(messages)] - __attribute__ ((aligned(__alignof__(messages)))); - fake_messages_c messages_c; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10messages_cE, _ZSt10messages_c, GLIBCPP_3.2) - -#ifdef _GLIBCPP_USE_WCHAR_T - typedef char fake_wtype_w[sizeof(std::ctype)] - __attribute__ ((aligned(__alignof__(std::ctype)))); - fake_wtype_w ctype_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx7ctype_wE, _ZSt7ctype_w, GLIBCPP_3.2) - - typedef char fake_wollate_w[sizeof(std::collate)] - __attribute__ ((aligned(__alignof__(std::collate)))); - fake_wollate_w collate_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9collate_wE, _ZSt9collate_w, GLIBCPP_3.2) - - typedef char fake_numpunct_w[sizeof(numpunct)] - __attribute__ ((aligned(__alignof__(numpunct)))); - fake_numpunct_w numpunct_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10numpunct_wE, _ZSt10numpunct_w, GLIBCPP_3.2) - - typedef char fake_num_get_w[sizeof(num_get)] - __attribute__ ((aligned(__alignof__(num_get)))); - fake_num_get_w num_get_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9num_get_wE, _ZSt9num_get_w, GLIBCPP_3.2) - - typedef char fake_num_put_w[sizeof(num_put)] - __attribute__ ((aligned(__alignof__(num_put)))); - fake_num_put_w num_put_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9num_put_wE, _ZSt9num_put_w, GLIBCPP_3.2) - - typedef char fake_wodecvt_w[sizeof(codecvt)] - __attribute__ ((aligned(__alignof__(codecvt)))); - fake_wodecvt_w codecvt_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9codecvt_wE, _ZSt9codecvt_w, GLIBCPP_3.2) - - typedef char fake_moneypunct_w[sizeof(moneypunct)] - __attribute__ ((aligned(__alignof__(moneypunct)))); - fake_moneypunct_w moneypunct_tw; - fake_moneypunct_w moneypunct_fw; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx13moneypunct_twE,\ - _ZSt13moneypunct_tw, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx13moneypunct_fwE,\ - _ZSt13moneypunct_fw, GLIBCPP_3.2) - - typedef char fake_money_get_w[sizeof(money_get)] - __attribute__ ((aligned(__alignof__(money_get)))); - fake_money_get_w money_get_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11money_get_wE, _ZSt11money_get_w, GLIBCPP_3.2) - - typedef char fake_money_put_w[sizeof(money_put)] - __attribute__ ((aligned(__alignof__(money_put)))); - fake_money_put_w money_put_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11money_put_wE, _ZSt11money_put_w, GLIBCPP_3.2) - - typedef char fake_timepunct_w[sizeof(__timepunct)] - __attribute__ ((aligned(__alignof__(__timepunct)))); - fake_timepunct_w timepunct_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx11timepunct_wE, _ZSt11timepunct_w, GLIBCPP_3.2) - - typedef char fake_time_get_w[sizeof(time_get)] - __attribute__ ((aligned(__alignof__(time_get)))); - fake_time_get_w time_get_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10time_get_wE, _ZSt10time_get_w, GLIBCPP_3.2) - - typedef char fake_time_put_w[sizeof(time_put)] - __attribute__ ((aligned(__alignof__(time_put)))); - fake_time_put_w time_put_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10time_put_wE, _ZSt10time_put_w, GLIBCPP_3.2) - - typedef char fake_messages_w[sizeof(messages)] - __attribute__ ((aligned(__alignof__(messages)))); - fake_messages_w messages_w; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx10messages_wE, _ZSt10messages_w, GLIBCPP_3.2) -#endif - - // Storage for static C locale caches - typedef char fake_locale_cache_np_c[sizeof(std::__locale_cache >)] - __attribute__ ((aligned(__alignof__(std::__locale_cache >)))); - fake_locale_cache_np_c locale_cache_np_c; - -#ifdef _GLIBCPP_USE_WCHAR_T - typedef char fake_locale_cache_np_w[sizeof(std::__locale_cache >)] - __attribute__ ((aligned(__alignof__(std::__locale_cache >)))); - fake_locale_cache_np_w locale_cache_np_w; -#endif - - typedef char fake_filebuf[sizeof(stdio_filebuf)] - __attribute__ ((aligned(__alignof__(stdio_filebuf)))); - fake_filebuf buf_cout; - fake_filebuf buf_cin; - fake_filebuf buf_cerr; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx8buf_coutE, _ZSt8buf_cout, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx7buf_cinE, _ZSt7buf_cin, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx8buf_cerrE, _ZSt8buf_cerr, GLIBCPP_3.2) - -#ifdef _GLIBCPP_USE_WCHAR_T - typedef char fake_wfilebuf[sizeof(stdio_filebuf)] - __attribute__ ((aligned(__alignof__(stdio_filebuf)))); - fake_wfilebuf buf_wcout; - fake_wfilebuf buf_wcin; - fake_wfilebuf buf_wcerr; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9buf_wcoutE, _ZSt9buf_wcout, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx8buf_wcinE, _ZSt8buf_wcin, GLIBCPP_3.2) - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx9buf_wcerrE, _ZSt9buf_wcerr, GLIBCPP_3.2) -#endif - - // Globals for once-only runtime initialization of mutex objects. This - // allows static initialization of these objects on systems that need a - // function call to initialize a mutex. For example, see stl_threads.h. -#ifdef __GTHREAD_MUTEX_INIT - // Need to provide explicit instantiations of static data for - // systems with broken weak linkage support. - template __gthread_mutex_t _Swap_lock_struct<0>::_S_swap_lock; -#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION) - __gthread_once_t _GLIBCPP_once = __GTHREAD_ONCE_INIT; - __gthread_mutex_t _GLIBCPP_mutex; - __gthread_mutex_t *_GLIBCPP_mutex_address; - - // Once-only initializer function for _GLIBCPP_mutex. - void - _GLIBCPP_mutex_init () - { __GTHREAD_MUTEX_INIT_FUNCTION (&_GLIBCPP_mutex); } - - // Once-only initializer function for _GLIBCPP_mutex_address. - void - _GLIBCPP_mutex_address_init () - { __GTHREAD_MUTEX_INIT_FUNCTION (_GLIBCPP_mutex_address); } -#endif - - // GLIBCXX_ABI. - struct __compat - { - static const char _S_atoms[]; - }; - const char __compat::_S_atoms[] = "0123456789eEabcdfABCDF"; - _GLIBCPP_ASM_SYMVER(_ZN9__gnu_cxx8__compat8_S_atomsE, _ZNSt10__num_base8_S_atomsE, GLIBCPP_3.2) -} // namespace __gnu_cxx - -namespace std -{ - // Standard stream objects. - typedef char fake_istream[sizeof(istream)] - __attribute__ ((aligned(__alignof__(istream)))); - typedef char fake_ostream[sizeof(ostream)] - __attribute__ ((aligned(__alignof__(ostream)))); - fake_istream cin; - fake_ostream cout; - fake_ostream cerr; - fake_ostream clog; - -#ifdef _GLIBCPP_USE_WCHAR_T - typedef char fake_wistream[sizeof(wistream)] - __attribute__ ((aligned(__alignof__(wistream)))); - typedef char fake_wostream[sizeof(wostream)] - __attribute__ ((aligned(__alignof__(wostream)))); - fake_wistream wcin; - fake_wostream wcout; - fake_wostream wcerr; - fake_wostream wclog; -#endif -} // namespace std diff --git a/contrib/libstdc++/src/stl-inst.cc b/contrib/libstdc++/src/stl-inst.cc deleted file mode 100644 index d80a718..0000000 --- a/contrib/libstdc++/src/stl-inst.cc +++ /dev/null @@ -1,43 +0,0 @@ -// Explicit instantiation file. - -// Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -// -// ISO C++ 14882: -// - -#include -#include - -namespace std -{ - template class allocator; - template class allocator; - - template class __default_alloc_template; -} // namespace std diff --git a/contrib/libstdc++/src/vterminate.cc b/contrib/libstdc++/src/vterminate.cc deleted file mode 100644 index 26e09d1..0000000 --- a/contrib/libstdc++/src/vterminate.cc +++ /dev/null @@ -1,82 +0,0 @@ -// Verbose terminate_handler -*- C++ -*- - -// Copyright (C) 2001, 2002 Free Software Foundation -// -// This file is part of the GNU ISO C++ Library. This library is free -// software; you can redistribute it and/or modify it under the -// terms of the GNU General Public License as published by the -// Free Software Foundation; either version 2, or (at your option) -// any later version. - -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License along -// with this library; see the file COPYING. If not, write to the Free -// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, -// USA. - -// As a special exception, you may use this file as part of a free software -// library without restriction. Specifically, if other files instantiate -// templates or use macros or inline functions from this file, or you compile -// this file and link it with other files to produce an executable, this -// file does not by itself cause the resulting executable to be covered by -// the GNU General Public License. This exception does not however -// invalidate any other reasons why the executable file might be covered by -// the GNU General Public License. - -#include -#include -#include -#include -#include - -using namespace std; -using namespace abi; - -namespace __gnu_cxx -{ - /* A replacement for the standard terminate_handler which prints - more information about the terminating exception (if any) on - stderr. */ - void __verbose_terminate_handler() - { - // Make sure there was an exception; terminate is also called for an - // attempt to rethrow when there is no suitable exception. - type_info *t = __cxa_current_exception_type(); - if (t) - { - char const *name = t->name(); - // Note that "name" is the mangled name. - - { - int status = -1; - char *dem = 0; - - // Disabled until __cxa_demangle gets the runtime GPL exception. - dem = __cxa_demangle(name, 0, 0, &status); - - printf("terminate called after throwing a `%s'\n", - status == 0 ? dem : name); - - if (status == 0) - free(dem); - } - - // If the exception is derived from std::exception, we can give more - // information. - try { __throw_exception_again; } -#ifdef __EXCEPTIONS - catch (exception &exc) - { fprintf(stderr, " what(): %s\n", exc.what()); } -#endif - catch (...) { } - } - else - fprintf(stderr, "terminate called without an active exception\n"); - - abort(); - } -} // namespace __gnu_cxx -- cgit v1.1