diff options
Diffstat (limited to 'native_client_sdk')
-rw-r--r-- | native_client_sdk/src/examples/input_events/input_events.cc | 12 | ||||
-rw-r--r-- | native_client_sdk/src/libraries/gtest/Makefile | 2 | ||||
-rw-r--r-- | native_client_sdk/src/tools/host_vc.mk | 4 |
3 files changed, 12 insertions, 6 deletions
diff --git a/native_client_sdk/src/examples/input_events/input_events.cc b/native_client_sdk/src/examples/input_events/input_events.cc index 5ff49ba..1a0a9f8 100644 --- a/native_client_sdk/src/examples/input_events/input_events.cc +++ b/native_client_sdk/src/examples/input_events/input_events.cc @@ -22,6 +22,10 @@ #include "custom_events.h" #include "shared_queue.h" +#ifdef PostMessage +#undef PostMessage +#endif + namespace event_queue { const char* const kDidChangeView = "DidChangeView"; const char* const kHandleInputEvent = "DidHandleInputEvent"; @@ -89,7 +93,8 @@ class EventInstance : public pp::Instance { // Create the 'worker thread'. bool Init(uint32_t argc, const char* argn[], const char* argv[]) { - pthread_create(&event_thread_, NULL, ProcessEventOnWorkerThread, this); + event_thread_ = new pthread_t; + pthread_create(event_thread_, NULL, ProcessEventOnWorkerThread, this); return true; } @@ -319,11 +324,12 @@ class EventInstance : public pp::Instance { void CancelQueueAndWaitForWorker() { if (event_thread_) { event_queue_.CancelQueue(); - pthread_join(event_thread_, NULL); + pthread_join(*event_thread_, NULL); + delete event_thread_; event_thread_ = NULL; } } - pthread_t event_thread_; + pthread_t* event_thread_; LockingQueue<Event*> event_queue_; pp::CompletionCallbackFactory<EventInstance> callback_factory_; }; diff --git a/native_client_sdk/src/libraries/gtest/Makefile b/native_client_sdk/src/libraries/gtest/Makefile index cd3d7c9..035fcd4 100644 --- a/native_client_sdk/src/libraries/gtest/Makefile +++ b/native_client_sdk/src/libraries/gtest/Makefile @@ -14,7 +14,7 @@ # to override this, specify TOOLCHAIN=newlib|glibc or CONFIG=Debug|Release on # the make command-line or in this file prior to including common.mk. The # toolchain we use by default will be the first valid one listed -VALID_TOOLCHAINS:=newlib glibc +VALID_TOOLCHAINS:=newlib glibc linux win # diff --git a/native_client_sdk/src/tools/host_vc.mk b/native_client_sdk/src/tools/host_vc.mk index 87d6621..df426db 100644 --- a/native_client_sdk/src/tools/host_vc.mk +++ b/native_client_sdk/src/tools/host_vc.mk @@ -15,8 +15,8 @@ # We use the C++ compiler for everything and then use the -Wl,-as-needed flag # in the linker to drop libc++ unless it's actually needed. # -HOST_CC?=cl.exe /nologo /WX -HOST_CXX?=cl.exe /nologo /EHsc /WX +HOST_CC?=cl.exe /nologo +HOST_CXX?=cl.exe /nologo /EHsc HOST_LINK?=link.exe /nologo HOST_LIB?=lib.exe /nologo |