summaryrefslogtreecommitdiff
path: root/gnu/lib
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2003-12-25 18:02:32 +0000
committerMarc Espie <espie@cvs.openbsd.org>2003-12-25 18:02:32 +0000
commit38f80c987bad7c7ca49b1dca506e35d6215c1d55 (patch)
treec9a80c0074dcab75c6134414d2d4cbe835b89672 /gnu/lib
parent49a19b317169ad5c6d484ee8329e9129885c49a8 (diff)
Automatic merge
Diffstat (limited to 'gnu/lib')
-rw-r--r--gnu/lib/libiberty/config.guess9
-rw-r--r--gnu/lib/libiberty/config.sub24
-rw-r--r--gnu/lib/libiberty/include/demangle.h8
-rw-r--r--gnu/lib/libiberty/include/hashtab.h26
-rw-r--r--gnu/lib/libiberty/include/libiberty.h4
-rw-r--r--gnu/lib/libiberty/include/splay-tree.h25
-rw-r--r--gnu/lib/libiberty/install-sh2
-rw-r--r--gnu/lib/libiberty/src/ChangeLog209
-rw-r--r--gnu/lib/libiberty/src/Makefile.in70
-rw-r--r--gnu/lib/libiberty/src/argv.c6
-rw-r--r--gnu/lib/libiberty/src/config.in31
-rw-r--r--gnu/lib/libiberty/src/configure312
-rw-r--r--gnu/lib/libiberty/src/configure.in44
-rw-r--r--gnu/lib/libiberty/src/cplus-dem.c82
-rw-r--r--gnu/lib/libiberty/src/floatformat.c3
-rw-r--r--gnu/lib/libiberty/src/getcwd.c2
-rw-r--r--gnu/lib/libiberty/src/hashtab.c111
-rw-r--r--gnu/lib/libiberty/src/memcmp.c8
-rw-r--r--gnu/lib/libiberty/src/rename.c5
-rw-r--r--gnu/lib/libiberty/src/sigsetmask.c4
-rw-r--r--gnu/lib/libiberty/src/strsignal.c2
-rw-r--r--gnu/lib/libiberty/src/xmalloc.c2
22 files changed, 690 insertions, 299 deletions
diff --git a/gnu/lib/libiberty/config.guess b/gnu/lib/libiberty/config.guess
index 4fc21ecc3aa..6bdac8d7b61 100644
--- a/gnu/lib/libiberty/config.guess
+++ b/gnu/lib/libiberty/config.guess
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2003-01-30'
+timestamp='2003-05-09'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -235,9 +235,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
- *:MicroBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
- exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -747,7 +744,7 @@ EOF
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit 0 ;;
- *:FreeBSD:*:*)
+ *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
# Determine whether the default compiler uses glibc.
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -1036,7 +1033,7 @@ EOF
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
diff --git a/gnu/lib/libiberty/config.sub b/gnu/lib/libiberty/config.sub
index 2ab7f25694c..fe4f1edf3c0 100644
--- a/gnu/lib/libiberty/config.sub
+++ b/gnu/lib/libiberty/config.sub
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2003-01-28'
+timestamp='2003-05-09'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -296,7 +296,7 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
@@ -333,7 +333,9 @@ case $basic_machine in
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
@@ -371,6 +373,9 @@ case $basic_machine in
basic_machine=a29k-none
os=-bsd
;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -925,6 +930,14 @@ case $basic_machine in
basic_machine=tic54x-unknown
os=-coff
;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -1118,7 +1131,7 @@ case $os in
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -microbsd*)
+ | -powermax* | -dnix*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1230,6 +1243,9 @@ case $os in
-aros*)
os=-aros
;;
+ -kaos*)
+ os=-kaos
+ ;;
-none)
;;
*)
diff --git a/gnu/lib/libiberty/include/demangle.h b/gnu/lib/libiberty/include/demangle.h
index bff266931c8..21e9dd33820 100644
--- a/gnu/lib/libiberty/include/demangle.h
+++ b/gnu/lib/libiberty/include/demangle.h
@@ -23,10 +23,6 @@
#include "ansidecl.h"
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
/* Options passed to cplus_demangle (in 2nd parameter). */
#define DMGL_NO_OPTS 0 /* For readability... */
@@ -164,8 +160,4 @@ enum gnu_v3_dtor_kinds {
extern enum gnu_v3_dtor_kinds
is_gnu_v3_mangled_dtor PARAMS ((const char *name));
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
#endif /* DEMANGLE_H */
diff --git a/gnu/lib/libiberty/include/hashtab.h b/gnu/lib/libiberty/include/hashtab.h
index 2e01e5aa0e6..07a8cd6aec8 100644
--- a/gnu/lib/libiberty/include/hashtab.h
+++ b/gnu/lib/libiberty/include/hashtab.h
@@ -1,5 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2002, 2003 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This program is free software; you can redistribute it and/or modify
@@ -76,10 +76,16 @@ typedef PTR (*htab_alloc) PARAMS ((size_t, size_t));
/* We also need a free() routine. */
typedef void (*htab_free) PARAMS ((PTR));
+/* Memory allocation and deallocation; variants which take an extra
+ argument. */
+typedef PTR (*htab_alloc_with_arg) PARAMS ((void *, size_t, size_t));
+typedef void (*htab_free_with_arg) PARAMS ((void *, void *));
+
/* Hash tables are of the following type. The structure
(implementation) of this type is not needed for using the hash
tables. All work with hash table should be executed only through
- functions mentioned below. */
+ functions mentioned below. The size of this structure is subject to
+ change. */
struct htab GTY(())
{
@@ -115,6 +121,11 @@ struct htab GTY(())
/* Pointers to allocate/free functions. */
htab_alloc alloc_f;
htab_free free_f;
+
+ /* Alternate allocate/free functions, which take an extra argument. */
+ PTR GTY((skip (""))) alloc_arg;
+ htab_alloc_with_arg alloc_with_arg_f;
+ htab_free_with_arg free_with_arg_f;
};
typedef struct htab *htab_t;
@@ -128,10 +139,20 @@ extern htab_t htab_create_alloc PARAMS ((size_t, htab_hash,
htab_eq, htab_del,
htab_alloc, htab_free));
+extern htab_t htab_create_alloc_ex PARAMS ((size_t, htab_hash,
+ htab_eq, htab_del,
+ PTR, htab_alloc_with_arg,
+ htab_free_with_arg));
+
/* Backward-compatibility functions. */
extern htab_t htab_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
extern htab_t htab_try_create PARAMS ((size_t, htab_hash, htab_eq, htab_del));
+extern void htab_set_functions_ex PARAMS ((htab_t, htab_hash,
+ htab_eq, htab_del,
+ PTR, htab_alloc_with_arg,
+ htab_free_with_arg));
+
extern void htab_delete PARAMS ((htab_t));
extern void htab_empty PARAMS ((htab_t));
@@ -147,6 +168,7 @@ extern void htab_clear_slot PARAMS ((htab_t, void **));
extern void htab_remove_elt PARAMS ((htab_t, void *));
extern void htab_traverse PARAMS ((htab_t, htab_trav, void *));
+extern void htab_traverse_noresize PARAMS ((htab_t, htab_trav, void *));
extern size_t htab_size PARAMS ((htab_t));
extern size_t htab_elements PARAMS ((htab_t));
diff --git a/gnu/lib/libiberty/include/libiberty.h b/gnu/lib/libiberty/include/libiberty.h
index fd0f641aed0..9c773343d39 100644
--- a/gnu/lib/libiberty/include/libiberty.h
+++ b/gnu/lib/libiberty/include/libiberty.h
@@ -85,6 +85,10 @@ extern char *basename ();
extern const char *lbasename PARAMS ((const char *));
+/* A well-defined realpath () that is always compiled in. */
+
+extern char *lrealpath PARAMS ((const char *));
+
/* Concatenate an arbitrary number of strings. You must pass NULL as
the last argument of this function, to terminate the list of
strings. Allocates memory using xmalloc. */
diff --git a/gnu/lib/libiberty/include/splay-tree.h b/gnu/lib/libiberty/include/splay-tree.h
index 23f7ac69d42..86707fc1d2f 100644
--- a/gnu/lib/libiberty/include/splay-tree.h
+++ b/gnu/lib/libiberty/include/splay-tree.h
@@ -36,6 +36,10 @@ extern "C" {
#include "ansidecl.h"
+#ifndef GTY
+#define GTY(X)
+#endif
+
/* Use typedefs for the key and data types to facilitate changing
these types, if necessary. These types should be sufficiently wide
that any pointer or scalar can be cast to these types, and then
@@ -65,7 +69,7 @@ typedef int (*splay_tree_foreach_fn) PARAMS((splay_tree_node, void*));
node structures. The first argument is the number of bytes needed;
the second is a data pointer the splay tree functions pass through
to the allocator. This function must never return zero. */
-typedef void *(*splay_tree_allocate_fn) PARAMS((int, void *));
+typedef PTR (*splay_tree_allocate_fn) PARAMS((int, void *));
/* The type of a function used to free memory allocated using the
corresponding splay_tree_allocate_fn. The first argument is the
@@ -74,24 +78,24 @@ typedef void *(*splay_tree_allocate_fn) PARAMS((int, void *));
typedef void (*splay_tree_deallocate_fn) PARAMS((void *, void *));
/* The nodes in the splay tree. */
-struct splay_tree_node_s
+struct splay_tree_node_s GTY(())
{
/* The key. */
- splay_tree_key key;
+ splay_tree_key GTY ((use_param1 (""))) key;
/* The value. */
- splay_tree_value value;
+ splay_tree_value GTY ((use_param2 (""))) value;
/* The left and right children, respectively. */
- splay_tree_node left;
- splay_tree_node right;
+ splay_tree_node GTY ((use_params (""))) left;
+ splay_tree_node GTY ((use_params (""))) right;
};
/* The splay tree itself. */
-typedef struct splay_tree_s
+struct splay_tree_s GTY(())
{
/* The root of the tree. */
- splay_tree_node root;
+ splay_tree_node GTY ((use_params (""))) root;
/* The comparision function. */
splay_tree_compare_fn comp;
@@ -105,9 +109,10 @@ typedef struct splay_tree_s
/* Allocate/free functions, and a data pointer to pass to them. */
splay_tree_allocate_fn allocate;
splay_tree_deallocate_fn deallocate;
- void *allocate_data;
+ PTR GTY((skip (""))) allocate_data;
-} *splay_tree;
+};
+typedef struct splay_tree_s *splay_tree;
extern splay_tree splay_tree_new PARAMS((splay_tree_compare_fn,
splay_tree_delete_key_fn,
diff --git a/gnu/lib/libiberty/install-sh b/gnu/lib/libiberty/install-sh
index 59bcde425aa..e9de23842dc 100644
--- a/gnu/lib/libiberty/install-sh
+++ b/gnu/lib/libiberty/install-sh
@@ -221,7 +221,7 @@ else
# Make a temp file name in the proper directory.
- dsttmp=$dstdir/_inst.$$_
+ dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
diff --git a/gnu/lib/libiberty/src/ChangeLog b/gnu/lib/libiberty/src/ChangeLog
index 513b48276ed..0539a5aa1ca 100644
--- a/gnu/lib/libiberty/src/ChangeLog
+++ b/gnu/lib/libiberty/src/ChangeLog
@@ -1,61 +1,55 @@
-2003-10-16 Release Manager
+2003-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- * GCC 3.3.2 Released.
+ * vsnprintf.c (vsnprintf): Don't pad string with extra nulls.
+ (main): Test that we don't write too much data.
-2003-08-04 Release Manager
+2003-04-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- * GCC 3.3.1 Released.
+ * configure.in (funcs, AC_CHECK_FUNCS): Add snprintf and
+ vsnprintf.
+ * snprintf.c, vsnprintf.c: New files.
+ * Makefile.in (CFILES): Add snprintf.c and vsnprintf.c.
+ (CONFIGURED_OFILES): Add snprintf.o and vsnprintf.o.
+ Regenerate dependencies.
-2003-08-04 Release Manager
+ * functions.texi, configure, config.in: Regenerated.
- * GCC 3.3.1 Released.
-
-2003-06-19 Dara Hazeghi <dhazeghi@yahoo.com>
+2003-04-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- * configure.in: Add check for malloc.h needed by
- m68k for function free().
- * configure: Regenerated.
- * config.in: Add HAVE_MALLOC_H.
- * hashtab.c: include malloc.h were available for
- free().
+ * mempcpy.c, stpcpy.c, stpncpy.c: New files.
+ * configure.in (funcs, AC_CHECK_FUNCS): Add mempcpy, stpcpy
+ and stpncpy.
+ * Makefile.in (CFILES): Add mempcpy.c, stpcpy.c and stpncpy.c.
+ (CONFIGURED_OFILES): Add mempcpy.o, stpcpy.o and stpncpy.o.
+ Regenerate dependencies.
-2003-06-09 Albert Chin-A-Young <china@thewrittenword.com>
-
- PR bootstrap/10974
- * physmem.c: Update comment.
- * configure.in: Modify test for _system_configuration for older
- AIX systems.
-
- * config.in, configure: Regenerated.
-
-2003-06-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+ * functions.texi, configure, config.in: Regenerated.
- PR other/10810
- * test-demangle.c (getline): Fix fence-post error.
-
-2003-05-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+2003-04-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
- Backport from mainline:
- 2003-04-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
+ * argv.c: Fix comments.
+ * calloc.c: Don't unnecessarily include "libiberty.h".
+ (bzero): Add prototype.
+ * floatformat.c: Include "ansidecl.h", rely on ANSI_PROTOTYPES.
+ * getcwd.c (getcwd): Use standard definition to avoid conflicts
+ with system headers.
+ * hashtab.c (htab_traverse): Delete unused variables.
+ * rename.c: Include "ansidecl.h".
+ (rename): Use standard definition to avoid conflicts with system
+ headers.
+ * strsignal.c: Rely on ANSI_PROTOTYPES.
+ * strstr.c: Check GNUC >= 2, not GNUC == 2.
+ * vfprintf.c: Include "ansidecl.h", rely on ANSI_PROTOTYPES.
+ * vprintf.c: Include "ansidecl.h" earlier, rely on
+ ANSI_PROTOTYPES.
* vsprintf.c: Include "ansidecl.h" earlier, rely on
ANSI_PROTOTYPES and possibly include <stdarg.h>.
+
+ * Makefile.in: Regenerate dependencies.
-2003-05-14 Carlo Wood <carlo@alinoe.com>
-
- * cp-demangle.c: Fix typo in "char_traints" string-literal.
-
-2003-05-13 Release Manager
-
- * GCC 3.3 Released.
-
-2003-05-13 Release Manager
-
- * GCC 3.3 Released.
-
-2003-05-13 Release Manager
+2003-04-15 DJ Delorie <dj@redhat.com>
- * GCC 3.3 Released.
+ * maint-tool (deps): Scan for headers in $srcdir also.
2003-04-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
@@ -66,6 +60,29 @@
__mempcpy.
* regex.c (regerror): Likewise.
+2003-04-14 Roger Sayle <roger@eyesopen.com>
+
+ * argv.c: Use ANSI_PROTOTYPES instead of __STDC__.
+ * memchr.c: Likewise.
+ * strcasecmp.c: Likewise.
+ * strncasecmp.c: Likewise.
+ * strncmp.c: Likewise.
+ * xatexit.c: Likewise.
+ * xmalloc.c: Likewise.
+
+ * copysign.c: Use traditional function declaration instead of DEFUN.
+ * sigsetmask.c: Likewise.
+
+ * memcmp.c: Both of the above, ANSI_PROTOTYPES and DEFUN.
+ * memset.c: Likewise.
+
+ * memcpy.c: ANSI_PROTOTYPES, DEFUN and prototype bcopy.
+ * memmove.c: Likewise.
+
+2003-04-14 Roger Sayle <roger@eyesopen.com>
+
+ * strdup.c (strdup): Tweak implementation to use memcpy.
+
2003-04-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in (HAVE_UINTPTR_T): Always define.
@@ -77,6 +94,25 @@
instead of $$CC alone.
(install_to_tooldir): Use it.
+2003-17-03 Jan Hubicka <jh@suse.cz>
+
+ * hashtab.c (htab_traverse_noresize): Break out from ...
+ * hashtab.c (htab_traverse): ... here.
+
+2003-12-03 Jan Hubicka <jh@suse.cz>
+
+ * hashtab.c (htab_expand): Fix warning.
+
+ * hashtab.c (htab_expand): Compute the size of hashtable based
+ on the number of elements actually used.
+ (htab_traverse): Call htab_expand when table is too empty.
+
+2003-03-11 Carlo Wood <carlo@gnu.org>
+
+ * cplus-dem.c (demangle_integral_value): Correction to reflect
+ patch of 2002-01-10 in order to also make negative multi-digits
+ without leading underscore work.
+
2003-03-03 Mark Mitchell <mark@codesourcery.com>
* cplus-dem.c: Add license exception to copyright notice.
@@ -135,7 +171,7 @@
* physmem.c (physmem_total, physmem_available): De-ANSI-fy.
* configure.in (AC_CHECK_FUNCS): Add pstat_getstatic and
pstat_getdynamic.
-
+
2003-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* Makefile.in (CFILES): Add physmem.c.
@@ -146,12 +182,48 @@
* config.in, configure: Regenerated.
+2003-02-20 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in (CFILES): Add lrealpath.c.
+ (REQUIRED_OFILES): Add lrealpath.o.
+ (lrealpath.o): Add rule.
+ * aclocal.m4 (libiberty_NEED_DECLARATION): Add.
+ * configure.in: Add realpath and canonicalize_file_name to
+ checkfuncs and AC_CHECK_FUNCS. Use libiberty_NEED_DECLARATION
+ for canonicalize_file_name.
+ * lrealpath.c: New file.
+ * make-relative-prefix.c: Update documentation.
+ (make_relative_prefix): Simplify. Use lbasename and lrealpath.
+ * config.in: Regenerated.
+ * configure: Regenerated.
+ * functions.texi: Regenerated.
+
+2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
+
+ * cplus_dem.c: Fix typo: intializes -> initializes.
+
2003-02-20 Alexandre Oliva <aoliva@redhat.com>
* configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to
config.status.
* configure: Rebuilt.
+2003-02-13 Daniel Jacobowitz <drow@mvista.com>
+
+ Fix PR c++/7612.
+ * cplus-dem.c (demangle_signature): Call string_delete.
+ Remove extra string_init.
+ (demangle_arm_hp_template): Call string_delete instead of
+ string_clear. Add missing string_delete call.
+ (demangle_qualified): Add missing string_delete call.
+ (do_type): Remove unused variable btype. Add missing string_delete
+ call. Call string_delete instead of string_clear.
+ (demangle_fund_type): Move variable btype inside of the switch
+ statement. Add missing string_delete call.
+ (do_arg): Call string_delete instead of string_clear. Remove extra
+ string_init.
+ (demangle_nested_args): Free work->previous_argument.
+
2003-02-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* acconfig.h: New file. Add uintptr_t.
@@ -161,7 +233,7 @@
* libiberty.texi: Update to GFDL 1.2.
-2003-02-02 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+2003-01-30 Christian Cornelssen <ccorn@cs.tu-berlin.de>
* Makefile.in (libiberty_topdir): New subst.
(mkinstalldirs): Redefine in terms of the above.
@@ -181,16 +253,51 @@
* Makefile.in (install_to_tooldir): Instead of $(MULTISUBDIR), use
/`$$CC -print-multi-os-directory`.
-2003-01-26 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+2003-01-26 Daniel Jacobowitz <drow@mvista.com>
- * Makefile.in (FLAGS_TO_PASS): Also pass DESTDIR.
- (install_to_libdir, install_to_tooldir): Add a mkinstalldirs
- command.
+ * hashtab.c (htab_create_alloc_ex): New function.
+ (hatab_set_functions_ex): New function.
+ (htab_delete, htab_expand): Support alternate allocation functions.
+
+2003-01-24 Christopher Faylor <cgf@redhat.com>
+
+ * configure.in: Remove special pex-cygwin consideration.
+ * configure: Regenerate.
+ * pex-cygwin.c: Remove.
+ * Makefile.in: Remove pex-cygwin.[co] lines.
+
+2003-01-24 Zack Weinberg <zack@codesourcery.com>
+
+ * Makefile.in (CFILES): Add pex-*.c.
+ (REQUIRED_OFILES): Change pexecute.o to @pexecute@
+ (CONFIGURED_OFILES): Add pex-*.o.
+ (TEXIFILES): Add pexecute.txh.
+ (pexecute.o): Delete rule.
+ (pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
+ pex-unix.o, pex-win32.o): New rules.
+ * configure.in: Change AC_INIT argument to xmalloc.c.
+ Compute appropriate pexecute implementation and substitute it
+ as @pexecute@.
+
+ * pexecute.c: Split up into...
+ * pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
+ pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
+ new files.
+
+ * functions.texi: Regenerate.
+ * configure: Regenerate.
2003-01-20 Josef Zlomek <zlomekj@suse.cz>
* hashtab.c (htab_expand): Fix allocation of new entries.
+2003-01-09 Christian Cornelssen <ccorn@cs.tu-berlin.de>
+
+ * Makefile.in (FLAGS_TO_PASS): Also pass DESTDIR.
+
+ * Makefile.in (install_to_libdir, install_to_tooldir): Add a
+ mkinstalldirs command.
+
2002-12-04 Danny Smith <dannysmith@users.sourceforge.net>
* make-relative-prefix.c (HAVE_HOST_EXECUTABLE_SUFFIX):
diff --git a/gnu/lib/libiberty/src/Makefile.in b/gnu/lib/libiberty/src/Makefile.in
index cafb3f7916d..d73ab2fef77 100644
--- a/gnu/lib/libiberty/src/Makefile.in
+++ b/gnu/lib/libiberty/src/Makefile.in
@@ -137,18 +137,22 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
hashtab.c hex.c \
index.c insque.c \
lbasename.c \
+ lrealpath.c \
make-relative-prefix.c \
make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmove.c \
- memset.c mkstemps.c \
+ mempcpy.c memset.c mkstemps.c \
objalloc.c obstack.c \
- partition.c pexecute.c physmem.c putenv.c \
+ partition.c \
+ pex-djgpp.c pex-mpw.c pex-msdos.c pex-os2.c \
+ pex-unix.c pex-win32.c \
+ physmem.c putenv.c \
random.c regex.c rename.c rindex.c \
- safe-ctype.c setenv.c sigsetmask.c sort.c spaces.c \
- splay-tree.c strcasecmp.c strchr.c strdup.c strerror.c \
- strncasecmp.c strncmp.c strrchr.c strsignal.c strstr.c \
- strtod.c strtol.c strtoul.c \
+ safe-ctype.c setenv.c sigsetmask.c snprintf.c sort.c spaces.c \
+ splay-tree.c stpcpy.c stpncpy.c strcasecmp.c strchr.c strdup.c \
+ strerror.c strncasecmp.c strncmp.c strrchr.c strsignal.c \
+ strstr.c strtod.c strtol.c strtoul.c \
ternary.c tmpnam.c \
- vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c \
+ vasprintf.c vfork.c vfprintf.c vprintf.c vsnprintf.c vsprintf.c \
waitpid.c \
xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c
@@ -162,10 +166,11 @@ REQUIRED_OFILES = regex.o cplus-dem.o cp-demangle.o md5.o \
getopt.o getopt1.o getpwd.o getruntime.o \
hashtab.o hex.o \
lbasename.o \
+ lrealpath.o \
make-relative-prefix.o \
make-temp-file.o \
objalloc.o obstack.o \
- partition.o physmem.o pexecute.o \
+ partition.o physmem.o @pexecute@ \
safe-ctype.o sort.o spaces.o splay-tree.o strerror.o \
strsignal.o \
ternary.o \
@@ -181,14 +186,16 @@ CONFIGURED_OFILES = asprintf.o atexit.o \
ffs.o \
getcwd.o getpagesize.o \
index.o insque.o \
- memchr.o memcmp.o memcpy.o memmove.o memset.o mkstemps.o \
- putenv.o \
+ memchr.o memcmp.o memcpy.o memmove.o mempcpy.o memset.o mkstemps.o \
+ pex-djgpp.o pex-mpw.o pex-msdos.o pex-os2.o \
+ pex-unix.o pex-win32.o \
+ putenv.o \
random.o rename.o rindex.o \
- setenv.o sigsetmask.o strcasecmp.o strchr.o strdup.o \
- strncasecmp.o strncmp.o strrchr.o strstr.o strtod.o strtol.o \
- strtoul.o \
+ setenv.o sigsetmask.o snprintf.o stpcpy.o stpncpy.o strcasecmp.o \
+ strchr.o strdup.o strncasecmp.o strncmp.o strrchr.o strstr.o \
+ strtod.o strtol.o strtoul.o \
tmpnam.o \
- vasprintf.o vfork.o vfprintf.o vprintf.o vsprintf.o \
+ vasprintf.o vfork.o vfprintf.o vprintf.o vsnprintf.o vsprintf.o \
waitpid.o
# These files are installed if the library has been configured to do so.
@@ -241,7 +248,7 @@ TEXISRC = \
# Additional files that have texi snippets that need to be collected
# and sorted. Some are here because the sources are imported from
# elsewhere. Others represent headers in ../include.
-TEXIFILES = fnmatch.txh
+TEXIFILES = fnmatch.txh pexecute.txh
libiberty.info : $(srcdir)/libiberty.texi $(TEXISRC)
$(MAKEINFO) -I$(srcdir) $(srcdir)/libiberty.texi
@@ -416,7 +423,7 @@ atexit.o: config.h
basename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
bsearch.o: config.h $(INCDIR)/ansidecl.h
-calloc.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+calloc.o: $(INCDIR)/ansidecl.h
choose-temp.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
clock.o: config.h
concat.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
@@ -424,7 +431,7 @@ copysign.o: $(INCDIR)/ansidecl.h
cp-demangle.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h \
$(INCDIR)/dyn-string.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h
cplus-dem.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h \
- $(INCDIR)/getopt.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
dyn-string.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/dyn-string.h \
$(INCDIR)/libiberty.h
fdmatch.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
@@ -443,36 +450,53 @@ hashtab.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/hashtab.h \
hex.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
lbasename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/safe-ctype.h
-make-relative-prefix.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+lrealpath.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+make-relative-prefix.o: config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/libiberty.h
make-temp-file.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
md5.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/md5.h
memchr.o: $(INCDIR)/ansidecl.h
memcmp.o: $(INCDIR)/ansidecl.h
memcpy.o: $(INCDIR)/ansidecl.h
memmove.o: $(INCDIR)/ansidecl.h
+mempcpy.o: $(INCDIR)/ansidecl.h
memset.o: $(INCDIR)/ansidecl.h
mkstemps.o: config.h $(INCDIR)/ansidecl.h
objalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/objalloc.h
obstack.o: config.h $(INCDIR)/obstack.h
partition.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/partition.h
-pexecute.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- $(INCDIR)/safe-ctype.h
-physmem.o: config.h $(INCDIR)/libiberty.h
+pex-djgpp.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h
+pex-mpw.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h
+pex-msdos.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h $(INCDIR)/safe-ctype.h
+pex-os2.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h
+pex-unix.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h
+pex-win32.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(srcdir)/pex-common.h
+physmem.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
putenv.o: config.h $(INCDIR)/ansidecl.h
random.o: $(INCDIR)/ansidecl.h
regex.o: config.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
-rename.o: config.h
+rename.o: config.h $(INCDIR)/ansidecl.h
safe-ctype.o: $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
setenv.o: config.h $(INCDIR)/ansidecl.h
sigsetmask.o: $(INCDIR)/ansidecl.h
+snprintf.o: $(INCDIR)/ansidecl.h
sort.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/sort.h
spaces.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
splay-tree.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/splay-tree.h
+stpcpy.o: $(INCDIR)/ansidecl.h
+stpncpy.o: $(INCDIR)/ansidecl.h
strcasecmp.o: $(INCDIR)/ansidecl.h
strchr.o: $(INCDIR)/ansidecl.h
+strdup.o: $(INCDIR)/ansidecl.h
strerror.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
strncasecmp.o: $(INCDIR)/ansidecl.h
strncmp.o: $(INCDIR)/ansidecl.h
@@ -485,7 +509,9 @@ ternary.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
$(INCDIR)/ternary.h
vasprintf.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
vfork.o: $(INCDIR)/ansidecl.h
+vfprintf.o: $(INCDIR)/ansidecl.h
vprintf.o: $(INCDIR)/ansidecl.h
+vsnprintf.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
vsprintf.o: $(INCDIR)/ansidecl.h
waitpid.o: config.h
xatexit.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
diff --git a/gnu/lib/libiberty/src/argv.c b/gnu/lib/libiberty/src/argv.c
index 4205579a576..31d8ef55e26 100644
--- a/gnu/lib/libiberty/src/argv.c
+++ b/gnu/lib/libiberty/src/argv.c
@@ -29,13 +29,13 @@ Boston, MA 02111-1307, USA. */
/* Routines imported from standard C runtime libraries. */
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
-#else /* !__STDC__ */
+#else /* !ANSI_PROTOTYPES */
#if !defined _WIN32 || defined __GNUC__
extern char *memcpy (); /* Copy memory region */
@@ -46,7 +46,7 @@ extern void free (); /* Free malloc'd memory */
extern char *strdup (); /* Duplicate a string */
#endif
-#endif /* __STDC__ */
+#endif /* ANSI_PROTOTYPES */
#ifndef NULL
diff --git a/gnu/lib/libiberty/src/config.in b/gnu/lib/libiberty/src/config.in
index 7b5cae9ebcd..1cc6d6132e5 100644
--- a/gnu/lib/libiberty/src/config.in
+++ b/gnu/lib/libiberty/src/config.in
@@ -63,6 +63,9 @@
/* Define if you have the calloc function. */
#undef HAVE_CALLOC
+/* Define if you have the canonicalize_file_name function. */
+#undef HAVE_CANONICALIZE_FILE_NAME
+
/* Define if you have the clock function. */
#undef HAVE_CLOCK
@@ -102,6 +105,9 @@
/* Define if you have the memmove function. */
#undef HAVE_MEMMOVE
+/* Define if you have the mempcpy function. */
+#undef HAVE_MEMPCPY
+
/* Define if you have the memset function. */
#undef HAVE_MEMSET
@@ -126,6 +132,9 @@
/* Define if you have the random function. */
#undef HAVE_RANDOM
+/* Define if you have the realpath function. */
+#undef HAVE_REALPATH
+
/* Define if you have the rename function. */
#undef HAVE_RENAME
@@ -141,6 +150,15 @@
/* Define if you have the sigsetmask function. */
#undef HAVE_SIGSETMASK
+/* Define if you have the snprintf function. */
+#undef HAVE_SNPRINTF
+
+/* Define if you have the stpcpy function. */
+#undef HAVE_STPCPY
+
+/* Define if you have the stpncpy function. */
+#undef HAVE_STPNCPY
+
/* Define if you have the strcasecmp function. */
#undef HAVE_STRCASECMP
@@ -201,6 +219,9 @@
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
+/* Define if you have the vsnprintf function. */
+#undef HAVE_VSNPRINTF
+
/* Define if you have the vsprintf function. */
#undef HAVE_VSPRINTF
@@ -270,9 +291,6 @@
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
-
/* Define if errno must be declared even when <errno.h> is included. */
#undef NEED_DECLARATION_ERRNO
@@ -288,6 +306,9 @@
/* Define if you have the sys_siglist variable. */
#undef HAVE_SYS_SIGLIST
+/* Define if you have the _system_configuration variable. */
+#undef HAVE__SYSTEM_CONFIGURATION
+
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP
systems. This function is required for alloca.c support on those
systems. */
@@ -300,6 +321,6 @@
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
-/* Define if you have the _system_configuration variable. */
-#undef HAVE__SYSTEM_CONFIGURATION
+/* Define if canonicalize_file_name is not declared in system header files. */
+#undef NEED_DECLARATION_CANONICALIZE_FILE_NAME
diff --git a/gnu/lib/libiberty/src/configure b/gnu/lib/libiberty/src/configure
index a3022505b10..f1ba0c85832 100644
--- a/gnu/lib/libiberty/src/configure
+++ b/gnu/lib/libiberty/src/configure
@@ -465,7 +465,7 @@ echo > confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=pexecute.c
+ac_unique_file=xmalloc.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
@@ -585,7 +585,7 @@ else
fi
ac_aux_dir=
-for ac_dir in ${GNUSYSTEM_AUX_DIR} $libiberty_topdir $srcdir/$libiberty_topdir; do
+for ac_dir in $libiberty_topdir $srcdir/$libiberty_topdir; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
@@ -1356,7 +1356,7 @@ else
fi
echo "$ac_t""$CPP" 1>&6
-for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h
+for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
@@ -1708,6 +1708,7 @@ funcs="$funcs memchr"
funcs="$funcs memcmp"
funcs="$funcs memcpy"
funcs="$funcs memmove"
+funcs="$funcs mempcpy"
funcs="$funcs memset"
funcs="$funcs mkstemps"
funcs="$funcs putenv"
@@ -1715,7 +1716,10 @@ funcs="$funcs random"
funcs="$funcs rename"
funcs="$funcs rindex"
funcs="$funcs setenv"
+funcs="$funcs snprintf"
funcs="$funcs sigsetmask"
+funcs="$funcs stpcpy"
+funcs="$funcs stpncpy"
funcs="$funcs strcasecmp"
funcs="$funcs strchr"
funcs="$funcs strdup"
@@ -1729,15 +1733,17 @@ funcs="$funcs tmpnam"
funcs="$funcs vasprintf"
funcs="$funcs vfprintf"
funcs="$funcs vprintf"
+funcs="$funcs vsnprintf"
funcs="$funcs vsprintf"
funcs="$funcs waitpid"
# Also in the old function.def file: alloca, vfork, getopt.
-vars="sys_errlist sys_nerr sys_siglist"
+vars="sys_errlist sys_nerr sys_siglist _system_configuration"
checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
-checkfuncs="$checkfuncs pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl"
+checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
+checkfuncs="$checkfuncs getsysinfo table sysctl"
# These are neither executed nor required, but they help keep
# autoheader happy without adding a bunch of text to acconfig.h.
@@ -1745,12 +1751,12 @@ if test "x" = "y"; then
for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1749: checking for $ac_func" >&5
+echo "configure:1755: 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 1754 "configure"
+#line 1760 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1773,7 +1779,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1783: \"$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
@@ -1800,12 +1806,12 @@ done
for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1804: checking for $ac_func" >&5
+echo "configure:1810: 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 1809 "configure"
+#line 1815 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1828,7 +1834,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1838: \"$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
@@ -1852,15 +1858,15 @@ else
fi
done
- for ac_func in memmove memset putenv random rename rindex sigsetmask
+ for ac_func in memmove mempcpy memset putenv random rename rindex sigsetmask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1859: checking for $ac_func" >&5
+echo "configure:1865: 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 1864 "configure"
+#line 1870 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1883,7 +1889,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1893: \"$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
@@ -1907,15 +1913,15 @@ else
fi
done
- for ac_func in strcasecmp setenv strchr strdup strncasecmp strrchr strstr
+ for ac_func in strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1914: checking for $ac_func" >&5
+echo "configure:1920: 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 1919 "configure"
+#line 1925 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1938,7 +1944,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1948: \"$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
@@ -1965,12 +1971,12 @@ done
for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1969: checking for $ac_func" >&5
+echo "configure:1975: 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 1974 "configure"
+#line 1980 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1993,7 +1999,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2003: \"$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
@@ -2020,12 +2026,12 @@ done
for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2024: checking for $ac_func" >&5
+echo "configure:2030: 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 2029 "configure"
+#line 2035 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2048,7 +2054,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2058: \"$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
@@ -2072,15 +2078,15 @@ else
fi
done
- for ac_func in sysconf times sbrk gettimeofday ffs
+ for ac_func in sysconf times sbrk gettimeofday ffs snprintf vsnprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2079: checking for $ac_func" >&5
+echo "configure:2085: 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 2084 "configure"
+#line 2090 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2103,7 +2109,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2113: \"$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
@@ -2130,12 +2136,12 @@ done
for ac_func in pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2134: checking for $ac_func" >&5
+echo "configure:2140: 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 2139 "configure"
+#line 2145 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2158,7 +2164,62 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2168: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+ for ac_func in realpath canonicalize_file_name
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2195: 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 2200 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2223: \"$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
@@ -2194,6 +2255,10 @@ EOF
#define HAVE_SYS_SIGLIST 1
EOF
+ cat >> confdefs.h <<\EOF
+#define HAVE__SYSTEM_CONFIGURATION 1
+EOF
+
fi
# For each of these functions, if the host does not provide the
@@ -2388,7 +2453,7 @@ if test -z "${setobjs}"; then
# We haven't set the list of objects yet. Use the standard autoconf
# tests. This will only work if the compiler works.
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2392: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2457: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2399,12 +2464,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2403 "configure"
+#line 2468 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2430,19 +2495,19 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2434: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2499: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
for ac_func in $funcs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2441: checking for $ac_func" >&5
+echo "configure:2506: 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 2446 "configure"
+#line 2511 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2465,7 +2530,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2534: \"$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
@@ -2492,12 +2557,12 @@ done
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2496: checking whether alloca needs Cray hooks" >&5
+echo "configure:2561: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2501 "configure"
+#line 2566 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2522,12 +2587,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2526: checking for $ac_func" >&5
+echo "configure:2591: 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 2531 "configure"
+#line 2596 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2550,7 +2615,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2619: \"$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
@@ -2576,7 +2641,7 @@ fi
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2580: checking stack direction for C alloca" >&5
+echo "configure:2645: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2584,7 +2649,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2588 "configure"
+#line 2653 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2603,7 +2668,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@@ -2625,17 +2690,17 @@ EOF
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2629: checking for vfork.h" >&5
+echo "configure:2694: checking for vfork.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 2634 "configure"
+#line 2699 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2704: \"$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*
@@ -2660,18 +2725,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2664: checking for working vfork" >&5
+echo "configure:2729: checking for working vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test "$cross_compiling" = yes; then
echo $ac_n "checking for vfork""... $ac_c" 1>&6
-echo "configure:2670: checking for vfork" >&5
+echo "configure:2735: checking for vfork" >&5
if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2675 "configure"
+#line 2740 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -2694,7 +2759,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vfork=yes"
else
@@ -2716,7 +2781,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 2720 "configure"
+#line 2785 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -2811,7 +2876,7 @@ main() {
}
}
EOF
-if { (eval echo configure:2815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_vfork_works=yes
else
@@ -2843,12 +2908,12 @@ fi
for ac_func in _doprnt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2847: checking for $ac_func" >&5
+echo "configure:2912: 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 2852 "configure"
+#line 2917 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2871,7 +2936,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2940: \"$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
@@ -2901,12 +2966,12 @@ done
for ac_func in _doprnt
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2905: checking for $ac_func" >&5
+echo "configure:2970: 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 2910 "configure"
+#line 2975 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2929,7 +2994,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2998: \"$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
@@ -2957,19 +3022,19 @@ done
for v in $vars; do
echo $ac_n "checking for $v""... $ac_c" 1>&6
-echo "configure:2961: checking for $v" >&5
+echo "configure:3026: checking for $v" >&5
if eval "test \"`echo '$''{'libiberty_cv_var_$v'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2966 "configure"
+#line 3031 "configure"
#include "confdefs.h"
int *p;
int main() {
extern int $v []; p = $v;
; return 0; }
EOF
-if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "libiberty_cv_var_$v=yes"
else
@@ -2992,43 +3057,15 @@ EOF
echo "$ac_t""no" 1>&6
fi
done
-
- # special check for _system_configuration because AIX <4.3.2 do not
- # contain the `physmem' member.
- echo $ac_n "checking for external symbol _system_configuration""... $ac_c" 1>&6
-echo "configure:3000: checking for external symbol _system_configuration" >&5
- cat > conftest.$ac_ext <<EOF
-#line 3002 "configure"
-#include "confdefs.h"
-#include <sys/systemcfg.h>
-int main() {
-double x = _system_configuration.physmem;
-; return 0; }
-EOF
-if { (eval echo configure:3009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<\EOF
-#define HAVE__SYSTEM_CONFIGURATION 1
-EOF
-
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-
for ac_func in $checkfuncs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3027: checking for $ac_func" >&5
+echo "configure:3064: 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 3032 "configure"
+#line 3069 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3051,7 +3088,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3092: \"$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
@@ -3075,23 +3112,81 @@ else
fi
done
+ echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
+echo "configure:3117: checking whether canonicalize_file_name must be declared" >&5
+if eval "test \"`echo '$''{'libiberty_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 3122 "configure"
+#include "confdefs.h"
+
+#include "confdefs.h"
+#include <stdio.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main() {
+char *(*pfn) = (char *(*)) canonicalize_file_name
+; return 0; }
+EOF
+if { (eval echo configure:3144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ libiberty_cv_decl_needed_canonicalize_file_name=no
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ libiberty_cv_decl_needed_canonicalize_file_name=yes
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$libiberty_cv_decl_needed_canonicalize_file_name" 1>&6
+if test $libiberty_cv_decl_needed_canonicalize_file_name = yes; then
+ cat >> confdefs.h <<\EOF
+#define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
+EOF
+
+fi
+
fi
+# Figure out which version of pexecute to use.
+case "${host}" in
+ *-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;;
+ *-*-msdosdjgpp*) pexecute=pex-djgpp.o ;;
+ *-*-msdos*) pexecute=pex-msdos.o ;;
+ *-*-os2-emx*) pexecute=pex-os2.o ;;
+ *) pexecute=pex-unix.o ;;
+esac
+
+
for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3085: checking for $ac_hdr" >&5
+echo "configure:3180: 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 3090 "configure"
+#line 3185 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3190: \"$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*
@@ -3120,12 +3215,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3124: checking for $ac_func" >&5
+echo "configure:3219: 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 3129 "configure"
+#line 3224 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3148,7 +3243,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3247: \"$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
@@ -3173,7 +3268,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3177: checking for working mmap" >&5
+echo "configure:3272: checking for working mmap" >&5
if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3181,7 +3276,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3185 "configure"
+#line 3280 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3321,7 +3416,7 @@ main()
}
EOF
-if { (eval echo configure:3325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3420: \"$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
@@ -3345,7 +3440,7 @@ fi
echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
-echo "configure:3349: checking for working strncmp" >&5
+echo "configure:3444: checking for working strncmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -3353,7 +3448,7 @@ else
ac_cv_func_strncmp_works=no
else
cat > conftest.$ac_ext <<EOF
-#line 3357 "configure"
+#line 3452 "configure"
#include "confdefs.h"
/* Test by Jim Wilson and Kaveh Ghazi.
@@ -3417,7 +3512,7 @@ main ()
}
EOF
-if { (eval echo configure:3421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_strncmp_works=yes
else
@@ -3613,6 +3708,7 @@ s%@CPP@%$CPP%g
s%@CHECK@%$CHECK%g
s%@target_header_dir@%$target_header_dir%g
s%@LIBOBJS@%$LIBOBJS%g
+s%@pexecute@%$pexecute%g
s%@INSTALL_DEST@%$INSTALL_DEST%g
CEOF
diff --git a/gnu/lib/libiberty/src/configure.in b/gnu/lib/libiberty/src/configure.in
index 8039b9310bb..e142cf501c8 100644
--- a/gnu/lib/libiberty/src/configure.in
+++ b/gnu/lib/libiberty/src/configure.in
@@ -1,7 +1,7 @@
dnl Process this file with autoconf to produce a configure script
AC_PREREQ(2.13)
-AC_INIT(pexecute.c)
+AC_INIT(xmalloc.c)
# This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of
@@ -142,7 +142,7 @@ 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 limits.h stdlib.h malloc.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h)
+AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h sys/pstat.h sys/sysmp.h sys/sysinfo.h machine/hal_sysinfo.h sys/table.h sys/sysctl.h sys/systemcfg.h)
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
@@ -177,6 +177,7 @@ funcs="$funcs memchr"
funcs="$funcs memcmp"
funcs="$funcs memcpy"
funcs="$funcs memmove"
+funcs="$funcs mempcpy"
funcs="$funcs memset"
funcs="$funcs mkstemps"
funcs="$funcs putenv"
@@ -184,7 +185,10 @@ funcs="$funcs random"
funcs="$funcs rename"
funcs="$funcs rindex"
funcs="$funcs setenv"
+funcs="$funcs snprintf"
funcs="$funcs sigsetmask"
+funcs="$funcs stpcpy"
+funcs="$funcs stpncpy"
funcs="$funcs strcasecmp"
funcs="$funcs strchr"
funcs="$funcs strdup"
@@ -198,30 +202,34 @@ funcs="$funcs tmpnam"
funcs="$funcs vasprintf"
funcs="$funcs vfprintf"
funcs="$funcs vprintf"
+funcs="$funcs vsnprintf"
funcs="$funcs vsprintf"
funcs="$funcs waitpid"
# Also in the old function.def file: alloca, vfork, getopt.
-vars="sys_errlist sys_nerr sys_siglist"
+vars="sys_errlist sys_nerr sys_siglist _system_configuration"
checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gettimeofday"
-checkfuncs="$checkfuncs pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl"
+checkfuncs="$checkfuncs realpath canonicalize_file_name pstat_getstatic pstat_getdynamic sysmp"
+checkfuncs="$checkfuncs getsysinfo table sysctl"
# 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 bsearch bzero calloc clock)
AC_CHECK_FUNCS(getcwd getpagesize index insque mkstemps memchr memcmp memcpy)
- AC_CHECK_FUNCS(memmove memset putenv random rename rindex sigsetmask)
- AC_CHECK_FUNCS(strcasecmp setenv strchr strdup strncasecmp strrchr strstr)
+ AC_CHECK_FUNCS(memmove mempcpy memset putenv random rename rindex sigsetmask)
+ AC_CHECK_FUNCS(strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strrchr strstr)
AC_CHECK_FUNCS(strtod strtol strtoul tmpnam vasprintf vfprintf vprintf)
AC_CHECK_FUNCS(vsprintf waitpid getrusage on_exit psignal strerror strsignal)
- AC_CHECK_FUNCS(sysconf times sbrk gettimeofday ffs)
+ AC_CHECK_FUNCS(sysconf times sbrk gettimeofday ffs snprintf vsnprintf)
AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic sysmp getsysinfo table sysctl)
+ AC_CHECK_FUNCS(realpath canonicalize_file_name)
AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.])
AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.])
AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.])
+ AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, [Define if you have the _system_configuration variable.])
fi
# For each of these functions, if the host does not provide the
@@ -424,20 +432,20 @@ if test -z "${setobjs}"; then
AC_MSG_RESULT(no)
fi
done
-
- # special check for _system_configuration because AIX <4.3.2 do not
- # contain the `physmem' member.
- AC_MSG_CHECKING([for external symbol _system_configuration])
- AC_TRY_COMPILE([#include <sys/systemcfg.h>],
- [double x = _system_configuration.physmem;],
- [AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1,
- [Define if you have the _system_configuration variable.])],
- [AC_MSG_RESULT([no])])
-
AC_CHECK_FUNCS($checkfuncs)
+ libiberty_NEED_DECLARATION(canonicalize_file_name)
fi
+# Figure out which version of pexecute to use.
+case "${host}" in
+ *-*-mingw* | *-*-winnt*) pexecute=pex-win32.o ;;
+ *-*-msdosdjgpp*) pexecute=pex-djgpp.o ;;
+ *-*-msdos*) pexecute=pex-msdos.o ;;
+ *-*-os2-emx*) pexecute=pex-os2.o ;;
+ *) pexecute=pex-unix.o ;;
+esac
+AC_SUBST(pexecute)
+
libiberty_AC_FUNC_STRNCMP
# Install a library built with a cross compiler in $(tooldir) rather
diff --git a/gnu/lib/libiberty/src/cplus-dem.c b/gnu/lib/libiberty/src/cplus-dem.c
index 199f767736d..59afcd371ba 100644
--- a/gnu/lib/libiberty/src/cplus-dem.c
+++ b/gnu/lib/libiberty/src/cplus-dem.c
@@ -1073,7 +1073,7 @@ ada_demangle (mangled, option)
/* This function performs most of what cplus_demangle use to do, but
to be able to demangle a name with a B, K or n code, we need to
have a longer term memory of what types have been seen. The original
- now intializes and cleans up the squangle code info, while internal
+ now initializes and cleans up the squangle code info, while internal
calls go directly to this routine to avoid resetting that info. */
static char *
@@ -1438,6 +1438,7 @@ demangle_signature (work, mangled, declp)
{
string_append (&s, SCOPE_STRING (work));
string_prepends (declp, &s);
+ string_delete (&s);
}
oldmangled = NULL;
expect_func = 1;
@@ -1517,7 +1518,6 @@ demangle_signature (work, mangled, declp)
{
/* Read the return type. */
string return_type;
- string_init (&return_type);
(*mangled)++;
success = do_type (work, mangled, &return_type);
@@ -1797,31 +1797,34 @@ demangle_integral_value (work, mangled, s)
success = 0;
- /* Negative numbers are indicated with a leading `m'. */
- if (**mangled == 'm')
- {
- string_appendn (s, "-", 1);
- (*mangled)++;
- }
- else if (mangled[0][0] == '_' && mangled[0][1] == 'm')
- {
- /* Since consume_count_with_underscores does not handle the
- `m'-prefix we must do it here, using consume_count and
- adjusting underscores: we have to consume the underscore
- matching the prepended one. */
- multidigit_without_leading_underscore = 1;
- string_appendn (s, "-", 1);
- (*mangled) += 2;
- }
- else if (**mangled == '_')
- {
- /* Do not consume a following underscore;
- multidigit_without_leading_underscore will consume what should be
- consumed. */
- leave_following_underscore = 1;
+ if (**mangled == '_')
+ {
+ if (mangled[0][1] == 'm')
+ {
+ /* Since consume_count_with_underscores does not handle the
+ `m'-prefix we must do it here, using consume_count and
+ adjusting underscores: we have to consume the underscore
+ matching the prepended one. */
+ multidigit_without_leading_underscore = 1;
+ string_appendn (s, "-", 1);
+ (*mangled) += 2;
+ }
+ else
+ {
+ /* Do not consume a following underscore;
+ consume_count_with_underscores will consume what
+ should be consumed. */
+ leave_following_underscore = 1;
+ }
}
else
{
+ /* Negative numbers are indicated with a leading `m'. */
+ if (**mangled == 'm')
+ {
+ string_appendn (s, "-", 1);
+ (*mangled)++;
+ }
/* Since consume_count_with_underscores does not handle
multi-digit numbers that do not start with an underscore,
and this number can be an integer template parameter,
@@ -1862,7 +1865,7 @@ demangle_integral_value (work, mangled, s)
/* All is well. */
success = 1;
}
- }
+ }
return success;
}
@@ -2330,7 +2333,7 @@ demangle_arm_hp_template (work, mangled, n, declp)
string_append (declp, "<");
while (1)
{
- string_clear (&arg);
+ string_delete (&arg);
switch (**mangled)
{
case 'T':
@@ -2387,7 +2390,7 @@ demangle_arm_hp_template (work, mangled, n, declp)
string_append (declp, "<");
/* should do error checking here */
while (args < e) {
- string_clear (&arg);
+ string_delete (&arg);
/* Check for type or literal here */
switch (*args)
@@ -2402,6 +2405,7 @@ demangle_arm_hp_template (work, mangled, n, declp)
goto cfront_template_args_done;
string_append (&arg, "(");
string_appends (&arg, &type_str);
+ string_delete (&type_str);
string_append (&arg, ")");
if (*args != 'L')
goto cfront_template_args_done;
@@ -3359,6 +3363,7 @@ demangle_qualified (work, mangled, result, isfuncname, append)
}
else
{
+ string_delete (&last_name);
success = do_type (work, mangled, &last_name);
if (!success)
break;
@@ -3501,10 +3506,8 @@ do_type (work, mangled, result)
string decl;
const char *remembered_type;
int type_quals;
- string btype;
type_kind_t tk = tk_none;
- string_init (&btype);
string_init (&decl);
string_init (result);
@@ -3622,6 +3625,7 @@ do_type (work, mangled, result)
string temp;
do_type (work, mangled, &temp);
string_prepends (&decl, &temp);
+ string_delete (&temp);
}
else if (**mangled == 't')
{
@@ -3632,7 +3636,7 @@ do_type (work, mangled, result)
if (success)
{
string_prependn (&decl, temp.b, temp.p - temp.b);
- string_clear (&temp);
+ string_delete (&temp);
}
else
break;
@@ -3812,11 +3816,8 @@ demangle_fund_type (work, mangled, result)
int success = 1;
char buf[10];
unsigned int dec = 0;
- string btype;
type_kind_t tk = tk_integral;
- string_init (&btype);
-
/* First pick off any type qualifiers. There can be more than one. */
while (!done)
@@ -3988,8 +3989,11 @@ demangle_fund_type (work, mangled, result)
}
case 't':
{
+ string btype;
+ string_init (&btype);
success = demangle_template (work, mangled, &btype, 0, 1, 1);
string_appends (result, &btype);
+ string_delete (&btype);
break;
}
default:
@@ -4191,12 +4195,9 @@ do_arg (work, mangled, result)
do not want to add additional types to the back-referenceable
type vector when processing a repeated type. */
if (work->previous_argument)
- string_clear (work->previous_argument);
+ string_delete (work->previous_argument);
else
- {
- work->previous_argument = (string*) xmalloc (sizeof (string));
- string_init (work->previous_argument);
- }
+ work->previous_argument = (string*) xmalloc (sizeof (string));
if (!do_type (work, mangled, work->previous_argument))
return 0;
@@ -4560,7 +4561,10 @@ demangle_nested_args (work, mangled, declp)
/* Restore the previous_argument field. */
if (work->previous_argument)
- string_delete (work->previous_argument);
+ {
+ string_delete (work->previous_argument);
+ free ((char *) work->previous_argument);
+ }
work->previous_argument = saved_previous_argument;
--work->forgetting_types;
work->nrepeats = saved_nrepeats;
diff --git a/gnu/lib/libiberty/src/floatformat.c b/gnu/lib/libiberty/src/floatformat.c
index d9e9fad816d..d69024f7390 100644
--- a/gnu/lib/libiberty/src/floatformat.c
+++ b/gnu/lib/libiberty/src/floatformat.c
@@ -17,9 +17,10 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+#include "ansidecl.h"
#include "floatformat.h"
#include <math.h> /* ldexp */
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
#include <stddef.h>
extern void *memcpy (void *s1, const void *s2, size_t n);
extern void *memset (void *s, int c, size_t n);
diff --git a/gnu/lib/libiberty/src/getcwd.c b/gnu/lib/libiberty/src/getcwd.c
index 465b4e0b2aa..a19d26796d5 100644
--- a/gnu/lib/libiberty/src/getcwd.c
+++ b/gnu/lib/libiberty/src/getcwd.c
@@ -40,7 +40,7 @@ extern int errno;
char *
getcwd (buf, len)
char *buf;
- int len;
+ size_t len;
{
char ourbuf[MAXPATHLEN];
char *result;
diff --git a/gnu/lib/libiberty/src/hashtab.c b/gnu/lib/libiberty/src/hashtab.c
index 9426a185178..32067afb5b8 100644
--- a/gnu/lib/libiberty/src/hashtab.c
+++ b/gnu/lib/libiberty/src/hashtab.c
@@ -1,5 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This file is part of the libiberty library.
@@ -45,10 +45,6 @@ Boston, MA 02111-1307, USA. */
#include <string.h>
#endif
-#ifdef HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-
#include <stdio.h>
#include "libiberty.h"
@@ -195,6 +191,63 @@ htab_create_alloc (size, hash_f, eq_f, del_f, alloc_f, free_f)
return result;
}
+/* As above, but use the variants of alloc_f and free_f which accept
+ an extra argument. */
+
+htab_t
+htab_create_alloc_ex (size, hash_f, eq_f, del_f, alloc_arg, alloc_f,
+ free_f)
+ size_t size;
+ htab_hash hash_f;
+ htab_eq eq_f;
+ htab_del del_f;
+ PTR alloc_arg;
+ htab_alloc_with_arg alloc_f;
+ htab_free_with_arg free_f;
+{
+ htab_t result;
+
+ size = higher_prime_number (size);
+ result = (htab_t) (*alloc_f) (alloc_arg, 1, sizeof (struct htab));
+ if (result == NULL)
+ return NULL;
+ result->entries = (PTR *) (*alloc_f) (alloc_arg, size, sizeof (PTR));
+ if (result->entries == NULL)
+ {
+ if (free_f != NULL)
+ (*free_f) (alloc_arg, result);
+ return NULL;
+ }
+ result->size = size;
+ result->hash_f = hash_f;
+ result->eq_f = eq_f;
+ result->del_f = del_f;
+ result->alloc_arg = alloc_arg;
+ result->alloc_with_arg_f = alloc_f;
+ result->free_with_arg_f = free_f;
+ return result;
+}
+
+/* Update the function pointers and allocation parameter in the htab_t. */
+
+void
+htab_set_functions_ex (htab, hash_f, eq_f, del_f, alloc_arg, alloc_f, free_f)
+ htab_t htab;
+ htab_hash hash_f;
+ htab_eq eq_f;
+ htab_del del_f;
+ PTR alloc_arg;
+ htab_alloc_with_arg alloc_f;
+ htab_free_with_arg free_f;
+{
+ htab->hash_f = hash_f;
+ htab->eq_f = eq_f;
+ htab->del_f = del_f;
+ htab->alloc_arg = alloc_arg;
+ htab->alloc_with_arg_f = alloc_f;
+ htab->free_with_arg_f = free_f;
+}
+
/* These functions exist solely for backward compatibility. */
#undef htab_create
@@ -238,6 +291,11 @@ htab_delete (htab)
(*htab->free_f) (htab->entries);
(*htab->free_f) (htab);
}
+ else if (htab->free_with_arg_f != NULL)
+ {
+ (*htab->free_with_arg_f) (htab->alloc_arg, htab->entries);
+ (*htab->free_with_arg_f) (htab->alloc_arg, htab);
+ }
}
/* This function clears all entries in the given hash table. */
@@ -315,9 +373,20 @@ htab_expand (htab)
oentries = htab->entries;
olimit = oentries + htab->size;
- nsize = higher_prime_number (htab->size * 2);
-
- nentries = (PTR *) (*htab->alloc_f) (nsize, sizeof (PTR));
+ /* Resize only when table after removal of unused elements is either
+ too full or too empty. */
+ if ((htab->n_elements - htab->n_deleted) * 2 > htab->size
+ || ((htab->n_elements - htab->n_deleted) * 8 < htab->size
+ && htab->size > 32))
+ nsize = higher_prime_number ((htab->n_elements - htab->n_deleted) * 2);
+ else
+ nsize = htab->size;
+
+ if (htab->alloc_with_arg_f != NULL)
+ nentries = (PTR *) (*htab->alloc_with_arg_f) (htab->alloc_arg, nsize,
+ sizeof (PTR *));
+ else
+ nentries = (PTR *) (*htab->alloc_f) (nsize, sizeof (PTR *));
if (nentries == NULL)
return 0;
htab->entries = nentries;
@@ -344,6 +413,8 @@ htab_expand (htab)
if (htab->free_f != NULL)
(*htab->free_f) (oentries);
+ else if (htab->free_with_arg_f != NULL)
+ (*htab->free_with_arg_f) (htab->alloc_arg, oentries);
return 1;
}
@@ -532,13 +603,16 @@ htab_clear_slot (htab, slot)
argument. */
void
-htab_traverse (htab, callback, info)
+htab_traverse_noresize (htab, callback, info)
htab_t htab;
htab_trav callback;
PTR info;
{
- PTR *slot = htab->entries;
- PTR *limit = slot + htab->size;
+ PTR *slot;
+ PTR *limit;
+
+ slot = htab->entries;
+ limit = slot + htab->size;
do
{
@@ -551,6 +625,21 @@ htab_traverse (htab, callback, info)
while (++slot < limit);
}
+/* Like htab_traverse_noresize, but does resize the table when it is
+ too empty to improve effectivity of subsequent calls. */
+
+void
+htab_traverse (htab, callback, info)
+ htab_t htab;
+ htab_trav callback;
+ PTR info;
+{
+ if ((htab->n_elements - htab->n_deleted) * 8 < htab->size)
+ htab_expand (htab);
+
+ htab_traverse_noresize (htab, callback, info);
+}
+
/* Return the current size of given hash table. */
size_t
diff --git a/gnu/lib/libiberty/src/memcmp.c b/gnu/lib/libiberty/src/memcmp.c
index d8d3997d066..92f2b6e6425 100644
--- a/gnu/lib/libiberty/src/memcmp.c
+++ b/gnu/lib/libiberty/src/memcmp.c
@@ -16,15 +16,17 @@ as if comparing unsigned char arrays.
*/
#include <ansidecl.h>
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
#include <stddef.h>
#else
#define size_t unsigned long
#endif
int
-DEFUN(memcmp, (str1, str2, count),
- const PTR str1 AND const PTR str2 AND size_t count)
+memcmp (str1, str2, count)
+ const PTR str1;
+ const PTR str2;
+ size_t count;
{
register const unsigned char *s1 = (const unsigned char*)str1;
register const unsigned char *s2 = (const unsigned char*)str2;
diff --git a/gnu/lib/libiberty/src/rename.c b/gnu/lib/libiberty/src/rename.c
index 05630629c1f..399980ab7d7 100644
--- a/gnu/lib/libiberty/src/rename.c
+++ b/gnu/lib/libiberty/src/rename.c
@@ -12,6 +12,7 @@ exists, it is removed.
*/
+#include "ansidecl.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -22,8 +23,8 @@ exists, it is removed.
int
rename (zfrom, zto)
- char *zfrom;
- char *zto;
+ const char *zfrom;
+ const char *zto;
{
if (link (zfrom, zto) < 0)
{
diff --git a/gnu/lib/libiberty/src/sigsetmask.c b/gnu/lib/libiberty/src/sigsetmask.c
index f705fbb2df2..4de3e4b1eb8 100644
--- a/gnu/lib/libiberty/src/sigsetmask.c
+++ b/gnu/lib/libiberty/src/sigsetmask.c
@@ -25,8 +25,8 @@ extern void abort PARAMS ((void)) ATTRIBUTE_NORETURN;
#ifdef SIG_SETMASK
int
-DEFUN(sigsetmask,(set),
- int set)
+sigsetmask (set)
+ int set;
{
sigset_t new;
sigset_t old;
diff --git a/gnu/lib/libiberty/src/strsignal.c b/gnu/lib/libiberty/src/strsignal.c
index 86c8aca5b49..a8a7d341fef 100644
--- a/gnu/lib/libiberty/src/strsignal.c
+++ b/gnu/lib/libiberty/src/strsignal.c
@@ -42,7 +42,7 @@ extern PTR memset ();
#undef sys_nsig
#ifndef NULL
-# ifdef __STDC__
+# ifdef ANSI_PROTOTYPES
# define NULL (void *) 0
# else
# define NULL 0
diff --git a/gnu/lib/libiberty/src/xmalloc.c b/gnu/lib/libiberty/src/xmalloc.c
index 4c8249ae70b..c3fe1a84f4d 100644
--- a/gnu/lib/libiberty/src/xmalloc.c
+++ b/gnu/lib/libiberty/src/xmalloc.c
@@ -68,7 +68,7 @@ function will be called to print an error message and terminate execution.
#include <stdio.h>
-#ifdef __STDC__
+#ifdef ANSI_PROTOTYPES
#include <stddef.h>
#else
#define size_t unsigned long