File 0631-Fix-bad-compiler-test.patch of Package erlang

From 31d97c32b8585fab4144a6046808983f7491180d Mon Sep 17 00:00:00 2001
From: Dan Gudmundsson <dgud@erlang.org>
Date: Wed, 20 Nov 2019 11:26:06 +0100
Subject: [PATCH 1/5] Fix bad compiler test

Turned the tests the wrong way and compilation
failed with wxWidget-3.0 and wxMac.
---
 lib/wx/api_gen/wxapi.conf      | 2 +-
 lib/wx/c_src/gen/wxe_funcs.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf
index c870f7afd6..afddd92a03 100644
--- a/lib/wx/api_gen/wxapi.conf
+++ b/lib/wx/api_gen/wxapi.conf
@@ -190,7 +190,7 @@
   {'SetTransparent', [{test_if, "wxCHECK_VERSION(2,8,12)"}]},
   {'CanSetTransparent', [{test_if, "wxCHECK_VERSION(2,8,12)"}]},
   {'IsDoubleBuffered', [{test_if, "wxCHECK_VERSION(3,0,0)"}]},
-  {'SetDoubleBuffered', [{test_if, "wxCHECK_VERSION(3,0,0) || (defined(__WXMAC__) && wxCHECK_VERSION(3,1,0))"}]},
+  {'SetDoubleBuffered', [{test_if, "wxCHECK_VERSION(3,1,0) || (!defined(__WXMAC__) && wxCHECK_VERSION(3,0,0))"}]},
   {'GetContentScaleFactor', [{test_if, "wxCHECK_VERSION(2,9,5)"}]}
 ]}.
 
diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp
index 309d1c8f45..481c3a4107 100644
--- a/lib/wx/c_src/gen/wxe_funcs.cpp
+++ b/lib/wx/c_src/gen/wxe_funcs.cpp
@@ -1714,7 +1714,7 @@ case wxWindow_IsDoubleBuffered: { // wxWindow::IsDoubleBuffered
  break;
 }
 #endif
-#if wxCHECK_VERSION(3,0,0) || (defined(__WXMAC__) && wxCHECK_VERSION(3,1,0))
+#if wxCHECK_VERSION(3,1,0) || (!defined(__WXMAC__) && wxCHECK_VERSION(3,0,0))
 case wxWindow_SetDoubleBuffered: { // wxWindow::SetDoubleBuffered
  wxWindow *This = (wxWindow *) getPtr(bp,memenv); bp += 4;
  bool * on = (bool *) bp; bp += 4;
-- 
2.16.4

openSUSE Build Service is sponsored by