diff --git a/core/synctex/patches/16-use-windows-ansi-api-path-find.diff b/core/synctex/patches/16-use-windows-ansi-api-path-find.diff new file mode 100644 --- /dev/null +++ b/core/synctex/patches/16-use-windows-ansi-api-path-find.diff @@ -0,0 +1,19 @@ +Use Windows ANSI versions of the PathFind... methods + +Author: Michel Ludwig + + +Index: synctex/synctex_parser_utils.c +--- synctex.orig/synctex_parser_utils.c ++++ synctex/synctex_parser_utils.c +@@ -187,8 +187,8 @@ void _synctex_strip_last_path_extension(char * string) { + char * last_component = NULL; + char * last_extension = NULL; + # if defined(SYNCTEX_WINDOWS) +- last_component = PathFindFileName(string); +- last_extension = PathFindExtension(string); ++ last_component = PathFindFileNameA(string); ++ last_extension = PathFindExtensionA(string); + if(last_extension == NULL)return; + if(last_component == NULL)last_component = string; + if(last_extension>last_component){/* filter out paths like "my/dir/.hidden" */ diff --git a/core/synctex/patches/series b/core/synctex/patches/series --- a/core/synctex/patches/series +++ b/core/synctex/patches/series @@ -8,3 +8,4 @@ 13-fix-Wundef-warnings.diff 14-fix-misc-compiler-warnings.diff 15-prevent-leaks-and-segfault.diff +16-use-windows-ansi-api-path-find.diff diff --git a/core/synctex/synctex_parser_utils.c b/core/synctex/synctex_parser_utils.c --- a/core/synctex/synctex_parser_utils.c +++ b/core/synctex/synctex_parser_utils.c @@ -187,8 +187,8 @@ char * last_component = NULL; char * last_extension = NULL; # if defined(SYNCTEX_WINDOWS) - last_component = PathFindFileName(string); - last_extension = PathFindExtension(string); + last_component = PathFindFileNameA(string); + last_extension = PathFindExtensionA(string); if(last_extension == NULL)return; if(last_component == NULL)last_component = string; if(last_extension>last_component){/* filter out paths like "my/dir/.hidden" */