summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-10-17 21:46:08 +0200
committerwm4 <wm4@nowhere>2014-10-17 22:15:19 +0200
commit201a65635055cb5a2987dc23819ba0fcb18e4e14 (patch)
treec6ac3b5e4392579ff0f6ed22efb9cd780984bc1c /options
parenta7eb363ac1acb5566ce1af923d07c658361d5ad4 (diff)
downloadmpv-201a65635055cb5a2987dc23819ba0fcb18e4e14.tar.bz2
mpv-201a65635055cb5a2987dc23819ba0fcb18e4e14.tar.xz
win32: get rid of mp_stat in the normal source code
mp_stat() instead of stat() was used in the normal code (i.e. even on Unix), because MinGW-w64 has an unbelievable macro-mess in place, which prevents solving this elegantly. Add some dirty workarounds to hide mp_stat() from the normal code properly. This now requires replacing all functions that use the struct stat type. This includes fstat, lstat, fstatat, and possibly others. (mpv currently uses stat and fstat only.)
Diffstat (limited to 'options')
-rw-r--r--options/path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/options/path.c b/options/path.c
index 7e5495f844..8a7873ded2 100644
--- a/options/path.c
+++ b/options/path.c
@@ -271,13 +271,13 @@ char *mp_getcwd(void *talloc_ctx)
bool mp_path_exists(const char *path)
{
struct stat st;
- return path && mp_stat(path, &st) == 0;
+ return path && stat(path, &st) == 0;
}
bool mp_path_isdir(const char *path)
{
struct stat st;
- return mp_stat(path, &st) == 0 && S_ISDIR(st.st_mode);
+ return stat(path, &st) == 0 && S_ISDIR(st.st_mode);
}
// Return false if it's considered a normal local filesystem path.