1 // Copyright (C) 2001 Free Software Foundation, Inc.
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 2, or (at your option)
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.
14 // You should have received a copy of the GNU General Public License along
15 // with this library; see the file COPYING. If not, write to the Free
16 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
19 // As a special exception, you may use this file as part of a free software
20 // library without restriction. Specifically, if other files instantiate
21 // templates or use macros or inline functions from this file, or you compile
22 // this file and link it with other files to produce an executable, this
23 // file does not by itself cause the resulting executable to be covered by
24 // the GNU General Public License. This exception does not however
25 // invalidate any other reasons why the executable file might be covered by
26 // the GNU General Public License.
32 // On AIX, and perhaps other systems, library initialization order is
33 // not guaranteed. For example, the static initializers for the main
34 // program might run before the static initializers for this library.
35 // That means that we cannot rely on static initialization in the
36 // library; there is no guarantee that things will get initialized in
37 // time. This file contains definitions of all global variables that
38 // require initialization as arrays of characters.
40 // Because <iostream> declares the standard streams to be [io]stream
41 // types instead of say [io]fstream types, it is also necessary to
42 // allocate the actual file buffers in this file.
45 typedef char fake_istream[sizeof(istream)]
46 __attribute__ ((aligned(__alignof__(istream))));
47 typedef char fake_ostream[sizeof(ostream)]
48 __attribute__ ((aligned(__alignof__(ostream))));
54 typedef char fake_filebuf[sizeof(filebuf)]
55 __attribute__ ((aligned(__alignof__(filebuf))));
56 fake_filebuf buf_cout;
58 fake_filebuf buf_cerr;
60 #ifdef _GLIBCPP_USE_WCHAR_T
61 typedef char fake_wistream[sizeof(wistream)]
62 __attribute__ ((aligned(__alignof__(wistream))));
63 typedef char fake_wostream[sizeof(wostream)]
64 __attribute__ ((aligned(__alignof__(wostream))));
70 typedef char fake_wfilebuf[sizeof(wfilebuf)]
71 __attribute__ ((aligned(__alignof__(wfilebuf))));
72 fake_wfilebuf buf_wcout;
73 fake_wfilebuf buf_wcin;
74 fake_wfilebuf buf_wcerr;