snaroff 02/11/12 17:05:30 Modified: live/gcc3/gcc Tag: fearless-kitty-branch cppfiles.c Log: fix gdb build failure related to loading files across a sym link Bug #: Revision Changes Path No revision No revision 1.46.4.4 +4 -3 src/live/gcc3/gcc/cppfiles.c Index: cppfiles.c =================================================================== RCS file: /cvs/Darwin/src/live/gcc3/gcc/cppfiles.c,v retrieving revision 1.46.4.3 retrieving revision 1.46.4.4 diff -u -r1.46.4.3 -r1.46.4.4 --- cppfiles.c 2002/11/10 23:10:02 1.46.4.3 +++ cppfiles.c 2002/11/13 01:05:28 1.46.4.4 @@ -1699,7 +1699,7 @@ list->next = obj; } else - entry->list = obj; + entry->list = obj; } static void @@ -1713,7 +1713,7 @@ { DIR *directory; struct dirent *directory_entry; - + /* cannot depend on path->name being null terminated (weird) */ memcpy (name, path->name, path->len); name[path->len] = 0; @@ -1724,7 +1724,8 @@ { if (directory_entry->d_name[0] == '.') // for now, assume headers cannot begin with "." continue; - else if (directory_entry->d_type == DT_REG || directory_entry->d_type == DT_DIR) + else if (directory_entry->d_type == DT_REG || directory_entry->d_type == DT_DIR || + directory_entry->d_type == DT_UNKNOWN) /* for symbolic links */ { struct hashed_entry **slot, *entry; slot = (struct hashed_entry **)htab_find_slot_with_hash (includehash, directory_entry->d_name,