OSDN Git Service

2006-05-15 Mircea Namolaru <namolaru@il.ibm.com>
[pf3gnuchains/gcc-fork.git] / gcc / fix-header.c
index 0212cf7..8bf5026 100644 (file)
@@ -14,7 +14,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 /* This program massages a system include file (such as stdio.h),
    into a form that is compatible with GNU C and GNU C++.
@@ -82,9 +82,19 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "errors.h"
 
 #ifdef TARGET_EXTRA_INCLUDES
-static void hook_void_int(int u ATTRIBUTE_UNUSED) { }
+void TARGET_EXTRA_INCLUDES (const char *sysroot ATTRIBUTE_UNUSED,
+                           const char *iprefix ATTRIBUTE_UNUSED,
+                           int stdinc ATTRIBUTE_UNUSED)
+{
+}
+#endif
 
-struct target_c_incpath_s target_c_incpath = { hook_void_int };
+#ifdef TARGET_EXTRA_PRE_INCLUDES 
+void TARGET_EXTRA_PRE_INCLUDES (const char *sysroot ATTRIBUTE_UNUSED,
+                           const char *iprefix ATTRIBUTE_UNUSED,
+                           int stdinc ATTRIBUTE_UNUSED)
+{
+}
 #endif
 
 struct line_maps line_table;
@@ -397,8 +407,7 @@ lookup_std_proto (const char *name, int name_length)
          && strncmp (fn->fname, name, name_length) == 0)
        return fn;
       i = (i+1) % HASH_SIZE;
-      if (i == i0)
-       abort ();
+      gcc_assert (i != i0);
     }
 }
 
@@ -657,8 +666,8 @@ read_scan_file (char *in_fname, int argc, char **argv)
     exit (FATAL_EXIT_CODE);
 
   register_include_chains (scan_in, NULL /* sysroot */, NULL /* iprefix */,
-                          true /* stdinc */, false /* cxx_stdinc */,
-                          false /* verbose */);
+                          NULL /* imultilib */, true /* stdinc */,
+                          false /* cxx_stdinc */, false /* verbose */);
 
   /* We are scanning a system header, so mark it as such.  */
   cpp_make_system_header (scan_in, 1, 0);
@@ -1178,7 +1187,7 @@ main (int argc, char **argv)
       exit (FATAL_EXIT_CODE);
     }
   inf_size = sbuf.st_size;
-  inf_buffer = xmalloc (inf_size + 2);
+  inf_buffer = XNEWVEC (char, inf_size + 2);
   inf_ptr = inf_buffer;
 
   to_read = inf_size;