diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2003-12-25 18:02:32 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2003-12-25 18:02:32 +0000 |
commit | 38f80c987bad7c7ca49b1dca506e35d6215c1d55 (patch) | |
tree | c9a80c0074dcab75c6134414d2d4cbe835b89672 /gnu/lib/libiberty/include | |
parent | 49a19b317169ad5c6d484ee8329e9129885c49a8 (diff) |
Automatic merge
Diffstat (limited to 'gnu/lib/libiberty/include')
-rw-r--r-- | gnu/lib/libiberty/include/demangle.h | 8 | ||||
-rw-r--r-- | gnu/lib/libiberty/include/hashtab.h | 26 | ||||
-rw-r--r-- | gnu/lib/libiberty/include/libiberty.h | 4 | ||||
-rw-r--r-- | gnu/lib/libiberty/include/splay-tree.h | 25 |
4 files changed, 43 insertions, 20 deletions
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, |