Module Name:    src
Committed By:   cjep
Date:           Sun May 30 10:39:41 UTC 2021

Modified Files:
        src/tools/compat: compat_defs.h

Log Message:
PR port-amiga/56188

Include a prototype for __nbcompat_heapsort. The tools for amiga now
build on Darwin where one Amiga specific tool uses heapsort.

Despite being a one-liner, ./build.sh -m amiga tools was tested on
NetBSD, Darwin, FreeBSD & Linux with the change.

Discussed various options with jdc & thorpej. Perhaps in the future
we could look at using qsort instead of heapsort as qsort is
standardised and more likely to be available. We could then remove
heapsort from the compatibility library.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/tools/compat/compat_defs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tools/compat/compat_defs.h
diff -u src/tools/compat/compat_defs.h:1.119 src/tools/compat/compat_defs.h:1.120
--- src/tools/compat/compat_defs.h:1.119	Mon May 24 23:07:40 2021
+++ src/tools/compat/compat_defs.h	Sun May 30 10:39:41 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: compat_defs.h,v 1.119 2021/05/24 23:07:40 uwe Exp $	*/
+/*	$NetBSD: compat_defs.h,v 1.120 2021/05/30 10:39:41 cjep Exp $	*/
 
 #ifndef	__NETBSD_COMPAT_DEFS_H__
 #define	__NETBSD_COMPAT_DEFS_H__
@@ -462,7 +462,9 @@ int __nbcompat_gettemp(char *, int *, in
 ssize_t pread(int, void *, size_t, off_t);
 #endif
 
+int __nbcompat_heapsort (void *, size_t, size_t, int (*)(const void *, const void *));
 #define heapsort __nbcompat_heapsort
+
 #if !HAVE_DECL_HEAPSORT
 int heapsort (void *, size_t, size_t, int (*)(const void *, const void *));
 #endif

Reply via email to