diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2018-12-21 19:08:15 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2018-12-21 19:08:15 +0000 |
commit | 5a388863faae4d49bf861b4be7794a6823d12800 (patch) | |
tree | da34ac07668d88c781c9d754ea12a316d5aa3833 /Examples/test-suite/director_thread.i | |
parent | 1faf5a879fdf93b268c61b7e39eab9755f3601f7 (diff) | |
download | swig-5a388863faae4d49bf861b4be7794a6823d12800.tar.gz |
director_thread test fixes for MacOS
Add extra debugging and correctly detect MacOS using __APPLE__ macro
Diffstat (limited to 'Examples/test-suite/director_thread.i')
-rw-r--r-- | Examples/test-suite/director_thread.i | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Examples/test-suite/director_thread.i b/Examples/test-suite/director_thread.i index eae5672e6..c4f08f4f9 100644 --- a/Examples/test-suite/director_thread.i +++ b/Examples/test-suite/director_thread.i @@ -19,6 +19,8 @@ #include <stdio.h> #else #include <pthread.h> +#include <errno.h> +#include <stdio.h> #include <signal.h> #include <unistd.h> #endif @@ -91,7 +93,8 @@ extern "C" { %#else int create = pthread_create(&thread,NULL,working,this); if (create != 0) { - fprintf(stderr, "pthread_create failed in run()\n"); + errno = create; + perror("pthread_create in run()"); assert(0); } %#endif @@ -109,7 +112,8 @@ extern "C" { %#endif if (setname != 0) { - fprintf(stderr, "pthread_setname_np failed in run()\n"); + errno = setname; + perror("calling pthread_setname_np in setThreadName()"); assert(0); } %#endif @@ -119,12 +123,8 @@ extern "C" { %#ifdef _WIN32 return false; %#else -%#ifdef __APPLE__ - return false; -%#else return true; %#endif -%#endif } virtual void do_foo() { |