Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
e22a4fdb
Commit
e22a4fdb
authored
Mar 01, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command/Error: improve libstdc++ 4.9.x detection for std::rethrow_if_nested() workaround
parent
29a7b2c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
NEWS
NEWS
+1
-0
CommandError.cxx
src/command/CommandError.cxx
+25
-2
No files found.
NEWS
View file @
e22a4fdb
ver 0.20.6 (not yet released)
* decoder
- mpcdec: fix crash (division by zero) after seeking
* workaround for GCC 4.9.4 / libstdc++ bug (build failure)
ver 0.20.5 (2017/02/20)
* tags
...
...
src/command/CommandError.cxx
View file @
e22a4fdb
...
...
@@ -29,6 +29,29 @@
#include <assert.h>
#define GLIBCXX_490 20140422
#define GLIBCXX_491 20140716
#define GLIBCXX_492 20141030
#define GLIBCXX_492_Debian_9 20141220
#define GLIBCXX_493 20150626
#define GLIBCXX_494 20160803
#define GLIBCXX_49X_NDK_r13b 20150123
/* the big mess attempts to detect whether we're compiling with
libstdc++ 4.9.x; __GLIBCXX__ is a date tag and cannot be used to
check the major version; and just checking the compiler version
isn't enough, because somebody could use an old libstdc++ with
clang - SIGH! */
#if GCC_OLDER_THAN(5,0) || (defined(__GLIBCXX__) && \
(__GLIBCXX__ == GLIBCXX_490 || __GLIBCXX__ == GLIBCXX_491 || \
__GLIBCXX__ == GLIBCXX_492 || \
__GLIBCXX__ == GLIBCXX_492_Debian_9 || \
__GLIBCXX__ == GLIBCXX_493 || \
__GLIBCXX__ == GLIBCXX_494 || \
__GLIBCXX__ == GLIBCXX_49X_NDK_r13b))
#define GLIBCXX_49X
#endif
gcc_const
static
enum
ack
ToAck
(
PlaylistResult
result
)
...
...
@@ -100,13 +123,13 @@ ToAck(std::exception_ptr ep)
return
ACK_ERROR_SYSTEM
;
}
catch
(
const
std
::
invalid_argument
&
e
)
{
return
ACK_ERROR_ARG
;
#if
defined(__GLIBCXX__) && __GLIBCXX__ < 20151204
#if
def GLIBCXX_49X
}
catch
(
const
std
::
exception
&
e
)
{
#else
}
catch
(...)
{
#endif
try
{
#if
defined(__GLIBCXX__) && __GLIBCXX__ < 20151204
#if
def GLIBCXX_49X
/* workaround for g++ 4.x: no overload for
rethrow_exception(exception_ptr) */
std
::
rethrow_if_nested
(
e
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment