summaryrefslogtreecommitdiff
path: root/gcc/fix-header.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-06-07 07:32:32 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1996-06-07 07:32:32 +0000
commite7399c765891fca0951102d3534e1c45c8688527 (patch)
tree61f712c6a9cf78210d8df156cd19799c94b6204f /gcc/fix-header.c
parentb1a548d4ea560dc2226027eed9aec44ebbf069df (diff)
downloadgcc-e7399c765891fca0951102d3534e1c45c8688527.tar.gz
* fix-header.c (read_scan_file): Use CPP_FATAL_ERRORS.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@12210 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fix-header.c')
-rw-r--r--gcc/fix-header.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/fix-header.c b/gcc/fix-header.c
index bae5e15e658..94873df7493 100644
--- a/gcc/fix-header.c
+++ b/gcc/fix-header.c
@@ -84,6 +84,10 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern void cpp_fatal ();
+#if !__STDC__ && !defined(const)
+#define const /* nothing */
+#endif
+
sstring buf;
int verbose = 0;
@@ -602,9 +606,9 @@ read_scan_file (in_fname, argc, argv)
scan_in.data = &scan_options;
cpp_options_init (&scan_options);
i = cpp_handle_options (&scan_in, argc, argv);
- if (i < argc && scan_in.errors < CPP_FATAL_LIMIT)
+ if (i < argc && ! CPP_FATAL_ERRORS (&scan_in))
cpp_fatal (&scan_in, "Invalid option `%s'", argv[i]);
- if (scan_in.errors >= CPP_FATAL_LIMIT)
+ if (CPP_FATAL_ERRORS (&scan_in))
exit (FATAL_EXIT_CODE);
if (! cpp_start_read (&scan_in, in_fname))