From 04cf2038e906009d4e2ae2e39eb45bdc27dfe12a Mon Sep 17 00:00:00 2001 From: Tim Stahlhut Date: Fri, 2 Aug 2019 11:36:47 -0400 Subject: [PATCH 1/3] Ensure visibility of needed Cygwin declarations Dl_info requires __GNU_VISIBLE be defined; and, pthread_setconcurrency requires __XSI_VISIBLE >= 500. Defining _GNU_SOURCE satifies both of the above needs. --- include/wx/platform.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/wx/platform.h b/include/wx/platform.h index 47c1c4778c..91749a1c8b 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -280,6 +280,11 @@ # if defined(__INNOTEK_LIBC__) /* Ensure visibility of strnlen declaration */ # define _GNU_SOURCE +# endif + +# if defined(__CYGWIN__) + /* Ensure visibility of Dl_info and pthread_setconcurrency declarations */ +# define _GNU_SOURCE # endif /* define __HPUX__ for HP-UX where standard macro is __hpux */ From f941b50c6bad30c699a4bb0955e9c5aad77ef527 Mon Sep 17 00:00:00 2001 From: Tim Stahlhut Date: Fri, 2 Aug 2019 17:44:21 -0400 Subject: [PATCH 2/3] Use cygwin native timeval __ms_timeval does not exist unless winsock.h or winsock2.h is included. So, test for __WINDOWS__ before using __ms_timeval. Fixes #18456 --- include/wx/private/socket.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/private/socket.h b/include/wx/private/socket.h index 56a3cef528..fe3d3b2df0 100644 --- a/include/wx/private/socket.h +++ b/include/wx/private/socket.h @@ -65,7 +65,7 @@ // 64 bit Cygwin can't use the standard struct timeval because it has long // fields, which are supposed to be 32 bits in Win64 API, but long is 64 bits // in 64 bit Cygwin, so we need to use its special __ms_timeval instead. -#if defined(__CYGWIN__) && defined(__LP64__) +#if defined(__CYGWIN__) && defined(__LP64__) && defined(__WINDOWS__) typedef __ms_timeval wxTimeVal_t; #else typedef timeval wxTimeVal_t; From 92b5f10840f131bcbf5282d6e3739295bad93fcc Mon Sep 17 00:00:00 2001 From: Tim Stahlhut Date: Sat, 3 Aug 2019 01:12:14 -0400 Subject: [PATCH 3/3] Add message wxJoystick requires wxThread under MSW --- include/wx/msw/chkconf.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/wx/msw/chkconf.h b/include/wx/msw/chkconf.h index 6f9c161d37..baf02f7e4e 100644 --- a/include/wx/msw/chkconf.h +++ b/include/wx/msw/chkconf.h @@ -444,6 +444,14 @@ # define wxUSE_FSWATCHER 0 # endif # endif +# if wxUSE_JOYSTICK +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxJoystick requires wxThread under MSW" +# else +# undef wxUSE_JOYSTICK +# define wxUSE_JOYSTICK 0 +# endif +# endif #endif /* !wxUSE_THREADS */