755-clean-temp-hashkey.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. From f47c5f2e21d0ccedb271b406e35b6963b23a64c4 Mon Sep 17 00:00:00 2001
  2. From: Bruno Haible <[email protected]>
  3. Date: Wed, 30 Apr 2025 13:11:01 +0200
  4. Subject: [PATCH] clean-temp: Fix link error (regression yesterday).
  5. * lib/clean-temp.c: Include hashkey-string.h.
  6. (create_temp_dir): Use hashkey_string_* functions instead of
  7. clean_temp_string_*.
  8. * lib/clean-temp-private.h (clean_temp_string_equals,
  9. clean_temp_string_hash): Remove declarations.
  10. * modules/clean-temp (Depends-on): Add hashkey-string.
  11. ---
  12. ChangeLog | 10 ++++++++++
  13. lib/clean-temp-private.h | 3 ---
  14. lib/clean-temp.c | 5 +++--
  15. modules/clean-temp | 1 +
  16. 4 files changed, 14 insertions(+), 5 deletions(-)
  17. --- a/lib/clean-temp-private.h
  18. +++ b/lib/clean-temp-private.h
  19. @@ -68,9 +68,6 @@ struct closeable_fd
  20. #define descriptors clean_temp_descriptors
  21. extern gl_list_t /* <closeable_fd *> */ volatile descriptors;
  22. -extern bool clean_temp_string_equals (const void *x1, const void *x2);
  23. -extern size_t clean_temp_string_hash (const void *x);
  24. -
  25. extern _GL_ASYNC_SAFE int clean_temp_asyncsafe_close (struct closeable_fd *element);
  26. extern void clean_temp_init_asyncsafe_close (void);
  27. --- a/lib/clean-temp.c
  28. +++ b/lib/clean-temp.c
  29. @@ -45,6 +45,7 @@
  30. #include "xmalloca.h"
  31. #include "glthread/lock.h"
  32. #include "thread-optim.h"
  33. +#include "hashkey-string.h"
  34. #include "gl_xlist.h"
  35. #include "gl_linkedhash_list.h"
  36. #include "gl_linked_list.h"
  37. @@ -221,11 +222,11 @@ create_temp_dir (const char *prefix, con
  38. tmpdir->cleanup_verbose = cleanup_verbose;
  39. tmpdir->subdirs =
  40. gl_list_create_empty (GL_LINKEDHASH_LIST,
  41. - clean_temp_string_equals, clean_temp_string_hash,
  42. + hashkey_string_equals, hashkey_string_hash,
  43. NULL, false);
  44. tmpdir->files =
  45. gl_list_create_empty (GL_LINKEDHASH_LIST,
  46. - clean_temp_string_equals, clean_temp_string_hash,
  47. + hashkey_string_equals, hashkey_string_hash,
  48. NULL, false);
  49. /* Create the temporary directory. */
  50. --- a/modules/clean-temp
  51. +++ b/modules/clean-temp
  52. @@ -24,6 +24,7 @@ rmdir
  53. xalloc
  54. xalloc-die
  55. xmalloca
  56. +hashkey-string
  57. linkedhash-list
  58. linked-list
  59. xlist