]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixing/Testing sockets on OpenVMS
authorJouk Jansen <joukj@hrem.nano.tudelft.nl>
Mon, 12 Jan 2009 09:06:36 +0000 (09:06 +0000)
committerJouk Jansen <joukj@hrem.nano.tudelft.nl>
Mon, 12 Jan 2009 09:06:36 +0000 (09:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

descrip.mms
samples/sockets/baseclient.cpp
samples/sockets/baseserver.cpp
samples/sockets/descrip.mms [new file with mode: 0644]
src/common/socket.cpp

index 9293d075946061374b7c6630e4da0219422ae767..081af3d708068f82171fc0cd9e9ae62fcbb68ca1 100644 (file)
@@ -2,7 +2,7 @@
 #                                                                            *
 # Make file for VMS                                                          *
 # Author : J.Jansen (joukj@hrem.nano.tudelft.nl)                             *
 #                                                                            *
 # Make file for VMS                                                          *
 # Author : J.Jansen (joukj@hrem.nano.tudelft.nl)                             *
-# Date : 23 November 2007                                                    *
+# Date : 12 January 2009                                                     *
 #                                                                            *
 #*****************************************************************************
 .first
 #                                                                            *
 #*****************************************************************************
 .first
@@ -87,6 +87,8 @@ gtk : [.include.wx]setup.h
        $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
        set default [-.richedit]
 #      $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
        $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
        set default [-.richedit]
 #      $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
+       set default [-.socket]
+       $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
        set default [-.xrc]
        $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
        set default [--]
        set default [-.xrc]
        $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
        set default [--]
index 6199b221813dcd82958c4698f42a8d183ef402c4..b131981988c800ffa8a2bb253bee74648072e7e3 100644 (file)
@@ -72,7 +72,7 @@ WX_DECLARE_LIST(ThreadWorker, TList);
 WX_DECLARE_LIST(EventWorker, EList);
 
 class Client : public wxApp {
 WX_DECLARE_LIST(EventWorker, EList);
 
 class Client : public wxApp {
-    DECLARE_EVENT_TABLE();
+    DECLARE_EVENT_TABLE()
 public:
     void RemoveEventWorker(EventWorker* p_worker);
 private:
 public:
     void RemoveEventWorker(EventWorker* p_worker);
 private:
@@ -141,7 +141,7 @@ private:
 
 class EventWorker : public wxEvtHandler
 {
 
 class EventWorker : public wxEvtHandler
 {
-    DECLARE_EVENT_TABLE();
+    DECLARE_EVENT_TABLE()
 public:
     EventWorker(const wxString& p_host, char* p_buf, int p_size);
     void Run();
 public:
     EventWorker(const wxString& p_host, char* p_buf, int p_size);
     void Run();
index 283ecb6b8e1afe653d8f545bd40292e90579f42b..ae30bce692274a36b2c8e9cb3bff1d45033c3fe0 100644 (file)
@@ -101,7 +101,7 @@ WX_DECLARE_LIST(EventWorker, EList);
 //and list of two type worker classes that serve clients
 class Server : public wxApp
 {
 //and list of two type worker classes that serve clients
 class Server : public wxApp
 {
-    DECLARE_EVENT_TABLE();
+    DECLARE_EVENT_TABLE()
 public:
     Server() : m_maxConnections(-1) {}
     ~Server() {}
 public:
     Server() : m_maxConnections(-1) {}
     ~Server() {}
@@ -198,7 +198,7 @@ private:
     void DoWrite();
     void DoRead();
 
     void DoWrite();
     void DoRead();
 
-    DECLARE_EVENT_TABLE();
+    DECLARE_EVENT_TABLE()
 };
 
 /******************* Implementation ******************/
 };
 
 /******************* Implementation ******************/
diff --git a/samples/sockets/descrip.mms b/samples/sockets/descrip.mms
new file mode 100644 (file)
index 0000000..8301036
--- /dev/null
@@ -0,0 +1,114 @@
+#*****************************************************************************
+#                                                                            *
+# Make file for VMS                                                          *
+# Author : J.Jansen (joukj@hrem.nano.tudelft.nl)                             *
+# Date : 12 January 2009                                                     *
+#                                                                            *
+#*****************************************************************************
+.first
+       define wx [--.include.wx]
+
+.ifdef __WXMOTIF__
+CXX_DEFINE = /define=(__WXMOTIF__=1)/name=(as_is,short)\
+          /assume=(nostdnew,noglobal_array_new)
+.else
+.ifdef __WXGTK__
+CXX_DEFINE = /define=(__WXGTK__=1)/float=ieee/name=(as_is,short)/ieee=denorm\
+          /assume=(nostdnew,noglobal_array_new)
+.else
+.ifdef __WXGTK2__
+CXX_DEFINE = /define=(__WXGTK__=1,VMS_GTK2=1)/float=ieee/name=(as_is,short)/ieee=denorm\
+          /assume=(nostdnew,noglobal_array_new)
+.else
+.ifdef __WXX11__
+CXX_DEFINE = /define=(__WXX11__=1,__WXUNIVERSAL__==1)/float=ieee\
+       /name=(as_is,short)/assume=(nostdnew,noglobal_array_new)
+.else
+CXX_DEFINE =
+.endif
+.endif
+.endif
+.endif
+
+.suffixes : .cpp
+
+.cpp.obj :
+       cxx $(CXXFLAGS)$(CXX_DEFINE) $(MMS$TARGET_NAME).cpp
+
+all :
+.ifdef __WXMOTIF__
+       $(MMS)$(MMSQUALIFIERS) baseclient.exe
+       $(MMS)$(MMSQUALIFIERS) baseserver.exe
+       $(MMS)$(MMSQUALIFIERS) client.exe
+       $(MMS)$(MMSQUALIFIERS) server.exe
+.else
+.ifdef __WXGTK__
+       $(MMS)$(MMSQUALIFIERS) baseclient_gtk.exe
+       $(MMS)$(MMSQUALIFIERS) baseserver_gtk.exe
+       $(MMS)$(MMSQUALIFIERS) client_gtk.exe
+       $(MMS)$(MMSQUALIFIERS) server_gtk.exe
+.else
+.ifdef __WXGTK2__
+       $(MMS)$(MMSQUALIFIERS) baseclient_gtk2.exe
+       $(MMS)$(MMSQUALIFIERS) baseserver_gtk2.exe
+       $(MMS)$(MMSQUALIFIERS) client_gtk2.exe
+       $(MMS)$(MMSQUALIFIERS) server_gtk2.exe
+.else
+.ifdef __WXX11__
+       $(MMS)$(MMSQUALIFIERS) baseclient_x11.exe
+       $(MMS)$(MMSQUALIFIERS) baseserver_x11.exe
+       $(MMS)$(MMSQUALIFIERS) client_x11.exe
+       $(MMS)$(MMSQUALIFIERS) server_x11.exe
+.endif
+.endif
+.endif
+.endif
+
+.ifdef __WXMOTIF__
+baseclient.exe : baseclient.obj
+       cxxlink baseclient,[--.lib]vms/opt
+baseserver.exe : baseserver.obj
+       cxxlink baseserver,[--.lib]vms/opt
+client.exe : client.obj
+       cxxlink client,[--.lib]vms/opt
+server.exe : server.obj
+       cxxlink server,[--.lib]vms/opt
+.else
+.ifdef __WXGTK__
+baseclient_gtk.exe : baseclient.obj
+       cxxlink/exe=baseclient_gtk.exe baseclient,[--.lib]vms_gtk/opt
+baseserver_gtk.exe : baseserver.obj
+       cxxlink/exe=baseserver_gtk.exe baseserver,[--.lib]vms_gtk/opt
+client_gtk.exe : client.obj
+       cxxlink/exe=client_gtk client,[--.lib]vms_gtk/opt
+server_gtk.exe : server.obj
+       cxxlink/exe=server_gtk.exe server,[--.lib]vms_gtk/opt
+.else
+.ifdef __WXGTK2__
+baseclient_gtk2.exe : baseclient.obj
+       cxxlink/exe=baseclient_gtk2.exe baseclient,[--.lib]vms_gtk2/opt
+baseserver_gtk2.exe : baseserver.obj
+       cxxlink/exe=baseserver_gtk2.exe baseserver,[--.lib]vms_gtk2/opt
+client_gtk2.exe : client.obj
+       cxxlink/exe=client_gtk2 client,[--.lib]vms_gtk2/opt
+server_gtk2.exe : server.obj
+       cxxlink/exe=server_gtk2.exe server,[--.lib]vms_gtk2/opt
+.else
+.ifdef __WXX11__
+baseclient_x11.exe : baseclient.obj
+       cxxlink/exe=baseclient_x11.exe baseclient,[--.lib]vms_x11/opt
+baseserver_x11.exe : baseserver.obj
+       cxxlink/exe=baseserver_x11.exe baseserver,[--.lib]vms_x11/opt
+client_x11.exe : client.obj
+       cxxlink/exe=client_x11 client,[--.lib]vms_x11/opt
+server_x11.exe : server.obj
+       cxxlink/exe=server_x11.exe server,[--.lib]vms_x11/opt
+.endif
+.endif
+.endif
+.endif
+
+baseclient.obj : baseclient.cpp
+baseserver.obj : baseserver.cpp
+client.obj : client.cpp
+server.obj : server.cpp
index c80b314d606202c72b1e47b1a47d94606a50ed65..dc64603aa5e68fca32b460a82410f11f8917f55a 100644 (file)
 // this should cover all the current Unix systems (Windows never sends any
 // signals anyhow) but if we find one that has neither we should explicitly
 // ignore SIGPIPE for it
 // this should cover all the current Unix systems (Windows never sends any
 // signals anyhow) but if we find one that has neither we should explicitly
 // ignore SIGPIPE for it
+// OpenVMS has neither MSG_NOSIGNAL nor SO_NOSIGPIPE. However the socket sample
+// seems to work. Not sure if problems will show up on OpenVMS using sockets.
 #ifdef MSG_NOSIGNAL
     #define wxSOCKET_MSG_NOSIGNAL MSG_NOSIGNAL
 #else // MSG_NOSIGNAL not available (BSD including OS X)
 #ifdef MSG_NOSIGNAL
     #define wxSOCKET_MSG_NOSIGNAL MSG_NOSIGNAL
 #else // MSG_NOSIGNAL not available (BSD including OS X)
-    #if defined(__UNIX__) && !defined(SO_NOSIGPIPE)
+    #if defined(__UNIX__) && !defined(SO_NOSIGPIPE) && !defined( __VMS )
         #error "Writing to socket could generate unhandled SIGPIPE."
         #error "Please post information about your system to wx-dev."
     #endif
         #error "Writing to socket could generate unhandled SIGPIPE."
         #error "Please post information about your system to wx-dev."
     #endif