]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Update from Cygnus libiberty.
authorJeff Law <law@gcc.gnu.org>
Fri, 15 May 1998 23:42:58 +0000 (17:42 -0600)
committerJeff Law <law@gcc.gnu.org>
Fri, 15 May 1998 23:42:58 +0000 (17:42 -0600)
libiberty uses autoconf now.

From-SVN: r19791

37 files changed:
libiberty/ChangeLog
libiberty/Makefile.in
libiberty/README
libiberty/alloca-botch.h [deleted file]
libiberty/alloca-norm.h [deleted file]
libiberty/atexit.c
libiberty/basename.c
libiberty/clock.c
libiberty/config.table
libiberty/config/mh-a68bsd [deleted file]
libiberty/config/mh-aix
libiberty/config/mh-apollo68 [deleted file]
libiberty/config/mh-cygwin32 [deleted file]
libiberty/config/mh-go32 [deleted file]
libiberty/config/mh-hpbsd [deleted file]
libiberty/config/mh-irix4 [deleted file]
libiberty/config/mh-ncr3000 [deleted file]
libiberty/config/mh-riscix [deleted file]
libiberty/config/mh-sysv [deleted file]
libiberty/config/mh-sysv4 [deleted file]
libiberty/config/mh-windows
libiberty/config/mt-mingw32 [deleted file]
libiberty/config/mt-sunos4 [deleted file]
libiberty/config/mt-vxworks5 [deleted file]
libiberty/configure.bat
libiberty/configure.in
libiberty/cplus-dem.c
libiberty/dummy.c [deleted file]
libiberty/functions.def [deleted file]
libiberty/getcwd.c
libiberty/getpagesize.c
libiberty/getruntime.c
libiberty/makefile.vms
libiberty/mpw-config.in
libiberty/strerror.c
libiberty/strsignal.c
libiberty/vmsbuild.com

index b99961fc9c0d43bc03f5fcc392e7684fc50f24cc..20fc2840e8f75e8fa31f05adab420c14d0622206 100644 (file)
 Wed May 13 14:24:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
-        * cplus-dem.c (squangle_mop_up): Change return type to void.
-        (internal_cplus_demangle): Remove unused parameter `options'.
-        All callers changed.
-        (cplus_demangle_opname): Remove function wide variable `int i' and
-        replace with `size_t i' at each location where it is used.
-        (cplus_mangle_opname): change type of `i' from int to size_t.
+       * cplus-dem.c (squangle_mop_up): Change return type to void.
+       (internal_cplus_demangle): Remove unused parameter `options'.
+       All callers changed.
+       (cplus_demangle_opname): Remove function wide variable `int i' and
+       replace with `size_t i' at each location where it is used.
+       (cplus_mangle_opname): change type of `i' from int to size_t.
+
+Wed May 13 13:39:38 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+       * alloca-conf.h: Include config.h.  Check HAVE_ALLOCA_H rather
+       than sparc or sun.
+       * Makefile.in (argv.o): Depend upon config.h and alloca-conf.h.
+
+Fri May  8 00:23:51 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+       * configure.in: Set libiberty_topdir correctly when srcdir is
+       "." and with_target_subdir is not set.
+       * configure: Rebuild.
+
+Thu May  7 13:01:44 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+       * configure.in: Add *-*-mingw32* case.
+       * configure: Rebuild.
+
+Wed May  6 11:33:51 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+       * config.table: Never use a PIC file for *-*-cygwin32*.
+
+       * Makefile.in (config.status): Depend upon config.table.
+
+       * configure.in: On a cygwin32 host, always compile random, and
+       don't test for sys_siglist, strsignal, or psignal.
+       * configure: Rebuild.
+
+       * clock.c: Check HAVE_SYS_PARAM_H rather than NO_SYS_PARAM_H.
+       * getcwd.c: Likewise.
+       * getpagesize.c: Likewise.
+       * getruntime.c: Likewise.
+
+Tue May  5 18:08:32 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+       Use autoconf tests rather than the old dummy.c test:
+       * configure.in: Add AC_ARG_WITH calls for --with-target-subdir and
+       --with-newlib.  Add AC_CONFIG_HEADER.  Use AC_REPLACE_FUNCS for
+       most functions.  Add special cases to handle newlib and VxWorks.
+       Remove target_makefile_frag.  Create stamp-h in AC_OUTPUT if
+       CONFIG_HEADERS is set.  Only call config-ml.in in AC_OUTPUT if
+       CONFIG_FILES is set; set ac_file before calling it.
+       * config.table (arm-*-riscix*, *-*-cygwin32): Remove.
+       (*-*-hpux*, *-*-hiux*, *-*-irix4*, *-*-solaris2*): Remove.
+       (*-*-sysv4*, *-*-go32, *-*-vxworks5*, *-*-vxworks): Remove
+       (i[3456]-*-mingw32*): Remove.
+       * Makefile.in (ERRORS_CC, CONFIG_H, NEEDED_LIST): Remove.
+       (LIBOBJS): New variable.
+       (HOST_OFILES, DO_ALSO, STAGESTUFF): Remove.
+       (all): Depend upon needed-list.  Don't check RULE1.
+       (@target_makefile_frag@): Remove.
+       (COMPILE.c): Include @DEFS@.
+       (HFILES): Add alloca-conf.h.
+       (REQUIRED_OFILES): Remove basename.o.
+       ($(TARGETLIB)): New target.
+       (stamp-needed, lneeded-list, needed.awk, stamp-config): Remove.
+       (lconfig.h, needed2.awk, dummy.o, errors): Remove.
+       (needed-list, config.h): Rewrite.
+       (RULE1, $(RULE1), RULE2, $(RULE2)): Remove.
+       (.always.): Remove.
+       (Makefile): Set CONFIG_FILES and CONFIG_HEADERS.
+       (stamp-h): New target.
+       (atexit.o, clock.o, getcwd.o, getpagesize.o): New targets.
+       (basename.o): Don't depend upon config.h.
+       (getruntime.o): Depend upon config.h.
+       * atexit.c: Include config.h.  Check HAVE_ON_EXIT rather than
+       NEED_on_exit.
+       * basename.c: Don't include config.h.  Don't check NEED_basename.
+       * clock.c: Include config.h.
+       * getcwd.c: Likewise.
+       * getpagesize.c: Likewise.
+       * getruntime.c: Likewise.  Fix checks which set HAVE_GETRUSAGE and
+       HAVE_TIMES.
+       * strerror.c: Change uses of NEED_sys_errlist to
+       HAVE_SYS_ERRLIST.  Likewise for NEED_strerror and HAVE_STRERROR.
+       * strsignal.c: Likewise for NEED_sys_siglist and HAVE_SYS_SIGLIST,
+       and for NEED_strsignal and HAVE_STRSIGNAL and for NEED_psignal and
+       HAVE_PSIGNAL.
+       * acconfig.h: New file.
+       * dummy.c: Remove.
+       * functions.def: Remove.
+       * config/mh-cxux7 (HDEFINES): Remove -DHAVE_SYSCONF.
+       * config/mh-windows (HDEFINES): Remove.
+       * config/mh-cygwin32: Remove.
+       * config/mh-go32: Remove.
+       * config/mh-irix4: Remove.
+       * config/mh-riscix: Remove.
+       * config/mh-sysv4: Remove.
+       * config/mt-mingw32: Remove.
+       * config/mt-vxworks5: Remove.
+       * config.in: New file, generated using autoheader.
+       * configure: Rebuild.
+
+Mon May  4 13:00:28 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+       * configure.in: Rewrite to use autoconf.
+       * configure: Generate using autoconf.
+       * config/mh-a68bsd: Remove.
+       * config/mh-apollo68: Remove.
+       * config/mh-hpbsd: Remove.
+       * config/mh-ncr3000: Remove.
+       * config/mh-sysv: Remove.
+       * config/mh-aix (RANLIB, INSTALL): Don't define.
+       * config/mh-cxux7 (RANLIB, INSTALL): Don't define.
+       * config/mh-irix4 (CC, RANLIB, INSTALL): Don't define.
+       * config/mh-sysv4 (RANLIB, INSTALL): Don't define.
+       * config.table: Change config_shell to CONFIG_SHELL, and use
+       libiberty_topdir to find move-if-change.
+       (m68k-apollo-bsd*, m68k-apollo-sysv*): Remove.
+       (i[3456]86-ncr-sysv4*, *-*-dgux*, hppa*-hp-bsd*): Remove.
+       (*-*-irix*, *-*-m88kbcs*, *-*-sysv*): Remove.
+       * Makefile.in (srcdir): Set to @srcdir@.
+       (VPATH): Likewise.
+       (prefix, exec_prefix, bindir, libdir): Set to autoconf variables.
+       (SHELL, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Likewise.
+       (CC, CFLAGS, RANLIB)): Likewise.
+       (datadir, man*dir, infodir, includedir, MAKEINFO): Remove.
+       (target_makefile_frag, host_makefile_frag): Add substitutions.
+       (INSTALL_DEST): Set to @INSTALL_DEST@.
+       (Makefile): Depend upon config.status.  Don't depend upon
+       $(host_makefile_frag) or $(target_makefile_frag).
+       (config.status): New target.
+
+Sun May  3 17:58:49 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+       * config/mt-sunos4: Remove.  Should be handled by --with-headers
+       and --with-libraries options at top level.
+       * config.table: Never use mt-sunos4.
+
+       * alloca-conf.h: New file, combining alloca-norm.h and
+       alloca-botch.h.
+       * alloca-norm.h: Remove.
+       * alloca-botch.h: Remove.
+       * configure.in: Set shell variables files and links to empty.
+       * config.table: Don't set shell variable files.
+       * configure.bat: Don't create alloca-conf.h.
+       * makefile.vms: Likewise.
+       * mpw-config.in: Likewise.
+       * vmsbuild.com: Likewise.
+
+Fri May  1 11:41:42 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+       * Makefile.in ($(HOST_OFILES) $(REQUIRED_OFILES)): Remove old
+       target depending upon config.h.
+       (alloca.o): Add target depending upon config.h
+       (basename.o, choose-temp.o, fnmatch.o): Likewise.
+       (getopt.o, getopt1.o, pexecute.o, strerror.o): Likewise.
+       (strsignal.o, xstrerror.o): Likewise.
 
 Fri May  1 04:26:25 1998  Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
 
@@ -39,22 +187,9 @@ Wed Apr 22 10:53:49 EDT 1998 Andrew MacLeod  <amacleod@cygnus.com>
        (register_Btype, remember_Btype): New functions for B codes.
        (forget_B_and_K_types): New function to destroy B and K info.
 
-Fri Apr 10 01:45:09 1998  Jeffrey A Law  (law@cygnus.com)
+Fri Apr 10 01:49:10 1998  Jeffrey A Law  (law@cygnus.com)
 
-       * cplus-dem.c: Sync with gcc.
-
-Thu Apr  2 13:53:54 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
-
-       * choose-temp.c: Include system.h when IN_GCC.
-
-1998-04-01  Mark Mitchell  <mmitchell@usa.net>
-
-       * cplus-dem.c (optable): Add sizeof.
-       (demangle_template_value_parm): New function containing code
-       previously found in demangle_template.
-       (demangle_integral_value): New function which handles complicated 
-       integral expressions.
-       (demangle_template): Use them.
+       * COPYING.LIB, choose-temp.c, cplus-dem.c: Sync with egcs & gcc.
 
 Thu Mar  5 09:23:28 1998  Manfred Hollstein  <manfred@s-direktnet.de>
 
@@ -65,6 +200,10 @@ Mon Feb 23 14:33:15 1998  Ian Lance Taylor  <ian@cygnus.com>
 
        * choose-temp.c: Fix handling of sys/file.h to work in libiberty.
 
+Sun Feb 22 18:03:23 1998  Jeffrey A Law  (law@cygnus.com)
+
+       * choose-temp.c: Sync with copy in gcc.
+
 Thu Feb 12 16:29:49 1998  Ian Lance Taylor  <ian@cygnus.com>
 
        * getopt.c: Update to latest FSF version.
@@ -75,17 +214,17 @@ Tue Feb 10 16:58:33 1998  Stan Shebs  <shebs@andros.cygnus.com>
        * cplus-dem.c (gnu_special): Don't get confused by .<digits>
        strings that are not actually lengths.
 
-Thu Feb  5 18:48:56 1998  Geoffrey Noer  <noer@cygnus.com>
-
-        * config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES
-        since it gets built automatically
-
 Fri Feb  6 01:35:17 1998  Manfred Hollstein  <manfred@s-direktnet.de>
 
        * Makefile.in (FLAGS_TO_PASS): Don't pass PICFLAG.
        (.c.o): Check value of enable_shared, not PICFLAG.
        (stamp-picdir): Dito.
 
+Thu Feb  5 18:48:56 1998  Geoffrey Noer  <noer@cygnus.com>
+
+        * config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES
+        since it gets built automatically
+
 Sun Feb  1 02:52:32 1998  Mike Stump  <mrs@wrs.com>
 
        * config.table (vxworks configs): Default to VxWorks 5.x, as that is
@@ -107,7 +246,7 @@ Sun Jan 18 15:57:28 1998  Michael Snyder  <msnyder@cleaver.cygnus.com>
        * vasprintf.c (int_vasprintf): Increase buffer size for float/double
        values.
 
-Sat Jan 17 22:28:38 1997  Mumit Khan  <khan@xraylith.wisc.edu>
+Sat Jan 17 22:28:38 1998  Mumit Khan  <khan@xraylith.wisc.edu>
                          J.J. VanderHeijden <J.J.vanderHeijden@student.utwente.nl>
 
        Add mingw32 support.
@@ -224,12 +363,6 @@ Tue Aug 19 17:10:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
        * cplus-dem.c: Add 'extern' to prepends_underscore.
 
-Wed Jul 30 11:42:19 1997  Per Bothner  <bothner@cygnus.com>
-
-       * cplus-dem.c:  Various changes to produce Java output when passed
-       DMGL_JAVA.  Thus "::" becomes "." and "JArray<Foo>" becomes "Foo[]".
-       (main):  Support --java and -j flags to set DMGL_JAVA.
-       
 Tue Jul 22 19:05:23 1997  Robert Hoehne <robert.hoehne@Mathematik.TU-Chemnitz.DE>
 
        * config/mh-go32 (CC, AR, RANLIB): Don't define.
index b68d1f5f953083fa6d4316a7569b10ea4bd9b4f5..9c7ed27485c8d0fcd0a02eb5bf3b07ccdf0d6ce8 100644 (file)
@@ -1,6 +1,7 @@
 #
 # Makefile
-#   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation
+#   Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+#   Free Software Foundation
 #
 # This file is part of the libiberty library.
 # Libiberty is free software; you can redistribute it and/or
 # Boston, MA 02111-1307, USA.
 #
 
-# This file was written, and is maintained by K. Richard Pixley
-# <rich@cygnus.com>.
+# This file was written by K. Richard Pixley <rich@cygnus.com>.
 
 #
 # Makefile for libiberty directory
 #
 
-srcdir = .
+srcdir = @srcdir@
+VPATH = @srcdir@
 
-prefix = /usr/local
+prefix = @prefix@
 
-exec_prefix = $(prefix)
-bindir = $(exec_prefix)/bin
-libdir = $(exec_prefix)/lib
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
 
-datadir = $(prefix)/share
-
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-infodir = $(prefix)/info
-includedir = $(prefix)/include
-
-SHELL = /bin/sh
+SHELL = @SHELL@
 
 # Multilib support variables.
 MULTISRCTOP =
@@ -59,19 +45,17 @@ MULTISUBDIR =
 MULTIDO = true
 MULTICLEAN = true
 
-INSTALL = $(SHELL) $(srcdir)/../install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL)
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
 
-AR = ar
+AR = @AR@
 AR_FLAGS = rc
 
-ERRORS_CC = $(CC)
-CC = cc
-CFLAGS = -g
+CC = @CC@
+CFLAGS = @CFLAGS@
 LIBCFLAGS = $(CFLAGS)
-MAKEINFO = makeinfo
-RANLIB = ranlib
+RANLIB = @RANLIB@
 
 PICFLAG =
 
@@ -79,19 +63,7 @@ MAKEOVERRIDES =
 
 TARGETLIB = libiberty.a
 
-CONFIG_H = lconfig.h
-NEEDED_LIST = lneeded-list
-
-# HOST_OFILES contains the list of objects that should be in the
-# library (in addition to the REQUIRED_OFILES and EXTRA_OFILES).
-# A configuration may override this with a fixed list a object files
-# names (hard to maintain), or some other way to generate a list.
-HOST_OFILES=`cat needed-list`
-
-# Extra targets that the top-level target depends on.
-# Specifically, what needs to be made before HOST_OFILES can be used.
-# Can be empty if HOST_OFILES is just a list of file names.
-DO_ALSO = needed-list
+LIBOBJS = @LIBOBJS@
 
 # A configuration can specify extra .o files that should be included,
 # even if they are in libc. (Perhaps the libc version is buggy.)
@@ -114,60 +86,54 @@ FLAGS_TO_PASS = \
        "RANLIB=$(RANLIB)" \
        "SHELL=$(SHELL)"
 
-all: stamp-picdir $(TARGETLIB) required-list
-       @if [ "$(RULE1)" != "not-used" ]; then \
-         $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all; \
-       else true; \
-       fi
+all: stamp-picdir $(TARGETLIB) needed-list required-list
+       @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
 
 .PHONY: check installcheck
 check installcheck:
 
-
-#### Host, target, and site specific Makefile fragments come in here.
-###
+@host_makefile_frag@
 
 INCDIR=$(srcdir)/$(MULTISRCTOP)../include
 
-COMPILE.c = $(CC) -c $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES)
+COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES)
 .c.o:
        test x"$(enable_shared)" != xyes || \
          $(COMPILE.c) $(PICFLAG) $< -o pic/$@
        $(COMPILE.c) $<
 
-# The default target just invokes make recursively.
-# However, the automatic configuration (in config/mh_default).
-# first causes it to figure out the objects missing in libc.
 info install-info clean-info dvi:
 
 # Include files that are in this directory.
-HFILES =
+HFILES = alloca-conf.h
 
 # NOTE: If you add new files to the library, add them to this list
-# (alphabetical), and add them to REQUIRED_OFILES or 'functions.def'.
-CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c bzero.c \
-        choose-temp.c clock.c concat.c cplus-dem.c fdmatch.c fnmatch.c \
-        getcwd.c getopt.c getopt1.c getpagesize.c getruntime.c \
-         floatformat.c hex.c index.c insque.c \
-        memchr.c memcmp.c memcpy.c memmove.c memset.c objalloc.c \
-         obstack.c pexecute.c random.c rename.c rindex.c sigsetmask.c spaces.c \
-        strcasecmp.c strncasecmp.c \
-         strchr.c strdup.c strerror.c strrchr.c strsignal.c \
-         strstr.c strtod.c strtol.c strtoul.c tmpnam.c \
-        vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c \
-        xatexit.c xexit.c xmalloc.c xstrdup.c xstrerror.c
+# (alphabetical), and add them to REQUIRED_OFILES or funcs in
+# configure.in.
+CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \
+       bzero.c choose-temp.c clock.c concat.c cplus-dem.c fdmatch.c \
+       fnmatch.c getcwd.c getopt.c getopt1.c getpagesize.c \
+       getruntime.c floatformat.c hex.c index.c insque.c memchr.c \
+       memcmp.c memcpy.c memmove.c memset.c objalloc.c obstack.c \
+       pexecute.c random.c rename.c rindex.c sigsetmask.c spaces.c \
+       strcasecmp.c strncasecmp.c strchr.c strdup.c strerror.c \
+       strrchr.c strsignal.c strstr.c strtod.c strtol.c strtoul.c \
+       tmpnam.c vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c \
+       waitpid.c xatexit.c xexit.c xmalloc.c xstrdup.c xstrerror.c
+
 # These are always included in the library.
-REQUIRED_OFILES = argv.o basename.o choose-temp.o concat.o cplus-dem.o \
+REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o \
   fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o \
   floatformat.o objalloc.o obstack.o pexecute.o spaces.o strerror.o \
   strsignal.o xatexit.o xexit.o xmalloc.o xstrdup.o xstrerror.o
 
-# Do we want/need any config overrides?
-#       
-
-STAGESTUFF = $(TARGETLIB) *.o
+$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
+       rm -f $(TARGETLIB)
+       $(AR) $(AR_FLAGS) $(TARGETLIB) \
+         $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
+       $(RANLIB) $(TARGETLIB)
 
-INSTALL_DEST = libdir
+INSTALL_DEST = @INSTALL_DEST@
 install: install_to_$(INSTALL_DEST)
 
 install_to_libdir: all
@@ -182,100 +148,26 @@ install_to_tooldir: all
        mv -f $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB).n $(tooldir)/lib$(MULTISUBDIR)/$(TARGETLIB)
        @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
 
-# The default configuration adds to libiberty all those functions that are
-# missing in libc.  More precisely, it includes whatever $(CC) fails to find.
-# Then a sed+awk combination translates the ld error messages into
-# a list of .o files.
-
-stamp-needed: stamp-picdir $(NEEDED_LIST)
-       cp $(NEEDED_LIST) needed-tmp
-       $(SHELL) $(srcdir)/$(MULTISRCTOP)../move-if-change needed-tmp needed-list
-       touch stamp-needed
-
-needed-list: stamp-needed ; @true
-
-lneeded-list: $(EXTRA_OFILES) needed.awk errors
-       rm -f lneeded-list
-       f=""; \
-       for i in `awk -f needed.awk <errors` $(EXTRA_OFILES) ; do \
-         case " $$f " in \
-           *" $$i "*) ;; \
-           *) f="$$f $$i" ;; \
-         esac ; \
-       done ; \
+# needed-list is used by libstdc++.
+needed-list: Makefile
+       f="$(LIBOBJS) $(EXTRA_OFILES)"; \
        case $$f in \
-           *alloca.o*) f="$$f xmalloc.o xexit.o" ;; \
-       esac ; \
-       echo $$f >>lneeded-list
-
-# Generate an awk script that looks for functions in functions.def
-
-needed.awk: $(srcdir)/functions.def Makefile
-       echo "# !Automatically generated from $(srcdir)/functions.def"\
-         "- DO NOT EDIT!" >needed.awk
-       grep '^DEF(' < $(srcdir)/functions.def \
-           | sed -e '/DEF/s|DEF.\([^,]*\).*|/\1/ { printf "\1.o " }|' \
-           >>needed.awk
-
-stamp-config: $(CONFIG_H)
-       cp $(CONFIG_H) config.tmp
-       $(SHELL) $(srcdir)/$(MULTISRCTOP)../move-if-change config.tmp config.h
-       touch stamp-config
-
-config.h: stamp-config ; @true
-
-lconfig.h: needed2.awk errors
-       echo "/* !Automatically generated from $(srcdir)/functions.def"\
-         "- DO NOT EDIT! */" >lconfig.h
-       awk -f needed2.awk <errors >>lconfig.h
-
-# Generate an awk script that looks for variables in functions.def
-
-needed2.awk: $(srcdir)/functions.def Makefile
-       echo "# !Automatically generated from $(srcdir)/functions.def"\
-         "- DO NOT EDIT!" >needed2.awk
-       grep '^DEFVAR(' < $(srcdir)/functions.def \
-        | sed -e '/DEFVAR/s|DEFVAR.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' \
-        >>needed2.awk
-       grep '^DEFFUNC(' < $(srcdir)/functions.def \
-        | sed -e '/DEFFUNC/s|DEFFUNC.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\n#define NEED_\1\\n#endif\\n" }|' \
-        >>needed2.awk
-
-dummy.o: $(srcdir)/dummy.c $(srcdir)/functions.def
-       $(CC) -c $(CFLAGS) -I. -I$(INCDIR) $(HDEFINES) $(srcdir)/dummy.c 2>/dev/null
-
-errors: dummy.o $(EXTRA_OFILES)
-       -($(ERRORS_CC) -o dummy $(CFLAGS) $(LDFLAGS) $(ERRORS_LDFLAGS) dummy.o $(EXTRA_OFILES) $(LOADLIBES)) >errors 2>&1 || true
-
-# required-list is used when building a shared bfd/opcodes/libiberty library.
+         *alloca.o*) f="$$f xmalloc.o xexit.o" ;; \
+       esac; \
+       echo $$f > needed-list
+
+# required-list was used when building a shared bfd/opcodes/libiberty
+# library.  I don't know if it used by anything currently.
 required-list: Makefile
        echo $(REQUIRED_OFILES) > required-list
 
-$(HOST_OFILES) $(REQUIRED_OFILES) : config.h
-
-RULE1 = $(TARGETLIB)
-$(RULE1): $(REQUIRED_OFILES) $(DO_ALSO) .always.
-       @$(MAKE) RULE1=not-used RULE2=$(TARGETLIB) $(FLAGS_TO_PASS) \
-               "HOST_OFILES=$(HOST_OFILES)"
-
-# Rule invoked by recursive make in $(RULE1).
-RULE2 = not-used
-$(RULE2): $(REQUIRED_OFILES) $(HOST_OFILES)
-       rm -rf $(TARGETLIB)
-       $(AR) $(AR_FLAGS) $(TARGETLIB) \
-         $(REQUIRED_OFILES) $(HOST_OFILES)
-       $(RANLIB) $(TARGETLIB)
-
 stamp-picdir:
        if [ x"$(enable_shared)" = xyes ] && [ ! -d pic ]; then \
          mkdir pic; \
        else true; fi
        touch stamp-picdir
 
-.always.:
-# Do nothing.
-
-.PHONY: all etags tags ls clean stage1 stage2 .always.
+.PHONY: all etags tags ls clean stage1 stage2
 
 etags tags: TAGS
 
@@ -308,28 +200,41 @@ maintainer-clean realclean: distclean
 
 force:
 
-Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
-       $(SHELL) ./config.status
+Makefile: $(srcdir)/Makefile.in config.status
+       CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
+
+config.h: stamp-h ; @true
+stamp-h: config.in config.status
+       CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
+
+config.status: $(srcdir)/configure $(srcdir)/config.table
+       $(SHELL) ./config.status --recheck
 
-argv.o: $(INCDIR)/libiberty.h
+alloca.o: config.h
+atexit.o: config.h
+argv.o: config.h alloca-conf.h $(INCDIR)/libiberty.h
 basename.o: $(INCDIR)/libiberty.h
+choose-temp.o: config.h
+clock.o: config.h
 concat.o: $(INCDIR)/libiberty.h
 cplus-dem.o: $(INCDIR)/demangle.h
 fdmatch.o: $(INCDIR)/libiberty.h
-fnmatch.o: $(INCDIR)/fnmatch.h
-getopt.o: $(INCDIR)/getopt.h
-getopt1.o: $(INCDIR)/getopt.h
-getruntime.o: $(INCDIR)/libiberty.h
+fnmatch.o: config.h $(INCDIR)/fnmatch.h
+getcwd.o: config.h
+getopt.o: config.h $(INCDIR)/getopt.h
+getopt1.o: config.h $(INCDIR)/getopt.h
+getpagesize.o: config.h
+getruntime.o: config.h $(INCDIR)/libiberty.h
 hex.o: $(INCDIR)/libiberty.h
 floatformat.o: $(INCDIR)/floatformat.h
 objalloc.o: $(INCDIR)/objalloc.h
 obstack.o: $(INCDIR)/obstack.h
-pexecute.o: $(INCDIR)/libiberty.h
+pexecute.o: config.h $(INCDIR)/libiberty.h
 spaces.o: $(INCDIR)/libiberty.h
-strerror.o: $(INCDIR)/libiberty.h
-strsignal.o: $(INCDIR)/libiberty.h
+strerror.o: config.h $(INCDIR)/libiberty.h
+strsignal.o: config.h $(INCDIR)/libiberty.h
 xatexit.o: $(INCDIR)/libiberty.h
 xexit.o: $(INCDIR)/libiberty.h
 xmalloc.o: $(INCDIR)/libiberty.h
 xstrdup.o: $(INCDIR)/libiberty.h
-xstrerror.o: $(INCDIR)/libiberty.h
+xstrerror.o: config.h $(INCDIR)/libiberty.h
index 92dc202929b90af5dfcfd5aa222b14d9f470ad2b..9f5226a6b1dd31022a3a887595190993412b6312 100644 (file)
@@ -27,62 +27,29 @@ that are "optional" will be included in the library only if "needed."
 To add a new required file, edit Makefile to add the source file
 name to CFILES and the object file to REQUIRED_OFILES.
 
-Adding a new optional file is more fragile.  As a general rule,
-an optional file will be included in the library if it provides
-functionality missing in the "standard" C library.
-For most hosts, the Makefile automatically figures out which
-functionality is missing by compiling and linking a dummy test
-program, and examining the error messages.
-
-So to get this to work, you should do the following:
-
-1) Select one function defined in the file you're adding.
-For example, the getcwd function.
-2) Add that function to the list in the file functions.def.
-3) The name of the new file must be the same as the function
-you've chosen with the .c suffix added.  E.g. getcwd() must be
-defined in getcwd.c.  (The file can define other functions as well.)
-4) In Makefile.in, add the name of the source file (e.g. getcwd.c)
-to CFILES.
-
-The file you've added (e.g. getcwd.c) should compile and work
-on all hosts where it is needed (e.g. not found when linking
-the dummy.c program).  It does not have to work or even
-compile on hosts where it is not needed.
+To add a new optional file, it must provide a single function, and the
+name of the function must be the same as the name of the file.
+
+    * Add the source file name to CFILES.
+
+    * Add the function to name to the funcs shell variable in
+      configure.in.
 
-HOW THE AUTOMATIC CONFIGURATION WORKS
-=====================================
-
-The libiberty.a target (in RULE1) depends on $(DO_ALSO).
-For normal configurations, DO_ALSO=needed-list.
-
-So needed-list is first made.  The needed-list rule compiles
-dummy.c.  Because dummy.c includes functions.def, the
-resulting object file will contain a call to each of the
-optional functions (for simplicity assume each optional file
-defines a single function).  This object file will be linked
-against the standard libraries (as defined by using $(CC)
-and various flags).  Any function missing will causes the
-linker to emit an error message.  We assume the name
-of the missing function(s) are in the error message(s).
-The awk script find-needed.awk has been generated from
-functions.def.  It is used to search the linker output
-messages for words that match the functions listed in
-functions.def.  The list of functions found is written
-on a single line to the file needed-list.
-
-After needed-list has been generated, the libiberty.a
-target (in RULE1) just calls 'make' recursively.
-It passes the contents of needed-list using the
-definition (expanded) HOST_OFILES="`cat needed-list`".
-It also tells the inferior 'make' to use RULE2.
-
-The inferior 'make' is very conventional:  The main
-rule is $(RULE2) (which is libiberty.a).  It depends
-on a list of object files: $(REQUIRED_OFILES) $(HOST_OFILES)
-(and $(EXTRA_OFILES), which is usually empty).  The superior
-'make' passes in $(HOST_OFILES); the others are fixed
-in the Makefile.
+    * Add the function to the AC_CHECK_FUNCS lists just after the
+      setting of the funcs shell variable.  These AC_CHECK_FUNCS calls
+      are never executed; they are there to make autoheader work
+      better.
+
+    * Consider the special cases of building libiberty; as of this
+      writing, the special cases are newlib and VxWorks.  If a
+      particular special case provides the function, you do not need
+      to do anything.  If it does not provide the function, add the
+      object file to LIBOBJS, and add the function name to the case
+      controlling whether to define HAVE_func.
+
+The optional file you've added (e.g. getcwd.c) should compile and work
+on all hosts where it is needed.  It does not have to work or even
+compile on hosts where it is not needed.
 
 ADDING A NEW CONFIGURATION
 ==========================
@@ -95,34 +62,4 @@ If the fully automatic scheme doesn't work, you may be able to get
 by with defining EXTRA_OFILES in your Makefile stub.  This is
 a list of object file names that should be treated as required
 for this configuration - they will be included in libiberty.a,
-regardless of whatever might be in the C library.  Moreover,
-when the dummy.c program is linked, it will be linked with
-$(EXTRA_OFILES).  Therefore, if a function in functions.def
-is defined by one of the EXTRA_OFILES, it will not be listed as
-"needed".  Thus if your hal9000 host needs a special implementation
-of getcwd, you can just create hal9000-getcwd.c, and define:
-       EXTRA_OFILES=hal9000-getcwd.o
-Or if you want to use the libiberty version of strstr(),
-even though there is a version in the C library (it might be
-buggy or slow), just define:
-       EXTRA_OFILES=strstr.o
-
-You can create a "manual" host configuration FOO with a file
-config/mh-FOO.  In it, the HOST_OFILES macro should explicitly
-list that subset of the optional files that should be in the
-library.  You should also set:
-       DO_ALSO =
-This overrides all of the magic needed to automatically
-determine which files are "needed."  However, keeping that list
-up to date is another matter...
-
-HOW THE MANUAL CONFIGURATION WORKS
-==================================
-
-This also uses a recursive make, but the superior make
-does not do anything interesting - it just calls the
-inferior make with HOST_OFILES defined as $(HOST_OFILES),
-which is the list you created in your configuration.
-
-You probably don't want to depend on manual configuration,
-because keeping the HOST_OFILES list up-to-date will be a pain.
+regardless of whatever might be in the C library.
diff --git a/libiberty/alloca-botch.h b/libiberty/alloca-botch.h
deleted file mode 100644 (file)
index c909573..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/* RS/6000 AIX botched alloca and requires a pragma, which ordinary compilers
-   throw up about, so we have to put it in a specially-configured file.
-   Like this one.  */
-
-#pragma alloca
diff --git a/libiberty/alloca-norm.h b/libiberty/alloca-norm.h
deleted file mode 100644 (file)
index bda4fc0..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* "Normal" configuration for alloca.  */
-
-#ifdef __GNUC__
-#ifndef alloca
-#define alloca __builtin_alloca
-#endif
-#else /* ! defined (__GNUC__) */
-#if defined (sparc) && defined (sun)
-#include <alloca.h>
-#ifdef __STDC__
-extern void *__builtin_alloca();
-#else /* ! defined (__STDC__) */
-extern char *__builtin_alloca();  /* Stupid include file doesn't declare it */
-#endif /* ! defined (__STDC__) */
-#else /* ! defined (sparc) || ! defined (sun) */
-#ifdef __STDC__
-PTR alloca (size_t);
-#else /* ! defined (__STDC__) */
-PTR alloca ();                 /* must agree with functions.def */
-#endif /* ! defined (__STDC__) */
-#endif /* ! defined (sparc) || ! defined (sun) */
-#ifdef _WIN32
-#include <malloc.h>
-#endif
-#endif /* ! defined (__GNUC__) */
index 4463cb6950184a79a9bf77c31424edfaa07c9164..137d985e4cbc5ed18e577fa5a91ee0d678878a8e 100644 (file)
@@ -1,7 +1,10 @@
 /* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
 /* This function is in the public domain.  --Mike Stump. */
 
-#ifndef NEED_on_exit
+#include "config.h"
+
+#ifdef HAVE_ON_EXIT
+
 int
 atexit(f)
      void (*f)();
@@ -11,4 +14,5 @@ atexit(f)
   on_exit (f, 0);
   return 0;
 }
+
 #endif
index 689b0c2d39a06813d6ca7e58c48148bd99505c9b..f544c853910c243cc58302176f22fcd431ff6b90 100644 (file)
@@ -20,10 +20,6 @@ BUGS
 #include "ansidecl.h"
 #include "libiberty.h"
 
-#include "config.h"
-
-#ifdef NEED_basename
-
 char *
 basename (name)
      const char *name;
@@ -39,5 +35,3 @@ basename (name)
     }
   return (char *) base;
 }
-
-#endif
index b60de1657a4565b387e2ff9b2b8e73ba6b51f853..b204566ff25c9e5aec175dd6edd56a715512d36f 100644 (file)
@@ -22,13 +22,15 @@ the resulting executable to be covered by the GNU General Public License.
 This exception does not however invalidate any other reasons why
 the executable file might be covered by the GNU General Public License. */
 
+#include "config.h"
+
 #ifdef HAVE_GETRUSAGE
 #include <sys/time.h>
 #include <sys/resource.h>
 #endif
 
 #ifdef HAVE_TIMES
-#ifndef NO_SYS_PARAM_H
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
 #include <sys/times.h>
index f302956725b1cb283d56a0806ac3a232417181a9..07f4baf8b0638033711deb25d064f389fc1ae96d 100644 (file)
@@ -1,50 +1,10 @@
 case "${host}" in
   rs6000-ibm-aix3.1 | rs6000-ibm-aix)
-                        frag=mh-aix
-                       files=${xsrcdir}alloca-botch.h ;;
-  *-ibm-aix*)          files=${xsrcdir}alloca-botch.h ;;
-  arm-*-riscix*)       frag=mh-riscix ;;
-  m68k-apollo-bsd*)    frag=mh-a68bsd ;;
-  m68k-apollo-sysv*)   frag=mh-apollo68 ;;
-  i[3456]86-ncr-sysv4*)        frag=mh-ncr3000 ;;
+                        frag=mh-aix ;;
   *-*-cxux7*)          frag=mh-cxux7 ;;
-  *-*-cygwin32)                frag=mh-cygwin32 ;;
-  *-*-dgux*)           frag=mh-sysv ;;
   *-*-freebsd2.1.*)    frag=mh-fbsd21 ;;
   *-*-freebsd2.2.*)    frag=mh-fbsd21 ;;
-  hppa*-hp-bsd*)       frag=mh-hpbsd ;;
-  *-*-hpux*)           frag=mh-hpux ;;
-  *-*-hiux*)           frag=mh-hpux ;;
-  *-*-irix4*)          frag=mh-irix4 ;;
-  *-*-irix*)           frag=mh-sysv ;;
-  *-*-m88kbcs*)                frag=mh-sysv ;;
-  *-*-solaris2*)       frag=mh-sysv4 ;;
-  *-*-sysv4*)          frag=mh-sysv4 ;;
-  *-*-sysv*)           frag=mh-sysv ;;
-  *-*-go32)            frag=mh-go32 ;;
   i[345]86-*-windows*) frag=mh-windows ;;
-
-  *-*-vxworks5* | *-*-vxworks)
-    # VxWorks 5 needs special action, because the usual
-    # autoconfiguration scheme does not work.
-    frag=mt-vxworks5
-    ;;
-
-  i[3456]86-*-mingw32*)
-    # Mingw32 does not require strerror.o from REQUIRED_OFILES.
-    # Worse: it will not compile it because of an incompatible sys_errlist
-    # definition.
-    frag=mt-mingw32
-    ;;
-esac
-
-# Try to handle funky case of solaris 2 -> sun 4.
-case "${host}" in
-  sparc-sun-sunos4.1.3)
-       if [ "${with_cross_host}" != "${host}" ] ; then
-          frag=mt-sunos4
-       fi
-  ;;
 esac
 
 frags=$frag
@@ -57,6 +17,7 @@ case "${enable_shared}" in
 esac
 if [ "${shared}" = "yes" ]; then
   case "${host}" in
+    *-*-cygwin32*) ;;
     hppa*-*-*)    frags="${frags} ../../config/mh-papic" ;;
     i[3456]86-*-*) frags="${frags} ../../config/mh-x86pic" ;;
     *-*-*)        frags="${frags} ../../config/mh-${host_cpu}pic" ;;
@@ -83,4 +44,4 @@ for frag in ${frags}; do
 done
 
 frag=xhost-mkfrag
-${config_shell} ${moveifchange} temp-frag xhost-mkfrag
+${CONFIG_SHELL} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag
diff --git a/libiberty/config/mh-a68bsd b/libiberty/config/mh-a68bsd
deleted file mode 100644 (file)
index 3c5a237..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-RANLIB=ranlib
-CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__
index ee84d03ff33a1ea6eada6fa455a237bff2bf593c..6b645058fa9da9743fb6addceb213b3fee333d1f 100644 (file)
@@ -1,7 +1,5 @@
 # This file is only needed by AIX 3.1.
 HDEFINES = -D__IEEE_BIG_ENDIAN
-RANLIB=true
-INSTALL=cp
 
 # Most releases of AIX 3.1 include an incorrect internal version of copysign
 # in libc.a for use by some libc public functions including modf.  The public
diff --git a/libiberty/config/mh-apollo68 b/libiberty/config/mh-apollo68
deleted file mode 100644 (file)
index 651770c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-RANLIB=true
-CC= cc -A ansi -A runtype,any -A systype,any -U__STDC__
diff --git a/libiberty/config/mh-cygwin32 b/libiberty/config/mh-cygwin32
deleted file mode 100644 (file)
index 42b1afb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-HDEFINES=-DNEED_sys_siglist -DNEED_basename -DNEED_strsignal
-EXTRA_OFILES=random.o
diff --git a/libiberty/config/mh-go32 b/libiberty/config/mh-go32
deleted file mode 100644 (file)
index 919290e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-HDEFINES=-DHAVE_GETRUSAGE
diff --git a/libiberty/config/mh-hpbsd b/libiberty/config/mh-hpbsd
deleted file mode 100644 (file)
index ce11dcd..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# HPPA hosts using BSD
-RANLIB=true
diff --git a/libiberty/config/mh-irix4 b/libiberty/config/mh-irix4
deleted file mode 100644 (file)
index ace7678..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-CC = cc -cckr
-RANLIB = true
-INSTALL = cp
-EXTRA_OFILES = alloca.o
diff --git a/libiberty/config/mh-ncr3000 b/libiberty/config/mh-ncr3000
deleted file mode 100644 (file)
index 3a45c22..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# Host configuration file for an NCR 3000 (i486/SVR4) system.
-
-# The NCR 3000 ships with a MetaWare compiler installed as /bin/cc.
-# This compiler not only emits obnoxious copyright messages every time
-# you run it, but it chokes and dies on a whole bunch of GNU source
-# files.  Default to using the AT&T compiler installed in /usr/ccs/ATT/cc.
-# Unfortunately though, the AT&T compiler sometimes generates code that
-# the assembler barfs on if -g is used, so disable it by default as well.
-CC = /usr/ccs/ATT/cc
-CFLAGS =
-
-RANLIB = true
-
-# The /usr/ucb/install program is incompatible (complains about unknown
-# group staff).  Use good old cp...
-INSTALL = cp
-
-# The l flag generates a warning from the SVR4 archiver, remove it.
-AR_FLAGS = cq
diff --git a/libiberty/config/mh-riscix b/libiberty/config/mh-riscix
deleted file mode 100644 (file)
index 0209279..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-# The native linker only reports the first undefined symbol if linking with a
-# shared library.  So build using gcc and link statically (this requires 
-# gcc 2.6.0 or above).
-
-ERRORS_CC = gcc
-ERRORS_LDFLAGS = -static
diff --git a/libiberty/config/mh-sysv b/libiberty/config/mh-sysv
deleted file mode 100644 (file)
index eb102d5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-RANLIB=true
diff --git a/libiberty/config/mh-sysv4 b/libiberty/config/mh-sysv4
deleted file mode 100644 (file)
index 4d1aa3c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-HDEFINES = -DHAVE_SYSCONF
-RANLIB=true
-INSTALL = cp
index 3dbd6ef694a20ea2545301f62d9eab26f59dd098..3ff5f794e9f88a60d35f68ac5de7da620f767c93 100644 (file)
@@ -1,2 +1 @@
-HDEFINES=-DNEED_basename -DNEED_sys_siglist -DNEED_strsignal -DNO_SYS_FILE_H
 EXTRA_OFILES=asprintf.o strcasecmp.o strncasecmp.o vasprintf.o
diff --git a/libiberty/config/mt-mingw32 b/libiberty/config/mt-mingw32
deleted file mode 100644 (file)
index 2fb17d7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Mingw32 target Makefile fragment.
-# The autoconfiguration fails for a Mingw32 target, because of an
-# incompatible definition of sys_errlist, which is imported from a DLL.
-# Therefore, we compute the dependencies by hand.
-
-HDEFINES = -DNO_SYS_PARAM_H -DNO_SYS_FILE_H
-CONFIG_H = mgconfig.h
-NEEDED_LIST = mgneeded-list
-
-mgconfig.h: Makefile
-       if [ -f ../newlib/Makefile ]; then \
-         $(MAKE) $(FLAGS_TO_PASS) xconfig.h; \
-         cp xconfig.h mgconfig.h; \
-       else \
-         echo "#define NEED_sys_siglist 1" >>mgconfig.h; \
-         echo "#define NEED_strsignal 1" >>mgconfig.h; \
-         echo "#define NEED_psignal 1" >>mgconfig.h; \
-         echo "#define NEED_basename 1" >>mgconfig.h; \
-       fi
-
-mgneeded-list: Makefile
-       if [ -f ../newlib/Makefile ]; then \
-         $(MAKE) $(FLAGS_TO_PASS) xneeded-list; \
-         cp xneeded-list mgneeded-list; \
-       else \
-         echo getopt.o vasprintf.o >mgneeded-list; \
-       fi
diff --git a/libiberty/config/mt-sunos4 b/libiberty/config/mt-sunos4
deleted file mode 100644 (file)
index c25baa6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-XTRAFLAGS = -isystem /s1/cygnus/dejagnu/sparc-sun-sunos4.1.3/include/
-LOADLIBES = -L/s1/cygnus/dejagnu/sparc-sun-sunos4.1.3/lib
diff --git a/libiberty/config/mt-vxworks5 b/libiberty/config/mt-vxworks5
deleted file mode 100644 (file)
index 916d69e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# VxWorks 5.x target Makefile fragment.
-# The autoconfiguration fails for a VxWorks target, because the
-# libraries are actually on the target board, not in the file system.
-# Therefore, we compute the dependencies by hand.
-
-HDEFINES = -DNO_SYS_PARAM_H -DNO_SYS_FILE_H
-CONFIG_H = vxconfig.h
-NEEDED_LIST = vxneeded-list
-
-vxconfig.h: Makefile
-       if [ -f ../newlib/Makefile ]; then \
-         $(MAKE) $(FLAGS_TO_PASS) xconfig.h; \
-         cp xconfig.h vxconfig.h; \
-       else \
-         echo "#define NEED_sys_nerr 1" >vxconfig.h; \
-         echo "#define NEED_sys_errlist 1" >>vxconfig.h; \
-         echo "#define NEED_sys_siglist 1" >>vxconfig.h; \
-         echo "#define NEED_strsignal 1" >>vxconfig.h; \
-         echo "#define NEED_psignal 1" >>vxconfig.h; \
-       fi
-
-vxneeded-list: Makefile
-       if [ -f ../newlib/Makefile ]; then \
-         $(MAKE) $(FLAGS_TO_PASS) xneeded-list; \
-         cp xneeded-list vxneeded-list; \
-       else \
-         echo getopt.o getpagesize.o insque.o random.o strcasecmp.o strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o >vxneeded-list; \
-       fi
index ed33777174b37fd8bf04344bfcb47a0331f32f35..18881ac2f75d5f184daba1365828eb348bc72ecb 100644 (file)
@@ -5,7 +5,6 @@ echo Configuring libiberty for go32
 copy Makefile.dos Makefile\r
 echo #define NEED_sys_siglist 1 >> config.h\r
 echo #define NEED_psignal 1 >> config.h\r
-update alloca-normal.h alloca-conf.h\r
 goto exit\r
 \r
 :h8300\r
index b0020d8bab42be6f2861018cfd58b05f2abe45d8..05a9df1e975a441d5ca196fe051c558cb9c0460a 100644 (file)
-# This file is a shell script fragment that supplies the information
-# necessary for a configure script to process the program in
-# this directory.  For more information, look at ../configure.
+dnl Process this file with autoconf to produce a configure script
 
-configdirs=
-srctrigger=getopt1.c
-srcname="-liberty library"
+AC_PREREQ(2.5)
+AC_INIT(pexecute.c)
 
-# per-host:
+dnl We use these options to decide which functions to include.
+AC_ARG_WITH(target-subdir,
+[  --with-target-subdir=SUBDIR      Configuring with a cross compiler])
+AC_ARG_WITH(newlib,
+[  --with-newlib                    Configuring with newlib])
 
-files="alloca-norm.h"
-links="alloca-conf.h"
+if test "${srcdir}" = "."; then
+  if test -z "${with_target_subdir}"; then
+    libiberty_topdir="${srcdir}/.."
+  else
+    if test "${with_target_subdir}" != "."; then
+      libiberty_topdir="${srcdir}/${with_multisrctop}../.."
+    else
+      libiberty_topdir="${srcdir}/${with_multisrctop}.."
+    fi
+  fi
+else
+  libiberty_topdir="${srcdir}/.."
+fi
+AC_CONFIG_AUX_DIR($libiberty_topdir)
+
+AC_CANONICAL_HOST
+
+dnl When we start using automake:
+dnl AM_INIT_AUTOMAKE(libiberty, 1.0)
+
+dnl These must be called before AM_PROG_LIBTOOL, because it may want
+dnl to call AC_CHECK_PROG.
+AC_CHECK_TOOL(AR, ar)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+
+# FIXME: We temporarily define our own version of AC_PROG_CC.  This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable.  This should really be fixed in autoconf
+# itself.
+
+AC_DEFUN(LIB_AC_PROG_CC,
+[AC_BEFORE([$0], [AC_PROG_CPP])dnl
+AC_PROVIDE([AC_PROG_CC])
+AC_CHECK_PROG(CC, gcc, gcc)
+if test -z "$CC"; then
+  AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+  test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
+fi
+
+AC_PROG_CC_GNU
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+dnl Check whether -g works, even if CFLAGS is set, in case the package
+dnl plays around with CFLAGS (such as to build both debugging and
+dnl normal versions of a library), tasteless as that idea is.
+  ac_test_CFLAGS="${CFLAGS+set}"
+  ac_save_CFLAGS="$CFLAGS"
+  CFLAGS=
+  AC_PROG_CC_G
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-O2"
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+])
+
+LIB_AC_PROG_CC
+
+AC_ISC_POSIX
+
+dnl When we start using libtool:
+dnl Default to a non shared library.  This may be overridden by the
+dnl configure option --enable-shared.
+dnl AM_DISABLE_SHARED
+
+dnl When we start using libtool:
+dnl AM_PROG_LIBTOOL
+
+dnl When we start using automake:
+dnl AM_CONFIG_HEADER(config.h:config.in)
+AC_CONFIG_HEADER(config.h:config.in)
+
+dnl When we start using automake:
+dnl AM_MAINTAINER_MODE
+dnl AM_EXEEXT
+
+dnl When we start using automake:
+dnl AM_PROG_INSTALL
+AC_PROG_INSTALL
 
 . ${srcdir}/config.table
 host_makefile_frag=${frag}
+AC_SUBST_FILE(host_makefile_frag)
+
+# It's OK to check for header files.  Although the compiler may not be
+# able to link anything, it had better be able to at least compile
+# something.
+AC_CHECK_HEADERS(sys/file.h sys/param.h stdlib.h string.h)
 
-# per-target:
-
-# post-target:
-
-# If this is the target libiberty, check at compile time whether we are using
-# newlib.  If we are, we already know the files we need, since the linker
-# will fail when run on some of the newlib targets.
-if [ -n "${with_target_subdir}" ] ; then
-  cat > Makefile.tem <<'!EOF!'
-CONFIG_H = xconfig.h
-NEEDED_LIST = xneeded-list
-
-xconfig.h: Makefile
-       if [ -f ../newlib/Makefile ]; then \
-         echo "#define NEED_sys_nerr 1" >xconfig.h; \
-         echo "#define NEED_sys_errlist 1" >>xconfig.h; \
-         echo "#define NEED_sys_siglist 1" >>xconfig.h; \
-         echo "#define NEED_strsignal 1" >>xconfig.h; \
-         echo "#define NEED_psignal 1" >>xconfig.h; \
-       else \
-         $(MAKE) $(FLAGS_TO_PASS) lconfig.h; \
-         cp lconfig.h xconfig.h; \
-       fi
-
-xneeded-list: Makefile
-       if [ -f ../newlib/Makefile ]; then \
-         echo insque.o random.o strdup.o alloca.o vasprintf.o >xneeded-list; \
-       else \
-         $(MAKE) $(FLAGS_TO_PASS) lneeded-list; \
-         cp lneeded-list xneeded-list; \
-       fi
-!EOF!
-sed -e "/^####/  r Makefile.tem" \
-  -e '/INSTALL_DEST =/s/libdir/tooldir/' ${Makefile} > Makefile.tem3
-mv Makefile.tem3 ${Makefile}
-rm -f Makefile.tem
+# This is the list of functions which libiberty will provide if they
+# are not available on the host.
+
+funcs="asprintf"
+funcs="$funcs atexit"
+funcs="$funcs basename"
+funcs="$funcs bcmp"
+funcs="$funcs bcopy"
+funcs="$funcs bzero"
+funcs="$funcs clock"
+funcs="$funcs getcwd"
+funcs="$funcs getpagesize"
+funcs="$funcs index"
+funcs="$funcs insque"
+funcs="$funcs memchr"
+funcs="$funcs memcmp"
+funcs="$funcs memcpy"
+funcs="$funcs memmove"
+funcs="$funcs memset"
+funcs="$funcs random"
+funcs="$funcs rename"
+funcs="$funcs rindex"
+funcs="$funcs sigsetmask"
+funcs="$funcs strcasecmp"
+funcs="$funcs strchr"
+funcs="$funcs strdup"
+funcs="$funcs strncasecmp"
+funcs="$funcs strrchr"
+funcs="$funcs strstr"
+funcs="$funcs strtod"
+funcs="$funcs strtol"
+funcs="$funcs strtoul"
+funcs="$funcs tmpnam"
+funcs="$funcs vasprintf"
+funcs="$funcs vfprintf"
+funcs="$funcs vprintf"
+funcs="$funcs vsprintf"
+funcs="$funcs waitpid"
+
+# Also in the old function.def file: alloca, vfork, getopt.
+
+vars="sys_errlist sys_nerr sys_siglist"
+
+checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times"
+
+# These are neither executed nor required, but they help keep
+# autoheader happy without adding a bunch of text to acconfig.h.
+if test "x" = "y"; then
+  AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bzero clock getcwd)
+  AC_CHECK_FUNCS(getpagesize index insque memchr memcmp memcpy memmove)
+  AC_CHECK_FUNCS(memset random rename rindex sigsetmask strcasecmp)
+  AC_CHECK_FUNCS(strchr strdup strncasecmp strrchr strstr strtod strtol)
+  AC_CHECK_FUNCS(strtoul tmpnam vasprintf vfprintf vprintf vsprintf waitpid)
+  AC_DEFINE(HAVE_SYS_ERRLIST)
+  AC_DEFINE(HAVE_SYS_NERR)
+  AC_DEFINE(HAVE_SYS_SIGLIST)
+  AC_CHECK_FUNCS(getrusage on_exit psignal strerror strsignal sysconf times)
 fi
 
-# We need multilib support, but only if configuring for the target.
-if [ -n "${with_target_subdir}" ] ; then
-  if [ "${srcdir}" = "." ] ; then
-    if [ "${with_target_subdir}" != "." ] ; then
-      . ${with_multisrctop}../../config-ml.in
+# For each of these functions, if the host does not provide the
+# function we want to put FN.o in LIBOBJS, and if the host does
+# provide the function, we want to define HAVE_FN in config.h.  Also,
+# if the host does not provide alloca, we set ALLOCA to alloca.o
+
+setobjs=
+if test -n "${with_target_subdir}"; then
+
+  # We are being configured with a cross compiler.  AC_REPLACE_FUNCS
+  # may not work correctly, because the compiler may not be able to
+  # link executables.
+
+  # If we are being configured for newlib, we know which functions
+  # newlib provide and which ones we will be expected to provide.
+
+  if test "x${with_newlib}" = "xyes"; then
+    ALLOCA="alloca.o"
+    LIBOBJS="basename.o insque.o random.o strdup.o vasprintf.o"
+
+    for f in $funcs; do
+      case "$f" in
+       basename | insque | random | strdup | vasprintf)
+         ;;
+       *)
+         n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+         AC_DEFINE_UNQUOTED($n)
+         ;;
+      esac
+    done
+
+    # newlib doesnt provide any of the variables in $vars, so we
+    # dont have to check them here.
+
+    # Of the functions in $checkfuncs, VxWorks only has strerror.
+    AC_DEFINE(HAVE_STRERROR)
+
+    setobjs=yes
+
+  fi
+fi
+
+if test -z "${setobjs}"; then
+  case "${host}" in
+
+  *-*-vxworks*)
+    # Handle VxWorks configuration specially, since on VxWorks the
+    # libraries are actually on the target board, not in the file
+    # system.
+    LIBOBJS="basename.o getpagesize.o insque.o random.o strcasecmp.o"
+    LIBOBJS="$LIBOBJS strncasecmp.o strdup.o vfork.o waitpid.o vasprintf.o"
+    for f in $funcs; do
+      case "$f" in
+       basename | getpagesize | insque | random | strcasecmp)
+         ;;
+       strncasecmp | strdup | vfork | waitpid | vasprintf)
+         ;;
+       *)
+         n=HAVE_`echo $f | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+         AC_DEFINE_UNQUOTED($n)
+         ;;
+      esac
+    done
+
+    # VxWorks doesn't provide any of the variables in $vars, so we
+    # don't have to check them here.
+
+    # Of the functions in $checkfuncs, VxWorks only has strerror.
+    AC_DEFINE(HAVE_STRERROR)
+
+    setobjs=yes
+    ;;
+
+  esac
+fi
+
+if test -z "${setobjs}"; then
+
+  case "${host}" in
+
+  *-*-cygwin32*)
+    # The cygwin32 library actually uses a couple of files from
+    # libiberty when it is built.  If we are building a native
+    # cygwin32, and we run the tests, we will appear to have these
+    # files.  However, when we go on to build winsup, we will wind up
+    # with a library which does not have the files, since they should
+    # have come from libiberty.
+
+    # We handle this by removing the functions the winsup library
+    # provides from our shell variables, so that they appear to be
+    # missing.
+
+    funcs="`echo $funcs | sed -e 's/random//'`"
+    LIBOBJS="$LIBOBJS random.o"
+    vars="`echo $vars | sed -e 's/sys_siglist//'`"
+    checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//`"
+    ;;
+
+  *-*-mingw32*)
+    # Under mingw32, sys_nerr and sys_errlist exist, but they are
+    # macros, so the test below won't find them.
+    vars="`echo $vars | sed -e 's/sys_nerr//' -e 's/sys_errlist//'`"
+    AC_DEFINE(HAVE_SYS_NERR)
+    AC_DEFINE(HAVE_SYS_ERRLIST)
+    ;;
+
+  esac
+
+  # We haven't set the list of objects yet.  Use the standard autoconf
+  # tests.  This will only work if the compiler works.
+  AC_PROG_CC_WORKS
+  AC_REPLACE_FUNCS($funcs)
+  AC_FUNC_ALLOCA
+  AC_FUNC_VFORK
+  if test $ac_cv_func_vfork_works = no; then
+    LIBOBJS="$LIBOBJS vfork.o"
+  fi
+  for v in $vars; do
+    AC_MSG_CHECKING([for $v])
+    AC_CACHE_VAL(libiberty_cv_var_$v,
+      [AC_TRY_LINK([int *p;], [extern int $v; p = &$v;],
+                  [eval "libiberty_cv_var_$v=yes"],
+                  [eval "libiberty_cv_var_$v=no"])])
+    if eval "test \"`echo '$libiberty_cv_var_'$v`\" = yes"; then
+      AC_MSG_RESULT(yes)
+      n=HAVE_`echo $v | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      AC_DEFINE_UNQUOTED($n)
     else
-      . ${with_multisrctop}../config-ml.in
+      AC_MSG_RESULT(no)
     fi
-  else
-    . ${srcdir}/../config-ml.in
-  fi
+  done
+  AC_CHECK_FUNCS($checkfuncs)
+fi
+
+# Install a library built with a cross compiler in $(tooldir) rather
+# than $(libdir).
+if test -z "${with_target_subdir}"; then
+  INSTALL_DEST=libdir
+else
+  INSTALL_DEST=tooldir
 fi
+AC_SUBST(INSTALL_DEST)
+
+# We need multilib support, but only if configuring for the target.
+AC_OUTPUT(Makefile,
+[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+if test -n "$CONFIG_FILES"; then
+  if test -n "${with_target_subdir}"; then
+    # FIXME: We shouldn't need to set ac_file
+    ac_file=Makefile
+    . ${libiberty_topdir}/config-ml.in
+  fi
+fi],
+srcdir=${srcdir}
+host=${host}
+target=${target}
+with_target_subdir=${with_target_subdir}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="--enable-multilib ${ac_configure_args}"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+libiberty_topdir=${libiberty_topdir}
+)
index c5bcc47664c79384d06eae9f0a670c5194acdaa0..ccf7aef4a855461e379129a023a697c176dd5fd8 100644 (file)
@@ -890,7 +890,8 @@ demangle_signature (work, mangled, declp)
            {
              remember_type (work, oldmangled, *mangled - oldmangled);
            }
-         string_append(&tname, (work -> options & DMGL_JAVA) ? "." : "::");
+           string_append (&tname, "::");
+
          string_prepends(declp, &tname);
          if (work -> destructor & 1)
            {
@@ -1374,7 +1375,6 @@ demangle_template (work, mangled, tname, trawname, is_type)
   int need_comma = 0;
   int success = 0;
   const char *start;
-  int is_java_array = 0;
   string temp;
 
   (*mangled)++;
@@ -1418,16 +1418,10 @@ demangle_template (work, mangled, tname, trawname, is_type)
            }
          if (trawname)
            string_appendn (trawname, *mangled, r);
-         is_java_array = (work -> options & DMGL_JAVA)
-           && strncmp (*mangled, "JArray1Z", 8) == 0;
-         if (! is_java_array)
-           {
              string_appendn (tname, *mangled, r);
-           }
          *mangled += r;
        }
     }
-  if (!is_java_array)
     string_append (tname, "<");
   /* get size of template parameter list */
   if (!get_count (mangled, &r))
@@ -1555,11 +1549,6 @@ demangle_template (work, mangled, tname, trawname, is_type)
        }
       need_comma = 1;
     }
-  if (is_java_array)
-    {
-      string_append (tname, "[]");
-    }
-  else
     {
       if (tname->p[-1] == '>')
        string_append (tname, " ");
@@ -1723,7 +1712,7 @@ demangle_class (work, mangled, declp)
        }
       remember_Ktype (work, class_name.b, LEN_STRING(&class_name));
       remember_Btype (work, class_name.b, LEN_STRING(&class_name), btype);
-      string_prepend (declp, (work -> options & DMGL_JAVA) ? "." : "::");
+       string_prepend (declp, "::");
       string_prepends (declp, &class_name);
       success = 1;
     }
@@ -2025,8 +2014,7 @@ gnu_special (work, mangled, declp)
            {
              if (p != NULL)
                {
-                 string_append (declp,
-                                (work -> options & DMGL_JAVA) ? "." : "::");
+                   string_append (declp, "::");
                  (*mangled)++;
                }
            }
@@ -2064,7 +2052,7 @@ gnu_special (work, mangled, declp)
          /* Consumed everything up to the cplus_marker, append the
             variable name.  */
          (*mangled)++;
-         string_append (declp, (work -> options & DMGL_JAVA) ? "." : "::");
+           string_append (declp, "::");
          n = strlen (*mangled);
          string_appendn (declp, *mangled, n);
          (*mangled) += n;
@@ -2361,7 +2349,7 @@ demangle_qualified (work, mangled, result, isfuncname, append)
 
       if (qualifiers > 0)
         {
-          string_append (&temp, (work -> options & DMGL_JAVA) ? "." : "::");
+           string_append (&temp, "::");
         }
     }
 
@@ -2372,7 +2360,7 @@ demangle_qualified (work, mangled, result, isfuncname, append)
 
   if (isfuncname && (work->constructor & 1 || work->destructor & 1))
     {
-      string_append (&temp, (work -> options & DMGL_JAVA) ? "." : "::");
+       string_append (&temp, "::");
       if (work -> destructor & 1)
        {
          string_append (&temp, "~");
@@ -2391,7 +2379,7 @@ demangle_qualified (work, mangled, result, isfuncname, append)
     {
       if (!STRING_EMPTY (result))
        {
-         string_append (&temp, (work -> options & DMGL_JAVA) ? "." : "::");
+           string_append (&temp, "::");
        }
       string_prepends (result, &temp);
     }
@@ -2486,7 +2474,6 @@ do_type (work, mangled, result)
        case 'P':
        case 'p':
          (*mangled)++;
-         if (! (work -> options & DMGL_JAVA))
            string_prepend (&decl, "*");
          break;
 
@@ -2569,7 +2556,7 @@ do_type (work, mangled, result)
              }
 
            string_append (&decl, ")");
-           string_prepend (&decl, (work -> options & DMGL_JAVA) ? "." : "::");
+             string_prepend (&decl, "::");
            if (isdigit (**mangled)) 
              {
                n = consume_count (mangled);
@@ -3622,7 +3609,6 @@ static struct option long_options[] = {
   {"strip-underscores", no_argument, 0, '_'},
   {"format", required_argument, 0, 's'},
   {"help", no_argument, 0, 'h'},
-  {"java", no_argument, 0, 'j'},
   {"no-strip-underscores", no_argument, 0, 'n'},
   {"version", no_argument, 0, 'v'},
   {0, no_argument, 0, 0}
@@ -3667,9 +3653,6 @@ main (argc, argv)
        case '_':
          strip_underscore = 1;
          break;
-       case 'j':
-         flags |= DMGL_JAVA;
-         break;
        case 's':
          if (strcmp (optarg, "gnu") == 0)
            {
diff --git a/libiberty/dummy.c b/libiberty/dummy.c
deleted file mode 100644 (file)
index 08da647..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <ansidecl.h>
-
-#ifdef __STDC__
-#include <stddef.h>
-#define clock_t unsigned long
-#define DEF(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME (ARGS);
-#define DEFFUNC(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME (ARGS);
-#else
-#define void int
-#define size_t unsigned long
-#define clock_t unsigned long
-#define DEF(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME ();
-#define DEFFUNC(NAME, RETURN_TYPE, ARGLIST, ARGS) extern RETURN_TYPE NAME ();
-#endif
-
-#define DEFVAR(NAME,DECL,USE) extern DECL;
-
-#define NOTHING /*nothing*/
-
-#include "alloca-conf.h"
-#include "functions.def"
-
-/* Always use our: getopt.o getopt1.o obstack.o spaces.o */
-
-int
-main (argc, argv)
-     int argc; char **argv;
-{
-
-/* Create a dummy function call for each DEF-defined function. */
-
-#undef DEF
-#undef DEFVAR
-#undef DEFFUNC
-#undef AND
-#define AND = 0;
-/* ARGS expands into a set of declaration.  NAME ARG_LIST expands
-   info a function call that uses those variables as actual parameters.
-   If the function has been DEF'ed correctly, we can pass the right
-   number and types of parameters, which is nice.  (E.g. gcc may
-   otherwise complain about the wrong number of parameters to certain
-   builtins.) */
-#define DEF(NAME, RETURN_TYPE, ARG_LIST, ARGS) { ARGS; NAME ARG_LIST; }
-#define DEFVAR(NAME, DECL, USE) { USE; }
-#define DEFFUNC(NAME, RETURN_TYPE, ARG_LIST, ARGS) { ARGS; NAME ARG_LIST; }
-#include "functions.def"
-
-  return (0);
-}
diff --git a/libiberty/functions.def b/libiberty/functions.def
deleted file mode 100644 (file)
index 0f13f10..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * List of function definitions that may *optionally* be included
- * in libiberty.a.  The function names must match the filenames,
- * e.g. bzero() is defined in bzero.c.  (While each file can contain
- * extra functions, do not list them.)
- *
- * In the default libiberty configuration, these object files
- * (e.g bzero.o) are included if and only if cc fails to find
- * the corresponding function in libc.
- */
-
-DEF(asprintf, int, (), NOTHING)
-DEF(atexit, int, (f), void (*f)())
-DEF(bcmp, int, (s1, s2, length), char *s1 AND char *s2 AND int length )
-DEF(bcopy, void, (s1, s2, length), char *s1 AND char *s2 AND int length )
-DEF(bzero, void, (s, length), char *s AND int length)
-DEF(clock, clock_t, (), NOTHING)
-DEF(getopt, int, (argc, argv, optstring),
-       int argc AND char **argv AND CONST char *optstring)     
-DEF(getpagesize, int , (), NOTHING)
-DEF(getcwd, char*, (buf, len), char *buf AND int len)
-DEF(index, char*, (s, c), char *s AND int c)
-DEF(insque, void, (), NOTHING)
-DEF(memchr, PTR, (s, c, length), CONST PTR s AND int c AND size_t length)
-DEF(memcmp, int, (s1, s2, length),
-       CONST PTR s1 AND CONST PTR s2 AND size_t length)
-DEF(memcpy, PTR, (s1, s2, length), PTR s1 AND CONST PTR s2 AND size_t length)
-DEF(memmove, PTR, (s1, s2, length), PTR s1 AND CONST PTR s2 AND size_t length)
-DEF(memset, PTR, (s, val, length), PTR s AND int val AND size_t length )
-DEF(random, long int, (), NOTHING)
-DEF(rename, int, (f, t), char *f AND char *t)
-DEF(rindex, char*, (s, c), char *s AND int c)
-DEF(strcasecmp, int, (s1, s2), char *s1 AND char *s2)
-DEF(strncasecmp, int, (s1, s2, n), char *s1 AND char *s2 AND int n)
-DEF(strchr, char*, (s, c), CONST char *s AND int c)
-DEF(strdup, char*, (s1), char * s1)
-DEF(strrchr, char*, (s, c), CONST char *s AND int c)
-DEF(strstr, char*, (), NOTHING)
-DEF(strtod, double, (), NOTHING)
-DEF(strtol, long, (), NOTHING)
-DEF(strtoul, unsigned long, (), NOTHING)
-DEF(tmpnam, char *, (s), char * s)
-DEF(vfork, int, (), NOTHING)
-DEF(vfprintf, int, (), NOTHING)
-DEF(vprintf, int, (), NOTHING)
-DEF(vsprintf, int, (), NOTHING)
-DEF(sigsetmask, int, (), NOTHING)
-DEF(alloca, PTR, (size), size_t size)
-DEF(waitpid, int, (pid, statp, opts), int pid AND int* statp AND int opts )
-DEF(vasprintf, int, (), NOTHING)
-
-/* List of global variables that we want to look for in the host
-   environment, and to generate an entry NEED_<variable> in config.h
-   if they are not found.  The first arg is the variable name, the
-   second arg is how to declare the variable, and the third is how to
-   use it. */
-
-DEFVAR(sys_nerr, int sys_nerr, sys_nerr = 0)
-DEFVAR(sys_errlist, char *sys_errlist[], sys_errlist[0] = 0)
-DEFVAR(sys_siglist, char *sys_siglist[], sys_siglist[0] = 0)
-
-/* List of global functions that we want to look for in the host
-   environment, and to generate an entry NEED_<funcname> in config.h
-   if they are not found. */
-
-DEFFUNC(strerror, char*, (errnoval), int errnoval)
-DEFFUNC(psignal, void, (signo, message), unsigned signo AND char *message)
-DEFFUNC(basename, char *, (name), CONST char *name)
-DEFFUNC(on_exit, void, (f, arg), void (*f)() AND char *arg)
-DEFFUNC(strsignal, const char *, (signo), int signo)
index 60c1dd84eed984cc4612db8c9398b2331c1f04f1..06d55c04f58699752e91909fef0e69ed2ede726f 100644 (file)
@@ -20,7 +20,9 @@ BUGS
 
 */
 
-#ifndef NO_SYS_PARAM_H
+#include "config.h"
+
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
 #include <errno.h>
index e9784b8520b89e1053f9c017729ba7e6138ef475..d6327a8887dd030a2b9a03228175a3989574c0cf 100644 (file)
@@ -28,8 +28,10 @@ BUGS
 
 #ifndef VMS
 
+#include "config.h"
+
 #include <sys/types.h>
-#ifndef NO_SYS_PARAM_H
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
 
index 1be3b4c4a2a07295ff734bcb33910fe507799eba..861622259016036bfa11353f53a91237c60baa98 100644 (file)
@@ -17,6 +17,8 @@ License along with libiberty; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
+#include "config.h"
+
 #include "ansidecl.h"
 #include "libiberty.h"
 
@@ -26,23 +28,13 @@ Boston, MA 02111-1307, USA.  */
 
 #include <time.h>
 
-/* These should go away when libiberty uses autoconf. */
-
-#if defined(__sun__) && !defined(__svr4__)
-#define HAVE_GETRUSAGE
-#endif
-
-#ifdef HAVE_SYSCONF
-#define HAVE_TIMES
-#endif
-
 #ifdef HAVE_GETRUSAGE
 #include <sys/time.h>
 #include <sys/resource.h>
 #endif
 
 #ifdef HAVE_TIMES
-#ifndef NO_SYS_PARAM_H
+#ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
 #include <sys/times.h>
index 6f49ee1b1ea68c3925402ece8fd1631a1227544b..b61b51290daff41e02d33fee173cd56b0e0821fd 100644 (file)
@@ -23,15 +23,11 @@ libiberty.olb: config.h alloca-conf.h $(OBJS)
        purge
        lib/create libiberty *.obj
 
-alloca-conf.h: alloca-norm.h
-       $(CP) $< $@
-
 config.h: config.h-vms
        $(CP) $< $@
 
 clean:
        $$ purge
-       $(RM) alloca-conf.h;
        $(RM) config.h;
        $(RM) *.obj;
        $(RM) libiberty.olb;
index 829d8e730d4663a782e60a92def412ff8d4d64fd..2a21802148d62c1f88738117f39039d73e50b4fc 100644 (file)
@@ -1,7 +1,5 @@
 # MPW configuration fragment for libiberty.
 
-forward-include "{srcdir}"alloca-norm.h alloca-conf.h
-
 Echo '/* config.h.  Generated by mpw-configure.  */'    > "{o}"config.new
 
 MoveIfChange "{o}"config.new "{o}"config.h
index f5e2eebee2e260fa98fc815e0bf2f4240afac4ae..644cc75462aee8bcf7d07a6254955060ff0d839b 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "config.h"
 
-#ifndef NEED_sys_errlist
+#ifdef HAVE_SYS_ERRLIST
 /* Note that errno.h (not sure what OS) or stdio.h (BSD 4.4, at least)
    might declare sys_errlist in a way that the compiler might consider
    incompatible with our later declaration, perhaps by using const
@@ -19,7 +19,7 @@
 #include <stdio.h>
 #include <errno.h>
 
-#ifndef NEED_sys_errlist
+#ifdef HAVE_SYS_ERRLIST
 #undef sys_errlist
 #endif
 
@@ -55,12 +55,12 @@ struct error_info
 {
   int value;           /* The numeric value from <errno.h> */
   const char *name;    /* The equivalent symbolic value */
-#ifdef NEED_sys_errlist
+#ifndef HAVE_SYS_ERRLIST
   const char *msg;     /* Short message about this value */
 #endif
 };
 
-#ifdef NEED_sys_errlist
+#ifndef HAVE_SYS_ERRLIST
 #   define ENTRY(value, name, msg)     {value, name, msg}
 #else
 #   define ENTRY(value, name, msg)     {value, name}
@@ -455,7 +455,7 @@ static int num_error_names = 0;
    same name, it differs from other implementations in that it is dynamically
    initialized rather than statically initialized. */
 
-#ifdef NEED_sys_errlist
+#ifndef HAVE_SYS_ERRLIST
 
 static int sys_nerr;
 static const char **sys_errlist;
@@ -532,7 +532,7 @@ init_error_tables ()
        }
     }
 
-#ifdef NEED_sys_errlist
+#ifndef HAVE_SYS_ERRLIST
 
   /* Now attempt to allocate the sys_errlist table, zero it out, and then
      initialize it from the statically initialized error_table. */
@@ -595,7 +595,7 @@ errno_max ()
   return (maxsize - 1);
 }
 
-#ifdef NEED_strerror
+#ifndef HAVE_STRERROR
 
 /*
 
@@ -634,7 +634,7 @@ strerror (errnoval)
   char *msg;
   static char buf[32];
 
-#ifdef NEED_sys_errlist
+#ifndef HAVE_SYS_ERRLIST
 
   if (error_names == NULL)
     {
@@ -668,7 +668,7 @@ strerror (errnoval)
   return (msg);
 }
 
-#endif /* NEED_strerror */
+#endif /* ! HAVE_STRERROR */
 
 
 /*
index d517eed0df14088e61c7b7fe6dac7110d73b5a27..c7bb10c441c46f58e4d598185794b121b18f786b 100644 (file)
@@ -64,12 +64,12 @@ struct signal_info
 {
   int value;           /* The numeric value from <signal.h> */
   const char *name;    /* The equivalent symbolic value */
-#ifdef NEED_sys_siglist
+#ifndef HAVE_SYS_SIGLIST
   const char *msg;     /* Short message about this value */
 #endif
 };
 
-#ifdef NEED_sys_siglist
+#ifndef HAVE_SYS_SIGLIST
 #   define ENTRY(value, name, msg)     {value, name, msg}
 #else
 #   define ENTRY(value, name, msg)     {value, name}
@@ -236,7 +236,7 @@ static int num_signal_names = 0;
    same name, it differs from other implementations in that it is dynamically
    initialized rather than statically initialized. */
 
-#ifdef NEED_sys_siglist
+#ifndef HAVE_SYS_SIGLIST
 
 static int sys_nsig;
 static const char **sys_siglist;
@@ -319,7 +319,7 @@ init_signal_tables ()
        }
     }
 
-#ifdef NEED_sys_siglist
+#ifndef HAVE_SYS_SIGLIST
 
   /* Now attempt to allocate the sys_siglist table, zero it out, and then
      initialize it from the statically initialized signal_table. */
@@ -414,7 +414,7 @@ DESCRIPTION
 
 */
 
-#ifdef NEED_strsignal
+#ifndef HAVE_STRSIGNAL
 
 const char *
 strsignal (signo)
@@ -423,7 +423,7 @@ strsignal (signo)
   const char *msg;
   static char buf[32];
 
-#ifdef NEED_sys_siglist
+#ifndef HAVE_SYS_SIGLIST
 
   if (signal_names == NULL)
     {
@@ -452,7 +452,7 @@ strsignal (signo)
   return (msg);
 }
 
-#endif /* NEED_strsignal */
+#endif /* ! HAVE_STRSIGNAL */
 
 /*
 
@@ -580,7 +580,7 @@ DESCRIPTION
        followed by a newline.
 */
 
-#ifdef NEED_psignal
+#ifndef HAVE_PSIGNAL
 
 void
 psignal (signo, message)
@@ -601,7 +601,7 @@ psignal (signo, message)
     }
 }
 
-#endif /* NEED_psignal */
+#endif /* ! HAVE_PSIGNAL */
 
 
 /* A simple little main that does nothing but print all the signal translations
index 368521c1c2066836187f8ff7f261bb3d5e88b98c..4fede380bfd6d39a4741c39cdbb3654d0b44475d 100644 (file)
@@ -31,8 +31,6 @@ $ create config.h
 #define NEED_strsignal
 #define NEED_psignal
 #define NEED_basename
-$ if f$search("alloca-conf.h").eqs."" then -
-       copy alloca-norm.h alloca-conf.h
 $ LIBR 'WORK_LIB' /Create
 $
 $! first pass: compile "required" modules