mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-27 05:50:56 -04:00
65 lines
1.7 KiB
Plaintext
65 lines
1.7 KiB
Plaintext
$NetBSD: patch-ai,v 1.2 2007/01/06 22:07:43 wiz Exp $
|
|
|
|
The SunPro compiler does not like static inline template<>s.
|
|
|
|
--- common/lsort.hpp.orig 2006-11-18 08:42:24.000000000 +0000
|
|
+++ common/lsort.hpp
|
|
@@ -44,7 +44,7 @@ struct Less {
|
|
|
|
|
|
template <class N, class LT, class NX>
|
|
-static inline N * merge(N * x, N * y, const LT & lt, const NX & nx)
|
|
+inline N * merge(N * x, N * y, const LT & lt, const NX & nx)
|
|
{
|
|
if (lt(y,x)) swap(x,y);
|
|
N * first = x;
|
|
@@ -67,7 +67,7 @@ static inline N * merge(N * x, N * y, co
|
|
// THIS is SLOWER!!!
|
|
// and even slower when condational move is used!!!!
|
|
template <class N, class LT, class NX>
|
|
-static inline N * merge1(N * x, N * y, const LT & lt, const NX & nx)
|
|
+inline N * merge1(N * x, N * y, const LT & lt, const NX & nx)
|
|
{
|
|
N * * cur = lt(x,y) ? &x : &y;
|
|
N * first = *cur;
|
|
@@ -85,13 +85,13 @@ static inline N * merge1(N * x, N * y, c
|
|
}
|
|
|
|
template <class N, class LT>
|
|
-static inline N * merge(N * x, N * y, const LT & lt)
|
|
+inline N * merge(N * x, N * y, const LT & lt)
|
|
{
|
|
return sort(x, y, lt, Next<N>());
|
|
}
|
|
|
|
template <class N>
|
|
-static inline N * merge(N * x, N * y)
|
|
+inline N * merge(N * x, N * y)
|
|
{
|
|
return sort(x, y, Less<N>(), Next<N>());
|
|
}
|
|
@@ -135,20 +135,20 @@ N * sort(N * first, const LT & lt, const
|
|
}
|
|
|
|
template <class N, class LT>
|
|
-static inline N * sort(N * first, const LT & lt)
|
|
+inline N * sort(N * first, const LT & lt)
|
|
{
|
|
return sort(first, lt, Next<N>());
|
|
}
|
|
|
|
template <class N>
|
|
-static inline N * sort(N * first)
|
|
+inline N * sort(N * first)
|
|
{
|
|
return sort(first, Less<N>(), Next<N>());
|
|
}
|
|
|
|
|
|
template <class N>
|
|
-static inline N * fix_links(N * cur)
|
|
+inline N * fix_links(N * cur)
|
|
{
|
|
N * prev = 0;
|
|
while (cur) {
|