```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
21 lines
732 B
Diff
21 lines
732 B
Diff
--- a/IlmBase/IexMath/IexMathFpu.cpp 2019-12-01 15:42:08.143387128 +0100
|
|
+++ b/IlmBase/IexMath/IexMathFpu.cpp 2019-12-01 15:43:02.402389927 +0100
|
|
@@ -281,10 +281,18 @@
|
|
inline void
|
|
restoreControlRegs (const ucontext_t & ucon, bool clearExceptions)
|
|
{
|
|
+#if defined(__GLIBC__) || defined(__i386__)
|
|
setCw ((ucon.uc_mcontext.fpregs->cw & cwRestoreMask) | cwRestoreVal);
|
|
+#else
|
|
+ setCw ((ucon.uc_mcontext.fpregs->cwd & cwRestoreMask) | cwRestoreVal);
|
|
+#endif
|
|
|
|
_fpstate * kfp = reinterpret_cast<_fpstate *> (ucon.uc_mcontext.fpregs);
|
|
+#if defined(__GLIBC__) || defined(__i386__)
|
|
setMxcsr (kfp->magic == 0 ? kfp->mxcsr : 0, clearExceptions);
|
|
+#else
|
|
+ setMxcsr (kfp->mxcsr, clearExceptions);
|
|
+#endif
|
|
}
|
|
|
|
#endif
|