pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/blosc



Module Name:    pkgsrc
Committed By:   maya
Date:           Sat May 12 14:04:00 UTC 2018

Modified Files:
        pkgsrc/devel/blosc: Makefile distinfo
        pkgsrc/devel/blosc/patches: patch-tests_test__common.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/devel/blosc/Makefile \
    pkgsrc/devel/blosc/distinfo
cvs rdiff -u -r1.2 -r1.3 \
    pkgsrc/devel/blosc/patches/patch-tests_test__common.h

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

Modified files:

Index: pkgsrc/devel/blosc/Makefile
diff -u pkgsrc/devel/blosc/Makefile:1.4 pkgsrc/devel/blosc/Makefile:1.5
--- pkgsrc/devel/blosc/Makefile:1.4     Sat May 12 12:01:26 2018
+++ pkgsrc/devel/blosc/Makefile Sat May 12 14:04:00 2018
@@ -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
Index: pkgsrc/devel/blosc/distinfo
diff -u pkgsrc/devel/blosc/distinfo:1.4 pkgsrc/devel/blosc/distinfo:1.5
--- pkgsrc/devel/blosc/distinfo:1.4     Sat May 12 12:01:26 2018
+++ pkgsrc/devel/blosc/distinfo Sat May 12 14:04:00 2018
@@ -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

Index: pkgsrc/devel/blosc/patches/patch-tests_test__common.h
diff -u pkgsrc/devel/blosc/patches/patch-tests_test__common.h:1.2 pkgsrc/devel/blosc/patches/patch-tests_test__common.h:1.3
--- pkgsrc/devel/blosc/patches/patch-tests_test__common.h:1.2   Sat May 12 12:01:26 2018
+++ pkgsrc/devel/blosc/patches/patch-tests_test__common.h       Sat May 12 14:04:00 2018
@@ -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