This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Fix detection of absolute pathnames in gcov.c
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Subject: PATCH: Fix detection of absolute pathnames in gcov.c
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- Date: Tue, 6 Nov 2001 07:49:41 +1100 (EST)
Hello
The following patch provide better detection of absolute pathnames,
particulary for users in DOS_BASED_FILE_SYSTEMS who like to use forward
slashes. Current mingw builds, for example, use '/' as primary
DIR_SEPARATOR.
ChangeLog
2001-11-06 Danny Smith <dannysmith@users.sourceforge.net>
* gcov.c (output_data): Use IS_ABSOLUTE_PATHNAME to
test for absolute pathnames.
--- gcov.c.orig Sun Oct 21 09:42:47 2001
+++ gcov.c Mon Nov 05 21:54:52 2001
@@ -998,12 +998,7 @@ output_data ()
{
/* If this is a relative file name, and an object directory has been
specified, then make it relative to the object directory name. */
- if (! (*s_ptr->name == '/' || *s_ptr->name == DIR_SEPARATOR
- /* Check for disk name on MS-DOS-based systems. */
- || (DIR_SEPARATOR == '\\'
- && s_ptr->name[1] == ':'
- && (s_ptr->name[2] == DIR_SEPARATOR
- || s_ptr->name[2] == '/')))
+ if (! IS_ABSOLUTE_PATHNAME (s_ptr->name)
&& object_directory != 0
&& *object_directory != '\0')
{
http://briefcase.yahoo.com.au - Yahoo! Briefcase
- Manage your files online.