[vlc-commits] contribs: libtasn1: Remove some of the benchmark code on winrt
Hugo Beauzée-Luyssen
git at videolan.org
Tue May 10 13:56:32 CEST 2016
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri May 6 14:40:27 2016 +0200| [e5b626c87b714f53503a6ddfe6beda166c299c84] | committer: Hugo Beauzée-Luyssen
contribs: libtasn1: Remove some of the benchmark code on winrt
This is not used anyway, but there's no way of disabling this at
configure time
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e5b626c87b714f53503a6ddfe6beda166c299c84
---
contrib/src/libtasn1/no-benchmark.patch | 39 +++++++++++++++++++++++++++++++
contrib/src/libtasn1/rules.mak | 3 +++
2 files changed, 42 insertions(+)
diff --git a/contrib/src/libtasn1/no-benchmark.patch b/contrib/src/libtasn1/no-benchmark.patch
new file mode 100644
index 0000000..18d8e84
--- /dev/null
+++ b/contrib/src/libtasn1/no-benchmark.patch
@@ -0,0 +1,39 @@
+--- libtasn1/src/benchmark.c.orig 2016-05-06 14:37:46.748895833 +0200
++++ libtasn1/src/benchmark.c 2016-05-06 14:38:16.620222564 +0200
+@@ -91,25 +91,6 @@
+ benchmark_must_finish = 0;
+
+ #if defined _WIN32
+- st->wtimer = CreateWaitableTimer (NULL, TRUE, NULL);
+- if (st->wtimer == NULL)
+- {
+- fprintf (stderr, "error: CreateWaitableTimer %u\n", GetLastError ());
+- exit (1);
+- }
+- st->wthread = CreateThread (NULL, 0, alarm_handler, &st->wtimer, 0, NULL);
+- if (st->wthread == NULL)
+- {
+- fprintf (stderr, "error: CreateThread %u\n", GetLastError ());
+- exit (1);
+- }
+- st->alarm_timeout.QuadPart = (5) * 10000000;
+- if (SetWaitableTimer (st->wtimer, &st->alarm_timeout, 0, NULL, NULL, FALSE)
+- == 0)
+- {
+- fprintf (stderr, "error: SetWaitableTimer %u\n", GetLastError ());
+- exit (1);
+- }
+ #else
+ alarm (5);
+ #endif
+@@ -127,10 +108,6 @@
+ char imetric[16];
+
+ #if defined _WIN32
+- if (st->wtimer != NULL)
+- CloseHandle (st->wtimer);
+- if (st->wthread != NULL)
+- CloseHandle (st->wthread);
+ #else
+ signal (SIGALRM, st->old_handler);
+ #endif
diff --git a/contrib/src/libtasn1/rules.mak b/contrib/src/libtasn1/rules.mak
index 13ce553..51f6c6f 100644
--- a/contrib/src/libtasn1/rules.mak
+++ b/contrib/src/libtasn1/rules.mak
@@ -14,6 +14,9 @@ $(TARBALLS)/libtasn1-$(LIBTASN1_VERSION).tar.gz:
libtasn1: libtasn1-$(LIBTASN1_VERSION).tar.gz .sum-libtasn1
$(UNPACK)
+ifdef HAVE_WINRT
+ $(APPLY) $(SRC)/libtasn1/no-benchmark.patch
+endif
$(MOVE)
.libtasn1: libtasn1
More information about the vlc-commits
mailing list