It's (PCH) merging time! for libiberty

Geoff Keating geoffk@geoffk.org
Wed Jun 5 18:50:00 GMT 2002


Here's the patch I'll apply after one last compilation check.

-- 
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>

===File ~/patches/cygnus/pch-libibertyback-3.patch==========
Index: include/ChangeLog
2002-06-04  Geoffrey Keating  <geoffk@redhat.com>

	* hashtab.h (htab_create): Restore prototype for backward
	compatibility.
	(htab_try_create): Likewise.

Index: libiberty/ChangeLog
2002-06-04  Geoffrey Keating  <geoffk@redhat.com>

	* hashtab.c (htab_create): New stub function for backward
	compatibility.
	(htab_try_create): Likewise.

Index: include/hashtab.h
===================================================================
RCS file: /cvs/gcc/gcc/include/hashtab.h,v
retrieving revision 1.12
diff -p -u -p -r1.12 hashtab.h
--- include/hashtab.h	4 Jun 2002 07:11:03 -0000	1.12
+++ include/hashtab.h	6 Jun 2002 01:46:34 -0000
@@ -128,7 +128,11 @@ extern htab_t	htab_create_alloc	PARAMS (
 						 htab_eq, htab_del,
 						 htab_alloc, htab_free));
 
-/* Provided for convenience... */
+/* 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));
+
+/* Provided for convenience.  */
 #define htab_create(SIZE, HASH, EQ, DEL) \
   htab_create_alloc (SIZE, HASH, EQ, DEL, xcalloc, free)
 
Index: libiberty/hashtab.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/hashtab.c,v
retrieving revision 1.27
diff -p -u -p -r1.27 hashtab.c
--- libiberty/hashtab.c	4 Jun 2002 07:11:05 -0000	1.27
+++ libiberty/hashtab.c	6 Jun 2002 01:46:35 -0000
@@ -191,6 +191,29 @@ htab_create_alloc (size, hash_f, eq_f, d
   return result;
 }
 
+/* These functions exist solely for backward compatibility.  */
+
+#undef htab_create
+htab_t
+htab_create (size, hash_f, eq_f, del_f)
+     size_t size;
+     htab_hash hash_f;
+     htab_eq eq_f;
+     htab_del del_f;
+{
+  return htab_create_alloc (size, hash_f, eq_f, del_f, xcalloc, free);
+}
+
+htab_t
+htab_try_create (size, hash_f, eq_f, del_f)
+     size_t size;
+     htab_hash hash_f;
+     htab_eq eq_f;
+     htab_del del_f;
+{
+  return htab_create_alloc (size, hash_f, eq_f, del_f, calloc, free);
+}
+
 /* This function frees all memory allocated for given hash table.
    Naturally the hash table must already exist. */
 
============================================================



More information about the Gcc-patches mailing list