This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
tiny tweaks for errors.c
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 07 Oct 2003 13:02:26 -0700
- Subject: tiny tweaks for errors.c
errors.c doesn't need coretypes.h nor tm.h, and can use
IS_DIR_SEPARATOR.
Bootstrapped i686-linux.
zw
* errors.c: Don't include coretypes.h or tm.h.
(trim_filename): Use IS_DIR_SEPARATOR.
* Makefile.in: Update dependencies of errors.o and
$(BUILD_PREFIX_1)errors.o.
===================================================================
Index: Makefile.in
--- Makefile.in 7 Oct 2003 13:30:00 -0000 1.1165
+++ Makefile.in 7 Oct 2003 20:02:15 -0000
@@ -1522,7 +1522,7 @@ print-rtl.o : print-rtl.c $(CONFIG_H) $(
rtlanal.o : rtlanal.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h $(RTL_H) \
hard-reg-set.h $(TM_P_H) insn-config.h $(RECOG_H) real.h flags.h
-errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GTM_H) errors.h
+errors.o : errors.c $(CONFIG_H) $(SYSTEM_H) errors.h
$(CC) -c $(ALL_CFLAGS) -DGENERATOR_FILE $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION)
varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_H) \
@@ -2255,7 +2255,7 @@ $(BUILD_PREFIX_1)bitmap.o: $(srcdir)/bit
sed -e 's/config[.]h/bconfig.h/' $(srcdir)/bitmap.c > $(BUILD_PREFIX)bitmap.c
$(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)bitmap.c $(OUTPUT_OPTION)
-$(BUILD_PREFIX_1)errors.o: errors.c $(BCONFIG_H) coretypes.h $(GTM_H) $(SYSTEM_H) errors.h
+$(BUILD_PREFIX_1)errors.o: errors.c $(BCONFIG_H) $(SYSTEM_H) errors.h
rm -f $(BUILD_PREFIX)errors.c
sed -e 's/config[.]h/bconfig.h/' $(srcdir)/errors.c > $(BUILD_PREFIX)errors.c
$(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(INCLUDES) $(BUILD_PREFIX)errors.c $(OUTPUT_OPTION)
===================================================================
Index: errors.c
--- errors.c 1 Jun 2003 15:59:08 -0000 1.12
+++ errors.c 7 Oct 2003 20:02:15 -0000
@@ -25,8 +25,6 @@ Software Foundation, 59 Temple Place - S
#include "config.h"
#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
#include "errors.h"
/* Set this to argv[0] at the beginning of main. */
@@ -116,11 +114,7 @@ trim_filename (const char *name)
p++, q++;
/* Now go backwards until the previous directory separator. */
- while (p > name && p[-1] != DIR_SEPARATOR
-#ifdef DIR_SEPARATOR_2
- && p[-1] != DIR_SEPARATOR_2
-#endif
- )
+ while (p > name && !IS_DIR_SEPARATOR (p[-1]))
p--;
return p;