]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
removed OpenBSD specificity 4336/head
authorYann Collet <cyan@fb.com>
Wed, 12 Mar 2025 16:55:14 +0000 (09:55 -0700)
committerYann Collet <cyan@fb.com>
Wed, 12 Mar 2025 16:55:14 +0000 (09:55 -0700)
lib/dictBuilder/cover.c

index 467c1b17f68c6326b40eda2931103004ff8ec8db..92c22a96c7a1e88f8bb8f3af6a5eb2cd32a4a500 100644 (file)
@@ -364,14 +364,6 @@ static void stableSort(COVER_ctx_t *ctx)
     qsort_s(ctx->suffix, ctx->suffixSize, sizeof(U32),
             (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp),
             ctx);
-#elif defined(__OpenBSD__)
-    /* On OpenBSD, qsort() is not guaranteed to be stable, their mergesort() is.
-     * Note(@cyan): qsort() is never guaranteed to be stable,
-     *              so why would this property only matter for OpenBSD ?
-     */
-    g_coverCtx = ctx;
-    mergesort(ctx->suffix, ctx->suffixSize, sizeof(U32),
-          (ctx->d <= 8 ? &COVER_strict_cmp8 : &COVER_strict_cmp));
 #else /* C90 fallback.*/
     g_coverCtx = ctx;
     /* TODO(cavalcanti): implement a reentrant qsort() when _r is not available. */