diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-11 10:43:49 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-11 10:43:49 +0000 |
commit | aec2e7404e2ad652ae07bec4ce946028515e4c5a (patch) | |
tree | ebe902306e4a15ad31f2a8f37a87098265fa8a10 /libstdc++-v3/include/ext | |
parent | 5cf25aea09f4ad3b5c1d5a1202e13cca663056c2 (diff) | |
download | gcc-aec2e7404e2ad652ae07bec4ce946028515e4c5a.tar.gz |
2003-02-11 Paolo Carlini <pcarlini@unitus.it>
PR libstdc++/9320
* include/ext/stdio_filebuf.h
(stdio_filebuf(int, std::ios_base::openmode, bool, int_type),
stdio_filebuf(std::__c_file*, std::ios_base::openmode, int_type)):
Change to take a __size parameter of type size_t, not
of type (template parameter dependent) int_type.
* src/ios.cc (ios_base::Init::_S_ios_create): Change type of
size vars to size_t.
* testsuite/ext/stdio_filebuf.cc: Add.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62691 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/ext')
-rw-r--r-- | libstdc++-v3/include/ext/stdio_filebuf.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libstdc++-v3/include/ext/stdio_filebuf.h b/libstdc++-v3/include/ext/stdio_filebuf.h index 1fb40be2b49..c41256423b1 100644 --- a/libstdc++-v3/include/ext/stdio_filebuf.h +++ b/libstdc++-v3/include/ext/stdio_filebuf.h @@ -58,6 +58,7 @@ namespace __gnu_cxx typedef typename traits_type::int_type int_type; typedef typename traits_type::pos_type pos_type; typedef typename traits_type::off_type off_type; + typedef std::size_t size_t; protected: // Stack-based buffer for unbuffered input. @@ -75,7 +76,7 @@ namespace __gnu_cxx * file will be closed when the stdio_filebuf is closed/destroyed. */ stdio_filebuf(int __fd, std::ios_base::openmode __mode, bool __del, - int_type __size); + size_t __size); /** * @param f An open @c FILE*. @@ -88,7 +89,7 @@ namespace __gnu_cxx * stdio_filebuf is closed/destroyed. */ stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode, - int_type __size = static_cast<int_type>(BUFSIZ)); + size_t __size = static_cast<size_t>(BUFSIZ)); /** * Possibly closes the external data stream, in the case of the file @@ -117,7 +118,7 @@ namespace __gnu_cxx template<typename _CharT, typename _Traits> stdio_filebuf<_CharT, _Traits>:: stdio_filebuf(int __fd, std::ios_base::openmode __mode, bool __del, - int_type __size) + size_t __size) { this->_M_file.sys_open(__fd, __mode, __del); if (this->is_open()) @@ -142,7 +143,7 @@ namespace __gnu_cxx template<typename _CharT, typename _Traits> stdio_filebuf<_CharT, _Traits>:: stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode, - int_type __size) + size_t __size) { this->_M_file.sys_open(__f, __mode); if (this->is_open()) |