orc: Implement a windows helper for getenv()
authorNirbheek Chauhan <nirbheek@centricular.com>
Tue, 30 Jun 2020 10:00:35 +0000 (15:30 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Tue, 30 Jun 2020 11:50:24 +0000 (17:20 +0530)
commite990f2e17a1eb6c195583db15b25dd1bba88dfa9
treec3aa1082118921c43bbcc0037d7e9cb81631f37e
parent5f5b9b1208b3dfcce50c415ad0272d816ea4e308
orc: Implement a windows helper for getenv()

On Windows, getenv() is deprecated and does not work in all cases. On
the Universal Windows Platform (UWP) it always returns NULL. Add
a wrapper orc_getenv() that calls GetEnvironmentVariable on Windows.

Also change semantics to always make a copy before returning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/42>
orc/orc.c
orc/orccompiler.c
orc/orcdebug.c
orc/orcinternal.h