]> git.saurik.com Git - wxWidgets.git/commitdiff
use extern C around signal handler declaration (fixes Sun CC warning)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 13 Sep 2005 15:57:02 +0000 (15:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 13 Sep 2005 15:57:02 +0000 (15:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/unix/gsocket.cpp

index ac1610a0b8de1afe828a2ac5d841a37cbf202cc4..cef26902b31dfd6615c668a33ca9a8eba7bdffd1 100644 (file)
@@ -159,12 +159,11 @@ int _System soclose(int);
     #define UNMASK_SIGNAL() }
 
 #else
+    extern "C" { typedef void (*wxSigHandler)(int); }
 
     #define MASK_SIGNAL()                       \
     {                                           \
-        void (*old_handler)(int);               \
-                                                \
-        old_handler = signal(SIGPIPE, SIG_IGN);
+        wxSigHandler old_handler = signal(SIGPIPE, SIG_IGN);
 
     #define UNMASK_SIGNAL()                     \
         signal(SIGPIPE, old_handler);           \