summaryrefslogtreecommitdiff
path: root/function.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2010-07-09 11:40:19 +0000
committerEli Zaretskii <eliz@gnu.org>2010-07-09 11:40:19 +0000
commit0c1d78a8d1db2c2d8086af2caa2542a0dcf35870 (patch)
tree3027752f46f15b7ac38fcd05528adf999bacc0a1 /function.c
parent36a483d42c2225d58e0148954bb73fdacbc6e24e (diff)
downloadmake-0c1d78a8d1db2c2d8086af2caa2542a0dcf35870.tar.gz
Fix Savannah bug #30312.
function.c (abspath): Support absolute file names in UNC format.
Diffstat (limited to 'function.c')
-rw-r--r--function.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/function.c b/function.c
index 45ebc9ef..870e4a05 100644
--- a/function.c
+++ b/function.c
@@ -1912,6 +1912,13 @@ abspath (const char *name, char *apath)
#ifdef HAVE_DOS_PATHS
if (IS_PATHSEP(name[0]))
{
+ if (IS_PATHSEP(name[1]))
+ {
+ /* A UNC. Don't prepend a drive letter. */
+ apath[0] = name[0];
+ apath[1] = name[1];
+ root_len = 2;
+ }
/* We have /foo, an absolute file name except for the drive
letter. Assume the missing drive letter is the current
drive, which we can get if we remove from starting_directory