File: 0005-Export-soft-float-conversion-functions.patch

package info (click to toggle)
astc-encoder 5.3.0%2Bds-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 43,260 kB
  • sloc: ansic: 44,647; cpp: 24,160; python: 3,403; sh: 79; makefile: 26
file content (37 lines) | stat: -rw-r--r-- 1,178 bytes parent folder | download
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
37
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

Forwarded: not-needed
---
 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 5fd296d..137cbd7 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
@@ -450,8 +456,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
 
 /*********************************