dpatel      03/02/03 16:10:45

  Modified:    live/gcc3/gcc cppfiles.c
  Log:
  Bug #: 3131027 Framework not being found properly sometimes if ...
  Reviewed by: Mike Stump
  
  Revision  Changes    Path
  1.59      +9 -1      src/live/gcc3/gcc/cppfiles.c
  
  Index: cppfiles.c
  ===================================================================
  RCS file: /cvs/Darwin/src/live/gcc3/gcc/cppfiles.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- cppfiles.c        2003/01/02 21:49:34     1.58
  +++ cppfiles.c        2003/02/04 00:10:44     1.59
  @@ -1854,9 +1854,17 @@
         directory = opendir(name);
         while ((directory_entry = readdir(directory)) != NULL) 
           {
  +       int len = strlen (directory_entry->d_name);
  +       int framework_dir = -1;
  +       /* 10 = strlen (".framework");  */
  +       if (len > 10)
  +         framework_dir = len - 10;
           if (directory_entry->d_name[0] == '.') // for now, assume headers cannot 
begin with "."
             continue;
  -        else if (directory_entry->d_type == DT_DIR) // just add directories, *not* 
all the headers
  +     // just add directories, *not* all the headers        
  +     else if (directory_entry->d_type == DT_DIR ||
  +              ((framework_dir != -1) 
  +               && !strcmp ((directory_entry->d_name + framework_dir), 
".framework")))
             {
             struct hashed_entry **slot, *entry;
             slot = (struct hashed_entry **)htab_find_slot_with_hash (frameworkhash, 
directory_entry->d_name,
  
  
  


Reply via email to