aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog27
-rw-r--r--gcc/Makefile.in37
-rw-r--r--gcc/acconfig.h3
-rw-r--r--gcc/build-make4
-rw-r--r--gcc/config.in6
-rwxr-xr-xgcc/configure149
-rw-r--r--gcc/configure.in4
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/Make-lang.in2
-rw-r--r--gcc/cppalloc.c83
-rw-r--r--gcc/cpperror.c38
-rw-r--r--gcc/cppmain.c2
-rw-r--r--gcc/fixinc/fixincl.c20
-rw-r--r--gcc/fixinc/fixlib.c2
-rw-r--r--gcc/fixinc/procopen.c2
-rw-r--r--gcc/gen-protos.c18
-rw-r--r--gcc/system.h11
17 files changed, 143 insertions, 269 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7a5f669..b9d0d98 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,30 @@
+2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
+
+ * Makefile.in (STMP_FIXINC): New toggle.
+ (LIBGCC2_DEPS): Delete all references.
+ (stmp-headers): Delete target. All references either deleted
+ or changed to stmp-int-headers.
+ (all.cross): Don't depend on stmp-headers or STMP_FIXPROTO.
+ (LIBCPP_OBJS): Take out cppalloc.o.
+ (cppalloc.o): Delete target.
+ (stmp-int-hdrs): Depend on $(STMP_FIXINC).
+ (gen-protos, fix-header): Link with libiberty.a.
+ * build-make: Don't change FIXINCLUDES. Override STMP_FIXINC
+ to empty.
+
+ * configure.in: Remove refs to strerror.
+ * acconfig.h: Take out NEED_DECLARATION_STRERROR.
+ * system.h: Take out strerror stanza.
+
+ * cpperror.c (my_strerror): Delete function.
+ (cpp_error_from_errno, cpp_notice_from_errno): Use xstrerror.
+ * cppmain.c (main): Call xmalloc_set_program_name first thing.
+ * cppalloc.c: Delete file.
+ * gen-protos.c: Don't provide xrealloc.
+
+ * fixinc/fixincl.c, fixinc/fixlib.c, fixinc/procopen.c: Use
+ xstrerror throughout.
+
2000-02-26 Bruce Korb <bkorb@gnu.org>
fixinc/inclhack.def(undefine_null): the bypass pattern needs to
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index c05d763..bdba804 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -219,8 +219,9 @@ SYSTEM_HEADER_DIR = /usr/include
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
CROSS_SYSTEM_HEADER_DIR = $(tooldir)/sys-include
-# Control whether to run fixproto.
+# Control whether to run fixproto and fixincludes.
STMP_FIXPROTO = stmp-fixproto
+STMP_FIXINC = stmp-fixinc
# Test to see whether <limits.h> exists in the system header files.
LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
@@ -359,10 +360,6 @@ LIBGCC2_INCLUDES =
# Additional target-dependent options for compiling libgcc2.a.
TARGET_LIBGCC2_CFLAGS =
-# Things which must be built before building libgcc2.a.
-# Some targets override this to stmp-int-hdrs
-LIBGCC2_DEPS =
-
# libgcc1-test target (must also be overridable for a target)
LIBGCC1_TEST = libgcc1-test
@@ -836,7 +833,7 @@ all.internal: start.encap rest.encap doc
# This is what to compile if making a cross-compiler.
# Note that we can compile enquire using the cross-compiler just built,
# although we can't run it on this machine.
-all.cross: native gcc-cross xcpp$(exeext) specs stmp-headers $(STMP_FIXPROTO) \
+all.cross: native gcc-cross xcpp$(exeext) specs \
$(LIBGCC) $(LIBGCC1_TEST) $(EXTRA_PARTS) lang.all.cross doc
# This is what to compile if making gcc with a cross-compiler.
all.build: native xgcc$(exeext) xcpp$(exeext) $(EXTRA_PARTS) lang.all.build
@@ -844,7 +841,7 @@ all.build: native xgcc$(exeext) xcpp$(exeext) $(EXTRA_PARTS) lang.all.build
start.encap: native xgcc$(exeext) xcpp$(exeext) specs $(LIBGCC1) \
xlimits.h lang.start.encap
# These can't be made until after GCC can run.
-rest.encap: stmp-headers $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
+rest.encap: $(STMP_FIXPROTO) $(LIBGCC) $(EXTRA_PARTS) lang.rest.encap
# This is what is made with the host's compiler
# whether making a cross compiler or not.
native: config.status auto-host.h cpp$(exeext) intl.all $(LANGUAGES) \
@@ -1047,7 +1044,7 @@ libgcc1.S: libgcc1.c $(CONFIG_H) config.status
# Compiling libgcc2.a requires making sure that cc1, etc. have been compiled.
# But recompiling cc1 should not force recompilation of libgcc2.a.
# If you want to force recompilation, delete libgcc2.a.
-libgcc2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs $(STMP_FIXPROTO)
+libgcc2.ready: $(GCC_PASSES) stmp-int-hdrs $(STMP_FIXPROTO)
-if [ -f libgcc2.ready ] ; then \
true; \
else \
@@ -2023,7 +2020,7 @@ cccp.o: cccp.c $(CONFIG_H) intl.h pcp.h version.c config.status system.h \
$(PREPROCESSOR_DEFINES) \
-c `echo $(srcdir)/cccp.c | sed 's,^\./,,'`
-LIBCPP_OBJS = cpplib.o cpphash.o cppalloc.o cpperror.o cppexp.o cppfiles.o \
+LIBCPP_OBJS = cpplib.o cpphash.o cpperror.o cppexp.o cppfiles.o \
cppinit.o cppulp.o prefix.o version.o mbchar.o @extra_cpp_objs@
# All the other archives built/used by this makefile are for targets. This
@@ -2042,7 +2039,6 @@ cppmain.o: cppmain.c $(CONFIG_H) cpplib.h intl.h system.h
cppulp.o: cppulp.c $(CONFIG_H) system.h output.h
cpplib.o: cpplib.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h
cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h system.h cpphash.h version.h
-cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h system.h
cpperror.o: cpperror.c $(CONFIG_H) cpplib.h intl.h system.h
cppexp.o: cppexp.c $(CONFIG_H) cpplib.h intl.h system.h
cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h intl.h system.h
@@ -2131,7 +2127,7 @@ gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS)
# Build the include directory including float.h (which no longer depends upon
# enquire).
-stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
+stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h
# Copy in the headers provided with gcc.
# The sed command gets just the last file name component;
# this is necessary because VPATH could add a dirname.
@@ -2160,10 +2156,6 @@ stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h
chmod a+r include/README
touch $@
-# Now that float.h no longer depends upon enquire, this is actually a no-op.
-stmp-headers:
- touch $@
-
# fixinc.sh depends on this, not on specs directly.
# The idea is to make sure specs gets built, but not rerun fixinc.sh
# after each stage just because specs' mtime has changed.
@@ -2215,6 +2207,9 @@ stmp-fixinc: fixinc.sh gsyslimits.h
touch stmp-fixinc
# Files related to the fixproto script.
+# gen-protos and fix-header are compiled with HOST_CC, but they are only
+# used in native and host-x-target builds, so it's safe to link them with
+# libiberty.a.
deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
if [ -d $(SYSTEM_HEADER_DIR) ]; \
@@ -2230,7 +2225,7 @@ deduced.h: $(GCC_PASSES) $(srcdir)/scan-types.sh stmp-int-hdrs
GEN_PROTOS_OBJS = gen-protos.o scan.o
gen-protos: $(GEN_PROTOS_OBJS)
${HOST_CC} $(HOST_CFLAGS) $(HOST_LDFLAGS) -o gen-protos \
- $(GEN_PROTOS_OBJS)
+ $(GEN_PROTOS_OBJS) ../libiberty/libiberty.a
gen-protos.o: gen-protos.c scan.h $(build_xm_file) system.h
$(HOST_CC) -c $(HOST_CFLAGS) $(HOST_CPPFLAGS) $(INCLUDES) $(srcdir)/gen-protos.c
@@ -2250,7 +2245,7 @@ xsys-protos.h: $(GCC_PASSES) $(srcdir)/sys-protos.h deduced.h gen-protos Makefil
fix-header: fix-header.o scan-decls.o scan.o xsys-protos.h $(HOST_LIBDEPS) \
libcpp.a
$(HOST_CC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o $@ fix-header.o \
- scan-decls.o scan.o libcpp.a $(HOST_LIBS)
+ scan-decls.o scan.o libcpp.a $(HOST_LIBS) ../libiberty/libiberty.a
fix-header.o: fix-header.c $(srcdir)/../include/obstack.h scan.h \
xsys-protos.h $(build_xm_file) system.h cpplib.h
@@ -2270,10 +2265,10 @@ fixhdr.ready: fix-header
touch fixhdr.ready; \
fi
-# stmp-headers is to make sure fixincludes has already finished.
+# stmp-int-headers is to make sure fixincludes has already finished.
# The if statement is so that we don't run fixproto a second time
# if it has already been run on the files in `include'.
-stmp-fixproto: fixhdr.ready fixproto stmp-headers
+stmp-fixproto: fixhdr.ready fixproto stmp-int-hdrs
@echo "Various warnings and error messages from fixproto are normal"
-if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi
-if [ -f include/fixed ] ; then true; \
@@ -2689,7 +2684,7 @@ install-include-dir: installdirs
-chmod a+rx $(libsubdir)/include
# Install the include directory using tar.
-install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
+install-headers-tar: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
# We use `pwd`/include instead of just include to problems with CDPATH
# Unless a full pathname is provided, some shells would print the new CWD,
# found in CDPATH, corrupting the output. We could just redirect the
@@ -2701,7 +2696,7 @@ install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
# So use `exit 0' to ignore its exit status.
# Install the include directory using cpio.
-install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
+install-headers-cpio: stmp-int-hdrs $(STMP_FIXPROTO) install-include-dir
# See discussion about the use of `pwd` above
cd `pwd`/include ; \
find . -print | cpio -pdum $(libsubdir)/include
diff --git a/gcc/acconfig.h b/gcc/acconfig.h
index f52eddf..b86b4d3 100644
--- a/gcc/acconfig.h
+++ b/gcc/acconfig.h
@@ -123,9 +123,6 @@
/* Whether abort must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_ABORT
-/* Whether strerror must be declared even if <string.h> is included. */
-#undef NEED_DECLARATION_STRERROR
-
/* Whether strsignal must be declared even if <string.h> is included. */
#undef NEED_DECLARATION_STRSIGNAL
diff --git a/gcc/build-make b/gcc/build-make
index f9049ae..1e40dd7 100644
--- a/gcc/build-make
+++ b/gcc/build-make
@@ -22,9 +22,7 @@ HOST_OBSTACK=$(OBSTACK)
# To build the native compiler with the cross compiler, the headers
# for the target are already fixed. And /usr/include is for host, not
# target.
-FIXINCLUDES=Makefile.in
-
-# Don't run fixproto either
+STMP_FIXINC =
STMP_FIXPROTO =
# Cause installation using install-build. We do nothing here.
diff --git a/gcc/config.in b/gcc/config.in
index 671ae67..7ef6bcd 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -124,9 +124,6 @@
/* Whether abort must be declared even if <stdlib.h> is included. */
#undef NEED_DECLARATION_ABORT
-/* Whether strerror must be declared even if <string.h> is included. */
-#undef NEED_DECLARATION_STRERROR
-
/* Whether strsignal must be declared even if <string.h> is included. */
#undef NEED_DECLARATION_STRSIGNAL
@@ -335,9 +332,6 @@
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
-/* Define if you have the strerror function. */
-#undef HAVE_STRERROR
-
/* Define if you have the strrchr function. */
#undef HAVE_STRRCHR
diff --git a/gcc/configure b/gcc/configure
index 117b0ff..82de798 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -2221,7 +2221,7 @@ EOF
fi
-for ac_func in strtoul bsearch strerror putenv popen bcopy bzero bcmp \
+for ac_func in strtoul bsearch putenv popen bcopy bzero bcmp \
index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
fputs_unlocked getrusage valloc
@@ -2896,7 +2896,7 @@ fi
for ac_func in bcopy bzero bcmp \
- index rindex getenv atol sbrk abort atof strerror getcwd getwd \
+ index rindex getenv atol sbrk abort atof getcwd getwd \
strsignal putc_unlocked fputs_unlocked strstr environ
do
echo $ac_n "checking whether $ac_func must be declared""... $ac_c" 1>&6
@@ -6708,7 +6708,7 @@ else
int main() {
/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
+typedef int charset[2]; const charset x = {0,0};
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
@@ -6783,7 +6783,7 @@ for ac_kw in inline __inline__ __inline; do
#include "confdefs.h"
int main() {
-} $ac_kw foo() {
+} int $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:6790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
@@ -6889,7 +6889,7 @@ else
#include "confdefs.h"
#include <alloca.h>
int main() {
-char *p = alloca(2 * sizeof(int));
+void *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:6896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
@@ -7242,12 +7242,15 @@ else
#include <sys/types.h>
#include <fcntl.h>
#include <sys/mman.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
-# ifdef HAVE_UNISTD_H
-# include <unistd.h>
-# endif
/* Assume that all systems that can run configure have sys/param.h. */
# ifndef HAVE_SYS_PARAM_H
@@ -7302,7 +7305,7 @@ main()
/*
* First, make a file with some known garbage in it.
*/
- data = malloc(pagesize);
+ data = (char*)malloc(pagesize);
if (!data)
exit(1);
for (i = 0; i < pagesize; ++i)
@@ -7323,7 +7326,7 @@ main()
fd = open("conftestmmap", O_RDWR);
if (fd < 0)
exit(1);
- data2 = malloc(2 * pagesize);
+ data2 = (char*)malloc(2 * pagesize);
if (!data2)
exit(1);
data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
@@ -7341,7 +7344,7 @@ main()
*/
for (i = 0; i < pagesize; ++i)
*(data2 + i) = *(data2 + i) + 1;
- data3 = malloc(pagesize);
+ data3 = (char*)malloc(pagesize);
if (!data3)
exit(1);
if (read(fd, data3, pagesize) != pagesize)
@@ -7355,7 +7358,7 @@ main()
}
EOF
-if { (eval echo configure:7359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -7383,17 +7386,17 @@ unistd.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:7387: checking for $ac_hdr" >&5
+echo "configure:7390: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7392 "configure"
+#line 7395 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -7423,12 +7426,12 @@ done
strdup __argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7427: checking for $ac_func" >&5
+echo "configure:7430: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7432 "configure"
+#line 7435 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7451,7 +7454,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7480,12 +7483,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7484: checking for $ac_func" >&5
+echo "configure:7487: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7489 "configure"
+#line 7492 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7508,7 +7511,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7542,19 +7545,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:7546: checking for LC_MESSAGES" >&5
+echo "configure:7549: checking for LC_MESSAGES" >&5
if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7551 "configure"
+#line 7554 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:7558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
am_cv_val_LC_MESSAGES=yes
else
@@ -7575,7 +7578,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:7579: checking whether NLS is requested" >&5
+echo "configure:7582: checking whether NLS is requested" >&5
# Check whether --enable-nls or --disable-nls was given.
if test "${enable_nls+set}" = set; then
enableval="$enable_nls"
@@ -7595,7 +7598,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:7599: checking whether included gettext is requested" >&5
+echo "configure:7602: checking whether included gettext is requested" >&5
# Check whether --with-included-gettext or --without-included-gettext was given.
if test "${with_included_gettext+set}" = set; then
withval="$with_included_gettext"
@@ -7614,17 +7617,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:7618: checking for libintl.h" >&5
+echo "configure:7621: checking for libintl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7623 "configure"
+#line 7626 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:7628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:7631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -7641,19 +7644,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:7645: checking for gettext in libc" >&5
+echo "configure:7648: checking for gettext in libc" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7650 "configure"
+#line 7653 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:7657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
gt_cv_func_gettext_libc=yes
else
@@ -7669,7 +7672,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:7673: checking for bindtextdomain in -lintl" >&5
+echo "configure:7676: checking for bindtextdomain in -lintl" >&5
ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7677,7 +7680,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7681 "configure"
+#line 7684 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7688,7 +7691,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:7692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7704,12 +7707,12 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:7708: checking for gettext in libintl" >&5
+echo "configure:7711: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
-echo "configure:7713: checking for gettext in -lintl" >&5
+echo "configure:7716: checking for gettext in -lintl" >&5
ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7717,7 +7720,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7721 "configure"
+#line 7724 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -7728,7 +7731,7 @@ int main() {
gettext()
; return 0; }
EOF
-if { (eval echo configure:7732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -7767,7 +7770,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7771: checking for $ac_word" >&5
+echo "configure:7774: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7801,12 +7804,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:7805: checking for $ac_func" >&5
+echo "configure:7808: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 7810 "configure"
+#line 7813 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -7829,7 +7832,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:7833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -7856,7 +7859,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7860: checking for $ac_word" >&5
+echo "configure:7863: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7892,7 +7895,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:7896: checking for $ac_word" >&5
+echo "configure:7899: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -7924,7 +7927,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 7928 "configure"
+#line 7931 "configure"
#include "confdefs.h"
int main() {
@@ -7932,7 +7935,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:7936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -7955,7 +7958,7 @@ fi
if test "$CATOBJEXT" = "NONE"; then
echo $ac_n "checking whether catgets can be used""... $ac_c" 1>&6
-echo "configure:7959: checking whether catgets can be used" >&5
+echo "configure:7962: checking whether catgets can be used" >&5
# Check whether --with-catgets or --without-catgets was given.
if test "${with_catgets+set}" = set; then
withval="$with_catgets"
@@ -7968,7 +7971,7 @@ fi
if test "$nls_cv_use_catgets" = "yes"; then
echo $ac_n "checking for main in -li""... $ac_c" 1>&6
-echo "configure:7972: checking for main in -li" >&5
+echo "configure:7975: checking for main in -li" >&5
ac_lib_var=`echo i'_'main | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -7976,14 +7979,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-li $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 7980 "configure"
+#line 7983 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:7987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:7990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -8011,12 +8014,12 @@ else
fi
echo $ac_n "checking for catgets""... $ac_c" 1>&6
-echo "configure:8015: checking for catgets" >&5
+echo "configure:8018: checking for catgets" >&5
if eval "test \"`echo '$''{'ac_cv_func_catgets'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8020 "configure"
+#line 8023 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char catgets(); below. */
@@ -8039,7 +8042,7 @@ catgets();
; return 0; }
EOF
-if { (eval echo configure:8043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:8046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_catgets=yes"
else
@@ -8061,7 +8064,7 @@ EOF
# Extract the first word of "gencat", so it can be a program name with args.
set dummy gencat; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8065: checking for $ac_word" >&5
+echo "configure:8068: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8097,7 +8100,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8101: checking for $ac_word" >&5
+echo "configure:8104: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8134,7 +8137,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8138: checking for $ac_word" >&5
+echo "configure:8141: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8169,7 +8172,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8173: checking for $ac_word" >&5
+echo "configure:8176: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8227,7 +8230,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8231: checking for $ac_word" >&5
+echo "configure:8234: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8261,7 +8264,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8265: checking for $ac_word" >&5
+echo "configure:8268: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8297,7 +8300,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:8301: checking for $ac_word" >&5
+echo "configure:8304: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8390,7 +8393,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:8394: checking for catalogs to be installed" >&5
+echo "configure:8397: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -8418,17 +8421,17 @@ echo "configure:8394: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:8422: checking for linux/version.h" >&5
+echo "configure:8425: checking for linux/version.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 8427 "configure"
+#line 8430 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -8503,7 +8506,7 @@ fi
echo $ac_n "checking whether windows registry support is requested""... $ac_c" 1>&6
-echo "configure:8507: checking whether windows registry support is requested" >&5
+echo "configure:8510: checking whether windows registry support is requested" >&5
if test x$enable_win32_registry != xno; then
cat >> confdefs.h <<\EOF
#define ENABLE_WIN32_REGISTRY 1
@@ -8532,7 +8535,7 @@ esac
if test x$enable_win32_registry != xno; then
echo $ac_n "checking registry key on windows hosts""... $ac_c" 1>&6
-echo "configure:8536: checking registry key on windows hosts" >&5
+echo "configure:8539: checking registry key on windows hosts" >&5
cat >> confdefs.h <<EOF
#define WIN32_REGISTRY_KEY "$gcc_cv_win32_registry_key"
EOF
@@ -8708,7 +8711,7 @@ fi
# Figure out what assembler alignment features are present.
echo $ac_n "checking assembler alignment features""... $ac_c" 1>&6
-echo "configure:8712: checking assembler alignment features" >&5
+echo "configure:8715: checking assembler alignment features" >&5
gcc_cv_as=
gcc_cv_as_alignment_features=
gcc_cv_as_gas_srcdir=`echo $srcdir | sed -e 's,/gcc$,,'`/gas
@@ -8829,7 +8832,7 @@ fi
echo "$ac_t""$gcc_cv_as_alignment_features" 1>&6
echo $ac_n "checking assembler subsection support""... $ac_c" 1>&6
-echo "configure:8833: checking assembler subsection support" >&5
+echo "configure:8836: checking assembler subsection support" >&5
gcc_cv_as_subsections=
if test x$gcc_cv_as != x; then
# Check if we have .subsection
@@ -8871,7 +8874,7 @@ echo "$ac_t""$gcc_cv_as_subsections" 1>&6
case "$target" in
sparc*-*-*)
echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6
-echo "configure:8875: checking assembler .register pseudo-op support" >&5
+echo "configure:8878: checking assembler .register pseudo-op support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_register_pseudo_op'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8901,7 +8904,7 @@ EOF
case "$tm_file" in
*64*)
echo $ac_n "checking for 64 bit support in assembler ($gcc_cv_as)""... $ac_c" 1>&6
-echo "configure:8905: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
+echo "configure:8908: checking for 64 bit support in assembler ($gcc_cv_as)" >&5
if eval "test \"`echo '$''{'gcc_cv_as_flags64'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8946,7 +8949,7 @@ EOF
if test "x$gcc_cv_as_flags64" != xno; then
echo $ac_n "checking for assembler offsetable %lo() support""... $ac_c" 1>&6
-echo "configure:8950: checking for assembler offsetable %lo() support" >&5
+echo "configure:8953: checking for assembler offsetable %lo() support" >&5
if eval "test \"`echo '$''{'gcc_cv_as_offsetable_lo10'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -8985,7 +8988,7 @@ EOF
i[34567]86-*-*)
echo $ac_n "checking assembler instructions""... $ac_c" 1>&6
-echo "configure:8989: checking assembler instructions" >&5
+echo "configure:8992: checking assembler instructions" >&5
gcc_cv_as_instructions=
if test x$gcc_cv_as != x; then
set "filds fists" "filds mem; fists mem"
diff --git a/gcc/configure.in b/gcc/configure.in
index 7d1857a..71720f6 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -376,7 +376,7 @@ if test $gcc_cv_header_inttypes_h = yes; then
AC_DEFINE(HAVE_INTTYPES_H)
fi
-AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
+AC_CHECK_FUNCS(strtoul bsearch putenv popen bcopy bzero bcmp \
index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
sysconf isascii gettimeofday strsignal putc_unlocked fputc_unlocked \
fputs_unlocked getrusage valloc)
@@ -399,7 +399,7 @@ AC_FUNC_VFORK
AC_FUNC_MMAP_ANYWHERE
GCC_NEED_DECLARATIONS(bcopy bzero bcmp \
- index rindex getenv atol sbrk abort atof strerror getcwd getwd \
+ index rindex getenv atol sbrk abort atof getcwd getwd \
strsignal putc_unlocked fputs_unlocked strstr environ)
GCC_NEED_DECLARATIONS(malloc realloc calloc free, [
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d482875..7cbf336 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
+
+ * Make-lang.in: Delete refs to LIBGCC2_DEPS.
+
Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
* optimize.c (expand_call_inline): Emit the return label before
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
index 3c6c243..619f2c51 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -187,7 +187,7 @@ cplib2.txt: $(CXX_LIB2SRCS) $(CXX_EXTRA_HEADERS) cplib2.ready
# Don't try to do write if `.' is not writable;
# in that case, we're installing from someone else's directory.
# But go ahead and fail if that directory hasn't been properly built.
-cplib2.ready: $(GCC_PASSES) $(LIBGCC2_DEPS) stmp-int-hdrs
+cplib2.ready: $(GCC_PASSES) stmp-int-hdrs $(STMP_FIXPROTO)
@if [ -r cplib2.txt -a -w . ]; then \
case " $(LANGUAGES) " in \
*" "[cC]"++ "*) \
diff --git a/gcc/cppalloc.c b/gcc/cppalloc.c
deleted file mode 100644
index acebfb5..0000000
--- a/gcc/cppalloc.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Part of CPP library. (memory allocation - xmalloc etc)
- Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1998, 1999, 2000
- Free Software Foundation, Inc.
- Written by Per Bothner, 1994.
- Based on CCCP program by Paul Rubin, June 1986
- Adapted to ANSI C, Richard Stallman, Jan 1987
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 2, or (at your option) any
-later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
- In other words, you are welcome to use, share and improve this program.
- You are forbidden to forbid anyone else to use, share and improve
- what you give them. Help stamp out software-hoarding! */
-
-#include "config.h"
-#include "system.h"
-#include "cpplib.h"
-#include "intl.h"
-
-static void memory_full PARAMS ((void)) ATTRIBUTE_NORETURN;
-
-static void
-memory_full ()
-{
- fprintf (stderr, _("%s: virtual memory exhausted\n"), progname);
- exit (FATAL_EXIT_CODE);
-}
-
-PTR
-xmalloc (size)
- size_t size;
-{
- register PTR ptr = (PTR) malloc (size);
- if (ptr == 0)
- memory_full ();
- return ptr;
-}
-
-PTR
-xcalloc (number, size)
- size_t number, size;
-{
- register PTR ptr = (PTR) calloc (number, size);
- if (ptr == 0)
- memory_full ();
- return ptr;
-}
-
-PTR
-xrealloc (old, size)
- PTR old;
- size_t size;
-{
- register PTR ptr;
- if (old)
- ptr = (PTR) realloc (old, size);
- else
- ptr = (PTR) malloc (size);
- if (ptr == 0)
- memory_full ();
- return ptr;
-}
-
-char *
-xstrdup (input)
- const char *input;
-{
- size_t size = strlen (input) + 1;
- char *output = xmalloc (size);
- memcpy (output, input, size);
- return output;
-}
diff --git a/gcc/cpperror.c b/gcc/cpperror.c
index 0e1470a..b72740c 100644
--- a/gcc/cpperror.c
+++ b/gcc/cpperror.c
@@ -28,46 +28,12 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "cpplib.h"
#include "intl.h"
-static const char *my_strerror PARAMS ((int));
static void cpp_print_containing_files PARAMS ((cpp_reader *, cpp_buffer *));
static void cpp_print_file_and_line PARAMS ((const char *, long, long));
static void v_cpp_message PARAMS ((cpp_reader *, int,
const char *, long, long,
const char *, va_list));
-/* my_strerror - return the descriptive text associated with an
- `errno' code.
- XXX - link with libiberty so we can use its strerror(). */
-
-static const char *
-my_strerror (errnum)
- int errnum;
-{
- const char *result;
-
-#ifndef VMS
-#ifndef HAVE_STRERROR
- result = (char *) ((errnum < sys_nerr) ? sys_errlist[errnum] : 0);
-#else
- result = strerror (errnum);
-#endif
-#else /* VMS */
- /* VAXCRTL's strerror() takes an optional second argument, which only
- matters when the first argument is EVMSERR. However, it's simplest
- just to pass it unconditionally. `vaxc$errno' is declared in
- <errno.h>, and maintained by the library in parallel with `errno'.
- We assume that caller's `errnum' either matches the last setting of
- `errno' by the library or else does not have the value `EVMSERR'. */
-
- result = strerror (errnum, vaxc$errno);
-#endif
-
- if (!result)
- result = "errno = ?";
-
- return result;
-}
-
/* Print the file names and line numbers of the #include
commands which led to the current file. */
@@ -294,7 +260,7 @@ cpp_error_from_errno (pfile, name)
cpp_reader *pfile;
const char *name;
{
- cpp_error (pfile, "%s: %s", name, my_strerror (errno));
+ cpp_error (pfile, "%s: %s", name, xstrerror (errno));
}
void
@@ -473,5 +439,5 @@ cpp_notice_from_errno (pfile, name)
cpp_reader *pfile;
const char *name;
{
- cpp_notice (pfile, "%s: %s", name, my_strerror (errno));
+ cpp_notice (pfile, "%s: %s", name, xstrerror (errno));
}
diff --git a/gcc/cppmain.c b/gcc/cppmain.c
index edfc853..b2f1ddb 100644
--- a/gcc/cppmain.c
+++ b/gcc/cppmain.c
@@ -46,6 +46,8 @@ main (argc, argv)
while (p != argv[0] && p[-1] != '/') --p;
progname = p;
+ xmalloc_set_program_name (progname);
+
#ifdef HAVE_LC_MESSAGES
setlocale (LC_MESSAGES, "");
#endif
diff --git a/gcc/fixinc/fixincl.c b/gcc/fixinc/fixincl.c
index 6a5ca18..fb5f68b 100644
--- a/gcc/fixinc/fixincl.c
+++ b/gcc/fixinc/fixincl.c
@@ -183,7 +183,7 @@ main (argc, argv)
if (freopen (argv[1], "r", stdin) == (FILE*)NULL)
{
fprintf (stderr, "Error %d (%s) reopening %s as stdin\n",
- errno, strerror (errno), argv[1] );
+ errno, xstrerror (errno), argv[1] );
exit (EXIT_FAILURE);
}
break;
@@ -264,7 +264,7 @@ main (argc, argv)
if (child == NOPROCESS)
{
fprintf (stderr, "Error %d (%s) forking in main\n",
- errno, strerror (errno));
+ errno, xstrerror (errno));
exit (EXIT_FAILURE);
}
@@ -464,7 +464,7 @@ wait_for_pid(child)
default:
if (NOT_SILENT)
fprintf (stderr, "Error %d (%s) waiting for %d to finish\n",
- errno, strerror( errno ), child );
+ errno, xstrerror( errno ), child );
/* FALLTHROUGH */
case ECHILD: /* no children to wait for?? */
@@ -492,7 +492,7 @@ load_file ( fname )
{
if (NOT_SILENT)
fprintf (stderr, "error %d (%s) stat-ing %s\n",
- errno, strerror (errno), fname );
+ errno, xstrerror (errno), fname );
return (char *) NULL;
}
if (stbf.st_size == 0)
@@ -506,7 +506,7 @@ load_file ( fname )
{
if (NOT_SILENT)
fprintf (stderr, "error %d (%s) opening %s for read\n",
- errno, strerror (errno), fname);
+ errno, xstrerror (errno), fname);
return (char*)NULL;
}
@@ -724,7 +724,7 @@ create_file ()
if (fd < 0)
{
fprintf (stderr, "Error %d (%s) creating %s\n",
- errno, strerror (errno), fname);
+ errno, xstrerror (errno), fname);
exit (EXIT_FAILURE);
}
if (NOT_SILENT)
@@ -968,7 +968,7 @@ internal_fix (read_fd, p_fixd)
/*
* Parent in error
*/
- fprintf (stderr, z_fork_err, errno, strerror (errno),
+ fprintf (stderr, z_fork_err, errno, xstrerror (errno),
p_fixd->fix_name);
{
static int failCt = 0;
@@ -1058,7 +1058,7 @@ start_fixer (read_fd, p_fixd, pz_fix_file)
break;
}
- fprintf (stderr, z_fork_err, errno, strerror (errno),
+ fprintf (stderr, z_fork_err, errno, xstrerror (errno),
p_fixd->fix_name);
if ((errno != EAGAIN) || (++failCt > 10))
@@ -1307,7 +1307,7 @@ process ()
int erno = errno;
fprintf (stderr, "Cannot access %s from %s\n\terror %d (%s)\n",
pz_curr_file, getcwd ((char *) NULL, MAXPATHLEN),
- erno, strerror (erno));
+ erno, xstrerror (erno));
return;
}
@@ -1352,7 +1352,7 @@ process ()
if (read_fd < 0)
{
fprintf (stderr, "Error %d (%s) opening %s\n", errno,
- strerror (errno), pz_curr_file);
+ xstrerror (errno), pz_curr_file);
exit (EXIT_FAILURE);
}
diff --git a/gcc/fixinc/fixlib.c b/gcc/fixinc/fixlib.c
index 9c8e534..133aa8e 100644
--- a/gcc/fixinc/fixlib.c
+++ b/gcc/fixinc/fixlib.c
@@ -63,7 +63,7 @@ load_file_data (fp)
int err = errno;
if (err != EISDIR)
fprintf (stderr, "error %d (%s) reading input\n", err,
- strerror (err));
+ xstrerror (err));
free ((void *) pz_data);
fclose (fp);
return (char *) NULL;
diff --git a/gcc/fixinc/procopen.c b/gcc/fixinc/procopen.c
index 086a21e..ed50e0b 100644
--- a/gcc/fixinc/procopen.c
+++ b/gcc/fixinc/procopen.c
@@ -194,7 +194,7 @@ chain_open (stdin_fd, pp_args, p_child)
execvp (pz_cmd, pp_args);
fprintf (stderr, "Error %d: Could not execvp( '%s', ... ): %s\n",
- errno, pz_cmd, strerror (errno));
+ errno, pz_cmd, xstrerror (errno));
exit (EXIT_PANIC);
}
diff --git a/gcc/gen-protos.c b/gcc/gen-protos.c
index 4858b4f..0bf6ea9 100644
--- a/gcc/gen-protos.c
+++ b/gcc/gen-protos.c
@@ -192,21 +192,3 @@ main (argc, argv)
return 0;
}
-
-/* Needed by scan.o. We can't use libiberty here. */
-PTR
-xrealloc (p, s)
- PTR p;
- size_t s;
-{
- PTR r;
- if (s == 0)
- s = 1;
- if (p)
- r = realloc (p, s);
- else
- r = malloc (s);
- if (!r)
- abort ();
- return r;
-}
diff --git a/gcc/system.h b/gcc/system.h
index 06ef2c8..cdbcf9d 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -399,17 +399,6 @@ extern PTR calloc PARAMS ((size_t, size_t));
extern PTR realloc PARAMS ((PTR, size_t));
#endif
-#ifdef HAVE_STRERROR
-# ifdef NEED_DECLARATION_STRERROR
-# ifndef strerror
-extern char *strerror PARAMS ((int));
-# endif
-# endif
-#else /* ! HAVE_STRERROR */
-extern int sys_nerr;
-extern char *sys_errlist[];
-#endif /* HAVE_STRERROR */
-
/* If the system doesn't provide strsignal, we get it defined in
libiberty but no declaration is supplied. */
#ifdef NEED_DECLARATION_STRSIGNAL