Description: Fix FTBFS in mSort helper implementations
 msort.c uses K&R-style empty-parameter function pointer int (*cmp)()
 which modern GCC treats as a zero-argument function, causing
 "error: too many arguments to function 'cmp'; expected 0, have 2"
 and aborting the build. Add explicit (void*, void*) parameter types
 to the comparator pointer in msort.c and the mSort declaration in
 regular.h so they match the actual int (*order)(void*, void*)
 callbacks.
Author: tangxiaofeng <xiaofeng_tang@qq.com>
Origin: upstream
Forwarded: not-needed
Last-Update: 2026-08-27

--- acedb-4.9.39+dfsg.02.orig/w1/msort.c
+++ acedb-4.9.39+dfsg.02/w1/msort.c
@@ -43,7 +43,7 @@
 
 #include "regular.h"
 
-static void mDoSortInt (int *b, int n, int (*cmp)(), int *buf)
+static void mDoSortInt (int *b, int n, int (*cmp)(void *, void *), int *buf)
 {
   int *b0 = buf, *b1, *b2 ;
   int  n1, n2 ;
@@ -70,7 +70,7 @@ static void mDoSortInt (int *b, int n, i
 
 /***********************************************************/
 
-static void mDoSort (char *b, int n, int s, int (*cmp)(), char *buf)
+static void mDoSort (char *b, int n, int s, int (*cmp)(void *, void *), char *buf)
 {
   char *b0 = buf, *b1, *b2 ;
   int  n1, n2 ;
@@ -105,7 +105,7 @@ static void mDoSort (char *b, int n, int
 
 /***********************************************************/
 
-void mSort (void *b, int n, int s, int (*cmp)())
+void mSort (void *b, int n, int s, int (*cmp)(void *, void *))
 { 
   int size = n * s, s_of_i = sizeof (int) ;
   char  sBuf [4*1024] ;
--- acedb-4.9.39+dfsg.02.orig/wh/regular.h
+++ acedb-4.9.39+dfsg.02/wh/regular.h
@@ -680,7 +680,7 @@ void randrestore (int *num_arr) ;
 
 
 /****************** alternative qsort() ************************/
-void mSort (void *b, int n, int s, int (*cmp)()) ;
+void mSort (void *b, int n, int s, int (*cmp)(void *, void *)) ;
 
 
 /******************* Unix debugging.  ****************************/
