pooler: Patch for NetBSD

This commit is contained in:
Jason Bacon 2020-11-15 20:40:23 -06:00
parent 063cbece8f
commit 0943892297
3 changed files with 37 additions and 1 deletions

View File

@ -4,4 +4,5 @@ SHA1 (pooler-1.75.tar.gz) = 1b8c92087d40c664dc6547b58cccaa966d7273a2
RMD160 (pooler-1.75.tar.gz) = 2f0a7b2388fb20c18e231c3b3f917762f58b2d54
SHA512 (pooler-1.75.tar.gz) = d72f063455aaf5eb9de30cbbfd649cc069af4192d2f2aaf4d20d5f70973a41a0e92f660842e306d557ab8737de0d95ce0021cfbd247251b2f0f3e255ca13b487
Size (pooler-1.75.tar.gz) = 125999 bytes
SHA1 (patch-Makefile) = 97f8c8a673564311be5ff4134eda83dd095252db
SHA1 (patch-Makefile) = 32f05ccd92c60da7c7683ccbe696062a7c0b79b6
SHA1 (patch-bit-basics.h) = d9405402333d495020e592bb47b8f35fa060bcf4

View File

@ -4,6 +4,20 @@ $NetBSD$
--- Makefile.orig 2020-11-16 01:19:09.379126643 +0000
+++ Makefile
@@ -62,11 +62,11 @@ clean:
# an extra reminder that they're auto-generated (as well
# as the explanatory comment at the top)
128.h 32.h 32-64.h: 64.h 64-128.h
- chmod +w 128.h 32.h 32-64.h 2>/dev/null || true
+ chmod u+w 128.h 32.h 32-64.h 2>/dev/null || true
sed -e s/64/128/g < 64.h > 128.h
sed -e s/64/32/g < 64.h > 32.h
sed -e s/64/32/g -e s/128/64/g < 64-128.h > 32-64.h
- chmod -w 128.h 32.h 32-64.h
+ chmod u-w 128.h 32.h 32-64.h
# -----------------------------------------------------
# Rules you won't need unless releasing new versions:
@@ -130,6 +130,7 @@ publish-src: test-other
# compatibility with bsd.port.mk:
all: pooler

View File

@ -0,0 +1,21 @@
$NetBSD$
# Portability
--- bit-basics.h.orig 2020-11-16 02:34:09.827273691 +0000
+++ bit-basics.h
@@ -58,12 +58,14 @@ static inline int trail0_128(bit128 b) {
return trail0_64((bit64)b);
}
#endif
+/*
static inline int popcount32(bit32 i) {
return __builtin_popcount(i);
}
static inline int popcount64(bit64 i) {
return __builtin_popcountll(i);
}
+*/
#if Has_128bit
static inline int popcount128(bit128 i) {
return popcount64((bit64)i) + popcount64((bit64)(i>>64));