This library is just a helper and should not be built by default as it
is only used to extract the objects and has no use as stand-alone
library for uses to link to.
This makes the function thread safe, to call, for example,
from multiple transient dependecies or threads.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This function will be required to make dav1d_init threadsafe.
Full erro checking support is included in this implementation,
for completeness, even though dav1d_init cannot fail, and thus
will ignore the return value of pthread_once.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Define `_POSIX_C_SOURCE` to `200112L`, to indicate we want to use
POSIX.1–2001. Additionally remove incorrect definition of
`POSIX_C_SOURCE` (note the lack of underscore at the beginning).
The intention was probably to define `_POSIX_C_SOURCE` which would be
redundant and previously even conflicting with the other version set
previously.
For the has_function check, use the correct value of `200112L`.
- _REENTRANT and _THREAD_SAFE were taken from the VLC build system
and have since been removed there, so it seems safe to remove those
here as well.
- _POSIX_PTHREAD_SEMANTICS is required for POSIX thread flavor of
threading functions but instead we can define _POSIX_C_SOURCE to a
value higher than 199506L, when including <pthread.h>, see
https://docs.oracle.com/cd/E19455-01/806-5257/compile-3/index.html
- __EXTENSIONS__ is used to enable Solaris extensions, as far as I
know we are not using any.
- _FILE_OFFSET_BITS is already defined to 64 by meson.
- _ISOC99_SOURCE should not be required as we do not support compiling
with -std c89.
- _ISOC11_SOURCE should not be required as we set -std c11, so we do
not need any C11 extensions to C99 as we already use C11.
- _POSIX_SOURCE is not required as we already set _POSIX_C_SOURCE to
a positive integer.
* _XOPEN_SOURCE should not be needed as we already have
_POSIX_C_SOURCE.
* _XOPEN_SOURCE_EXTENDED should not be required as we do not need any
X/Open Unix extensions to my knowledge.
* _BSD_SOURCE should not be required as we already set _POSIX_C_SOURCE.
* _SVID_SOURCE should not be required as we already set _POSIX_C_SOURCE.
Contains some useful stuff (vim, emacs swapfiles, ctags) and the /build
directory, since that's what the README uses.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>