]>
Commit | Line | Data |
---|---|---|
b2dad0e3 BK |
1 | // underlying io library -*- C++ -*- |
2 | ||
c0a26060 | 3 | // Copyright (C) 2000, 2001 Free Software Foundation, Inc. |
b2dad0e3 BK |
4 | // |
5 | // This file is part of the GNU ISO C++ Library. This library is free | |
6 | // software; you can redistribute it and/or modify it under the | |
7 | // terms of the GNU General Public License as published by the | |
8 | // Free Software Foundation; either version 2, or (at your option) | |
9 | // any later version. | |
10 | ||
11 | // This library is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | ||
16 | // You should have received a copy of the GNU General Public License along | |
17 | // with this library; see the file COPYING. If not, write to the Free | |
18 | // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
19 | // USA. | |
20 | ||
21 | // As a special exception, you may use this file as part of a free software | |
22 | // library without restriction. Specifically, if other files instantiate | |
23 | // templates or use macros or inline functions from this file, or you compile | |
24 | // this file and link it with other files to produce an executable, this | |
25 | // file does not by itself cause the resulting executable to be covered by | |
26 | // the GNU General Public License. This exception does not however | |
27 | // invalidate any other reasons why the executable file might be covered by | |
28 | // the GNU General Public License. | |
29 | ||
30 | // c_io_libio.h - Defines for using the GNU libio | |
31 | ||
32 | #ifndef _CPP_IO_LIBIO_H | |
33 | #define _CPP_IO_LIBIO_H 1 | |
34 | ||
35 | #include <libio.h> | |
36 | ||
c0a26060 BK |
37 | namespace std |
38 | { | |
b2dad0e3 | 39 | // from fpos.h |
b2dad0e3 | 40 | typedef _IO_ssize_t streamsize; // Signed integral type |
b2dad0e3 | 41 | typedef _IO_ssize_t wstreamsize; |
f3b004d8 | 42 | |
b2dad0e3 | 43 | #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001 |
f3b004d8 BK |
44 | typedef _IO_off64_t streamoff; |
45 | typedef _IO_fpos64_t __c_streampos; | |
b2dad0e3 | 46 | #else |
f3b004d8 BK |
47 | typedef _IO_off_t streamoff; |
48 | typedef _IO_fpos_t __c_streampos; | |
b2dad0e3 BK |
49 | #endif |
50 | ||
8b8ab21c BK |
51 | #ifdef _GLIBCPP_USE_THREADS |
52 | typedef _IO_lock_t __c_lock; | |
53 | #else | |
54 | typedef int __c_lock; | |
55 | #endif | |
56 | ||
b2dad0e3 | 57 | // from basic_file.h |
b2dad0e3 | 58 | #define _GLIBCPP_BASIC_FILE_INHERITANCE 1 |
8901ac21 BK |
59 | typedef _IO_FILE __c_file_type; |
60 | typedef _IO_wide_data __c_wfile_type; | |
61 | ||
3c97056f | 62 | #ifdef _GLIBCPP_USE_WCHAR_T |
0517cb99 | 63 | extern "C" _IO_codecvt __c_libio_codecvt; |
9717c75c | 64 | #endif |
b2dad0e3 BK |
65 | |
66 | // from ios_base.h | |
67 | struct __ios_flags | |
0517cb99 BK |
68 | { |
69 | typedef short __int_type; | |
70 | ||
71 | static const __int_type _S_boolalpha = _IO_BAD_SEEN; | |
72 | static const __int_type _S_dec = _IO_DEC; | |
73 | static const __int_type _S_fixed = _IO_FIXED; | |
74 | static const __int_type _S_hex = _IO_HEX; | |
75 | static const __int_type _S_internal = _IO_INTERNAL; | |
76 | static const __int_type _S_left = _IO_LEFT; | |
77 | static const __int_type _S_oct = _IO_OCT; | |
78 | static const __int_type _S_right = _IO_RIGHT; | |
79 | static const __int_type _S_scientific = _IO_SCIENTIFIC; | |
80 | static const __int_type _S_showbase = _IO_SHOWBASE; | |
81 | static const __int_type _S_showpoint = _IO_SHOWPOINT; | |
82 | static const __int_type _S_showpos = _IO_SHOWPOS; | |
83 | static const __int_type _S_skipws = _IO_SKIPWS; | |
84 | static const __int_type _S_unitbuf = _IO_UNITBUF; | |
85 | static const __int_type _S_uppercase = _IO_UPPERCASE; | |
86 | static const __int_type _S_adjustfield = _IO_LEFT | _IO_RIGHT | |
87 | | _IO_INTERNAL; | |
88 | static const __int_type _S_basefield = _IO_DEC | _IO_OCT | _IO_HEX; | |
89 | static const __int_type _S_floatfield = _IO_SCIENTIFIC | _IO_FIXED; | |
b2dad0e3 BK |
90 | |
91 | // 27.4.2.1.3 Type ios_base::iostate | |
0517cb99 BK |
92 | static const __int_type _S_badbit = _IO_BAD_SEEN; |
93 | static const __int_type _S_eofbit = _IO_EOF_SEEN; | |
94 | static const __int_type _S_failbit = _IO_ERR_SEEN; | |
b2dad0e3 BK |
95 | |
96 | // 27.4.2.1.4 Type openmode | |
0517cb99 BK |
97 | static const __int_type _S_app = _IOS_APPEND; |
98 | static const __int_type _S_ate = _IOS_ATEND; | |
99 | static const __int_type _S_bin = _IOS_BIN; | |
100 | static const __int_type _S_in = _IOS_INPUT; | |
101 | static const __int_type _S_out = _IOS_OUTPUT; | |
102 | static const __int_type _S_trunc = _IOS_TRUNC; | |
b2dad0e3 | 103 | }; |
b2dad0e3 BK |
104 | } |
105 | ||
106 | #endif // _CPP_IO_LIBIO_H | |
107 | ||
108 | ||
109 | ||
110 | ||
111 | ||
112 | ||
113 | ||
114 |