Fixing/Testing sockets on OpenVMS

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jouk Jansen
2009-01-12 09:06:36 +00:00
parent 0e1381f2fc
commit 66034aba2e
5 changed files with 124 additions and 6 deletions

View File

@@ -2,7 +2,7 @@
# * # *
# Make file for VMS * # Make file for VMS *
# Author : J.Jansen (joukj@hrem.nano.tudelft.nl) * # 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) $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
set default [-.richedit] set default [-.richedit]
# $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1) # $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
set default [-.socket]
$(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
set default [-.xrc] set default [-.xrc]
$(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1) $(MMS)$(MMSQUALIFIERS)/macro=(__WXGTK__=1)
set default [--] set default [--]

View File

@@ -72,7 +72,7 @@ WX_DECLARE_LIST(ThreadWorker, TList);
WX_DECLARE_LIST(EventWorker, EList); WX_DECLARE_LIST(EventWorker, EList);
class Client : public wxApp { class Client : public wxApp {
DECLARE_EVENT_TABLE(); DECLARE_EVENT_TABLE()
public: public:
void RemoveEventWorker(EventWorker* p_worker); void RemoveEventWorker(EventWorker* p_worker);
private: private:
@@ -141,7 +141,7 @@ private:
class EventWorker : public wxEvtHandler class EventWorker : public wxEvtHandler
{ {
DECLARE_EVENT_TABLE(); DECLARE_EVENT_TABLE()
public: public:
EventWorker(const wxString& p_host, char* p_buf, int p_size); EventWorker(const wxString& p_host, char* p_buf, int p_size);
void Run(); void Run();

View File

@@ -101,7 +101,7 @@ WX_DECLARE_LIST(EventWorker, EList);
//and list of two type worker classes that serve clients //and list of two type worker classes that serve clients
class Server : public wxApp class Server : public wxApp
{ {
DECLARE_EVENT_TABLE(); DECLARE_EVENT_TABLE()
public: public:
Server() : m_maxConnections(-1) {} Server() : m_maxConnections(-1) {}
~Server() {} ~Server() {}
@@ -198,7 +198,7 @@ private:
void DoWrite(); void DoWrite();
void DoRead(); void DoRead();
DECLARE_EVENT_TABLE(); DECLARE_EVENT_TABLE()
}; };
/******************* Implementation ******************/ /******************* Implementation ******************/

114
samples/sockets/descrip.mms Normal file
View File

@@ -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

View File

@@ -57,10 +57,12 @@
// this should cover all the current Unix systems (Windows never sends any // 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 // signals anyhow) but if we find one that has neither we should explicitly
// ignore SIGPIPE for it // 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 #ifdef MSG_NOSIGNAL
#define wxSOCKET_MSG_NOSIGNAL MSG_NOSIGNAL #define wxSOCKET_MSG_NOSIGNAL MSG_NOSIGNAL
#else // MSG_NOSIGNAL not available (BSD including OS X) #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 "Writing to socket could generate unhandled SIGPIPE."
#error "Please post information about your system to wx-dev." #error "Please post information about your system to wx-dev."
#endif #endif