mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
uri: Enable Windows paths on Cygwin
This commit is contained in:
6
uri.c
6
uri.c
@@ -1469,7 +1469,7 @@ xmlIsPathSeparator(int c, int isFile) {
|
|||||||
if (c == '/')
|
if (c == '/')
|
||||||
return(1);
|
return(1);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
if (isFile && (c == '\\'))
|
if (isFile && (c == '\\'))
|
||||||
return(1);
|
return(1);
|
||||||
#endif
|
#endif
|
||||||
@@ -1511,7 +1511,7 @@ xmlNormalizePath(char *path, int isFile) {
|
|||||||
* Collapse multiple separators first.
|
* Collapse multiple separators first.
|
||||||
*/
|
*/
|
||||||
while (xmlIsPathSeparator(*cur, isFile)) {
|
while (xmlIsPathSeparator(*cur, isFile)) {
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
/* Allow two separators at start of path */
|
/* Allow two separators at start of path */
|
||||||
if ((isFile) && (out == path + 1))
|
if ((isFile) && (out == path + 1))
|
||||||
*out++ = '/';
|
*out++ = '/';
|
||||||
@@ -1876,7 +1876,7 @@ xmlIsAbsolutePath(const xmlChar *path) {
|
|||||||
if (xmlIsPathSeparator(c, 1))
|
if (xmlIsPathSeparator(c, 1))
|
||||||
return(1);
|
return(1);
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||||
if ((((c >= 'A') && (c <= 'Z')) ||
|
if ((((c >= 'A') && (c <= 'Z')) ||
|
||||||
((c >= 'a') && (c <= 'z'))) &&
|
((c >= 'a') && (c <= 'z'))) &&
|
||||||
(path[1] == ':'))
|
(path[1] == ':'))
|
||||||
|
|||||||
Reference in New Issue
Block a user