From 1438bd49dc9bd5b7e57f9a75c6760ae769ee37bf Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 2 May 2006 08:41:41 +0000 Subject: Windows doesn't have POSIX thread. ifdef out things for now. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@824 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/Makefile.am | 7 ++++++- src/polyp/thread-mainloop.c | 19 +++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index 8ad4859e..66e20af5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -181,7 +181,6 @@ pabrowse_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) noinst_PROGRAMS = \ mainloop-test \ - thread-mainloop-test \ mcalign-test \ pacat-simple \ parec-simple \ @@ -207,6 +206,12 @@ noinst_PROGRAMS += \ mainloop-test-glib12 endif +# FIXME: We need to make thread-mainloop win32-compatible first +if !OS_IS_WIN32 +noinst_PROGRAMS += \ + thread-mainloop-test +endif + mainloop_test_SOURCES = tests/mainloop-test.c mainloop_test_CFLAGS = $(AM_CFLAGS) mainloop_test_LDADD = $(AM_LDADD) libpolyp-@PA_MAJORMINOR@.la diff --git a/src/polyp/thread-mainloop.c b/src/polyp/thread-mainloop.c index 894e037f..32be494d 100644 --- a/src/polyp/thread-mainloop.c +++ b/src/polyp/thread-mainloop.c @@ -23,17 +23,27 @@ #include #endif -#include #include #include -#include #include +#ifdef HAVE_SYS_POLL_H +#include +#else +#include "../polypcore/poll.h" +#endif + +#ifdef HAVE_PTHREAD +#include +#endif + #include #include "mainloop.h" #include "thread-mainloop.h" +#ifndef OS_IS_WIN32 + struct pa_threaded_mainloop { pa_mainloop *real_mainloop; pthread_t thread_id; @@ -201,3 +211,8 @@ pa_mainloop_api* pa_threaded_mainloop_get_api(pa_threaded_mainloop*m) { return pa_mainloop_get_api(m->real_mainloop); } +#else /* OS_IS_WIN32 */ + +// FIXME: Use Win32 primitives + +#endif /* OS_IS_WIN32 */ -- cgit