diff --git a/3rdparty/w32pthreads/include/pthread.h b/3rdparty/w32pthreads/include/pthread.h
index d6c2c9da54..5e0c78119a 100644
--- a/3rdparty/w32pthreads/include/pthread.h
+++ b/3rdparty/w32pthreads/include/pthread.h
@@ -957,7 +957,7 @@ PTW32_DLLPORT int PTW32_CDECL pthread_join (pthread_t thread,
PTW32_DLLPORT pthread_t PTW32_CDECL pthread_self (void);
-extern int PTW32_CDECL pthread_cancel (pthread_t thread);
+extern int pthread_cancel (pthread_t thread);
PTW32_DLLPORT int PTW32_CDECL pthread_setcancelstate (int state,
int *oldstate);
@@ -965,7 +965,7 @@ PTW32_DLLPORT int PTW32_CDECL pthread_setcancelstate (int state,
PTW32_DLLPORT int PTW32_CDECL pthread_setcanceltype (int type,
int *oldtype);
-extern void PTW32_CDECL pthread_testcancel (void);
+extern void pthread_testcancel (void);
PTW32_DLLPORT int PTW32_CDECL pthread_once (pthread_once_t * once_control,
void (*init_routine) (void));
@@ -1031,14 +1031,14 @@ PTW32_DLLPORT int PTW32_CDECL pthread_mutex_init (pthread_mutex_t * mutex,
PTW32_DLLPORT int PTW32_CDECL pthread_mutex_destroy (pthread_mutex_t * mutex);
-extern int PTW32_CDECL pthread_mutex_lock (pthread_mutex_t * mutex);
+extern int pthread_mutex_lock (pthread_mutex_t * mutex);
PTW32_DLLPORT int PTW32_CDECL pthread_mutex_timedlock(pthread_mutex_t *mutex,
const struct timespec *abstime);
-extern int PTW32_CDECL pthread_mutex_trylock (pthread_mutex_t * mutex);
+extern int pthread_mutex_trylock (pthread_mutex_t * mutex);
-extern int PTW32_CDECL pthread_mutex_unlock (pthread_mutex_t * mutex);
+extern int pthread_mutex_unlock (pthread_mutex_t * mutex);
#ifdef PTW32_ALLOW_SPIN
/*
diff --git a/3rdparty/w32pthreads/include/semaphore.h b/3rdparty/w32pthreads/include/semaphore.h
index 232782808b..107a92324f 100644
--- a/3rdparty/w32pthreads/include/semaphore.h
+++ b/3rdparty/w32pthreads/include/semaphore.h
@@ -132,9 +132,9 @@ PTW32_DLLPORT int __cdecl sem_init (sem_t * sem,
PTW32_DLLPORT int __cdecl sem_destroy (sem_t * sem);
-extern int __cdecl sem_trywait (sem_t * sem);
+extern int sem_trywait (sem_t * sem);
-extern int __cdecl sem_wait (sem_t * sem);
+extern int sem_wait (sem_t * sem);
PTW32_DLLPORT int __cdecl sem_timedwait (sem_t * sem,
const struct timespec * abstime);
diff --git a/3rdparty/w32pthreads/pthreads_lib_2008.vcproj b/3rdparty/w32pthreads/pthreads_lib_2008.vcproj
index c1f9030e9f..4a5b92e81a 100644
--- a/3rdparty/w32pthreads/pthreads_lib_2008.vcproj
+++ b/3rdparty/w32pthreads/pthreads_lib_2008.vcproj
@@ -46,6 +46,7 @@
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="ptw32pch.h"
WarningLevel="3"
+ CompileAs="2"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
sem);
/* Cleanup if we're canceled or on any other error */
pthread_cleanup_pop(result);
-#ifdef _MSC_VER
-#pragma inline_depth()
-#endif
}
#ifdef NEED_SEM