mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 16:33:02 +00:00
build: replace glob() check and assume it's always in POSIX
POSIX requires glob(), so no need to check for it. Together with the fact that we can emulate glob() on Windows, glob() is always available.
This commit is contained in:
parent
0b77f6fd22
commit
70a70b9da3
@ -115,7 +115,6 @@ static mf_t *open_mf_pattern(void *talloc_ctx, struct mp_log *log, char *filenam
|
||||
|
||||
char *fname = talloc_size(mf, strlen(filename) + 32);
|
||||
|
||||
#if HAVE_GLOB || HAVE_GLOB_WIN32_REPLACEMENT
|
||||
if (!strchr(filename, '%')) {
|
||||
strcpy(fname, filename);
|
||||
if (!strchr(filename, '*'))
|
||||
@ -138,7 +137,6 @@ static mf_t *open_mf_pattern(void *talloc_ctx, struct mp_log *log, char *filenam
|
||||
globfree(&gg);
|
||||
goto exit_mf;
|
||||
}
|
||||
#endif
|
||||
|
||||
mp_info(log, "search expr: %s\n", filename);
|
||||
|
||||
|
@ -103,7 +103,7 @@ static bool split_opt(struct parse_state *p)
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(__MINGW32__) && (HAVE_GLOB || HAVE_GLOB_WIN32_REPLACEMENT)
|
||||
#ifdef __MINGW32__
|
||||
static void process_non_option(struct playlist *files, const char *arg)
|
||||
{
|
||||
glob_t gg;
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#if HAVE_GLOB
|
||||
#if HAVE_POSIX
|
||||
#include <glob.h>
|
||||
#endif
|
||||
|
||||
|
8
wscript
8
wscript
@ -208,13 +208,9 @@ iconv support use --disable-iconv.",
|
||||
'func': check_true,
|
||||
'deps_any': ['posix-spawn', 'mingw'],
|
||||
}, {
|
||||
'name': 'glob',
|
||||
'desc': 'glob()',
|
||||
'func': check_statement('glob.h', 'glob("filename", 0, 0, 0)')
|
||||
}, {
|
||||
'name': 'glob-win32-replacement',
|
||||
'name': 'glob-win32',
|
||||
'desc': 'glob() win32 replacement',
|
||||
'deps_neg': [ 'glob' ],
|
||||
'deps_neg': [ 'posix' ],
|
||||
'deps_any': [ 'os-win32', 'os-cygwin' ],
|
||||
'func': check_true
|
||||
}, {
|
||||
|
@ -432,7 +432,7 @@ def build(ctx):
|
||||
( "osdep/path-unix.c"),
|
||||
( "osdep/path-win.c", "os-win32" ),
|
||||
( "osdep/path-win.c", "os-cygwin" ),
|
||||
( "osdep/glob-win.c", "glob-win32-replacement" ),
|
||||
( "osdep/glob-win.c", "glob-win32" ),
|
||||
( "osdep/w32_keyboard.c", "os-win32" ),
|
||||
( "osdep/w32_keyboard.c", "os-cygwin" ),
|
||||
( "osdep/windows_utils.c", "win32" ),
|
||||
|
Loading…
Reference in New Issue
Block a user