mpv/common
wm4 cc54377463 Do not call strerror()
...because everything is terrible.

strerror() is not documented as having to be thread-safe by POSIX and
C11. (Which is pretty much bullshit, because both mandate threads and
some form of thread-local storage - so there's no excuse why
implementation couldn't implement this in a thread-safe way. Especially
with C11 this is ridiculous, because there is no way to use threads and
convert error numbers to strings at the same time!)

Since we heavily use threads now, we should avoid unsafe functions like
strerror().

strerror_r() is in POSIX, but GNU/glibc deliberately fucks it up and
gives the function different semantics than the POSIX one. It's a bit of
work to convince this piece of shit to expose the POSIX standard
function, and not the messed up GNU one.

strerror_l() is also in POSIX, but only since the 2008 standard, and
thus is not widespread.

The solution is using avlibc (libavutil, by its official name), which
handles the unportable details for us, mostly. We avoid some pain.
2014-11-26 21:21:56 +01:00
..
av_common.c demux: always use AVPacket 2014-08-25 00:46:26 +02:00
av_common.h Improve setting AVOptions 2014-08-02 03:12:33 +02:00
av_log.c av_log: add tons of warnings against mismatched ffmpeg/libav libraries 2014-02-10 23:28:10 +01:00
av_log.h av_log: mp_msg conversion 2013-12-21 21:43:16 +01:00
codecs.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
codecs.h codecs: mp_msg conversion 2013-12-21 20:50:12 +01:00
common.c Do not call strerror() 2014-11-26 21:21:56 +01:00
common.h Do not call strerror() 2014-11-26 21:21:56 +01:00
encode.h encode: make option struct local 2014-06-11 02:05:07 +02:00
encode_lavc.c Silence some Coverity warnings 2014-11-21 09:59:58 +01:00
encode_lavc.h encode: make option struct local 2014-06-11 02:05:07 +02:00
global.h stream: redo playback abort handling 2014-09-13 16:09:51 +02:00
msg.c Add some missing "const"s 2014-10-10 13:44:08 +02:00
msg.h Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
msg_control.h Add some missing "const"s 2014-10-10 13:44:08 +02:00
playlist.c player: deal with some corner cases with playlist navigation 2014-09-09 01:23:10 +02:00
playlist.h player: deal with some corner cases with playlist navigation 2014-09-09 01:23:10 +02:00
tags.c Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
tags.h Move compat/ and bstr/ directory contents somewhere else 2014-08-29 12:31:52 +02:00
version.c common: fix version variable declarations 2014-11-02 17:38:07 +01:00