From 28b9bb030954d37e521113384c8cc0979d0e204b Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Sat, 22 Jun 2024 21:51:52 +0200 Subject: [PATCH] uri: Enable Windows paths on Cygwin --- uri.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uri.c b/uri.c index b9fa22b6..7034f03f 100644 --- a/uri.c +++ b/uri.c @@ -1469,7 +1469,7 @@ xmlIsPathSeparator(int c, int isFile) { if (c == '/') return(1); -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) if (isFile && (c == '\\')) return(1); #endif @@ -1511,7 +1511,7 @@ xmlNormalizePath(char *path, int isFile) { * Collapse multiple separators first. */ while (xmlIsPathSeparator(*cur, isFile)) { -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) /* Allow two separators at start of path */ if ((isFile) && (out == path + 1)) *out++ = '/'; @@ -1876,7 +1876,7 @@ xmlIsAbsolutePath(const xmlChar *path) { if (xmlIsPathSeparator(c, 1)) return(1); -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) if ((((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))) && (path[1] == ':'))