aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafaël Carré <funman@videolan.org>2013-08-20 19:25:22 +0200
committerMartin Storsjö <martin@martin.st>2013-08-21 14:20:33 +0100
commit4622f11f9c83db8a2e08408c71ff901826ca652c (patch)
tree6e1b2ebc6f6b777574c1b0ee2657bdf76600fb36
parent0b45269c2d732d15afa2de9c475d85fcf5561ac4 (diff)
downloadffmpeg-4622f11f9c83db8a2e08408c71ff901826ca652c.tar.gz
w32pthread: help compiler figure out undeeded code
The emulation code is not needed when targetting Vista+ This helps getting rid of CreateSemaphore symbol, which is forbidden in Windows Store apps. Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--compat/w32pthreads.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/compat/w32pthreads.h b/compat/w32pthreads.h
index 8b7ff6ba7a..f570801832 100644
--- a/compat/w32pthreads.h
+++ b/compat/w32pthreads.h
@@ -129,7 +129,7 @@ typedef struct win32_cond_t {
static void pthread_cond_init(pthread_cond_t *cond, const void *unused_attr)
{
win32_cond_t *win32_cond = NULL;
- if (cond_init) {
+ if (_WIN32_WINNT >= 0x0600 || cond_init) {
cond_init(cond);
return;
}
@@ -154,7 +154,7 @@ static void pthread_cond_destroy(pthread_cond_t *cond)
{
win32_cond_t *win32_cond = cond->ptr;
/* native condition variables do not destroy */
- if (cond_init)
+ if (_WIN32_WINNT >= 0x0600 || cond_init)
return;
/* non native condition variables */
@@ -171,7 +171,7 @@ static void pthread_cond_broadcast(pthread_cond_t *cond)
win32_cond_t *win32_cond = cond->ptr;
int have_waiter;
- if (cond_broadcast) {
+ if (_WIN32_WINNT >= 0x0600 || cond_broadcast) {
cond_broadcast(cond);
return;
}
@@ -201,7 +201,7 @@ static int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
{
win32_cond_t *win32_cond = cond->ptr;
int last_waiter;
- if (cond_wait) {
+ if (_WIN32_WINNT >= 0x0600 || cond_wait) {
cond_wait(cond, mutex, INFINITE);
return 0;
}
@@ -233,7 +233,7 @@ static void pthread_cond_signal(pthread_cond_t *cond)
{
win32_cond_t *win32_cond = cond->ptr;
int have_waiter;
- if (cond_signal) {
+ if (_WIN32_WINNT >= 0x0600 || cond_signal) {
cond_signal(cond);
return;
}