1From aae8b63ddffe014e9353c3e8d2604628433eb7d7 Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Sun, 4 Dec 2022 14:14:21 +0100
4Subject: [PATCH] build sh4 FE
5
6ensures FE_UPWARD and FE_DOWNWARD are defined for sh4 architecture.
7
8Closes: #1007769.
9
10[Retrieved from:
11https://salsa.debian.org/python-team/packages/scipy/-/blob/master/debian/patches/build_sh4_FE.patch]
12Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
13---
14 scipy/special/_round.h | 7 +++++++
15 1 file changed, 7 insertions(+)
16
17diff --git a/scipy/special/_round.h b/scipy/special/_round.h
18index 013a25620..c321a1939 100644
19--- a/scipy/special/_round.h
20+++ b/scipy/special/_round.h
21@@ -69,5 +69,12 @@ int fegetround()
22
23 #endif
24
25+/* SH4 is not C99 compliant, see https://github.com/scipy/scipy/issues/15584 */
26+#ifndef FE_UPWARD
27+#define FE_UPWARD -1
28+#endif
29+#ifndef FE_DOWNWARD
30+#define FE_DOWNWARD -1
31+#endif
32
33 #endif /* _round.h */
34--
352.38.1
36
37