mpv/DOCS
wm4 987146362e lua: add an utility function for starting processes
Because 1) Lua is terrible, and 2) popen() is terrible. Unfortunately,
since Unix is also terrible, this turned out more complicated than I
hoped. As a consequence and to avoid that this code has to be maintained
forever, add a disclaimer that any function in Lua's utils module can
disappear any time. The complexity seems a bit ridiculous, especially
for a feature so far removed from actual video playback, so if it turns
out that we don't really need this function, it will be dropped again.

The motivation for this commit is the same as with 8e4fa5fc.

Note that there is an "#ifndef __GLIBC__". The GNU people are very
special people and thought it'd be convenient to actually declare
"environ", even though the POSIX people, which are also very special
people, state that no header declares this and that the user has to
declare this manually. Since the GNU people overtook the Unix world with
their very clever "embrace, extend, extinguish" strategy, but not 100%,
and trying to build without _GNU_SOURCE is hopeless; but since there
might be Unix environments which support _GNU_SOURCE features partially,
this means that in practice "environ" will be randomly declared or not
declared by system headers. Also, gcc was written by very clever people
too, and prints a warning if an external variable is declared twice (I
didn't check, but I suppose redeclaring is legal C, and not even the gcc
people are clever enough to only warn against a definitely not legal C
construct, although sometimes they do this), ...and since we at mpv hate
compiler warnings, we seek to silence them all. Adding a configure test
just for a warning seems too radical, so we special-case this against
__GLIBC__, which is hopefully not defined on other libcs, especially not
libcs which don't implement all aspects of _GNU_SOURCE, and redefine
"environ" on systems even if the headers define it already (because they
support _GNU_SOURCE - as I mentioned before, the clever GNU people wrote
software THAT portable that other libcs just gave up and implemented
parts of _GNU_SOURCE, although probably not all), which means that
compiling mpv will print a warning about "environ" being redefined, but
at least this won't happen on my system, so all is fine. However, should
someone complain about this warning, I will force whoever complained
about this warning to read this ENTIRE commit message, and if possible,
will also force them to eat a printed-out copy of the GNU Manifesto, and
if that is not enough, maybe this person could even be forced to
convince the very clever POSIX people of not doing crap like this:
having the user to manually declare somewhat central symbols - but I
doubt it's possible, because the POSIX people are too far gone and only
care about maintaining compatibility with old versions of AIX and HP-UX.

Oh, also, this code contains some subtle and obvious issues, but writing
about this is not fun.
2014-10-19 05:51:37 +02:00
..
client_api_examples DOCS/client_api_examples: qtexample: don't require Qt 5.x 2014-10-17 22:36:23 +02:00
man lua: add an utility function for starting processes 2014-10-19 05:51:37 +02:00
client-api-changes.rst client API: add qthelper.hpp 2014-10-13 23:54:19 +02:00
contribute.md DOCS/contribute.md: move instructions for sending patches to the top 2014-06-17 23:18:13 +02:00
crosscompile-mingw.md input: use libwaio for pipe input on Windows 2014-09-14 16:24:01 +02:00
edl-mpv.rst DOCS/edl-mpv: minor clarification 2014-10-12 01:33:10 +02:00
encoding.rst manpage: update config file locations 2014-06-28 15:55:09 +02:00
release-policy.md DOCS: mark the recent release in client-api-changes.rst 2014-08-12 23:01:19 +02:00
tech-overview.txt DOCS/tech-overview.txt: some updates 2014-08-18 01:21:13 +02:00
waf-buildsystem.rst DOCS/waf-buildsystem: add link to the Waf book 2014-02-06 13:45:35 +01:00