OSDN Git Service

2005-12-23 Daniel Berlin <dberlin@dberlin.org>
[pf3gnuchains/gcc-fork.git] / gcc / c-pch.c
index a151341..1bbcab1 100644 (file)
@@ -1,5 +1,5 @@
 /* Precompiled header implementation for the C languages.
-   Copyright (C) 2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -15,8 +15,8 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+Boston, MA 02110-1301, USA.  */
 
 #include "config.h"
 #include "system.h"
@@ -187,7 +187,7 @@ c_common_write_pch (void)
   if (fwrite (&h, sizeof (h), 1, pch_outfile) != 1)
     fatal_error ("can%'t write %s: %m", pch_file);
   
-  buf = xmalloc (16384);
+  buf = XNEWVEC (char, 16384);
 
   if (fseek (asm_out_file, asm_file_startpos, SEEK_SET) != 0)
     fatal_error ("can%'t seek in %s: %m", asm_file_name);
@@ -385,7 +385,7 @@ c_common_read_pch (cpp_reader *pfile, const char *name,
   if (!flag_preprocess_only)
     {
       unsigned long written;
-      char * buf = xmalloc (16384);
+      char * buf = XNEWVEC (char, 16384);
 
       for (written = 0; written < h.asm_size; )
        {
@@ -447,7 +447,7 @@ c_common_pch_pragma (cpp_reader *pfile)
   const char *name;
   int fd;
 
-  if (c_lex (&name_t) != CPP_STRING)
+  if (pragma_lex (&name_t) != CPP_STRING)
     {
       error ("malformed #pragma GCC pch_preprocess, ignored");
       return;
@@ -464,7 +464,7 @@ c_common_pch_pragma (cpp_reader *pfile)
   
   fd = open (name, O_RDONLY | O_BINARY, 0666);
   if (fd == -1)
-    fatal_error ("%s: couldn%'t open PCH file: %m\n", name);
+    fatal_error ("%s: couldn%'t open PCH file: %m", name);
   
   if (c_common_valid_pch (pfile, name, fd) != 1)
     {