aboutsummaryrefslogtreecommitdiff
path: root/win32/mingw.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/mingw.c')
-rw-r--r--win32/mingw.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/win32/mingw.c b/win32/mingw.c
index 2de07122e..063a0c546 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -2117,10 +2117,15 @@ int has_path(const char *file)
2117 has_dos_drive_prefix(file); 2117 has_dos_drive_prefix(file);
2118} 2118}
2119 2119
2120/* Test whether a path is relative to a known location (usually the 2120/*
2121 * Test whether a path is relative to a known location (usually the
2121 * current working directory or a symlink). On Unix this is a path 2122 * current working directory or a symlink). On Unix this is a path
2122 * that doesn't start with a slash but on Windows we also need to 2123 * that doesn't start with a slash but on Windows it also includes
2123 * exclude paths that start with a backslash or a drive letter. */ 2124 * paths that don't start with a backslash or a drive letter.
2125 *
2126 * Paths of the form /dir/file or c:dir/file aren't relative by this
2127 * definition.
2128 */
2124int is_relative_path(const char *path) 2129int is_relative_path(const char *path)
2125{ 2130{
2126 return !is_dir_sep(path[0]) && !has_dos_drive_prefix(path); 2131 return !is_dir_sep(path[0]) && !has_dos_drive_prefix(path);