aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/sleef/seh-cpu-ext.diff
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/sleef/seh-cpu-ext.diff
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/sleef/seh-cpu-ext.diff')
-rw-r--r--vcpkg/ports/sleef/seh-cpu-ext.diff26
1 files changed, 26 insertions, 0 deletions
diff --git a/vcpkg/ports/sleef/seh-cpu-ext.diff b/vcpkg/ports/sleef/seh-cpu-ext.diff
new file mode 100644
index 0000000..6cd8eaa
--- /dev/null
+++ b/vcpkg/ports/sleef/seh-cpu-ext.diff
@@ -0,0 +1,26 @@
+diff --git a/src/libm/dispatcher.h b/src/libm/dispatcher.h
+index 41b69d9..4d395c3 100644
+--- a/src/libm/dispatcher.h
++++ b/src/libm/dispatcher.h
+@@ -27,6 +27,14 @@ NOEXPORT int Sleef_internal_cpuSupportsExt(void (*tryExt)(), int *cache) {
+ static int cache = -1;
+ if (cache != -1) return cache;
+
++#ifdef _MSC_VER
++ __try {
++ (*tryExt)();
++ cache = 1;
++ } __except(1) {
++ cache = 0;
++ }
++#else
+ void (*org);
+ org = signal(SIGILL, sighandler);
+
+@@ -38,5 +46,6 @@ NOEXPORT int Sleef_internal_cpuSupportsExt(void (*tryExt)(), int *cache) {
+ }
+
+ signal(SIGILL, org);
++#endif
+ return cache;
+ }