Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/compat PR port-amiga/56188



details:   https://anonhg.NetBSD.org/src/rev/667a8d10c277
branches:  trunk
changeset: 379405:667a8d10c277
user:      cjep <cjep%NetBSD.org@localhost>
date:      Sun May 30 10:39:41 2021 +0000

description:
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.

diffstat:

 tools/compat/compat_defs.h |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r c43880dffcbb -r 667a8d10c277 tools/compat/compat_defs.h
--- a/tools/compat/compat_defs.h        Sun May 30 09:54:56 2021 +0000
+++ b/tools/compat/compat_defs.h        Sun May 30 10:39:41 2021 +0000
@@ -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



Home | Main Index | Thread Index | Old Index