This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug bootstrap/12974] gcc-3.4-20031105 bootstrap failure [MinGW]


------- Additional Comments From dannysmith at gcc dot gnu dot org  2003-12-13 09:07 -------
I don't have msys installed so I can't test this, but one thing that may be 
affecting search path with msys is the change to make-relative-prefix/lrealpath 
in 3.4 vs 3.3.1. (It has recently been backported to 3_3-branch as well.

2003-02-20  Daniel Jacobowitz  <drow@mvista.com>

	* lrealpath.c: New file.
	* make-relative-prefix.c: Update documentation.
	(make_relative_prefix): Simplify.  Use lbasename and lrealpath.


Could you try this patch to see if it helps

Index: gcc/libiberty/lrealpath.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/lrealpath.c,v
retrieving revision 1.1
diff -c -3 -p -r1.1 lrealpath.c
*** gcc/libiberty/lrealpath.c	20 Feb 2003 22:11:13 -0000	1.1
--- gcc/libiberty/lrealpath.c	1 Dec 2003 20:25:47 -0000
*************** extern char *canonicalize_file_name (con
*** 64,69 ****
--- 64,74 ----
  #   define REALPATH_LIMIT MAXPATHLEN
  #  endif
  # endif
+ #else
+ # if defined (_WIN32)
+ #  define WIN32_LEAN_AND_MEAN
+ #  include <windows.h> /* for GetFullPathName */
+ # endif
  #endif
  
  char *
*************** lrealpath (filename)
*** 120,125 ****
--- 125,144 ----
  	free (buf);
  	return ret;
        }
+   }
+ #endif
+ 
+   /* The W32API method.  If we don't have realpath, we assume we don't
+      have symlinks and just canonicalize to a Windows absolute path.  */
+ #if defined (_WIN32_)
+   {
+     char buf[MAX_PATH];
+     char* finalpart;
+     DWORD len = GetFullPathName (filename, MAX_PATH, buf, &finalpart);
+     if (len == 0 || len > MAX_PATH-1) /* failure */
+       return strdup (filename);
+     else
+       return strdup (buf);
    }
  #endif
  

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12974


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]