]> git.ipfire.org Git - thirdparty/gcc.git/commit
porting.texi: Add documentation about libstdc++-v3-specific macros that are currently...
authorLoren J. Rittle <ljrittle@acm.org>
Tue, 12 Jun 2001 23:09:09 +0000 (23:09 +0000)
committerLoren J. Rittle <ljrittle@gcc.gnu.org>
Tue, 12 Jun 2001 23:09:09 +0000 (23:09 +0000)
commitddf1e65262a1843776d525cfa32fb5138e24951e
treec1c7768a7c3fa4e6421e9078340dd04bd57fa444
parent1d855e87fd1e2a8c68d86128616f4c2170800544
porting.texi: Add documentation about libstdc++-v3-specific macros that are currently...

libstdc++/2071
* porting.texi: Add documentation about libstdc++-v3-specific
macros that are currently included in os_defines.h files.

* config/basic_file_stdio.h (sys_getc): New method.
(sys_ungetc): New method.
* include/bits/basic_file.h: (sys_getc): New method signature.
(sys_ungetc): New method signature.

* include/bits/fstream.tcc (underflow): Add conditional code
paths which avoid using short seeks on streams (especially
useful when the stream might be interactive or a pipe).  At
the moment, this alternate path only avoids seeking when the
``buffer size'' of underflow() is 1 since the C standard only
guarantees buffer space for one ungetc (this technique could
be extended since *-*-solaris* supports buffering for 4 calls
to ungetc and *-*-*bsd* supports buffering limited only by
memory resources).  Also, _GLIBCPP_AVOID_FSEEK must be defined
in a port's os_defines.h file for this alternate path to even
be considered.  As a bonus, the idiom of using getc/ungetc
requires no system calls whereas fseek maps to one or two
system call(s) on many platforms.

* config/os/bsd/freebsd/bits/os_defines.h (_GLIBCPP_AVOID_FSEEK):
Define it.
* config/os/solaris/solaris2.5/bits/os_defines.h
(_GLIBCPP_AVOID_FSEEK): Likewise.
* config/os/solaris/solaris2.6/bits/os_defines.h
(_GLIBCPP_AVOID_FSEEK): Likewise.
* config/os/solaris/solaris2.7/bits/os_defines.h
(_GLIBCPP_AVOID_FSEEK): Likewise.

From-SVN: r43278
libstdc++-v3/ChangeLog
libstdc++-v3/config/basic_file_stdio.h
libstdc++-v3/config/os/bsd/freebsd/bits/os_defines.h
libstdc++-v3/config/os/solaris/solaris2.5/bits/os_defines.h
libstdc++-v3/config/os/solaris/solaris2.6/bits/os_defines.h
libstdc++-v3/config/os/solaris/solaris2.7/bits/os_defines.h
libstdc++-v3/include/bits/basic_file.h
libstdc++-v3/include/bits/fstream.tcc
libstdc++-v3/porting.texi