darwin-c.c (framework_construct_pathname): We must find all headers of a framework in the first instance of it found in...
* config/darwin-c.c (framework_construct_pathname): We must find all headers of a framework in the first instance of it found in the seach path. * gcc.dg/Foundation.framework/empty: New. * gcc.dg/framework-2.c: New. From-SVN: r98162
This commit is contained in:
parent
417ac4e6c7
commit
a68bdb0b8d
@ -1,3 +1,9 @@
|
||||
2005-04-14 Mike Stump <mrs@apple.com>
|
||||
|
||||
* config/darwin-c.c (framework_construct_pathname): We must
|
||||
find all headers of a framework in the first instance of it
|
||||
found in the seach path.
|
||||
|
||||
2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
PR tree-optimization/21021
|
||||
|
@ -270,6 +270,26 @@ framework_construct_pathname (const char *fname, cpp_dir *dir)
|
||||
strncpy (&frname[frname_len], ".framework/", strlen (".framework/"));
|
||||
frname_len += strlen (".framework/");
|
||||
|
||||
if (fast_dir == 0)
|
||||
{
|
||||
frname[frname_len-1] = 0;
|
||||
if (stat (frname, &st) == 0)
|
||||
{
|
||||
/* As soon as we find the first instance of the framework,
|
||||
we stop and never use any later instance of that
|
||||
framework. */
|
||||
add_framework (fname, fname_len, dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* If we can't find the parent directory, no point looking
|
||||
further. */
|
||||
free (frname);
|
||||
return 0;
|
||||
}
|
||||
frname[frname_len-1] = '/';
|
||||
}
|
||||
|
||||
/* Append framework_header_dirs and header file name */
|
||||
for (i = 0; framework_header_dirs[i].dirName; i++)
|
||||
{
|
||||
@ -280,11 +300,7 @@ framework_construct_pathname (const char *fname, cpp_dir *dir)
|
||||
&fname[fname_len]);
|
||||
|
||||
if (stat (frname, &st) == 0)
|
||||
{
|
||||
if (fast_dir == 0)
|
||||
add_framework (fname, fname_len, dir);
|
||||
return frname;
|
||||
}
|
||||
return frname;
|
||||
}
|
||||
|
||||
free (frname);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2005-04-14 Mike Stump <mrs@apple.com>
|
||||
|
||||
* gcc.dg/Foundation.framework/empty: New.
|
||||
* gcc.dg/framework-2.c: New.
|
||||
|
||||
2005-04-14 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
PR tree-optimization/21021
|
||||
|
1
gcc/testsuite/gcc.dg/Foundation.framework/empty
Normal file
1
gcc/testsuite/gcc.dg/Foundation.framework/empty
Normal file
@ -0,0 +1 @@
|
||||
This directory is empty.
|
4
gcc/testsuite/gcc.dg/framework-2.c
Normal file
4
gcc/testsuite/gcc.dg/framework-2.c
Normal file
@ -0,0 +1,4 @@
|
||||
/* { dg-do compile { target *-*-darwin* } } */
|
||||
/* { dg-options "-F$srcdir/gcc.dg" } */
|
||||
|
||||
#include <Foundation/Foundation.h> /* { dg-error "error: Foundation/Foundation.h: No such file" } */
|
Loading…
Reference in New Issue
Block a user