]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/app.cpp
removed #errors in 2.7 compilation
[wxWidgets.git] / src / gtk / app.cpp
index 4d25eb73def0d8591edb22c7be25bf22ea9f32c2..aaf7989b30b50199a5cd207952e93bcd60155278 100644 (file)
@@ -7,10 +7,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "app.h"
-#endif
-
 #ifdef __VMS
 // vms_jackets.h should for proper working be included before anything else
 # include <vms_jackets.h>
@@ -76,6 +72,7 @@
     #include <unistd.h>
 #endif // HAVE_POLL/!HAVE_POLL
 
+#include "wx/unix/private.h"
 #include "wx/gtk/win_gtk.h"
 
 #include <gtk/gtk.h>
@@ -310,23 +307,23 @@ int wxPoll(wxPollFd *ufds, unsigned int nfds, int timeout)
     fd_set readfds;
     fd_set writefds;
     fd_set exceptfds;
-    FD_ZERO(&readfds);
-    FD_ZERO(&writefds);
-    FD_ZERO(&exceptfds);
+    wxFD_ZERO(&readfds);
+    wxFD_ZERO(&writefds);
+    wxFD_ZERO(&exceptfds);
 
     unsigned int i;
     for ( i = 0; i < nfds; i++ )
     {
-        wxASSERT_MSG( ufds[i].fd < FD_SETSIZE, _T("fd out of range") );
+        wxASSERT_MSG( ufds[i].fd < wxFD_SETSIZE, _T("fd out of range") );
 
         if ( ufds[i].events & G_IO_IN )
-            FD_SET(ufds[i].fd, &readfds);
+            wxFD_SET(ufds[i].fd, &readfds);
 
         if ( ufds[i].events & G_IO_PRI )
-            FD_SET(ufds[i].fd, &exceptfds);
+            wxFD_SET(ufds[i].fd, &exceptfds);
 
         if ( ufds[i].events & G_IO_OUT )
-            FD_SET(ufds[i].fd, &writefds);
+            wxFD_SET(ufds[i].fd, &writefds);
 
         if ( ufds[i].fd > fdMax )
             fdMax = ufds[i].fd;
@@ -340,13 +337,13 @@ int wxPoll(wxPollFd *ufds, unsigned int nfds, int timeout)
     {
         ufds[i].revents = 0;
 
-        if ( FD_ISSET(ufds[i].fd, &readfds ) )
+        if ( wxFD_ISSET(ufds[i].fd, &readfds ) )
             ufds[i].revents |= G_IO_IN;
 
-        if ( FD_ISSET(ufds[i].fd, &exceptfds ) )
+        if ( wxFD_ISSET(ufds[i].fd, &exceptfds ) )
             ufds[i].revents |= G_IO_PRI;
 
-        if ( FD_ISSET(ufds[i].fd, &writefds ) )
+        if ( wxFD_ISSET(ufds[i].fd, &writefds ) )
             ufds[i].revents |= G_IO_OUT;
     }
 
@@ -616,6 +613,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
     // (1) this variable exists for the sole purpose of specifying the encoding
     //     of the filenames for GTK+ programs, so use it if it is set
     wxString encName(wxGetenv(_T("G_FILENAME_ENCODING")));
+    encName = encName.BeforeFirst(_T(','));
     if (encName == _T("@locale"))
         encName.clear();
     encName.MakeUpper();