From fc9b078cc5c3c2e0b91de7b07c5b20f5ca2e1e3f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 13 Sep 2005 16:23:46 +0000 Subject: [PATCH] X error handler should be extern C (SunCC warning fix) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/utilsx11.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/unix/utilsx11.cpp b/src/unix/utilsx11.cpp index 26a81cff28..6510b0d3db 100644 --- a/src/unix/utilsx11.cpp +++ b/src/unix/utilsx11.cpp @@ -65,9 +65,13 @@ static bool IsMapped(Display *display, Window window) // Suspends X11 errors. Used when we expect errors but they are not fatal // for us. -extern "C" { +extern "C" +{ + typedef int (*wxX11ErrorHandler)(Display *, XErrorEvent *); + static int wxX11ErrorsSuspender_handler(Display*, XErrorEvent*) { return 0; } } + class wxX11ErrorsSuspender { public: @@ -83,7 +87,7 @@ public: private: Display *m_display; - int (*m_old)(Display*, XErrorEvent *); + wxX11ErrorHandler m_old; }; -- 2.45.2