summaryrefslogtreecommitdiff
path: root/gcc/fix-header.c
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-23 11:57:02 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-23 11:57:02 +0000
commit117115d04a7af610164600d6504f79bdaff36e40 (patch)
tree363bce80c38ec2136e0b02d1c6967f54b9a7c3e1 /gcc/fix-header.c
parent1bd7aab17b1683feaf822ed9abcd4175fa0ef4e7 (diff)
downloadgcc-117115d04a7af610164600d6504f79bdaff36e40.tar.gz
* Makefile.in (BUILD_ERRORS): Set to build-errors.
(errors.o): New target for host. (build-errors.o): New target for build. (genobjs): Replace errors.o with build-errors. (gengenrtl$(buildexeext)): Add $(BUILD_ERRORS). (GCOV_OBJS, GCOV_DUMP_OBJS): Add errors.o. (fix-headers$(build_exeext)): Add $(BUILD_ERRORS). (fix-header.o): Add errors.h * collect2.c (fancy_abort): Add parameters. * collect2.h (fancy_abort): Don't declare. * errors.h (fancy_abort): Don't declare. * errors.c: Include either bconfig.h or config.h. (fancy_abort): Trim filename. * fix-header.c (v_fatal, fatal): Remove. (progname): Remove definition. (main): Set progname here. * gcc.c (fancy_abort): Add parameters. * gcc.h (fancy_abort): Remove declaration. * gcov.c (fancy_abort): Remove. * rtl.h (fancy_abort): Don't declare. (abort): Don't define. * tree.h (fancy_abort): Don't declare. (abort): Don't define. * system.h (fancy_abort): Declare. (abort): Define to fancy_abort. * fixinc/Makefile.in (ALLOBJ): Add ../build-errors.o * java/jv-scan.c (fancy_abort): Add. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86424 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fix-header.c')
-rw-r--r--gcc/fix-header.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/gcc/fix-header.c b/gcc/fix-header.c
index 5e2e7bb3ed7..0212cf77ca4 100644
--- a/gcc/fix-header.c
+++ b/gcc/fix-header.c
@@ -79,10 +79,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "scan.h"
#include "cpplib.h"
#include "c-incpath.h"
-
-static void v_fatal (const char *, va_list)
- ATTRIBUTE_PRINTF (1,0) ATTRIBUTE_NORETURN;
-static void fatal (const char *, ...) ATTRIBUTE_PRINTF_1 ATTRIBUTE_NORETURN;
+#include "errors.h"
#ifdef TARGET_EXTRA_INCLUDES
static void hook_void_int(int u ATTRIBUTE_UNUSED) { }
@@ -407,7 +404,6 @@ lookup_std_proto (const char *name, int name_length)
char *inc_filename;
int inc_filename_length;
-const char *progname = "fix-header";
FILE *outf;
sstring line;
@@ -1076,6 +1072,7 @@ main (int argc, char **argv)
long int inf_size;
struct symbol_list *cur_symbols;
+ progname = "fix-header";
if (argv[0] && argv[0][0])
{
char *p;
@@ -1301,24 +1298,3 @@ main (int argc, char **argv)
return 0;
}
-
-
-static void
-v_fatal (const char *str, va_list ap)
-{
- fprintf (stderr, "%s: %s: ", progname, inc_filename);
- vfprintf (stderr, str, ap);
- fprintf (stderr, "\n");
-
- exit (FATAL_EXIT_CODE);
-}
-
-static void
-fatal (const char *str, ...)
-{
- va_list ap;
-
- va_start (ap, str);
- v_fatal (str, ap);
- va_end (ap);
-}