* collect2.c (find_a_file): Use IS_ABSOLUTE_PATH.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 21 May 2008 15:40:48 +0000 (16:40 +0100)
committerJoseph Myers <jsm28@gcc.gnu.org>
Wed, 21 May 2008 15:40:48 +0000 (16:40 +0100)
From-SVN: r135721

gcc/ChangeLog
gcc/collect2.c

index 822d9c1e96ea7c09303a31a2233732a7d2ce05dc..1d13768cf5b70cf43ebbb48e4ad4da04bab4744d 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-21  Joseph Myers  <joseph@codesourcery.com>
+
+       * collect2.c (find_a_file): Use IS_ABSOLUTE_PATH.
+
 2008-05-21  Tom Tromey  <tromey@redhat.com>
 
        * ggc-zone.c (lookup_page_table_if_allocated): New function.
index af8bc799a38b7a6e5d94406d69384609da22b85d..531b12288553d711a739dc53ae9c8999e7ccee00 100644 (file)
@@ -605,11 +605,7 @@ find_a_file (struct path_prefix *pprefix, const char *name)
 
   /* Determine the filename to execute (special case for absolute paths).  */
 
-  if (*name == '/'
-#ifdef HAVE_DOS_BASED_FILE_SYSTEM
-      || (*name && name[1] == ':')
-#endif
-      )
+  if (IS_ABSOLUTE_PATH (name))
     {
       if (access (name, X_OK) == 0)
        {