1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Tue, 3 Aug 2021 20:01:06 +0200
Subject: Export soft float conversion functions
---
Source/astcenc_mathlib.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/Source/astcenc_mathlib.h b/Source/astcenc_mathlib.h
index 67e989e..cc40b86 100644
--- a/Source/astcenc_mathlib.h
+++ b/Source/astcenc_mathlib.h
@@ -27,6 +27,12 @@
#include <cstdint>
#include <cmath>
+#ifndef ASTCENCMATH_PUBLIC
+ #define ASTCENCMATH_PUBLIC extern "C" __attribute__ ((visibility ("default")))
+#else
+ #define ASTCENCMATH_PUBLIC
+#endif
+
#ifndef ASTCENC_POPCNT
#if defined(__POPCNT__)
#define ASTCENC_POPCNT 1
@@ -423,8 +429,8 @@ uint64_t rand(uint64_t state[2]);
============================================================================ */
#if (ASTCENC_F16C == 0) && (ASTCENC_NEON == 0)
/* narrowing float->float conversions */
- uint16_t float_to_sf16(float val);
- float sf16_to_float(uint16_t val);
+ ASTCENCMATH_PUBLIC uint16_t float_to_sf16(float val);
+ ASTCENCMATH_PUBLIC float sf16_to_float(uint16_t val);
#endif
/*********************************
|