+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
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++)
{
&fname[fname_len]);
if (stat (frname, &st) == 0)
- {
- if (fast_dir == 0)
- add_framework (fname, fname_len, dir);
- return frname;
- }
+ return frname;
}
free (frname);
+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
--- /dev/null
+/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-options "-F$srcdir/gcc.dg" } */
+
+#include <Foundation/Foundation.h> /* { dg-error "error: Foundation/Foundation.h: No such file" } */