Made wxSocket compile using makefiles; #ifdefed out <<, >> operators in stream.cpp
for USE_SERIALL; included io.h for VC++ in socket.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,6 +13,16 @@
|
||||
#pragma implementation "http.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "wx/string.h"
|
||||
@@ -22,10 +32,6 @@
|
||||
#include "wx/protocol/http.h"
|
||||
#include "wx/sckstrm.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxHTTP, wxProtocol)
|
||||
IMPLEMENT_PROTOCOL(wxHTTP, "http", "80", TRUE)
|
||||
|
@@ -12,6 +12,20 @@
|
||||
#pragma implementation "objstrm.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/defs.h"
|
||||
#include "wx/setup.h"
|
||||
#endif
|
||||
|
||||
#if USE_SERIAL
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/objstrm.h"
|
||||
#include "wx/datstrm.h"
|
||||
@@ -310,3 +324,6 @@ wxObject *wxObjectInputStream::LoadObject()
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -13,19 +13,20 @@
|
||||
#pragma implementation "protocol.h"
|
||||
#endif
|
||||
|
||||
#ifdef WXPREC
|
||||
#include <wx/wxprec.h>
|
||||
#else
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
#include "wx/protocol/protocol.h"
|
||||
#include "wx/url.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// wxProtoInfo
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
@@ -13,6 +13,16 @@
|
||||
#pragma implementation "sckaddr.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
@@ -42,10 +52,6 @@
|
||||
|
||||
#include "wx/sckaddr.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#define CHECK_ADDRTYPE(var, type)
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
|
@@ -11,15 +11,22 @@
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "sckfile.h"
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <wx/fstream.h>
|
||||
#include "wx/protocol/file.h"
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <wx/fstream.h>
|
||||
#include "wx/protocol/file.h"
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxFileProto, wxProtocol)
|
||||
IMPLEMENT_PROTOCOL(wxFileProto, "file", NULL, FALSE)
|
||||
|
@@ -13,15 +13,19 @@
|
||||
#pragma implementation "sckipc.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef WXPREC
|
||||
#include <wx/wxprec.h>
|
||||
#else
|
||||
#include <wx/wx.h>
|
||||
#endif
|
||||
|
||||
#include "wx/socket.h"
|
||||
#include "wx/sckipc.h"
|
||||
|
||||
|
@@ -12,6 +12,16 @@
|
||||
#pragma implementation "sckstrm.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#endif
|
||||
|
||||
#include "wx/stream.h"
|
||||
#include "wx/socket.h"
|
||||
#include "wx/sckstrm.h"
|
||||
|
@@ -15,6 +15,13 @@
|
||||
#pragma implementation "socket.cpp"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// wxWindows headers
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -52,6 +59,10 @@
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <io.h>
|
||||
#endif
|
||||
|
||||
#if defined(__WXMOTIF__) || defined(__WXXT__)
|
||||
#include <X11/Intrinsic.h>
|
||||
|
||||
@@ -75,10 +86,6 @@
|
||||
#include "wx/sckaddr.h"
|
||||
#include "wx/socket.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Some patch ///// BEGIN
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -363,12 +363,14 @@ wxInputStream& wxInputStream::operator>>(float& f)
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if USE_SERIAL
|
||||
wxInputStream& wxInputStream::operator>>(wxObject *& obj)
|
||||
{
|
||||
wxObjectInputStream obj_s(*this);
|
||||
obj = obj_s.LoadObject();
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
off_t wxInputStream::SeekI(off_t pos, wxSeekMode mode)
|
||||
{
|
||||
@@ -542,12 +544,14 @@ wxOutputStream& wxOutputStream::operator<<(double f)
|
||||
return Write(strfloat, strfloat.Len());
|
||||
}
|
||||
|
||||
#if USE_SERIAL
|
||||
wxOutputStream& wxOutputStream::operator<<(wxObject& obj)
|
||||
{
|
||||
wxObjectOutputStream obj_s(*this);
|
||||
obj_s.SaveObject(obj);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxStream
|
||||
|
@@ -13,6 +13,16 @@
|
||||
#pragma implementation "tokenzr.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#endif
|
||||
|
||||
#include "wx/object.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/tokenzr.h"
|
||||
|
@@ -12,6 +12,17 @@
|
||||
#ifdef __GNUG__
|
||||
#pragma implementation "url.h"
|
||||
#endif
|
||||
|
||||
// For compilers that support precompilation, includes "wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
@@ -23,10 +34,6 @@
|
||||
// wxSocket header
|
||||
#include "wx/url.h"
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#if !USE_SHARED_LIBRARY
|
||||
IMPLEMENT_CLASS(wxProtoInfo, wxObject)
|
||||
IMPLEMENT_CLASS(wxURL, wxObject)
|
||||
@@ -133,7 +140,7 @@ bool wxURL::PrepHost(wxString& url)
|
||||
{
|
||||
int pos, pos2;
|
||||
|
||||
if ((url[0UL] != '/') || (url[1UL] != '/'))
|
||||
if ((url.GetChar(0) != '/') || (url.GetChar(1) != '/'))
|
||||
return FALSE;
|
||||
|
||||
url = url(2, url.Length());
|
||||
|
@@ -108,7 +108,16 @@ COMMONOBJS = \
|
||||
$(COMMDIR)\hash.obj \
|
||||
$(COMMDIR)\list.obj \
|
||||
$(COMMDIR)\string.obj \
|
||||
$(COMMDIR)\socket.obj \
|
||||
$(COMMDIR)\sckaddr.obj \
|
||||
$(COMMDIR)\sckfile.obj \
|
||||
$(COMMDIR)\sckipc.obj \
|
||||
$(COMMDIR)\sckstrm.obj \
|
||||
$(COMMDIR)\url.obj \
|
||||
$(COMMDIR)\http.obj \
|
||||
$(COMMDIR)\protocol.obj \
|
||||
$(COMMDIR)\time.obj \
|
||||
$(COMMDIR)\tokenzr.obj \
|
||||
$(COMMDIR)\wxexpr.obj \
|
||||
$(COMMDIR)\y_tab.obj \
|
||||
$(COMMDIR)\extended.obj \
|
||||
@@ -118,6 +127,7 @@ COMMONOBJS = \
|
||||
$(COMMDIR)\zstream.obj \
|
||||
$(COMMDIR)\stream.obj \
|
||||
$(COMMDIR)\datstrm.obj \
|
||||
$(COMMDIR)\objstrm.obj \
|
||||
$(COMMDIR)\wincmn.obj
|
||||
|
||||
MSWOBJS = \
|
||||
@@ -914,6 +924,51 @@ $(COMMDIR)/string.obj: $*.$(SRCSUFF)
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/socket.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/sckaddr.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/sckfile.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/sckipc.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/sckstrm.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/url.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/http.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/protocol.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/tokenzr.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/matrix.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
@@ -959,9 +1014,14 @@ $(COMMDIR)\datstrm.obj: $*.$(SRCSUFF)
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)\objstrm.obj: $*.$(SRCSUFF)
|
||||
cl @<<
|
||||
$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/extended.obj: $*.c
|
||||
cl @<<
|
||||
$(CPPFLAGS2) /c /Tp $*.c /Fo$@
|
||||
$(CPPFLAGS2) /c $*.c /Fo$@
|
||||
<<
|
||||
|
||||
$(COMMDIR)/process.obj: $*.$(SRCSUFF)
|
||||
|
Reference in New Issue
Block a user