pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/blosc blosc: fix previous, use posix_memalign if...
details: https://anonhg.NetBSD.org/pkgsrc/rev/f0c767eb1c13
branches: trunk
changeset: 380156:f0c767eb1c13
user: maya <maya%pkgsrc.org@localhost>
date: Sat May 12 14:04:00 2018 +0000
description:
blosc: fix previous, use posix_memalign if possible.
We are using undefined behaviour so lots of the tests are failing. with
this and testing upstream trunk, all tests passed on netbsd.
diffstat:
devel/blosc/Makefile | 4 ++--
devel/blosc/distinfo | 4 ++--
devel/blosc/patches/patch-tests_test__common.h | 23 +++++++++++++++--------
3 files changed, 19 insertions(+), 12 deletions(-)
diffs (69 lines):
diff -r a9ed7782156d -r f0c767eb1c13 devel/blosc/Makefile
--- a/devel/blosc/Makefile Sat May 12 12:16:00 2018 +0000
+++ b/devel/blosc/Makefile Sat May 12 14:04:00 2018 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.4 2018/05/12 12:01:26 maya Exp $
+# $NetBSD: Makefile,v 1.5 2018/05/12 14:04:00 maya Exp $
DISTNAME= blosc-1.14.2
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GITHUB:=Blosc/}
GITHUB_PROJECT= c-blosc
diff -r a9ed7782156d -r f0c767eb1c13 devel/blosc/distinfo
--- a/devel/blosc/distinfo Sat May 12 12:16:00 2018 +0000
+++ b/devel/blosc/distinfo Sat May 12 14:04:00 2018 +0000
@@ -1,8 +1,8 @@
-$NetBSD: distinfo,v 1.4 2018/05/12 12:01:26 maya Exp $
+$NetBSD: distinfo,v 1.5 2018/05/12 14:04:00 maya Exp $
SHA1 (blosc-1.14.2.tar.gz) = ba8bc63c2f0cdc62077a45b5e44216abd098020a
RMD160 (blosc-1.14.2.tar.gz) = 4e75ba5f5cee49410cde42e0bef75d2f7e3d78d8
SHA512 (blosc-1.14.2.tar.gz) = fb0346e3c2c6101d17963771643a114302034a5389e2ffd9498c6b6367fe6f138ec59edbf039f89a57ce44a63e1f70324ad3906a39884ecc9d54ee2987a1b39c
Size (blosc-1.14.2.tar.gz) = 759731 bytes
SHA1 (patch-CMakeLists.txt) = 70dfc44c1541b1fccd200905acbd16e17a9313e1
-SHA1 (patch-tests_test__common.h) = 84e330c5b269ef80ad827f39dc7f4a9470faa36f
+SHA1 (patch-tests_test__common.h) = a5f7e117c5de05059203a79dda9b4f1fbd850b3b
diff -r a9ed7782156d -r f0c767eb1c13 devel/blosc/patches/patch-tests_test__common.h
--- a/devel/blosc/patches/patch-tests_test__common.h Sat May 12 12:16:00 2018 +0000
+++ b/devel/blosc/patches/patch-tests_test__common.h Sat May 12 14:04:00 2018 +0000
@@ -1,23 +1,30 @@
-$NetBSD: patch-tests_test__common.h,v 1.2 2018/05/12 12:01:26 maya Exp $
+$NetBSD: patch-tests_test__common.h,v 1.3 2018/05/12 14:04:00 maya Exp $
Use posix_memalign on SunOS with __EXTENSIONS__.
-Try the __STDC_VERSION__ check for C11 for everyone, not just freebsd.
+Use a standard C11 test.
+Prefer posix_memalign over C11 aligned_alloc because we are invoking undefined
+behaviour (C11 7.22.3.1).
--- tests/test_common.h.orig 2017-07-19 08:08:12.000000000 +0000
+++ tests/test_common.h
-@@ -62,13 +62,13 @@ static void* blosc_test_malloc(const siz
+@@ -61,16 +61,15 @@ static void* blosc_test_malloc(const siz
+ const int32_t clean_value = 0x99;
void *block = NULL;
int32_t res = 0;
-
+-
-#if defined(_ISOC11_SOURCE) || (defined(__FreeBSD__) && __STDC_VERSION__ >= 201112L)
-+#if defined(_ISOC11_SOURCE) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L)
++#if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__EXTENSIONS__)
++ /* Platform does have an implementation of posix_memalign */
++ res = posix_memalign(&block, alignment, size);
++#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
/* C11 aligned allocation. 'size' must be a multiple of the alignment. */
block = aligned_alloc(alignment, size);
#elif defined(_WIN32)
/* A (void *) cast needed for avoiding a warning with MINGW :-/ */
block = (void *)_aligned_malloc(size, alignment);
-#elif _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
-+#elif _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600 || defined(__EXTENSIONS__)
- /* Platform does have an implementation of posix_memalign */
- res = posix_memalign(&block, alignment, size);
+- /* Platform does have an implementation of posix_memalign */
+- res = posix_memalign(&block, alignment, size);
#elif defined(__APPLE__)
+ /* Mac OS X guarantees 16-byte alignment in small allocs */
+ block = malloc(size);
Home |
Main Index |
Thread Index |
Old Index