FreeBSD/contrib/gcc/c-incpath.c
/* Append the standard include chain defined in cppdefault.c.  */
Append the standard include chain defined in cppdefault.c.
Append the standard include chain defined in cppdefault . c .
static void
add_standard_paths (const char *sysroot, const char *iprefix,
		    const char *imultilib, int cxx_stdinc)
{
  const struct default_include *p;
  size_t len;
  if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0)
    {
      for (p = cpp_include_defaults; p->fname; p++)
	{
	  if (!p->cplusplus || cxx_stdinc)
	    {
	      if (sysroot && p->add_sysroot)
		continue;
	      if (!strncmp (p->fname, cpp_GCC_INCLUDE_DIR, len))
		{
		  char *str = concat (iprefix, p->fname + len, NULL);
		  if (p->multilib && imultilib)
		    str = concat (str, dir_separator_str, imultilib, NULL);
		  add_path (str, SYSTEM, p->cxx_aware, false);
		}
	    }
	}
    }
  for (p = cpp_include_defaults; p->fname; p++)
    {
      if (!p->cplusplus || cxx_stdinc)
	{
	  char *str;
	  if (sysroot && p->add_sysroot)
	    str = concat (sysroot, p->fname, NULL);
	  else
	    str = update_path (p->fname, p->component);
	  if (p->multilib && imultilib)
	    str = concat (str, dir_separator_str, imultilib, NULL);
	  add_path (str, SYSTEM, p->cxx_aware, false);
	}
    }
}
static void add_standard_paths ( const char * sysroot , const char * iprefix , const char * imultilib , int cxx_stdinc ) { const struct default_include * p ; size_t len ; if ( iprefix && ( len = cpp_GCC_INCLUDE_DIR_len ) != 0 ) { for ( p = cpp_include_defaults ; p -> fname ; p ++ ) { if ( ! p -> cplusplus || cxx_stdinc ) { if ( sysroot && p -> add_sysroot ) continue ; if ( ! strncmp ( p -> fname , cpp_GCC_INCLUDE_DIR , len ) ) { char * str = concat ( iprefix , p -> fname + len , NULL ) ; if ( p -> multilib && imultilib ) str = concat ( str , dir_separator_str , imultilib , NULL ) ; add_path ( str , SYSTEM , p -> cxx_aware , false ) ; } } } } for ( p = cpp_include_defaults ; p -> fname ; p ++ ) { if ( ! p -> cplusplus || cxx_stdinc ) { char * str ; if ( sysroot && p -> add_sysroot ) str = concat ( sysroot , p -> fname , NULL ) ; else str = update_path ( p -> fname , p -> component ) ; if ( p -> multilib && imultilib ) str = concat ( str , dir_separator_str , imultilib , NULL ) ; add_path ( str , SYSTEM , p -> cxx_aware , false ) ; } } }
Append the standard include chain defined in cppdefault.c.
Append the standard include chain defined in cppdefault . c .
/* Look for directories that start with the standard prefix.
	 "Translate" them, i.e. replace /usr/local/lib/gcc... with
	 IPREFIX and search them first.  */ /* Should we be translating sysrooted dirs too?  Assume
		 that iprefix and sysroot are mutually exclusive, for
		 now.  */ /* Should this directory start with the sysroot?  */