OSDN Git Service

2004-12-18 H.J. Lu <hongjiu.lu@intel.com>
[pf3gnuchains/gcc-fork.git] / gcc / c-incpath.c
index 4fd1b13..b141c07 100644 (file)
@@ -37,7 +37,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 # define INO_T_EQ(A, B) (!memcmp (&(A), &(B), sizeof (A)))
 # define INO_T_COPY(DEST, SRC) memcpy(&(DEST), &(SRC), sizeof (SRC))
 #else
-# if (defined _WIN32 && ! defined (_UWIN)) || defined __MSDOS__
+# if (defined _WIN32 && !defined (_UWIN)) || defined __MSDOS__
 #  define INO_T_EQ(A, B) 0
 # else
 #  define INO_T_EQ(A, B) ((A) == (B))
@@ -211,7 +211,8 @@ remove_duplicates (cpp_reader *pfile, struct cpp_dir *head,
          /* Remove this one if it is in the system chain.  */
          reason = REASON_DUP_SYS;
          for (tmp = system; tmp; tmp = tmp->next)
-           if (INO_T_EQ (tmp->ino, cur->ino) && tmp->dev == cur->dev)
+           if (INO_T_EQ (tmp->ino, cur->ino) && tmp->dev == cur->dev
+               && cur->construct == tmp->construct)
              break;
 
          if (!tmp)
@@ -219,14 +220,16 @@ remove_duplicates (cpp_reader *pfile, struct cpp_dir *head,
              /* Duplicate of something earlier in the same chain?  */
              reason = REASON_DUP;
              for (tmp = head; tmp != cur; tmp = tmp->next)
-               if (INO_T_EQ (cur->ino, tmp->ino) && cur->dev == tmp->dev)
+               if (INO_T_EQ (cur->ino, tmp->ino) && cur->dev == tmp->dev
+                   && cur->construct == tmp->construct)
                  break;
 
              if (tmp == cur
                  /* Last in the chain and duplicate of JOIN?  */
                  && !(cur->next == NULL && join
                       && INO_T_EQ (cur->ino, join->ino)
-                      && cur->dev == join->dev))
+                      && cur->dev == join->dev
+                      && cur->construct == join->construct))
                {
                  /* Unique, so keep this directory.  */
                  pcur = &cur->next;