00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 #include "bits/c++config.h"
00029 #include "bits/gthr.h"
00030 #include <fstream>
00031 #include <istream>
00032 #include <ostream>
00033 #include <locale>
00034 #include <ext/stdio_filebuf.h>
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 
00044 
00045 
00046 
00047 namespace std 
00048 {
00049   
00050   typedef char fake_locale[sizeof(locale)]
00051   __attribute__ ((aligned(__alignof__(locale))));
00052   fake_locale c_locale;
00053 
00054   typedef char fake_locale_Impl[sizeof(locale::_Impl)]
00055   __attribute__ ((aligned(__alignof__(locale::_Impl))));
00056   fake_locale_Impl c_locale_impl;
00057   
00058   typedef char fake_facet_vec[sizeof(locale::facet*)]
00059   __attribute__ ((aligned(__alignof__(locale::facet*))));
00060   fake_facet_vec facet_vec[_GLIBCPP_NUM_FACETS];
00061 
00062   typedef char fake_ctype_c[sizeof(std::ctype<char>)]
00063   __attribute__ ((aligned(__alignof__(std::ctype<char>))));
00064   fake_ctype_c ctype_c;
00065 
00066   typedef char fake_collate_c[sizeof(std::collate<char>)]
00067   __attribute__ ((aligned(__alignof__(std::collate<char>))));
00068   fake_collate_c collate_c;
00069 
00070   typedef char fake_numpunct_c[sizeof(numpunct<char>)]
00071   __attribute__ ((aligned(__alignof__(numpunct<char>))));
00072   fake_numpunct_c numpunct_c;
00073 
00074   typedef char fake_num_get_c[sizeof(num_get<char>)]
00075   __attribute__ ((aligned(__alignof__(num_get<char>))));
00076   fake_num_get_c num_get_c;
00077 
00078   typedef char fake_num_put_c[sizeof(num_put<char>)]
00079   __attribute__ ((aligned(__alignof__(num_put<char>))));
00080   fake_num_put_c num_put_c;
00081 
00082   typedef char fake_codecvt_c[sizeof(codecvt<char, char, mbstate_t>)]
00083   __attribute__ ((aligned(__alignof__(codecvt<char, char, mbstate_t>))));
00084   fake_codecvt_c codecvt_c;
00085 
00086   typedef char fake_moneypunct_c[sizeof(moneypunct<char, true>)]
00087   __attribute__ ((aligned(__alignof__(moneypunct<char, true>))));
00088   fake_moneypunct_c moneypunct_tc;
00089   fake_moneypunct_c moneypunct_fc;
00090 
00091   typedef char fake_money_get_c[sizeof(money_get<char>)]
00092   __attribute__ ((aligned(__alignof__(money_get<char>))));
00093   fake_money_get_c money_get_c;
00094   
00095   typedef char fake_money_put_c[sizeof(money_put<char>)]
00096   __attribute__ ((aligned(__alignof__(money_put<char>))));
00097   fake_money_put_c money_put_c;
00098 
00099   typedef char fake_timepunct_c[sizeof(__timepunct<char>)]
00100   __attribute__ ((aligned(__alignof__(__timepunct<char>))));
00101   fake_timepunct_c timepunct_c;
00102 
00103   typedef char fake_time_get_c[sizeof(time_get<char>)]
00104   __attribute__ ((aligned(__alignof__(time_get<char>))));
00105   fake_time_get_c time_get_c;
00106 
00107   typedef char fake_time_put_c[sizeof(time_put<char>)]
00108   __attribute__ ((aligned(__alignof__(time_put<char>))));
00109   fake_time_put_c time_put_c;
00110 
00111   typedef char fake_messages_c[sizeof(messages<char>)]
00112   __attribute__ ((aligned(__alignof__(messages<char>))));
00113   fake_messages_c messages_c;
00114 
00115 #ifdef  _GLIBCPP_USE_WCHAR_T
00116   typedef char fake_wtype_w[sizeof(std::ctype<wchar_t>)]
00117   __attribute__ ((aligned(__alignof__(std::ctype<wchar_t>))));
00118   fake_wtype_w ctype_w;
00119 
00120   typedef char fake_wollate_w[sizeof(std::collate<wchar_t>)]
00121   __attribute__ ((aligned(__alignof__(std::collate<wchar_t>))));
00122   fake_wollate_w collate_w;
00123 
00124   typedef char fake_numpunct_w[sizeof(numpunct<wchar_t>)]
00125   __attribute__ ((aligned(__alignof__(numpunct<wchar_t>))));
00126   fake_numpunct_w numpunct_w;
00127 
00128   typedef char fake_num_get_w[sizeof(num_get<wchar_t>)]
00129   __attribute__ ((aligned(__alignof__(num_get<wchar_t>))));
00130   fake_num_get_w num_get_w;
00131 
00132   typedef char fake_num_put_w[sizeof(num_put<wchar_t>)]
00133   __attribute__ ((aligned(__alignof__(num_put<wchar_t>))));
00134   fake_num_put_w num_put_w;
00135 
00136   typedef char fake_wodecvt_w[sizeof(codecvt<wchar_t, char, mbstate_t>)]
00137   __attribute__ ((aligned(__alignof__(codecvt<wchar_t, char, mbstate_t>))));
00138   fake_wodecvt_w codecvt_w;
00139 
00140   typedef char fake_moneypunct_w[sizeof(moneypunct<wchar_t, true>)]
00141   __attribute__ ((aligned(__alignof__(moneypunct<wchar_t, true>))));
00142   fake_moneypunct_w moneypunct_tw;
00143   fake_moneypunct_w moneypunct_fw;
00144 
00145   typedef char fake_money_get_w[sizeof(money_get<wchar_t>)]
00146   __attribute__ ((aligned(__alignof__(money_get<wchar_t>))));
00147   fake_money_get_w money_get_w;
00148   
00149   typedef char fake_money_put_w[sizeof(money_put<wchar_t>)]
00150   __attribute__ ((aligned(__alignof__(money_put<wchar_t>))));
00151   fake_money_put_w money_put_w;
00152 
00153   typedef char fake_timepunct_w[sizeof(__timepunct<wchar_t>)]
00154   __attribute__ ((aligned(__alignof__(__timepunct<wchar_t>))));
00155   fake_timepunct_w timepunct_w;
00156 
00157   typedef char fake_time_get_w[sizeof(time_get<wchar_t>)]
00158   __attribute__ ((aligned(__alignof__(time_get<wchar_t>))));
00159   fake_time_get_w time_get_w;
00160 
00161   typedef char fake_time_put_w[sizeof(time_put<wchar_t>)]
00162   __attribute__ ((aligned(__alignof__(time_put<wchar_t>))));
00163   fake_time_put_w time_put_w;
00164 
00165   typedef char fake_messages_w[sizeof(messages<wchar_t>)]
00166   __attribute__ ((aligned(__alignof__(messages<wchar_t>))));
00167   fake_messages_w messages_w;
00168 #endif
00169 
00170   
00171   typedef char fake_istream[sizeof(istream)]
00172   __attribute__ ((aligned(__alignof__(istream))));
00173   typedef char fake_ostream[sizeof(ostream)] 
00174   __attribute__ ((aligned(__alignof__(ostream))));
00175   fake_istream cin;
00176   fake_ostream cout;
00177   fake_ostream cerr;
00178   fake_ostream clog;
00179 
00180   typedef char fake_filebuf[sizeof(__gnu_cxx::stdio_filebuf<char>)]
00181   __attribute__ ((aligned(__alignof__(__gnu_cxx::stdio_filebuf<char>))));
00182   fake_filebuf buf_cout;
00183   fake_filebuf buf_cin;
00184   fake_filebuf buf_cerr;
00185 
00186 #ifdef _GLIBCPP_USE_WCHAR_T
00187   typedef char fake_wistream[sizeof(wistream)] 
00188   __attribute__ ((aligned(__alignof__(wistream))));
00189   typedef char fake_wostream[sizeof(wostream)] 
00190   __attribute__ ((aligned(__alignof__(wostream))));
00191   fake_wistream wcin;
00192   fake_wostream wcout;
00193   fake_wostream wcerr;
00194   fake_wostream wclog;
00195 
00196   typedef char fake_wfilebuf[sizeof(__gnu_cxx::stdio_filebuf<wchar_t>)]
00197   __attribute__ ((aligned(__alignof__(__gnu_cxx::stdio_filebuf<wchar_t>))));
00198   fake_wfilebuf buf_wcout;
00199   fake_wfilebuf buf_wcin;
00200   fake_wfilebuf buf_wcerr;
00201 #endif
00202 
00203 
00204   
00205   
00206   
00207 #ifdef __GTHREAD_MUTEX_INIT
00208   
00209   
00210   template __gthread_mutex_t _Swap_lock_struct<0>::_S_swap_lock;
00211 #elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
00212   __gthread_once_t _GLIBCPP_once = __GTHREAD_ONCE_INIT;
00213   __gthread_mutex_t _GLIBCPP_mutex;
00214   __gthread_mutex_t *_GLIBCPP_mutex_address;
00215   
00216   
00217   void
00218   _GLIBCPP_mutex_init ()
00219   { __GTHREAD_MUTEX_INIT_FUNCTION (&_GLIBCPP_mutex); }
00220 
00221   
00222   void
00223   _GLIBCPP_mutex_address_init ()
00224   { __GTHREAD_MUTEX_INIT_FUNCTION (_GLIBCPP_mutex_address); }
00225 #endif
00226 }