PR libstdc++/85343 overload __throw_ios_failure to take errno
commitf2b443b321f8a6d4a9dc82d81761046e5fe19870
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Aug 2018 12:09:57 +0000 (14 12:09 +0000)
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Aug 2018 12:09:57 +0000 (14 12:09 +0000)
tree1227bb8ea48c20af0f5bac310dfeecfce9a1e3ac
parent906508bbf0b1b73751f15559350c418c49b9e037
PR libstdc++/85343 overload __throw_ios_failure to take errno

[ios::failure] p2: "When throwing ios_base::failure exceptions,
implementations should provide values of ec that identify the specific
reason for the failure."

This adds a new overload of __throw_ios_failure that can be passed
errno, to store error_code(errno, system_category()) in the exception
object.

PR libstdc++/85343
* acinclude.m4 (libtool_VERSION): Bump version.
* config/abi/pre/gnu.ver (GLIBCXX_3.4.26): Add new symbol version.
Export new symbol.
* configure: Regenerate.
* doc/xml/manual/abi.xml: Document new versions.
* include/bits/fstream.tcc (basic_filebuf<C, T>::underflow)
(basic_filebuf<C, T>::xsgetn): Pass errno to __throw_ios_failure.
* include/bits/functexcept.h (__throw_ios_failure(const char*, int)):
Declare new overload.
* src/c++11/cxx11-ios_failure.cc (__ios_failure): Add new constructor
and static member function.
(__throw_ios_failure(const char*, int)): Define.
* src/c++98/ios_failure.cc [!_GLIBCXX_USE_DUAL_ABI]
(__throw_ios_failure(const char*, int)): Define.
* testsuite/util/testsuite_abi.cc: Update known and latest versions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263535 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/doc/xml/manual/abi.xml
libstdc++-v3/include/bits/fstream.tcc
libstdc++-v3/include/bits/functexcept.h
libstdc++-v3/src/c++11/cxx11-ios_failure.cc
libstdc++-v3/src/c++98/ios_failure.cc