[multiple changes]
2000-08-09 Benjamin Kosnik <bkoz@purist.soma.redhat.com> Preliminary wchar_t implementation, with trivial encodings. * docs/configopts.html: Add bits about canonical configure option checking. * testsuite/27_io/iostream_objects.cc: Replace this file (which has newly-declared-illegal mixing of wide/narrow stdstreams) with... * testsuite/27_io/narrow_stream_objects.cc: New file. * testsuite/27_io/wide_stream_objects.cc: New file. * bits/fstream.tcc (underflow): Temporarily hack a solution together that writes from the external file to the internal buffers. This removes codecvt from the loop, and is incorrect. (_M_really_overflow): Same here. * testsuite/21_strings/inserters_extractors.cc (test05): Tweaks. 2000-08-08 Benjamin Kosnik <bkoz@cygnus.com> Ulrich Drepper <drepper@cygnus.com> * config/c_io_libio.h: Tweak. * config/c_io_libio_codecvt.c: New file. * libio/Makefile.am: Add c_codecvt.c. * libio/Makefile.in: Regenerate. * libio/genops.c (_IO_unbuffer_write): Don't call _IO_SETBUF if the stream is not orientated. * acinclude.m4: Add config/c_io_libio_codecvt.c dummy file, until encoding gets fleshed out. * bits/basic_file.h: Add specialization declarations. * config/c_io_libio.cc: Add specializations for pbackfail, uflow. * config/c_io_libio.h: Add __c_wfile_type. * bits/basic_file.h: Add _M_wfile. * config/c_io_libio.cc (__basic_file<char>): Initialize the streams without setting the orientation of the underlying FILE to either wide or narrow. (__basic_file<wchar_t>)): Enable tricky wchar_t io bits. From-SVN: r35584
This commit is contained in:
parent
5c61484936
commit
8901ac210e
16 changed files with 1238 additions and 987 deletions
|
@ -1,3 +1,45 @@
|
|||
2000-08-09 Benjamin Kosnik <bkoz@purist.soma.redhat.com>
|
||||
|
||||
Preliminary wchar_t implementation, with trivial encodings.
|
||||
* docs/configopts.html: Add bits about canonical configure option
|
||||
checking.
|
||||
|
||||
* testsuite/27_io/iostream_objects.cc: Replace this file (which
|
||||
has newly-declared-illegal mixing of wide/narrow stdstreams) with...
|
||||
* testsuite/27_io/narrow_stream_objects.cc: New file.
|
||||
* testsuite/27_io/wide_stream_objects.cc: New file.
|
||||
|
||||
* bits/fstream.tcc (underflow): Temporarily hack a solution
|
||||
together that writes from the external file to the internal
|
||||
buffers. This removes codecvt from the loop, and is incorrect.
|
||||
(_M_really_overflow): Same here.
|
||||
|
||||
* testsuite/21_strings/inserters_extractors.cc (test05): Tweaks.
|
||||
|
||||
2000-08-08 Benjamin Kosnik <bkoz@cygnus.com>
|
||||
Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* config/c_io_libio.h: Tweak.
|
||||
* config/c_io_libio_codecvt.c: New file.
|
||||
* libio/Makefile.am: Add c_codecvt.c.
|
||||
* libio/Makefile.in: Regenerate.
|
||||
* libio/genops.c (_IO_unbuffer_write): Don't call _IO_SETBUF if the
|
||||
stream is not orientated.
|
||||
|
||||
* acinclude.m4: Add config/c_io_libio_codecvt.c dummy file, until
|
||||
encoding gets fleshed out.
|
||||
|
||||
* bits/basic_file.h: Add specialization declarations.
|
||||
* config/c_io_libio.cc: Add specializations for pbackfail, uflow.
|
||||
|
||||
* config/c_io_libio.h: Add __c_wfile_type.
|
||||
* bits/basic_file.h: Add _M_wfile.
|
||||
|
||||
* config/c_io_libio.cc (__basic_file<char>): Initialize the
|
||||
streams without setting the orientation of the underlying FILE to
|
||||
either wide or narrow.
|
||||
(__basic_file<wchar_t>)): Enable tricky wchar_t io bits.
|
||||
|
||||
2000-08-07 Felix Natter <fnatter@gmx.net>
|
||||
|
||||
* docs/17_intro/porting-howto.html: New version.
|
||||
|
|
|
@ -1268,6 +1268,12 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
|
|||
esac
|
||||
AC_LINK_FILES($CSTDIO_H, bits/c++io.h)
|
||||
AC_LINK_FILES($CSTDIO_CC, src/c++io.cc)
|
||||
|
||||
# 2000-08-04 bkoz hack
|
||||
CCODECVT_C=config/c_io_libio_codecvt.c
|
||||
AC_LINK_FILES($CCODECVT_C, libio/c_codecvt.c)
|
||||
# 2000-08-04 bkoz hack
|
||||
|
||||
AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
|
||||
AM_CONDITIONAL(GLIBCPP_NEED_XTRA_LIBIO, test "$need_xtra_libio" = yes)
|
||||
AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
|
||||
|
|
6
libstdc++-v3/aclocal.m4
vendored
6
libstdc++-v3/aclocal.m4
vendored
|
@ -1280,6 +1280,12 @@ AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
|
|||
esac
|
||||
AC_LINK_FILES($CSTDIO_H, bits/c++io.h)
|
||||
AC_LINK_FILES($CSTDIO_CC, src/c++io.cc)
|
||||
|
||||
# 2000-08-04 bkoz hack
|
||||
CCODECVT_C=config/c_io_libio_codecvt.c
|
||||
AC_LINK_FILES($CCODECVT_C, libio/c_codecvt.c)
|
||||
# 2000-08-04 bkoz hack
|
||||
|
||||
AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
|
||||
AM_CONDITIONAL(GLIBCPP_NEED_XTRA_LIBIO, test "$need_xtra_libio" = yes)
|
||||
AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
|
||||
|
|
|
@ -38,13 +38,82 @@
|
|||
#include <bits/std_ios.h>
|
||||
|
||||
namespace std {
|
||||
|
||||
|
||||
// Ulrich is going to make some detailed comment here, explaining
|
||||
// all this unpleasantness, providing detailed performance analysis
|
||||
// as to why we have to do all this lame vtable hacking instead of a
|
||||
// sane, function-based approach. This verbage will provide a clear
|
||||
// and detailed description of the whole object-layout,
|
||||
// vtable-swapping, sordid history of this hack.
|
||||
template<typename _CharT>
|
||||
struct __basic_file_base: public __c_file_type
|
||||
{
|
||||
virtual
|
||||
~__basic_file_base() { };
|
||||
|
||||
virtual int
|
||||
overflow(int __c = EOF) = 0;
|
||||
|
||||
virtual int
|
||||
underflow() = 0;
|
||||
|
||||
virtual int
|
||||
uflow() = 0;
|
||||
|
||||
virtual int
|
||||
pbackfail(int __c) = 0;
|
||||
|
||||
virtual streamsize
|
||||
xsputn(const _CharT* __s, streamsize __n) = 0;
|
||||
|
||||
virtual streamsize
|
||||
xsgetn(_CharT* __s, streamsize __n) = 0;
|
||||
|
||||
virtual streamoff
|
||||
seekoff(streamoff __off, ios_base::seekdir __way,
|
||||
ios_base::openmode __mode = ios_base::in | ios_base::out) = 0;
|
||||
|
||||
virtual streamoff
|
||||
seekpos(streamoff __pos,
|
||||
ios_base::openmode __mode = ios_base::in | ios_base::out) = 0;
|
||||
|
||||
virtual streambuf*
|
||||
setbuf(_CharT* __b, int __len) = 0;
|
||||
|
||||
virtual int
|
||||
sync() = 0;
|
||||
|
||||
virtual int
|
||||
doallocate() = 0;
|
||||
|
||||
virtual streamsize
|
||||
sys_read(_CharT* __s, streamsize __n) = 0;
|
||||
|
||||
virtual streamsize
|
||||
sys_write(const _CharT* __s, streamsize __n) = 0;
|
||||
|
||||
virtual streamoff
|
||||
sys_seek(streamoff __off, ios_base::seekdir __way) = 0;
|
||||
|
||||
virtual int
|
||||
sys_close() = 0;
|
||||
|
||||
virtual int
|
||||
sys_stat(void* __v) = 0;
|
||||
|
||||
virtual int
|
||||
showmanyc() = 0;
|
||||
|
||||
virtual void
|
||||
imbue(void* __v) = 0;
|
||||
};
|
||||
|
||||
// Some of these member functions are based on libio/filebuf.cc.
|
||||
// Also note that the order and number of virtual functions has to precisely
|
||||
// match the order and number in the _IO_jump_t struct defined in libioP.h.
|
||||
template<typename _CharT>
|
||||
#if _GLIBCPP_BASIC_FILE_INHERITANCE
|
||||
class __basic_file: public __c_file_type
|
||||
class __basic_file: public __basic_file_base<_CharT>
|
||||
#else
|
||||
class __basic_file
|
||||
#endif
|
||||
|
@ -53,6 +122,7 @@ namespace std {
|
|||
int _M_fileno;
|
||||
__c_file_type* _M_cfile;
|
||||
#endif
|
||||
__c_wfile_type _M_wfile;
|
||||
|
||||
public:
|
||||
__basic_file(__c_lock* __lock = 0);
|
||||
|
@ -104,13 +174,13 @@ namespace std {
|
|||
// ponters and associated data members correctly and manages it's
|
||||
// relation to the external byte sequence.
|
||||
virtual streamsize
|
||||
xsputn(const char* __s, streamsize __n);
|
||||
xsputn(const _CharT* __s, streamsize __n);
|
||||
|
||||
// A complex "read" function that sets all of __c_file_type's
|
||||
// ponters and associated data members correctly and manages it's
|
||||
// relation to the external byte sequence.
|
||||
virtual streamsize
|
||||
xsgetn(char* __s, streamsize __n);
|
||||
xsgetn(_CharT* __s, streamsize __n);
|
||||
|
||||
// A complex "seekoff" function that sets all of __c_file_type's
|
||||
// ponters and associated data members correctly and manages it's
|
||||
|
@ -139,13 +209,13 @@ namespace std {
|
|||
// does no mucking around with or setting of the pointers or flags
|
||||
// in __c_file_type.
|
||||
virtual streamsize
|
||||
sys_read(char* __s, streamsize __n);
|
||||
sys_read(_CharT* __s, streamsize __n);
|
||||
|
||||
// A simple write function for the external byte sequence, that
|
||||
// does no mucking around with or setting of the pointers or flags
|
||||
// in __c_file_type.
|
||||
virtual streamsize
|
||||
sys_write(const char* __s, streamsize __n);
|
||||
sys_write(const _CharT* __s, streamsize __n);
|
||||
|
||||
// A simple seek function for the external byte sequence, that
|
||||
// does no mucking around with or setting of the pointers or flags
|
||||
|
@ -178,6 +248,14 @@ namespace std {
|
|||
int
|
||||
__basic_file<char>::underflow();
|
||||
|
||||
template<>
|
||||
int
|
||||
__basic_file<char>::uflow();
|
||||
|
||||
template<>
|
||||
int
|
||||
__basic_file<char>::pbackfail(int __c);
|
||||
|
||||
template<>
|
||||
streamsize
|
||||
__basic_file<char>::xsputn(const char* __s, streamsize __n);
|
||||
|
@ -216,9 +294,17 @@ namespace std {
|
|||
int
|
||||
__basic_file<wchar_t>::underflow();
|
||||
|
||||
template<>
|
||||
int
|
||||
__basic_file<wchar_t>::uflow();
|
||||
|
||||
template<>
|
||||
int
|
||||
__basic_file<wchar_t>::pbackfail(int __c);
|
||||
|
||||
template<>
|
||||
streamsize
|
||||
__basic_file<wchar_t>::xsputn(const char* __s, streamsize __n);
|
||||
__basic_file<wchar_t>::xsputn(const wchar_t* __s, streamsize __n);
|
||||
|
||||
template<>
|
||||
streamoff
|
||||
|
|
|
@ -235,10 +235,30 @@ namespace std
|
|||
|
||||
if (__testinit || __testget)
|
||||
{
|
||||
#if 1
|
||||
streamsize __size = _M_file->xsgetn(_M_in_beg, _M_buf_size);
|
||||
if (0 < __size)
|
||||
{
|
||||
_M_set_determinate(__size);
|
||||
streamoff __p = _M_file->seekoff(0 - __size, ios_base::cur,
|
||||
ios_base::in);
|
||||
if (__p == -1)
|
||||
{
|
||||
// XXX Something is wrong, do error checking.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (__testout)
|
||||
_M_out_cur = _M_in_cur;
|
||||
__ret = traits_type::to_int_type(*_M_in_cur);
|
||||
}
|
||||
}
|
||||
#else
|
||||
// 2000-08-04 bkoz disable
|
||||
// Part one: (Re)fill external buf (_M_file->_IO_*) from
|
||||
// external byte sequence (whatever physical byte sink or
|
||||
// FILE actually is.)
|
||||
char __conv_buf[_M_buf_size];
|
||||
char_type __conv_buf[_M_buf_size];
|
||||
streamsize __size = _M_file->xsgetn(__conv_buf, _M_buf_size);
|
||||
|
||||
// Part two: (Re)fill internal buf contents from external buf.
|
||||
|
@ -278,7 +298,8 @@ namespace std
|
|||
// XXX Something is wrong, do error checking.
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
_M_last_overflowed = false;
|
||||
return __ret;
|
||||
|
@ -384,10 +405,29 @@ namespace std
|
|||
{
|
||||
int_type __ret = traits_type::eof();
|
||||
bool __testput = _M_out_cur && _M_out_beg < _M_out_end;
|
||||
bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
|
||||
|
||||
if (__testput)
|
||||
{
|
||||
bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
|
||||
#if 1
|
||||
int __plen = _M_out_end - _M_out_beg;
|
||||
streamsize __len = _M_file->xsputn(_M_out_beg, __plen);
|
||||
if (!__testeof)
|
||||
{
|
||||
char_type __pending = traits_type::to_char_type(__c);
|
||||
__len += _M_file->xsputn(&__pending, 1);
|
||||
++__plen;
|
||||
}
|
||||
traits_type::to_char_type(__c);
|
||||
// NB: Need this so that external byte sequence reflects
|
||||
// internal buffer.
|
||||
_M_file->sync();
|
||||
if (__len == __plen)
|
||||
{
|
||||
_M_set_indeterminate();
|
||||
__ret = traits_type::not_eof(__c);
|
||||
}
|
||||
#else
|
||||
// Part one: Allocate temporary conversion buffer on
|
||||
// stack. Convert internal buffer plus __c (ie,
|
||||
// "pending sequence") to temporary conversion buffer.
|
||||
|
@ -427,6 +467,7 @@ namespace std
|
|||
__ret = traits_type::not_eof(__c);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
_M_last_overflowed = true;
|
||||
return __ret;
|
||||
|
|
|
@ -36,7 +36,12 @@
|
|||
#include <fcntl.h> // Solaris needs for O_* macros
|
||||
|
||||
namespace std {
|
||||
|
||||
|
||||
// Need to instantiate base class here for type-info bits, etc
|
||||
template struct __basic_file_base<char>;
|
||||
template struct __basic_file_base<wchar_t>;
|
||||
|
||||
// Generic definitions for __basic_file
|
||||
template<typename _CharT>
|
||||
int
|
||||
__basic_file<_CharT>::get_fileno(void)
|
||||
|
@ -104,17 +109,17 @@ namespace std {
|
|||
int __rw_mode = _IO_NO_READS + _IO_NO_WRITES;
|
||||
|
||||
_M_open_mode(__mode, __p_mode, __rw_mode);
|
||||
// _IO_file_attach
|
||||
// sets _IO_DELETE_DONT_CLOSE
|
||||
// clears _IO_NO_READS + _IO_NO_WRITES
|
||||
if (_IO_file_attach(this, __fd) != NULL)
|
||||
|
||||
if (!_IO_file_is_open(this))
|
||||
{
|
||||
// Set flags appropriately for openmode...
|
||||
_fileno = __fd;
|
||||
_flags &= ~(_IO_NO_READS+_IO_NO_WRITES);
|
||||
_flags |= _IO_DELETE_DONT_CLOSE;
|
||||
_offset = _IO_pos_BAD;
|
||||
int __mask = _IO_NO_READS + _IO_NO_WRITES + _IO_IS_APPENDING;
|
||||
_IO_mask_flags(this, __rw_mode, __mask);
|
||||
}
|
||||
else
|
||||
_IO_un_link((_IO_FILE_plus*) this);
|
||||
|
||||
return __ret;
|
||||
}
|
||||
|
||||
|
@ -147,34 +152,22 @@ namespace std {
|
|||
{
|
||||
return _IO_file_close_it(this) ? static_cast<__basic_file*>(NULL) : this;
|
||||
}
|
||||
|
||||
// NB: Unused.
|
||||
template<typename _CharT>
|
||||
int
|
||||
__basic_file<_CharT>::uflow()
|
||||
{ return _IO_default_uflow(this); }
|
||||
|
||||
// NB: Unused.
|
||||
template<typename _CharT>
|
||||
int
|
||||
__basic_file<_CharT>::pbackfail(int __c)
|
||||
{ return _IO_default_pbackfail(this, __c); }
|
||||
|
||||
|
||||
template<typename _CharT>
|
||||
streamsize
|
||||
__basic_file<_CharT>::xsgetn(char* __s, streamsize __n)
|
||||
__basic_file<_CharT>::xsgetn(_CharT* __s, streamsize __n)
|
||||
{ return _IO_file_xsgetn(this, __s, __n); }
|
||||
|
||||
// NB: Unused.
|
||||
template<typename _CharT>
|
||||
streamsize
|
||||
__basic_file<_CharT>::sys_read(char* __s, streamsize __n)
|
||||
__basic_file<_CharT>::sys_read(_CharT* __s, streamsize __n)
|
||||
{ return _IO_file_read(this, __s, __n); }
|
||||
|
||||
// NB: Unused.
|
||||
template<typename _CharT>
|
||||
streamsize
|
||||
__basic_file<_CharT>::sys_write(const char* __s, streamsize __n)
|
||||
__basic_file<_CharT>::sys_write(const _CharT* __s, streamsize __n)
|
||||
{ return _IO_file_write(this, __s, __n); }
|
||||
|
||||
// NB: Unused.
|
||||
|
@ -211,7 +204,8 @@ namespace std {
|
|||
#ifdef _IO_MTSAFE_IO
|
||||
_lock = __lock;
|
||||
#endif
|
||||
_IO_no_init(this, 0 /* ??? */, -1, 0, 0);
|
||||
// Don't set the orientation of the stream when initializing.
|
||||
_IO_no_init(this, 0, 0, &_M_wfile, 0);
|
||||
_IO_JUMPS(this) = &_IO_file_jumps;
|
||||
_IO_file_init((_IO_FILE_plus*)this);
|
||||
}
|
||||
|
@ -226,6 +220,16 @@ namespace std {
|
|||
__basic_file<char>::underflow()
|
||||
{ return _IO_file_underflow(this); }
|
||||
|
||||
// NB: Unused.
|
||||
int
|
||||
__basic_file<char>::uflow()
|
||||
{ return _IO_default_uflow(this); }
|
||||
|
||||
// NB: Unused.
|
||||
int
|
||||
__basic_file<char>::pbackfail(int __c)
|
||||
{ return _IO_default_pbackfail(this, __c); }
|
||||
|
||||
streamsize
|
||||
__basic_file<char>::xsputn(const char* __s, streamsize __n)
|
||||
{ return _IO_file_xsputn(this, __s, __n); }
|
||||
|
@ -262,11 +266,32 @@ namespace std {
|
|||
#ifdef _IO_MTSAFE_IO
|
||||
_lock = __lock;
|
||||
#endif
|
||||
// bkoz this should be -1
|
||||
// _IO_no_init(this, 0 /* ??? */, 1, 0, 0);
|
||||
_IO_no_init(this, 0 /* ??? */, -1, 0, 0);
|
||||
_IO_JUMPS(this) = &_IO_file_jumps;
|
||||
// Don't set the orientation of the stream when initializing.
|
||||
_IO_no_init(this, 0, 0, &_M_wfile, &_IO_wfile_jumps);
|
||||
_IO_JUMPS(this) = &_IO_wfile_jumps;
|
||||
_IO_file_init((_IO_FILE_plus*)this);
|
||||
|
||||
// In addition, need to allocate the buffer...
|
||||
_IO_wdoallocbuf(this);
|
||||
// Setup initial positions for this buffer...
|
||||
// if (!(_flags & _IO_NO_READS))
|
||||
_IO_wsetg(this, _wide_data->_IO_buf_base, _wide_data->_IO_buf_base,
|
||||
_wide_data->_IO_buf_base);
|
||||
// if (!(_flags & _IO_NO_WRITES))
|
||||
_IO_wsetp(this, _wide_data->_IO_buf_base, _wide_data->_IO_buf_base);
|
||||
|
||||
// Setup codecvt bits...
|
||||
_wide_data->_codecvt = __c_libio_codecvt;
|
||||
|
||||
// Do the same for narrow bits...
|
||||
if (_IO_write_base == NULL)
|
||||
{
|
||||
_IO_doallocbuf(this);
|
||||
// if (!(_flags & _IO_NO_READS))
|
||||
_IO_setg(this, _IO_buf_base, _IO_buf_base, _IO_buf_base);
|
||||
// if (!(_flags & _IO_NO_WRITES))
|
||||
_IO_setp(this, _IO_buf_base, _IO_buf_base);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -277,8 +302,18 @@ namespace std {
|
|||
__basic_file<wchar_t>::underflow()
|
||||
{ return _IO_wfile_underflow(this); }
|
||||
|
||||
// NB: Unused.
|
||||
int
|
||||
__basic_file<wchar_t>::uflow()
|
||||
{ return _IO_wdefault_uflow(this); }
|
||||
|
||||
// NB: Unused.
|
||||
int
|
||||
__basic_file<wchar_t>::pbackfail(int __c)
|
||||
{ return _IO_wdefault_pbackfail(this, __c); }
|
||||
|
||||
streamsize
|
||||
__basic_file<wchar_t>::xsputn(const char* __s, streamsize __n)
|
||||
__basic_file<wchar_t>::xsputn(const wchar_t* __s, streamsize __n)
|
||||
{ return _IO_wfile_xsputn(this, __s, __n); }
|
||||
|
||||
streamoff
|
||||
|
|
|
@ -53,8 +53,11 @@ namespace std {
|
|||
typedef _IO_lock_t __c_lock;
|
||||
|
||||
// from basic_file.h
|
||||
typedef _IO_FILE __c_file_type;
|
||||
#define _GLIBCPP_BASIC_FILE_INHERITANCE 1
|
||||
typedef _IO_FILE __c_file_type;
|
||||
typedef _IO_wide_data __c_wfile_type;
|
||||
|
||||
extern "C" struct _IO_codecvt __c_libio_codecvt;
|
||||
|
||||
// from ios_base.h
|
||||
struct __ios_flags
|
||||
|
|
1846
libstdc++-v3/configure
vendored
1846
libstdc++-v3/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -9,7 +9,7 @@
|
|||
<TITLE>libstdc++-v3 configure options</TITLE>
|
||||
<LINK REL="home" HREF="http://sources.redhat.com/libstdc++/">
|
||||
<LINK REL=StyleSheet HREF="lib3styles.css">
|
||||
<!-- $Id: configopts.html,v 1.5 2000/07/07 21:13:27 pme Exp $ -->
|
||||
<!-- $Id: configopts.html,v 1.6 2000/07/11 21:45:07 pme Exp $ -->
|
||||
</HEAD>
|
||||
<BODY>
|
||||
|
||||
|
@ -33,6 +33,11 @@ options</A></H1>
|
|||
all have opposite forms as well</A>
|
||||
(enable/disable and with/without). The defaults are for the latest
|
||||
snapshot, 2.90.8.
|
||||
<P>
|
||||
The canonical way to find out the configure options that are
|
||||
available for a given set of libstdc++ sources is to go to the
|
||||
source directory and then type: <TT> ./config --help </TT>
|
||||
|
||||
<DL>
|
||||
<DT><TT>--enable-multilib </TT>[default]
|
||||
<DD><P>This is part of the generic multilib support for building
|
||||
|
@ -158,7 +163,7 @@ options</A></H1>
|
|||
|
||||
<HR>
|
||||
<P CLASS="fineprint"><EM>
|
||||
$Id: configopts.html,v 1.5 2000/07/07 21:13:27 pme Exp $
|
||||
$Id: configopts.html,v 1.6 2000/07/11 21:45:07 pme Exp $
|
||||
</EM></P>
|
||||
|
||||
|
||||
|
|
|
@ -1,14 +1,23 @@
|
|||
2000-07-12 benjamin kosnik <bkoz@haight.constant.com>
|
||||
2000-08-04 benjamin kosnik <bkoz@haight.constant.com>
|
||||
|
||||
* genops.c (_IO_unbuffer_write): Don't call _IO_SETBUF if the
|
||||
stream is not orientated.
|
||||
|
||||
2000-08-04 Benjamin Kosnik <bkoz@gnu.org>
|
||||
|
||||
* Makefile.am (LIBIO_SRCS): Add c_codecvt.c
|
||||
|
||||
2000-07-12 benjamin kosnik <bkoz@gnu.org>
|
||||
|
||||
* _G_config.h: Smoke less crack, don't define _G_HAVE_ST_BLKSIZE.
|
||||
|
||||
2000-04-25 Benjamin Kosnik <bkoz@haight.constant.com>
|
||||
2000-04-25 Benjamin Kosnik <bkoz@gnu.org>
|
||||
|
||||
* libio.h: Change decls for seekoff/seekpos.
|
||||
* Makefile.am: Add bits to not generate _G_config.h on linux.
|
||||
* gen-params: Remove sigset_t declaration.
|
||||
|
||||
2000-02-29 Benjamin Kosnik <bkoz@haight.constant.com>
|
||||
2000-02-29 Benjamin Kosnik <bkoz@gnu.org>
|
||||
|
||||
* Makefile.am (libio_headers): Strip out deadweight.
|
||||
|
||||
|
|
|
@ -71,21 +71,21 @@ libio_headers = \
|
|||
|
||||
if GLIBCPP_NEED_LIBIO
|
||||
LIBIO_SRCS = \
|
||||
filedoalloc.c genops.c fileops.c stdfiles.c cleanup.c
|
||||
filedoalloc.c genops.c fileops.c stdfiles.c cleanup.c c_codecvt.c
|
||||
else
|
||||
LIBIO_SRCS =
|
||||
endif
|
||||
|
||||
if GLIBCPP_NEED_WLIBIO
|
||||
LIBIO_WSRCS = \
|
||||
iofwide.c wfiledoalloc.c wfileops.c wgenops.c
|
||||
wfiledoalloc.c wfileops.c wgenops.c
|
||||
else
|
||||
LIBIO_WSRCS =
|
||||
endif
|
||||
|
||||
if GLIBCPP_NEED_XTRA_LIBIO
|
||||
LIBIO_XTRASRCS = \
|
||||
iofclose.c iofopen.c stdio.c
|
||||
iofwide.c iofclose.c iofopen.c stdio.c
|
||||
else
|
||||
LIBIO_XTRASRCS =
|
||||
endif
|
||||
|
|
|
@ -146,11 +146,11 @@ LINK = $(LIBTOOL) --mode=link "$(CCLD)" $(CFLAGS) $(AM_CFLAGS) $(LDFLAGS) -o $@
|
|||
|
||||
libio_headers = libio.h libioP.h iolibio.h
|
||||
|
||||
@GLIBCPP_NEED_LIBIO_TRUE@LIBIO_SRCS = filedoalloc.c genops.c fileops.c stdfiles.c cleanup.c
|
||||
@GLIBCPP_NEED_LIBIO_TRUE@LIBIO_SRCS = filedoalloc.c genops.c fileops.c stdfiles.c cleanup.c c_codecvt.c
|
||||
@GLIBCPP_NEED_LIBIO_FALSE@LIBIO_SRCS =
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@LIBIO_WSRCS = iofwide.c wfiledoalloc.c wfileops.c wgenops.c
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@LIBIO_WSRCS = wfiledoalloc.c wfileops.c wgenops.c
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@LIBIO_WSRCS =
|
||||
@GLIBCPP_NEED_XTRA_LIBIO_TRUE@LIBIO_XTRASRCS = iofclose.c iofopen.c stdio.c
|
||||
@GLIBCPP_NEED_XTRA_LIBIO_TRUE@LIBIO_XTRASRCS = iofwide.c iofclose.c iofopen.c stdio.c
|
||||
@GLIBCPP_NEED_XTRA_LIBIO_FALSE@LIBIO_XTRASRCS =
|
||||
|
||||
EXTRA_DIST = iostreamP.h
|
||||
|
@ -175,16 +175,16 @@ libio_la_LDFLAGS =
|
|||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@fileops.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdfiles.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@cleanup.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofwide.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@c_codecvt.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wfiledoalloc.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wfileops.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wgenops.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofwide.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofclose.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofopen.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdio.lo
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@libio_la_OBJECTS =
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@libio_la_OBJECTS = \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@iofwide.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wfiledoalloc.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wfileops.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wgenops.lo
|
||||
|
@ -193,8 +193,10 @@ libio_la_LDFLAGS =
|
|||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@genops.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@fileops.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@stdfiles.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@cleanup.lo
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@cleanup.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@c_codecvt.lo
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@libio_la_OBJECTS = \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofwide.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofclose.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofopen.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdio.lo
|
||||
|
@ -204,14 +206,16 @@ libio_la_LDFLAGS =
|
|||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@fileops.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdfiles.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@cleanup.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@c_codecvt.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofwide.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofclose.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofopen.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdio.lo
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@libio_la_OBJECTS = \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofwide.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wfiledoalloc.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wfileops.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@wgenops.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofwide.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofclose.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@iofopen.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@@GLIBCPP_NEED_XTRA_LIBIO_TRUE@stdio.lo
|
||||
|
@ -221,7 +225,7 @@ libio_la_LDFLAGS =
|
|||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@fileops.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@stdfiles.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@cleanup.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@iofwide.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@c_codecvt.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wfiledoalloc.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wfileops.lo \
|
||||
@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@@GLIBCPP_NEED_XTRA_LIBIO_FALSE@wgenops.lo
|
||||
|
|
|
@ -783,7 +783,9 @@ _IO_unbuffer_write ()
|
|||
for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain)
|
||||
if (! (fp->_flags & _IO_UNBUFFERED)
|
||||
&& (! (fp->_flags & _IO_NO_WRITES)
|
||||
|| (fp->_flags & _IO_IS_APPENDING)))
|
||||
|| (fp->_flags & _IO_IS_APPENDING))
|
||||
/* Iff stream is un-orientated, it wasn't used. */
|
||||
&& fp->_mode != 0)
|
||||
_IO_SETBUF (fp, NULL, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
# include <iconv/gconv_int.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* Prototypes of libio's codecvt functions. */
|
||||
static enum __codecvt_result do_out (struct _IO_codecvt *codecvt,
|
||||
__mbstate_t *statep,
|
||||
|
@ -109,12 +108,12 @@ _IO_fwide (fp, mode)
|
|||
fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end;
|
||||
fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_write_base;
|
||||
|
||||
#ifdef _LIBC
|
||||
/* The functions are always the same. */
|
||||
*cc = __libio_codecvt;
|
||||
|
||||
/* Get the character conversion functions based on the currently
|
||||
selected locale for LC_CTYPE. */
|
||||
#ifdef _LIBC
|
||||
{
|
||||
struct gconv_fcts fcts;
|
||||
|
||||
|
@ -173,7 +172,7 @@ _IO_fwide (fp, mode)
|
|||
if (cc->__cd_in != (iconv_t) -1)
|
||||
cc->__cd_out = iconv_open (external_ccs, internal_ccs);
|
||||
|
||||
if (cc->__cd_in != (iconv_t) -1 || cc->__cd_out != (iconv_t) -1)
|
||||
if (cc->__cd_in == (iconv_t) -1 || cc->__cd_out == (iconv_t) -1)
|
||||
/* XXX */
|
||||
abort ();
|
||||
}
|
||||
|
@ -196,7 +195,6 @@ _IO_fwide (fp, mode)
|
|||
weak_alias (_IO_fwide, fwide)
|
||||
#endif
|
||||
|
||||
|
||||
static enum __codecvt_result
|
||||
do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep,
|
||||
const wchar_t *from_start, const wchar_t *from_end,
|
||||
|
@ -241,21 +239,22 @@ do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep,
|
|||
}
|
||||
#else
|
||||
# ifdef _GLIBCPP_USE_WCHAR_T
|
||||
|
||||
size_t res;
|
||||
const char *from_start_copy = (const char *) from_start;
|
||||
size_t from_len = from_end - from_start;
|
||||
char *to_start_copy = (char *) from_start;
|
||||
char *to_start_copy = to_start;
|
||||
size_t to_len = to_end - to_start;
|
||||
|
||||
res = iconv (codecvt->__cd_out, &from_start_copy, &from_len,
|
||||
&to_start_copy, &to_len);
|
||||
|
||||
|
||||
if (res == 0 || from_len == 0)
|
||||
result = __codecvt_ok;
|
||||
else if (to_len < codecvt->__codecvt_do_max_length (codecvt))
|
||||
result = __codecvt_partial;
|
||||
else
|
||||
result = __codecvt_error;
|
||||
|
||||
# else
|
||||
/* Decide what to do. */
|
||||
result = __codecvt_error;
|
||||
|
@ -477,3 +476,10 @@ do_max_length (struct _IO_codecvt *codecvt)
|
|||
return MB_CUR_MAX;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ void test04(int size)
|
|||
void test05(int size)
|
||||
{
|
||||
bool test = true;
|
||||
const char* filename = "testsuite/inserters_extractors-1.txt";
|
||||
const char filename[] = "testsuite/inserters_extractors-1.txt";
|
||||
const char fillc = 'f';
|
||||
std::ofstream ofs(filename);
|
||||
std::string str(size, fillc);
|
||||
|
|
|
@ -105,7 +105,7 @@ test03(void)
|
|||
double tf_size = BUFSIZ * 2.5;
|
||||
ofstream testfile(TEST_IN);
|
||||
|
||||
for ( int i=0; i < tf_size; ++i )
|
||||
for (int i = 0; i < tf_size; ++i)
|
||||
testfile.put('.');
|
||||
testfile.close();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue