0002-Don-t-blindly-enable-frexpl-and-ldexpl-for-uClibc.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. From b0a1b9628d17251bb417a063ec6c6e09f32393c2 Mon Sep 17 00:00:00 2001
  2. From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
  3. Date: Tue, 6 Oct 2015 01:20:48 +0100
  4. Subject: [PATCH] Don't blindly enable frexpl and ldexpl for uClibc
  5. When the size of double and long double are equal, numpy blindly
  6. assumes that frexpl and ldexpl will be available as well. But for
  7. uClibc, that's not true: it only defines the long double functions
  8. when long double "exists" on the architecture.
  9. So make an exception for uClibc.
  10. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
  11. ---
  12. numpy/core/src/private/npy_config.h | 2 +-
  13. 1 file changed, 1 insertion(+), 1 deletion(-)
  14. diff --git a/numpy/core/src/private/npy_config.h b/numpy/core/src/private/npy_config.h
  15. index 453dbd0..7ecf72c 100644
  16. --- a/numpy/core/src/private/npy_config.h
  17. +++ b/numpy/core/src/private/npy_config.h
  18. @@ -11,7 +11,7 @@
  19. #endif
  20. /* Safe to use ldexp and frexp for long double for MSVC builds */
  21. -#if (NPY_SIZEOF_LONGDOUBLE == NPY_SIZEOF_DOUBLE) || defined(_MSC_VER)
  22. +#if ((NPY_SIZEOF_LONGDOUBLE == NPY_SIZEOF_DOUBLE) && !defined(__UCLIBC__)) || defined(_MSC_VER)
  23. #ifdef HAVE_LDEXP
  24. #define HAVE_LDEXPL 1
  25. #endif
  26. --
  27. 2.5.3