Commit e3d1fd32 by Per Bothner

Patches to use cpplib with cc1 #if USE_CPPLIB.

From-SVN: r14557
parent b4294351
...@@ -209,9 +209,10 @@ char *input_filename; ...@@ -209,9 +209,10 @@ char *input_filename;
char *main_input_filename; char *main_input_filename;
#if !USE_CPPLIB
/* Stream for reading from the input file. */ /* Stream for reading from the input file. */
FILE *finput; FILE *finput;
#endif
/* Current line number in real source file. */ /* Current line number in real source file. */
...@@ -2123,6 +2124,7 @@ compile_file (name) ...@@ -2123,6 +2124,7 @@ compile_file (name)
symout_time = 0; symout_time = 0;
dump_time = 0; dump_time = 0;
#if !USE_CPPLIB
/* Open input file. */ /* Open input file. */
if (name == 0 || !strcmp (name, "-")) if (name == 0 || !strcmp (name, "-"))
...@@ -2138,12 +2140,17 @@ compile_file (name) ...@@ -2138,12 +2140,17 @@ compile_file (name)
#ifdef IO_BUFFER_SIZE #ifdef IO_BUFFER_SIZE
setvbuf (finput, (char *) xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE); setvbuf (finput, (char *) xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE);
#endif #endif
#endif /* !USE_CPPLIB */
/* Initialize data in various passes. */ /* Initialize data in various passes. */
init_obstacks (); init_obstacks ();
init_tree_codes (); init_tree_codes ();
#if USE_CPPLIB
init_parse (name);
#else
init_lex (); init_lex ();
#endif
/* Some of these really don't need to be called when generating bytecode, /* Some of these really don't need to be called when generating bytecode,
but the options would have to be parsed first to know that. -bson */ but the options would have to be parsed first to know that. -bson */
init_rtl (); init_rtl ();
...@@ -2722,7 +2729,11 @@ compile_file (name) ...@@ -2722,7 +2729,11 @@ compile_file (name)
whether fclose returns an error, since the pages might still be on the whether fclose returns an error, since the pages might still be on the
buffer chain while the file is open. */ buffer chain while the file is open. */
#if USE_CPPLIB
finish_parse ();
#else
fclose (finput); fclose (finput);
#endif
if (ferror (asm_out_file) != 0 || fclose (asm_out_file) != 0) if (ferror (asm_out_file) != 0 || fclose (asm_out_file) != 0)
fatal_io_error (asm_file_name); fatal_io_error (asm_file_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment