* buildsym.c (start_subfile): Use FILENAME_CMP instead of STREQ.
authorEli Zaretskii <eliz@gnu.org>
Mon, 30 Apr 2001 10:30:27 +0000 (10:30 +0000)
committerEli Zaretskii <eliz@gnu.org>
Mon, 30 Apr 2001 10:30:27 +0000 (10:30 +0000)
(top-level): #include filenames.h.

* dwarf2read.c (dwarf2_start_subfile): Use IS_ABSOLUTE_PATH and
FILENAME_CMP, to DTRT on non-Posix platforms.
(top-level): #include filenames.h.

gdb/buildsym.c
gdb/dwarf2read.c

index e30f98a0252c48d156fd068ffed485a8850c6f48..b62c3464d01d19921712b4a387b4c29cc4e11c23 100644 (file)
@@ -38,6 +38,7 @@
 #include "expression.h"                /* For "enum exp_opcode" used by... */
 #include "language.h"          /* For "longest_local_hex_string_custom" */
 #include "bcache.h"
+#include "filenames.h"         /* For DOSish file names */
 /* Ask buildsym.h to define the vars it normally declares `extern'.  */
 #define        EXTERN
 /**/
@@ -532,7 +533,7 @@ start_subfile (char *name, char *dirname)
 
   for (subfile = subfiles; subfile; subfile = subfile->next)
     {
-      if (STREQ (subfile->name, name))
+      if (FILENAME_CMP (subfile->name, name) == 0)
        {
          current_subfile = subfile;
          return;
index 9617f67937e46f6ae496f05b772cdab0095df598..17e0701d8e997df98cac545ac33588e25a955c75 100644 (file)
@@ -36,6 +36,7 @@
 #include "buildsym.h"
 #include "demangle.h"
 #include "expression.h"
+#include "filenames.h" /* for DOSish file names */
 
 #include "language.h"
 #include "complaints.h"
@@ -4063,14 +4064,14 @@ dwarf2_start_subfile (char *filename, char *dirname)
   /* If the filename isn't absolute, try to match an existing subfile
      with the full pathname.  */
 
-  if (*filename != '/' && dirname != NULL)
+  if (!IS_ABSOLUTE_PATH (filename) && dirname != NULL)
     {
       struct subfile *subfile;
       char *fullname = concat (dirname, "/", filename, NULL);
 
       for (subfile = subfiles; subfile; subfile = subfile->next)
        {
-         if (STREQ (subfile->name, fullname))
+         if (FILENAME_CMP (subfile->name, fullname) == 0)
            {
              current_subfile = subfile;
              xfree (fullname);