summaryrefslogtreecommitdiffstats
path: root/osdep/io.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-18 17:49:10 +0200
committerwm4 <wm4@nowhere>2013-09-18 19:08:51 +0200
commit12372298a2a5fd7cd2274fcb2427581f35a6a2c1 (patch)
treed6198570a800c56d4284ace70d3fa2eefdce04b2 /osdep/io.h
parentb97d10a839aee875ac8157a84bb008d82f53219a (diff)
downloadmpv-12372298a2a5fd7cd2274fcb2427581f35a6a2c1.tar.bz2
mpv-12372298a2a5fd7cd2274fcb2427581f35a6a2c1.tar.xz
win32: add getenv() UTF-8 variant
This is a bit "hard", because getenv() returns a static string, and we can't just return an allocated string. We also want getenv() to be thread-safe if possible. (If the mpv core is going to be more threaded, we sure do want the lower layers to be thread-safe as well.)
Diffstat (limited to 'osdep/io.h')
-rw-r--r--osdep/io.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/osdep/io.h b/osdep/io.h
index 7554b402d4..5dd93a79a1 100644
--- a/osdep/io.h
+++ b/osdep/io.h
@@ -59,6 +59,7 @@ DIR *mp_opendir(const char *path);
struct dirent *mp_readdir(DIR *dir);
int mp_closedir(DIR *dir);
int mp_mkdir(const char *path, int mode);
+char *mp_getenv(const char *name);
// NOTE: stat is not overridden with mp_stat, because MinGW-w64 defines it as
// macro.
@@ -72,6 +73,7 @@ int mp_mkdir(const char *path, int mode);
#define readdir(...) mp_readdir(__VA_ARGS__)
#define closedir(...) mp_closedir(__VA_ARGS__)
#define mkdir(...) mp_mkdir(__VA_ARGS__)
+#define getenv(...) mp_getenv(__VA_ARGS__)
#else /* __MINGW32__ */