00001 // Copyright (C) 2001 Free Software Foundation, Inc.
00002 //
00003 // This file is part of the GNU ISO C++ Library. This library is free
00004 // software; you can redistribute it and/or modify it under the
00005 // terms of the GNU General Public License as published by the
00006 // Free Software Foundation; either version 2, or (at your option)
00007 // any later version.
00008
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00012 // GNU General Public License for more details.
00013
00014 // You should have received a copy of the GNU General Public License along
00015 // with this library; see the file COPYING. If not, write to the Free
00016 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00017 // USA.
00018
00019 // As a special exception, you may use this file as part of a free software
00020 // library without restriction. Specifically, if other files instantiate
00021 // templates or use macros or inline functions from this file, or you compile
00022 // this file and link it with other files to produce an executable, this
00023 // file does not by itself cause the resulting executable to be covered by
00024 // the GNU General Public License. This exception does not however
00025 // invalidate any other reasons why the executable file might be covered by
00026 // the GNU General Public License.
00027
00028 // On AIX, and perhaps other systems, library initialization order
00029 // is not guaranteed. For example, the static initializers for the
00030 // main program might run before the static initializers for this
00031 // library. That means that we cannot rely on static initialization in
00032 // the library; there is no guarantee that things will get initialized
00033 // in time. This file contains definitions of all global variables
00034 // that require initialization as arrays of characters.
00035
00036 #include <istream>
00037 #include <ostream>
00038
00039 namespace std {
00040 typedef char fake_istream[sizeof (istream)]
00041 __attribute__ ((aligned (__alignof__ (istream))));
00042 typedef char fake_ostream[sizeof (ostream)]
00043 __attribute__ ((aligned (__alignof__ (ostream))));
00044
00045 fake_istream cin;
00046 fake_ostream cout;
00047 fake_ostream cerr;
00048 fake_ostream clog;
00049
00050 #ifdef _GLIBCPP_USE_WCHAR_T
00051 typedef char fake_wistream[sizeof (wistream)]
00052 __attribute__ ((aligned (__alignof__ (wistream))));
00053 typedef char fake_wostream[sizeof (wostream)]
00054 __attribute__ ((aligned (__alignof__ (wostream))));
00055
00056 fake_wistream wcin;
00057 fake_wostream wcout;
00058 fake_wostream wcerr;
00059 fake_wostream wclog;
00060 #endif
00061 }
1.2.6 written by Dimitri van Heesch,
© 1997-2001