/* If the following is nonzero, it is a macro name.
Don't include the file again if that macro is defined. */
U_CHAR *control_macro;
+ /* If the following is nonzero, it is a C-language system include
+ directory. */
+ int c_system_include_path;
};
/* #include "file" looks in source file dir, then stack. */
xmalloc (sizeof (struct file_name_list));
dirtmp->next = 0; /* New one goes on the end */
dirtmp->control_macro = 0;
+ dirtmp->c_system_include_path = 0;
if (i + 1 == argc)
fatal ("Directory name missing after `-iwithprefix' option");
xmalloc (sizeof (struct file_name_list));
dirtmp->next = 0; /* New one goes on the end */
dirtmp->control_macro = 0;
+ dirtmp->c_system_include_path = 0;
if (i + 1 == argc)
fatal ("Directory name missing after `-iwithprefixbefore' option");
xmalloc (sizeof (struct file_name_list));
dirtmp->next = 0; /* New one goes on the end */
dirtmp->control_macro = 0;
+ dirtmp->c_system_include_path = 0;
if (i + 1 == argc)
fatal ("Directory name missing after `-idirafter' option");
else
xmalloc (sizeof (struct file_name_list));
dirtmp->next = 0; /* New one goes on the end */
dirtmp->control_macro = 0;
+ dirtmp->c_system_include_path = 0;
if (argv[i][2] != 0)
dirtmp->fname = argv[i] + 2;
else if (i + 1 == argc)
strcat (str, p->fname + default_len);
new->fname = str;
new->control_macro = 0;
+ new->c_system_include_path = !p->cplusplus;
append_include_chain (new, new);
if (first_system_include == 0)
first_system_include = new;
struct file_name_list *new
= (struct file_name_list *) xmalloc (sizeof (struct file_name_list));
new->control_macro = 0;
+ new->c_system_include_path = !p->cplusplus;
new->fname = p->fname;
append_include_chain (new, new);
if (first_system_include == 0)
xmalloc (sizeof (struct file_name_list));
dirtmp->next = 0; /* New one goes on the end */
dirtmp->control_macro = 0;
+ dirtmp->c_system_include_path = 0;
dirtmp->fname = name;
append_include_chain (dirtmp, dirtmp);
ptr = (struct file_name_list *) xmalloc (sizeof (struct file_name_list));
ptr->control_macro = 0;
+ ptr->c_system_include_path = 0;
ptr->next = all_include_files;
all_include_files = ptr;
ptr->fname = savestring (fname);
register unsigned length = strlen (sys_dir);
if (! strncmp (sys_dir, filename, length) && filename[length] == '/')
- return 1;
+ {
+ if (searchptr->c_system_include_path)
+ return 2;
+ else
+ return 1;
+ }
}
return 0;
}
dont_repeat_files = new;
new->fname = savestring (ip->fname);
new->control_macro = 0;
+ new->c_system_include_path = 0;
}
return 0;
}
*line_end++ = ' ';
*line_end++ = '3';
}
+ /* Tell cc1plus if following text should be treated as C. */
+ if (ip->system_header_p == 2) {
+ *line_end++ = ' ';
+ *line_end++ = '4';
+ }
*line_end++ = '\n';
len = line_end - line_cmd_buf;
check_expand (op, len + 1);