*
*/
-#if defined (WIN32)
+#if defined (_WIN32)
# include <process.h>
# ifndef ETIMEDOUT
# define ETIMEDOUT 10060 /* This is the value in winsock.h. */
typedef pthread_t vlc_thread_t;
typedef pthread_mutex_t vlc_mutex_t;
#define VLC_STATIC_MUTEX PTHREAD_MUTEX_INITIALIZER
-typedef pthread_cond_t vlc_cond_t;
-#define VLC_STATIC_COND PTHREAD_COND_INITIALIZER
+typedef struct
+{
+ pthread_cond_t cond;
+ unsigned clock;
+} vlc_cond_t;
+#define VLC_STATIC_COND { PTHREAD_COND_INITIALIZER, 0 }
typedef semaphore_t vlc_sem_t;
typedef pthread_rwlock_t vlc_rwlock_t;
#define VLC_STATIC_RWLOCK PTHREAD_RWLOCK_INITIALIZER
vlc_cleanup_data.proc (vlc_cleanup_data.data); \
} while (0)
-#endif /* !LIBVLC_USE_PTHREAD_CLEANUO */
+#endif /* !LIBVLC_USE_PTHREAD_CLEANUP */
#ifndef LIBVLC_USE_PTHREAD_CANCEL
/* poll() with cancellation */
+# ifdef __OS2__
+int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout);
+# else
static inline int vlc_poll (struct pollfd *fds, unsigned nfds, int timeout)
{
int val;
return val;
}
+# endif
+
# define poll(u,n,t) vlc_poll(u, n, t)
#endif /* LIBVLC_USE_PTHREAD_CANCEL */