configure: Check for the SetDllDirectory and GetModuleHandle functions
These functions aren't available when building for the restricted UWP/WinRT/WinStore API subsets. Normally when building in this mode, one is probably only building the libraries, but being able to build ffmpeg.exe still is useful (and a ffmpeg.exe targeting these API subsets still can be run e.g. in wine, for testing). Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
4
configure
vendored
4
configure
vendored
@@ -2194,6 +2194,7 @@ SYSTEM_FUNCS="
|
|||||||
getaddrinfo
|
getaddrinfo
|
||||||
gethrtime
|
gethrtime
|
||||||
getopt
|
getopt
|
||||||
|
GetModuleHandle
|
||||||
GetProcessAffinityMask
|
GetProcessAffinityMask
|
||||||
GetProcessMemoryInfo
|
GetProcessMemoryInfo
|
||||||
GetProcessTimes
|
GetProcessTimes
|
||||||
@@ -2223,6 +2224,7 @@ SYSTEM_FUNCS="
|
|||||||
SecItemImport
|
SecItemImport
|
||||||
SetConsoleTextAttribute
|
SetConsoleTextAttribute
|
||||||
SetConsoleCtrlHandler
|
SetConsoleCtrlHandler
|
||||||
|
SetDllDirectory
|
||||||
setmode
|
setmode
|
||||||
setrlimit
|
setrlimit
|
||||||
Sleep
|
Sleep
|
||||||
@@ -6032,6 +6034,7 @@ check_func_headers mach/mach_time.h mach_absolute_time
|
|||||||
check_func_headers stdlib.h getenv
|
check_func_headers stdlib.h getenv
|
||||||
check_func_headers sys/stat.h lstat
|
check_func_headers sys/stat.h lstat
|
||||||
|
|
||||||
|
check_func_headers windows.h GetModuleHandle
|
||||||
check_func_headers windows.h GetProcessAffinityMask
|
check_func_headers windows.h GetProcessAffinityMask
|
||||||
check_func_headers windows.h GetProcessTimes
|
check_func_headers windows.h GetProcessTimes
|
||||||
check_func_headers windows.h GetSystemTimeAsFileTime
|
check_func_headers windows.h GetSystemTimeAsFileTime
|
||||||
@@ -6040,6 +6043,7 @@ check_func_headers windows.h MapViewOfFile
|
|||||||
check_func_headers windows.h PeekNamedPipe
|
check_func_headers windows.h PeekNamedPipe
|
||||||
check_func_headers windows.h SetConsoleTextAttribute
|
check_func_headers windows.h SetConsoleTextAttribute
|
||||||
check_func_headers windows.h SetConsoleCtrlHandler
|
check_func_headers windows.h SetConsoleCtrlHandler
|
||||||
|
check_func_headers windows.h SetDllDirectory
|
||||||
check_func_headers windows.h Sleep
|
check_func_headers windows.h Sleep
|
||||||
check_func_headers windows.h VirtualAlloc
|
check_func_headers windows.h VirtualAlloc
|
||||||
check_func_headers glob.h glob
|
check_func_headers glob.h glob
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ static void log_callback_report(void *ptr, int level, const char *fmt, va_list v
|
|||||||
|
|
||||||
void init_dynload(void)
|
void init_dynload(void)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#if HAVE_SETDLLDIRECTORY
|
||||||
/* Calling SetDllDirectory with the empty string (but not NULL) removes the
|
/* Calling SetDllDirectory with the empty string (but not NULL) removes the
|
||||||
* current working directory from the DLL search path as a security pre-caution. */
|
* current working directory from the DLL search path as a security pre-caution. */
|
||||||
SetDllDirectory("");
|
SetDllDirectory("");
|
||||||
@@ -2039,7 +2039,7 @@ FILE *get_preset_file(char *filename, size_t filename_size,
|
|||||||
av_strlcpy(filename, preset_name, filename_size);
|
av_strlcpy(filename, preset_name, filename_size);
|
||||||
f = fopen(filename, "r");
|
f = fopen(filename, "r");
|
||||||
} else {
|
} else {
|
||||||
#ifdef _WIN32
|
#if HAVE_GETMODULEHANDLE
|
||||||
char datadir[MAX_PATH], *ls;
|
char datadir[MAX_PATH], *ls;
|
||||||
base[2] = NULL;
|
base[2] = NULL;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user