From: Tobias Stoeckmann Date: Fri, 30 May 2025 15:41:26 +0000 (+0200) Subject: Remove archive_utility_string_sort with 4.0.0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2650%2Fhead;p=thirdparty%2Flibarchive.git Remove archive_utility_string_sort with 4.0.0 The archive_utility_string_sort function won't be part of the 4.0.0 API anymore. No users were found and such a task should be done outside of the library. Signed-off-by: Tobias Stoeckmann --- diff --git a/libarchive/archive.h b/libarchive/archive.h index 02aa1b157..dceb5558f 100644 --- a/libarchive/archive.h +++ b/libarchive/archive.h @@ -1250,8 +1250,10 @@ __LA_DECL int archive_match_include_gname_w(struct archive *, const wchar_t *); /* Utility functions */ +#if ARCHIVE_VERSION_NUMBER < 4000000 /* Convenience function to sort a NULL terminated list of strings */ __LA_DECL int archive_utility_string_sort(char **); +#endif #ifdef __cplusplus } diff --git a/libarchive/archive_util.c b/libarchive/archive_util.c index 97185c004..900abd0c3 100644 --- a/libarchive/archive_util.c +++ b/libarchive/archive_util.c @@ -77,7 +77,9 @@ #define O_CLOEXEC 0 #endif +#if ARCHIVE_VERSION_NUMBER < 4000000 static int __LA_LIBC_CC archive_utility_string_sort_helper(const void *, const void *); +#endif /* Generic initialization of 'struct archive' objects. */ int @@ -629,6 +631,7 @@ __archive_ensure_cloexec_flag(int fd) #endif } +#if ARCHIVE_VERSION_NUMBER < 4000000 /* * Utility functions to sort a group of strings using quicksort. */ @@ -652,3 +655,4 @@ archive_utility_string_sort(char **strings) archive_utility_string_sort_helper); return (ARCHIVE_OK); } +#endif