win32: remove pathcch compatibility code

No longer needed after 9f8b4b38c9.
This commit is contained in:
Kacper Michajłow 2024-06-04 18:49:10 +02:00
parent 1a3e3a0c98
commit 7746942a55
4 changed files with 6 additions and 18 deletions

View File

@ -497,17 +497,13 @@ endif
features += {'win32-desktop': win32 and not uwp.found()}
if features['win32-desktop']
pathcch = cc.find_library('pathcch', required: false)
features += {'pathcch': pathcch.found()}
if features['pathcch']
dependencies += pathcch
endif
win32_desktop_libs = [cc.find_library('avrt'),
cc.find_library('dwmapi'),
cc.find_library('gdi32'),
cc.find_library('imm32'),
cc.find_library('ntdll'),
cc.find_library('ole32'),
cc.find_library('pathcch'),
cc.find_library('shcore'),
cc.find_library('user32'),
cc.find_library('uuid'),

View File

@ -34,7 +34,7 @@
#include "misc/ctype.h"
#include "misc/path_utils.h"
#if defined(HAVE_PATHCCH) && HAVE_PATHCCH
#if HAVE_DOS_PATHS
#include <windows.h>
#include <pathcch.h>
#endif
@ -171,7 +171,7 @@ char *mp_normalize_path(void *talloc_ctx, const char *path)
path = mp_path_join(talloc_ctx, cwd, path);
}
#if defined(HAVE_PATHCCH) && HAVE_PATHCCH
#if HAVE_DOS_PATHS
wchar_t *pathw = mp_from_utf8(NULL, path);
wchar_t *read = pathw, *write = pathw;
wchar_t prev = '\0';
@ -198,8 +198,6 @@ char *mp_normalize_path(void *talloc_ctx, const char *path)
talloc_free(pathw);
talloc_free(pathc);
return ret;
#elif HAVE_DOS_PATHS
return talloc_strdup(talloc_ctx, path);
#else
char *result = talloc_strdup(talloc_ctx, "");
const char *next;

View File

@ -46,11 +46,9 @@ if not features['win32-threads']
endif
if features['win32-desktop']
test_utils_deps += cc.find_library('imm32')
test_utils_deps += cc.find_library('ntdll')
if features['pathcch']
test_utils_deps += cc.find_library('pathcch')
endif
test_utils_deps += [cc.find_library('imm32'),
cc.find_library('ntdll'),
cc.find_library('pathcch')]
endif
test_utils_objects = libmpv.extract_objects(test_utils_files)
test_utils = static_library('test-utils', 'test_utils.c', include_directories: incdir,

View File

@ -79,10 +79,6 @@ int main(void)
TEST_NORMALIZE("/foo", "/foo");
#endif
#if defined(_WIN32) && (!defined(HAVE_PATHCCH) || !HAVE_PATHCCH)
return 0;
#endif
void *ctx = talloc_new(NULL);
bstr dst = bstr0(mp_getcwd(ctx));
bstr_xappend(ctx, &dst, bstr0("/foo"));