--- function.c	2006-04-01 10:36:40.000000000 +0400
+++ function.c.fixed	2008-06-25 19:20:19.000000000 +0400
@@ -1889,7 +1889,11 @@
 
   apath_limit = apath + GET_PATH_MAX;
 
+#ifdef WINDOWS32
+  if (name[1] != ':')
+#else
   if (name[0] != '/')
+#endif
     {
       /* It is unlikely we would make it until here but just to make sure. */
       if (!starting_directory)
@@ -1901,8 +1905,16 @@
     }
   else
     {
+#ifdef WINDOWS32
+      apath[0] = name[0];
+      apath[1] = ':';
+      apath[2] = '/';
+      dest = apath + 3;
+      name += 2;
+#else
       apath[0] = '/';
       dest = apath + 1;
+#endif
     }
 
   for (start = end = name; *start != '\0'; start = end)
@@ -1926,7 +1938,11 @@
       else if (len == 2 && start[0] == '.' && start[1] == '.')
 	{
 	  /* Back up to previous component, ignore if at root already.  */
+#ifdef WINDOWS32
+	  if (dest > apath + 3)
+#else
 	  if (dest > apath + 1)
+#endif
 	    while ((--dest)[-1] != '/');
 	}
       else
