diff options
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 15 | ||||
-rw-r--r-- | libcpp/Makefile.in | 7 | ||||
-rwxr-xr-x | libcpp/configure | 286 | ||||
-rw-r--r-- | libcpp/configure.ac | 20 | ||||
-rw-r--r-- | libcpp/identifiers.c | 6 | ||||
-rw-r--r-- | libcpp/include/symtab.h | 20 | ||||
-rw-r--r-- | libcpp/init.c | 2 | ||||
-rw-r--r-- | libcpp/internal.h | 2 | ||||
-rw-r--r-- | libcpp/symtab.c | 24 |
9 files changed, 52 insertions, 330 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 0ec3013..e4da6ef 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,18 @@ +2012-08-14 Diego Novillo <dnovillo@google.com> + + Merge from cxx-conversion branch. Configury. + + * Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX. + * configure.ac: Likewise. + * configure: Regenerate. + +2012-08-14 Lawrence Crowl <crowl@google.com> + + Merge from cxx-conversion branch. New C++ hash table. + + * include/symtab.h (typedef struct ht hash_table): Change the typedef + name to cpp_hash_table. Update all users of the typedef. + 2012-07-30 Laurynas Biveinis <laurynas.biveinis@gmail.com> * include/line-map.h (line_map_macro): Use the "atomic" GTY option diff --git a/libcpp/Makefile.in b/libcpp/Makefile.in index d6df46d..3ae3280 100644 --- a/libcpp/Makefile.in +++ b/libcpp/Makefile.in @@ -77,16 +77,9 @@ ALL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(NOEXCEPTION_FLAGS) $(INCLUDES) \ $(CPPFLAGS) # The name of the compiler to use. -ENABLE_BUILD_WITH_CXX = @ENABLE_BUILD_WITH_CXX@ -ifneq ($(ENABLE_BUILD_WITH_CXX),yes) -COMPILER = $(CC) -COMPILER_FLAGS = $(ALL_CFLAGS) -DEPMODE = $(CCDEPMODE) -else COMPILER = $(CXX) COMPILER_FLAGS = $(ALL_CXXFLAGS) DEPMODE = $(CXXDEPMODE) -endif libcpp_a_OBJS = charset.o directives.o directives-only.o errors.o \ diff --git a/libcpp/configure b/libcpp/configure index fb5654d..01e4462 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -612,7 +612,6 @@ USE_NLS ALLOCA LIBOBJS CXXDEPMODE -CCDEPMODE DEPDIR am__leading_dot WERROR @@ -623,7 +622,6 @@ warn AUTOHEADER AUTOCONF ACLOCAL -ENABLE_BUILD_WITH_CXX EGREP GREP CPP @@ -696,7 +694,6 @@ ac_subst_files='' ac_user_opts=' enable_option_checking enable_largefile -enable_build_with_cxx enable_werror_always with_gnu_ld enable_rpath @@ -1332,7 +1329,6 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-largefile omit support for large files - --enable-build-with-cxx build with C++ compiler instead of C compiler --enable-werror-always enable -Werror despite compiler version --disable-rpath do not hardcode runtime library paths --enable-maintainer-mode enable rules only needed by maintainers @@ -4541,17 +4537,6 @@ rm -rf conftest* fi -# See if we are building gcc with C++. -# Do this early so setting lang to C++ affects following tests -# Check whether --enable-build-with-cxx was given. -if test "${enable_build_with_cxx+set}" = set; then : - enableval=$enable_build_with_cxx; ENABLE_BUILD_WITH_CXX=$enableval -else - ENABLE_BUILD_WITH_CXX=no -fi - - - MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing for ac_prog in aclocal do @@ -4895,104 +4880,6 @@ DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depdir" -if test "$ENABLE_BUILD_WITH_CXX" = "no"; then -depcc="$CC" am_compiler_list= - -am_depcomp=$ac_aux_dir/depcomp -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -f "$am_depcomp"; then - # We make a subdir and do the tests there. Otherwise we can end up - # making bogus files that we don't know about and never remove. For - # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. - mkdir conftest.dir - # Copy depcomp to subdir because otherwise we won't find it if we're - # using a relative directory. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - for depmode in $am_compiler_list; do - if test $depmode = none; then break; fi - - $as_echo "$as_me:$LINENO: trying $depmode" >&5 - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > sub/conftest.c - for i in 1 2 3 4 5 6; do - echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h - done - echo "include sub/conftest.Po" > confmf - - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. - depcmd="depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" - echo "| $depcmd" | sed -e 's/ */ /g' >&5 - if env $depcmd > conftest.err 2>&1 && - grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && - ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - $as_echo "$as_me:$LINENO: success" >&5 - break - fi - fi - $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 - sed -e 's/^/| /' < conftest.err >&5 - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -if test x${am_cv_CC_dependencies_compiler_type-none} = xnone -then as_fn_error "no usable dependency style found" "$LINENO" 5 -else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - -fi - -else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5112,7 +4999,6 @@ else CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type fi -fi # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 @@ -6454,6 +6340,12 @@ fi # g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which exposes a different # iconv() prototype. +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" @@ -6995,13 +6887,6 @@ fi fi -if test "$ENABLE_BUILD_WITH_CXX" = "yes"; then : - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - @@ -7157,169 +7042,12 @@ _ACEOF fi - ac_ext=c +ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -else - - - - - - am_save_CPPFLAGS="$CPPFLAGS" - - for element in $INCICONV; do - haveit= - for x in $CPPFLAGS; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" - fi - done - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 -$as_echo_n "checking for iconv... " >&6; } -if test "${am_cv_func_iconv+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - am_cv_func_iconv="no, consider installing GNU libiconv" - am_cv_lib_iconv=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <iconv.h> -int -main () -{ -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - am_cv_func_iconv=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test "$am_cv_func_iconv" != yes; then - am_save_LIBS="$LIBS" - LIBS="$LIBS $LIBICONV" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <iconv.h> -int -main () -{ -iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - am_cv_lib_iconv=yes - am_cv_func_iconv=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$am_save_LIBS" - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 -$as_echo "$am_cv_func_iconv" >&6; } - if test "$am_cv_func_iconv" = yes; then - -$as_echo "#define HAVE_ICONV 1" >>confdefs.h - - fi - if test "$am_cv_lib_iconv" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 -$as_echo_n "checking how to link with libiconv... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 -$as_echo "$LIBICONV" >&6; } - else - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= - fi - - - - if test "$am_cv_func_iconv" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 -$as_echo_n "checking for iconv declaration... " >&6; } - if test "${am_cv_proto_iconv+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include <stdlib.h> -#include <iconv.h> -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -#else -size_t iconv(); -#endif - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - am_cv_proto_iconv_arg1="" -else - am_cv_proto_iconv_arg1="const" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" -fi - - am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- - }$am_cv_proto_iconv" >&5 -$as_echo "${ac_t:- - }$am_cv_proto_iconv" >&6; } - -cat >>confdefs.h <<_ACEOF -#define ICONV_CONST $am_cv_proto_iconv_arg1 -_ACEOF - - fi - -fi # More defines and substitutions. PACKAGE="$PACKAGE_TARNAME" diff --git a/libcpp/configure.ac b/libcpp/configure.ac index 070ab63..29bd8c5 100644 --- a/libcpp/configure.ac +++ b/libcpp/configure.ac @@ -17,14 +17,6 @@ AC_PROG_RANLIB AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE -# See if we are building gcc with C++. -# Do this early so setting lang to C++ affects following tests -AC_ARG_ENABLE(build-with-cxx, -[ --enable-build-with-cxx build with C++ compiler instead of C compiler], -ENABLE_BUILD_WITH_CXX=$enableval, -ENABLE_BUILD_WITH_CXX=no) -AC_SUBST(ENABLE_BUILD_WITH_CXX) - MISSING=`cd $ac_aux_dir && ${PWDCMD-pwd}`/missing AC_CHECK_PROGS([ACLOCAL], [aclocal], [$MISSING aclocal]) AC_CHECK_PROGS([AUTOCONF], [autoconf], [$MISSING autoconf]) @@ -49,15 +41,11 @@ ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual]) # Dependency checking. ZW_CREATE_DEPDIR -if test "$ENABLE_BUILD_WITH_CXX" = "no"; then -ZW_PROG_COMPILER_DEPENDENCIES([CC]) -else AC_LANG_PUSH([C++]) AC_COMPILE_IFELSE([[int i;]], [], [AC_MSG_ERROR([C++ compiler missing or inoperational])]) AC_LANG_POP([C++]) ZW_PROG_COMPILER_DEPENDENCIES([CXX]) -fi # Checks for header files. AC_HEADER_TIME @@ -108,11 +96,9 @@ fi # g++ on Solaris 10+ defines _XOPEN_SOURCE=600, which exposes a different # iconv() prototype. -AS_IF([test "$ENABLE_BUILD_WITH_CXX" = "yes"], - [AC_LANG_PUSH([C++]) - AM_ICONV - AC_LANG_POP([C++])], - [AM_ICONV]) +AC_LANG_PUSH([C++]) +AM_ICONV +AC_LANG_POP([C++]) # More defines and substitutions. PACKAGE="$PACKAGE_TARNAME" diff --git a/libcpp/identifiers.c b/libcpp/identifiers.c index 8244f0c..d0973f4 100644 --- a/libcpp/identifiers.c +++ b/libcpp/identifiers.c @@ -28,12 +28,12 @@ along with this program; see the file COPYING3. If not see #include "cpplib.h" #include "internal.h" -static hashnode alloc_node (hash_table *); +static hashnode alloc_node (cpp_hash_table *); /* Return an identifier node for hashtable.c. Used by cpplib except when integrated with the C front ends. */ static hashnode -alloc_node (hash_table *table) +alloc_node (cpp_hash_table *table) { cpp_hashnode *node; @@ -45,7 +45,7 @@ alloc_node (hash_table *table) /* Set up the identifier hash table. Use TABLE if non-null, otherwise create our own. */ void -_cpp_init_hashtable (cpp_reader *pfile, hash_table *table) +_cpp_init_hashtable (cpp_reader *pfile, cpp_hash_table *table) { struct spec_nodes *s; diff --git a/libcpp/include/symtab.h b/libcpp/include/symtab.h index 4107a6f..30d7645 100644 --- a/libcpp/include/symtab.h +++ b/libcpp/include/symtab.h @@ -38,7 +38,7 @@ struct GTY(()) ht_identifier { #define HT_LEN(NODE) ((NODE)->len) #define HT_STR(NODE) ((NODE)->str) -typedef struct ht hash_table; +typedef struct ht cpp_hash_table; typedef struct ht_identifier *hashnode; enum ht_lookup_option {HT_NO_INSERT = 0, HT_ALLOC}; @@ -51,7 +51,7 @@ struct ht hashnode *entries; /* Call back, allocate a node. */ - hashnode (*alloc_node) (hash_table *); + hashnode (*alloc_node) (cpp_hash_table *); /* Call back, allocate something that hangs off a node like a cpp_macro. NULL means use the usual allocator. */ void * (*alloc_subobject) (size_t); @@ -71,14 +71,14 @@ struct ht }; /* Initialize the hashtable with 2 ^ order entries. */ -extern hash_table *ht_create (unsigned int order); +extern cpp_hash_table *ht_create (unsigned int order); /* Frees all memory associated with a hash table. */ -extern void ht_destroy (hash_table *); +extern void ht_destroy (cpp_hash_table *); -extern hashnode ht_lookup (hash_table *, const unsigned char *, +extern hashnode ht_lookup (cpp_hash_table *, const unsigned char *, size_t, enum ht_lookup_option); -extern hashnode ht_lookup_with_hash (hash_table *, const unsigned char *, +extern hashnode ht_lookup_with_hash (cpp_hash_table *, const unsigned char *, size_t, unsigned int, enum ht_lookup_option); #define HT_HASHSTEP(r, c) ((r) * 67 + ((c) - 113)); @@ -88,17 +88,17 @@ extern hashnode ht_lookup_with_hash (hash_table *, const unsigned char *, TABLE->PFILE, the node, and a PTR, and the callback sequence stops if the callback returns zero. */ typedef int (*ht_cb) (struct cpp_reader *, hashnode, const void *); -extern void ht_forall (hash_table *, ht_cb, const void *); +extern void ht_forall (cpp_hash_table *, ht_cb, const void *); /* For all nodes in TABLE, call the callback. If the callback returns a nonzero value, the node is removed from the table. */ -extern void ht_purge (hash_table *, ht_cb, const void *); +extern void ht_purge (cpp_hash_table *, ht_cb, const void *); /* Restore the hash table. */ -extern void ht_load (hash_table *ht, hashnode *entries, +extern void ht_load (cpp_hash_table *ht, hashnode *entries, unsigned int nslots, unsigned int nelements, bool own); /* Dump allocation statistics to stderr. */ -extern void ht_dump_statistics (hash_table *); +extern void ht_dump_statistics (cpp_hash_table *); #endif /* LIBCPP_SYMTAB_H */ diff --git a/libcpp/init.c b/libcpp/init.c index 7752fea..040ab34 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -149,7 +149,7 @@ init_library (void) /* Initialize a cpp_reader structure. */ cpp_reader * -cpp_create_reader (enum c_lang lang, hash_table *table, +cpp_create_reader (enum c_lang lang, cpp_hash_table *table, struct line_maps *line_table) { cpp_reader *pfile; diff --git a/libcpp/internal.h b/libcpp/internal.h index 37aac82..79dd54f 100644 --- a/libcpp/internal.h +++ b/libcpp/internal.h @@ -619,7 +619,7 @@ extern void _cpp_push_token_context (cpp_reader *, cpp_hashnode *, extern void _cpp_backup_tokens_direct (cpp_reader *, unsigned int); /* In identifiers.c */ -extern void _cpp_init_hashtable (cpp_reader *, hash_table *); +extern void _cpp_init_hashtable (cpp_reader *, cpp_hash_table *); extern void _cpp_destroy_hashtable (cpp_reader *); /* In files.c */ diff --git a/libcpp/symtab.c b/libcpp/symtab.c index 48a5338..a3537a0 100644 --- a/libcpp/symtab.c +++ b/libcpp/symtab.c @@ -31,7 +31,7 @@ along with this program; see the file COPYING3. If not see existing entry with a potential new one. */ static unsigned int calc_hash (const unsigned char *, size_t); -static void ht_expand (hash_table *); +static void ht_expand (cpp_hash_table *); static double approx_sqrt (double); /* A deleted entry. */ @@ -53,13 +53,13 @@ calc_hash (const unsigned char *str, size_t len) /* Initialize an identifier hashtable. */ -hash_table * +cpp_hash_table * ht_create (unsigned int order) { unsigned int nslots = 1 << order; - hash_table *table; + cpp_hash_table *table; - table = XCNEW (hash_table); + table = XCNEW (cpp_hash_table); /* Strings need no alignment. */ _obstack_begin (&table->stack, 0, 0, @@ -77,7 +77,7 @@ ht_create (unsigned int order) /* Frees all memory associated with a hash table. */ void -ht_destroy (hash_table *table) +ht_destroy (cpp_hash_table *table) { obstack_free (&table->stack, NULL); if (table->entries_owned) @@ -91,7 +91,7 @@ ht_destroy (hash_table *table) returns NULL. Otherwise insert and returns a new entry. A new string is allocated. */ hashnode -ht_lookup (hash_table *table, const unsigned char *str, size_t len, +ht_lookup (cpp_hash_table *table, const unsigned char *str, size_t len, enum ht_lookup_option insert) { return ht_lookup_with_hash (table, str, len, calc_hash (str, len), @@ -99,7 +99,7 @@ ht_lookup (hash_table *table, const unsigned char *str, size_t len, } hashnode -ht_lookup_with_hash (hash_table *table, const unsigned char *str, +ht_lookup_with_hash (cpp_hash_table *table, const unsigned char *str, size_t len, unsigned int hash, enum ht_lookup_option insert) { @@ -182,7 +182,7 @@ ht_lookup_with_hash (hash_table *table, const unsigned char *str, /* Double the size of a hash table, re-hashing existing entries. */ static void -ht_expand (hash_table *table) +ht_expand (cpp_hash_table *table) { hashnode *nentries, *p, *limit; unsigned int size, sizemask; @@ -224,7 +224,7 @@ ht_expand (hash_table *table) /* For all nodes in TABLE, callback CB with parameters TABLE->PFILE, the node, and V. */ void -ht_forall (hash_table *table, ht_cb cb, const void *v) +ht_forall (cpp_hash_table *table, ht_cb cb, const void *v) { hashnode *p, *limit; @@ -242,7 +242,7 @@ ht_forall (hash_table *table, ht_cb cb, const void *v) /* Like ht_forall, but a nonzero return from the callback means that the entry should be removed from the table. */ void -ht_purge (hash_table *table, ht_cb cb, const void *v) +ht_purge (cpp_hash_table *table, ht_cb cb, const void *v) { hashnode *p, *limit; @@ -259,7 +259,7 @@ ht_purge (hash_table *table, ht_cb cb, const void *v) /* Restore the hash table. */ void -ht_load (hash_table *ht, hashnode *entries, +ht_load (cpp_hash_table *ht, hashnode *entries, unsigned int nslots, unsigned int nelements, bool own) { @@ -274,7 +274,7 @@ ht_load (hash_table *ht, hashnode *entries, /* Dump allocation statistics to stderr. */ void -ht_dump_statistics (hash_table *table) +ht_dump_statistics (cpp_hash_table *table) { size_t nelts, nids, overhead, headers; size_t total_bytes, longest, deleted = 0; |