summaryrefslogtreecommitdiffstats
path: root/osdep/compiler.h
Commit message (Collapse)AuthorAgeFilesLines
* audio: introduce ao_read_data_nonblocking()Thomas Weißschuh2023-11-081-0/+2
| | | | | This behaves similar to ao_read_data() but does not block and may return partial data.
* osdep: remove alignof emulationNRK2023-10-231-6/+0
| | | | | it's unused. and since C11 is pretty freely used now, new code can just use _Alignof or include <stdalign.h> directly.
* osdep: add MP_FALLTHROUGHKacper Michajłow2023-02-021-0/+2
|
* osdep: rename MP_UNREACHABLENiklas Haas2021-11-031-2/+2
| | | | | It was pointed out on IRC that the name is misleading, since the actual semantics of the macro is to assert first.
* osdep: add MP_UNREACHABLENiklas Haas2021-11-031-0/+6
| | | | | | | | | This seems to work on gcc, clang and mingw as-is, but I made it conditional on __GNUC__ just in case, even though I can't figure out which compilers we care about that don't export this define. Also replace all instances of assert(0) in the code by MP_UNREACHABLE(), which is a strict improvement.
* osdep: add portable C11-like alignof() macrowm42018-05-241-0/+5
|
* osdep/compiler.h: change license to LGPLwm42017-05-081-14/+8
| | | | | | | | | | | This didn't have a header and this was implied LGPL, but this was not entirely correct. It turns out the printf attribute code was leaked in from talloc, which is "LGPL v3 or later". talloc was added to the mplayer2 code base in 27a30e310e1. This remaining code was an oversight. Since we want to reduce LGPL v3 code, replace this code with the one from ta/ta.h. This code was explicitly written newly to get rid of talloc and its license in 0933f12d28e.
* build: fix compilation with mingw-w64/ClangJames Ross-Gowan2016-11-171-1/+1
| | | | | | | | | | This fixes the build in mingw-w64/Clang on MSYS2. It also disables the use of gnu_printf in Clang, which was what was causing most of the warnings. The Clang-compiled mpv binary appears to work, but there are no guarantees yet, since until now mpv has only been tested with mingw-w64/GCC on Windows. Fixes #3800
* Move compat/ and bstr/ directory contents somewhere elsewm42014-08-291-1/+27
| | | | | | | | | bstr.c doesn't really deserve its own directory, and compat had just a few files, most of which may as well be in osdep. There isn't really any justification for these extra directories, so get rid of them. The compat/libav.h was empty - just delete it. We changed our approach to API compatibility, and will likely not need it anymore.
* bstr: preparation for next commitwm42014-08-291-0/+1
Just so I can move this file without modifying its contents in the next commit. compat/compiler.h is to be moved to osdep/ with the next commit, so add a dummy header.