wxOS2 with Open Watcom: correct PCH usage, missing headers, warning fixes, source cleaning and other Watcom adjustements.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#ifdef __WATCOMC__
|
#ifdef __WATCOMC__
|
||||||
|
|
||||||
|
#include <types.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/select.h>
|
#include <sys/select.h>
|
||||||
|
|
||||||
@@ -74,7 +75,7 @@ public:
|
|||||||
|
|
||||||
virtual bool OnInitGui(void);
|
virtual bool OnInitGui(void);
|
||||||
|
|
||||||
virtual bool Yield(bool onlyIfNeeded = FALSE);
|
virtual bool Yield(bool onlyIfNeeded = false);
|
||||||
virtual void WakeUpIdle(void);
|
virtual void WakeUpIdle(void);
|
||||||
|
|
||||||
virtual void SetPrintMode(int mode) { m_nPrintMode = mode; }
|
virtual void SetPrintMode(int mode) { m_nPrintMode = mode; }
|
||||||
@@ -120,4 +121,3 @@ protected:
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
// _WX_APP_H_
|
// _WX_APP_H_
|
||||||
|
|
||||||
|
@@ -106,10 +106,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
// If depth is omitted, will create a bitmap compatible with the display
|
// If depth is omitted, will create a bitmap compatible with the display
|
||||||
wxBitmap( int nWidth
|
wxBitmap( int nWidth, int nHeight, int nDepth = -1 );
|
||||||
,int nHeight
|
|
||||||
,int nDepth = -1
|
|
||||||
);
|
|
||||||
|
|
||||||
wxBitmap( const wxImage& image, int depth = -1 )
|
wxBitmap( const wxImage& image, int depth = -1 )
|
||||||
{ (void)CreateFromImage(image, depth); }
|
{ (void)CreateFromImage(image, depth); }
|
||||||
@@ -339,14 +336,14 @@ public:
|
|||||||
,int lType
|
,int lType
|
||||||
);
|
);
|
||||||
private:
|
private:
|
||||||
inline virtual bool Load( wxGDIImage* pImage
|
inline virtual bool Load( wxGDIImage* WXUNUSED(pImage)
|
||||||
,const wxString& rName
|
,const wxString& WXUNUSED(rName)
|
||||||
,HPS hPs
|
,HPS WXUNUSED(hPs)
|
||||||
,long lFlags
|
,long WXUNUSED(lFlags)
|
||||||
,int nDesiredWidth
|
,int WXUNUSED(nDesiredWidth)
|
||||||
,int nDesiredHeight
|
,int WXUNUSED(nDesiredHeight)
|
||||||
)
|
)
|
||||||
{ return FALSE; }
|
{ return false; }
|
||||||
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
|
DECLARE_DYNAMIC_CLASS(wxBitmapHandler)
|
||||||
}; // end of CLASS wxBitmapHandler
|
}; // end of CLASS wxBitmapHandler
|
||||||
|
|
||||||
|
@@ -17,12 +17,12 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if wxUSE_OWNER_DRAWN
|
#if wxUSE_OWNER_DRAWN
|
||||||
class WXDLLEXPORT wxOwnerDrawn;
|
class WXDLLEXPORT wxOwnerDrawn;
|
||||||
|
|
||||||
// define the array of list box items
|
// define the array of list box items
|
||||||
#include <wx/dynarray.h>
|
#include <wx/dynarray.h>
|
||||||
|
|
||||||
WX_DEFINE_EXPORTED_ARRAY(wxOwnerDrawn *, wxListBoxItemsArray);
|
WX_DEFINE_EXPORTED_ARRAY_PTR(wxOwnerDrawn *, wxListBoxItemsArray);
|
||||||
#endif // wxUSE_OWNER_DRAWN
|
#endif // wxUSE_OWNER_DRAWN
|
||||||
|
|
||||||
// forward decl for GetSelections()
|
// forward decl for GetSelections()
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
#include "wx/list.h" // for "template" list classes
|
#include "wx/list.h" // for "template" list classes
|
||||||
#include "wx/dynarray.h"
|
#include "wx/dynarray.h"
|
||||||
|
|
||||||
WX_DEFINE_EXPORTED_ARRAY(wxAcceleratorEntry *, wxAcceleratorArray);
|
WX_DEFINE_EXPORTED_ARRAY_PTR(wxAcceleratorEntry *, wxAcceleratorArray);
|
||||||
#endif // wxUSE_ACCEL
|
#endif // wxUSE_ACCEL
|
||||||
|
|
||||||
class WXDLLEXPORT wxFrame;
|
class WXDLLEXPORT wxFrame;
|
||||||
@@ -139,9 +139,9 @@ private:
|
|||||||
void EndRadioGroup(void);
|
void EndRadioGroup(void);
|
||||||
|
|
||||||
//
|
//
|
||||||
// If TRUE, insert a breal before appending the next item
|
// If true, insert a breal before appending the next item
|
||||||
//
|
//
|
||||||
bool m_bDoBreak;
|
bool m_bDoBreak;
|
||||||
|
|
||||||
//
|
//
|
||||||
// The menu handle of this menu
|
// The menu handle of this menu
|
||||||
|
@@ -63,10 +63,10 @@ public:
|
|||||||
bool Unassociate();
|
bool Unassociate();
|
||||||
|
|
||||||
// set an arbitrary command, ask confirmation if it already exists and
|
// set an arbitrary command, ask confirmation if it already exists and
|
||||||
// overwriteprompt is TRUE
|
// overwriteprompt is true
|
||||||
bool SetCommand(const wxString& cmd,
|
bool SetCommand(const wxString& cmd,
|
||||||
const wxString& verb,
|
const wxString& verb,
|
||||||
bool overwriteprompt = TRUE);
|
bool overwriteprompt = true);
|
||||||
|
|
||||||
bool SetDefaultIcon(const wxString& cmd = wxEmptyString, int index = 0);
|
bool SetDefaultIcon(const wxString& cmd = wxEmptyString, int index = 0);
|
||||||
|
|
||||||
@@ -101,10 +101,10 @@ public:
|
|||||||
size_t EnumAllFileTypes(wxArrayString& mimetypes);
|
size_t EnumAllFileTypes(wxArrayString& mimetypes);
|
||||||
|
|
||||||
// these are NOPs under OS/2
|
// these are NOPs under OS/2
|
||||||
bool ReadMailcap(const wxString& filename, bool fallback = TRUE)
|
bool ReadMailcap(const wxString& WXUNUSED(filename), bool WXUNUSED(fallback) = true)
|
||||||
{ return TRUE; }
|
{ return true; }
|
||||||
bool ReadMimeTypes(const wxString& filename)
|
bool ReadMimeTypes(const wxString& WXUNUSED(filename))
|
||||||
{ return TRUE; }
|
{ return true; }
|
||||||
|
|
||||||
void AddFallback(const wxFileTypeInfo& ft) { m_fallbacks.Add(ft); }
|
void AddFallback(const wxFileTypeInfo& ft) { m_fallbacks.Add(ft); }
|
||||||
|
|
||||||
@@ -116,4 +116,3 @@ private:
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
//_MIMETYPE_IMPL_H
|
//_MIMETYPE_IMPL_H
|
||||||
|
|
||||||
|
@@ -19,18 +19,22 @@
|
|||||||
#define INCL_GPI
|
#define INCL_GPI
|
||||||
#define INCL_WINSYS
|
#define INCL_WINSYS
|
||||||
#define INCL_SHLERRORS
|
#define INCL_SHLERRORS
|
||||||
|
#define INCL_DOS
|
||||||
#include <os2.h>
|
#include <os2.h>
|
||||||
#if defined (__EMX__) && !defined(USE_OS2_TOOLKIT_HEADERS) && !defined(HAVE_SPBCDATA)
|
|
||||||
typedef struct _SPBCDATA {
|
|
||||||
ULONG cbSize; /* Size of control block. */
|
|
||||||
ULONG ulTextLimit; /* Entryfield text limit. */
|
|
||||||
LONG lLowerLimit; /* Spin lower limit (numeric only). */
|
|
||||||
LONG lUpperLimit; /* Spin upper limit (numeric only). */
|
|
||||||
ULONG idMasterSpb; /* ID of the servant's master spinbutton. */
|
|
||||||
PVOID pHWXCtlData; /* Handwriting control data structure flag. */
|
|
||||||
} SPBCDATA;
|
|
||||||
|
|
||||||
typedef SPBCDATA *PSPBCDATA;
|
#if defined (__EMX__) && !defined(USE_OS2_TOOLKIT_HEADERS) && !defined(HAVE_SPBCDATA)
|
||||||
|
|
||||||
|
typedef struct _SPBCDATA {
|
||||||
|
ULONG cbSize; /* Size of control block. */
|
||||||
|
ULONG ulTextLimit; /* Entryfield text limit. */
|
||||||
|
LONG lLowerLimit; /* Spin lower limit (numeric only). */
|
||||||
|
LONG lUpperLimit; /* Spin upper limit (numeric only). */
|
||||||
|
ULONG idMasterSpb; /* ID of the servant's master spinbutton. */
|
||||||
|
PVOID pHWXCtlData; /* Handwriting control data structure flag. */
|
||||||
|
} SPBCDATA;
|
||||||
|
|
||||||
|
typedef SPBCDATA *PSPBCDATA;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/fontenc.h"
|
#include "wx/fontenc.h"
|
||||||
@@ -146,11 +150,11 @@ typedef MRESULT (APIENTRY * WndProcCast) (HWND, ULONG, MPARAM, MPARAM);
|
|||||||
#define STATIC_FLAGS (SS_TEXT|DT_LEFT|SS_LEFT|WS_VISIBLE)
|
#define STATIC_FLAGS (SS_TEXT|DT_LEFT|SS_LEFT|WS_VISIBLE)
|
||||||
#define CHECK_CLASS _T("BUTTON")
|
#define CHECK_CLASS _T("BUTTON")
|
||||||
#define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP)
|
#define CHECK_FLAGS (BS_AUTOCHECKBOX|WS_TABSTOP)
|
||||||
#define CHECK_IS_FAFA FALSE
|
#define CHECK_IS_FAFA FALSE
|
||||||
#define RADIO_CLASS _T("BUTTON" )
|
#define RADIO_CLASS _T("BUTTON" )
|
||||||
#define RADIO_FLAGS (BS_AUTORADIOBUTTON|WS_VISIBLE)
|
#define RADIO_FLAGS (BS_AUTORADIOBUTTON|WS_VISIBLE)
|
||||||
#define RADIO_SIZE 20
|
#define RADIO_SIZE 20
|
||||||
#define RADIO_IS_FAFA FALSE
|
#define RADIO_IS_FAFA FALSE
|
||||||
#define PURE_WINDOWS
|
#define PURE_WINDOWS
|
||||||
/* PM has no group box button style
|
/* PM has no group box button style
|
||||||
#define GROUP_CLASS "BUTTON"
|
#define GROUP_CLASS "BUTTON"
|
||||||
@@ -193,6 +197,34 @@ extern LONG APIENTRY wxSubclassedGenericControlProc(WXHWND hWnd, WXDWORD message
|
|||||||
#define ENDSESSION_LOGOFF 0x80000000
|
#define ENDSESSION_LOGOFF 0x80000000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef PMERR_INVALID_PARM
|
||||||
|
#define PMERR_INVALID_PARM 0x1303
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PMERR_INVALID_PARAMETERS
|
||||||
|
#define PMERR_INVALID_PARAMETERS 0x1208
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef BOOKERR_INVALID_PARAMETERS
|
||||||
|
#define BOOKERR_INVALID_PARAMETERS -1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DLGC_ENTRYFIELD
|
||||||
|
#define DLGC_ENTRYFIELD 0x0001
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DLGC_BUTTON
|
||||||
|
#define DLGC_BUTTON 0x0002
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DLGC_MLE
|
||||||
|
#define DLGC_MLE 0x0400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DP_NORMAL
|
||||||
|
#define DP_NORMAL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// debug messages -- OS/2 has no native debug output system
|
// debug messages -- OS/2 has no native debug output system
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
#include "wx/spinbutt.h" // the base class
|
#include "wx/spinbutt.h" // the base class
|
||||||
#include "wx/dynarray.h"
|
#include "wx/dynarray.h"
|
||||||
class WXDLLEXPORT wxSpinCtrl;
|
class WXDLLEXPORT wxSpinCtrl;
|
||||||
WX_DEFINE_EXPORTED_ARRAY(wxSpinCtrl *, wxArraySpins);
|
WX_DEFINE_EXPORTED_ARRAY_PTR(wxSpinCtrl *, wxArraySpins);
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Under Win32 and OS2 PM, wxSpinCtrl is a wxSpinButton with a buddy
|
// Under Win32 and OS2 PM, wxSpinCtrl is a wxSpinButton with a buddy
|
||||||
@@ -28,7 +28,7 @@ class WXDLLEXPORT wxSpinCtrl : public wxSpinButton
|
|||||||
public:
|
public:
|
||||||
wxSpinCtrl() { }
|
wxSpinCtrl() { }
|
||||||
wxSpinCtrl( wxWindow* pParent
|
wxSpinCtrl( wxWindow* pParent
|
||||||
,wxWindowID vId = -1
|
,wxWindowID vId = wxID_ANY
|
||||||
,const wxString& rsValue = wxEmptyString
|
,const wxString& rsValue = wxEmptyString
|
||||||
,const wxPoint& rPos = wxDefaultPosition
|
,const wxPoint& rPos = wxDefaultPosition
|
||||||
,const wxSize& rSize = wxDefaultSize
|
,const wxSize& rSize = wxDefaultSize
|
||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
virtual ~wxSpinCtrl();
|
virtual ~wxSpinCtrl();
|
||||||
|
|
||||||
bool Create(wxWindow* pParent
|
bool Create(wxWindow* pParent
|
||||||
,wxWindowID vId = -1
|
,wxWindowID vId = wxID_ANY
|
||||||
,const wxString& rsValue = wxEmptyString
|
,const wxString& rsValue = wxEmptyString
|
||||||
,const wxPoint& rPos = wxDefaultPosition
|
,const wxPoint& rPos = wxDefaultPosition
|
||||||
,const wxSize& rSize = wxDefaultSize
|
,const wxSize& rSize = wxDefaultSize
|
||||||
@@ -65,23 +65,23 @@ public:
|
|||||||
// implementation only from now on
|
// implementation only from now on
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
//
|
//
|
||||||
virtual bool Enable(bool bEnable = TRUE);
|
virtual bool Enable(bool bEnable = true);
|
||||||
|
|
||||||
virtual int GetValue(void) const;
|
virtual int GetValue(void) const;
|
||||||
|
|
||||||
|
virtual bool SetFont(const wxFont &rFont);
|
||||||
|
virtual void SetFocus(void);
|
||||||
|
|
||||||
virtual bool SetFont(const wxFont &rFont);
|
|
||||||
virtual void SetFocus(void);
|
|
||||||
inline virtual void SetValue(int nVal) { wxSpinButton::SetValue(nVal); }
|
inline virtual void SetValue(int nVal) { wxSpinButton::SetValue(nVal); }
|
||||||
void SetSelection( long lFrom
|
|
||||||
,long lTo
|
|
||||||
);
|
|
||||||
|
|
||||||
virtual bool Show(bool bShow = TRUE);
|
void SetSelection(long lFrom, long lTo);
|
||||||
|
|
||||||
|
virtual bool Show(bool bShow = true);
|
||||||
|
|
||||||
//
|
//
|
||||||
// wxSpinButton doesn't accept focus, but we do
|
// wxSpinButton doesn't accept focus, but we do
|
||||||
//
|
//
|
||||||
inline virtual bool AcceptsFocus(void) const { return FALSE; }
|
inline virtual bool AcceptsFocus(void) const { return false; }
|
||||||
|
|
||||||
//
|
//
|
||||||
// Return the spinctrl object whose buddy is the given window or NULL
|
// Return the spinctrl object whose buddy is the given window or NULL
|
||||||
@@ -126,5 +126,3 @@ private:
|
|||||||
}; // end of CLASS wxSpinCtrl
|
}; // end of CLASS wxSpinCtrl
|
||||||
|
|
||||||
#endif // _WX_MSW_SPINCTRL_H_
|
#endif // _WX_MSW_SPINCTRL_H_
|
||||||
|
|
||||||
|
|
||||||
|
@@ -27,9 +27,9 @@ public:
|
|||||||
|
|
||||||
// controlling tooltip behaviour: globally change tooltip parameters
|
// controlling tooltip behaviour: globally change tooltip parameters
|
||||||
// enable or disable the tooltips globally
|
// enable or disable the tooltips globally
|
||||||
static void Enable(bool flag) {}
|
static void Enable(bool WXUNUSED(flag)) {}
|
||||||
// set the delay after which the tooltip appears
|
// set the delay after which the tooltip appears
|
||||||
static void SetDelay(long milliseconds) {}
|
static void SetDelay(long WXUNUSED(milliseconds)) {}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Implementation
|
// Implementation
|
||||||
@@ -44,4 +44,3 @@ private:
|
|||||||
wxString m_sText; // tooltip text
|
wxString m_sText; // tooltip text
|
||||||
wxWindow* m_pWindow; // window we're associated with
|
wxWindow* m_pWindow; // window we're associated with
|
||||||
}; // end of CLASS wxToolTip
|
}; // end of CLASS wxToolTip
|
||||||
|
|
||||||
|
@@ -16,6 +16,12 @@
|
|||||||
* PLEASE don't put C++ comments here - this is a C source file.
|
* PLEASE don't put C++ comments here - this is a C source file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(__WATCOMC__)
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
#include <errno.h>
|
||||||
|
#include <nerrno.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __GSOCKET_STANDALONE__
|
#ifndef __GSOCKET_STANDALONE__
|
||||||
#include "wx/setup.h"
|
#include "wx/setup.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -118,7 +124,7 @@ int _System soclose(int);
|
|||||||
# define SOCKLEN_T socklen_t
|
# define SOCKLEN_T socklen_t
|
||||||
# endif
|
# endif
|
||||||
# elif defined(__WXMAC__)
|
# elif defined(__WXMAC__)
|
||||||
# define SOCKLEN_T socklen_t
|
# define SOCKLEN_T socklen_t
|
||||||
# else
|
# else
|
||||||
# define SOCKLEN_T int
|
# define SOCKLEN_T int
|
||||||
# endif
|
# endif
|
||||||
@@ -150,15 +156,24 @@ int _System soclose(int);
|
|||||||
#define INADDR_NONE INADDR_BROADCAST
|
#define INADDR_NONE INADDR_BROADCAST
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MASK_SIGNAL() \
|
#if defined(__VISAGECPP__) || defined(__WATCOMC__)
|
||||||
{ \
|
|
||||||
void (*old_handler)(int); \
|
|
||||||
\
|
|
||||||
old_handler = signal(SIGPIPE, SIG_IGN);
|
|
||||||
|
|
||||||
#define UNMASK_SIGNAL() \
|
#define MASK_SIGNAL() {
|
||||||
signal(SIGPIPE, old_handler); \
|
#define UNMASK_SIGNAL() }
|
||||||
}
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define MASK_SIGNAL() \
|
||||||
|
{ \
|
||||||
|
void (*old_handler)(int); \
|
||||||
|
\
|
||||||
|
old_handler = signal(SIGPIPE, SIG_IGN);
|
||||||
|
|
||||||
|
#define UNMASK_SIGNAL() \
|
||||||
|
signal(SIGPIPE, old_handler); \
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If a SIGPIPE is issued by a socket call on a remotely closed socket,
|
/* If a SIGPIPE is issued by a socket call on a remotely closed socket,
|
||||||
the program will "crash" unless it explicitly handles the SIGPIPE.
|
the program will "crash" unless it explicitly handles the SIGPIPE.
|
||||||
@@ -906,7 +921,7 @@ int GSocket::Write(const char *buffer, int size)
|
|||||||
|
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
{
|
{
|
||||||
if ((errno == EWOULDBLOCK) || (errno == EAGAIN))
|
if ((errno == EWOULDBLOCK) || (errno == EAGAIN))
|
||||||
{
|
{
|
||||||
m_error = GSOCK_WOULDBLOCK;
|
m_error = GSOCK_WOULDBLOCK;
|
||||||
GSocket_Debug(( "GSocket_Write error WOULDBLOCK\n" ));
|
GSocket_Debug(( "GSocket_Write error WOULDBLOCK\n" ));
|
||||||
@@ -1303,7 +1318,7 @@ GSocketError GSocket::Output_Timeout()
|
|||||||
int GSocket::Recv_Stream(char *buffer, int size)
|
int GSocket::Recv_Stream(char *buffer, int size)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ret = recv(m_fd, buffer, size, GSOCKET_MSG_NOSIGNAL);
|
ret = recv(m_fd, buffer, size, GSOCKET_MSG_NOSIGNAL);
|
||||||
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
|
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
|
||||||
@@ -1319,7 +1334,7 @@ int GSocket::Recv_Dgram(char *buffer, int size)
|
|||||||
|
|
||||||
fromlen = sizeof(from);
|
fromlen = sizeof(from);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ret = recvfrom(m_fd, buffer, size, 0, &from, (SOCKLEN_T *) &fromlen);
|
ret = recvfrom(m_fd, buffer, size, 0, &from, (SOCKLEN_T *) &fromlen);
|
||||||
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
|
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
|
||||||
@@ -1353,16 +1368,14 @@ int GSocket::Send_Stream(const char *buffer, int size)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
#ifndef __VISAGECPP__
|
MASK_SIGNAL();
|
||||||
MASK_SIGNAL();
|
|
||||||
#endif
|
do
|
||||||
do
|
|
||||||
{
|
{
|
||||||
ret = send(m_fd, (char *)buffer, size, GSOCKET_MSG_NOSIGNAL);
|
ret = send(m_fd, (char *)buffer, size, GSOCKET_MSG_NOSIGNAL);
|
||||||
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
|
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
|
||||||
#ifndef __VISAGECPP__
|
|
||||||
UNMASK_SIGNAL();
|
UNMASK_SIGNAL();
|
||||||
#endif
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@@ -1386,16 +1399,14 @@ int GSocket::Send_Dgram(const char *buffer, int size)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __VISAGECPP__
|
|
||||||
MASK_SIGNAL();
|
MASK_SIGNAL();
|
||||||
#endif
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ret = sendto(m_fd, (char *)buffer, size, 0, addr, len);
|
ret = sendto(m_fd, (char *)buffer, size, 0, addr, len);
|
||||||
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
|
} while (ret == -1 && errno == EINTR); /* Loop until not interrupted */
|
||||||
#ifndef __VISAGECPP__
|
|
||||||
UNMASK_SIGNAL();
|
UNMASK_SIGNAL();
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Frees memory allocated from _GAddress_translate_to */
|
/* Frees memory allocated from _GAddress_translate_to */
|
||||||
free(addr);
|
free(addr);
|
||||||
@@ -1440,15 +1451,15 @@ void GSocket::Detected_Read()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Do not throw a lost event in cases where the socket isn't really lost */
|
/* Do not throw a lost event in cases where the socket isn't really lost */
|
||||||
if ((errno == EWOULDBLOCK) || (errno == EAGAIN) || (errno == EINTR))
|
if ((errno == EWOULDBLOCK) || (errno == EAGAIN) || (errno == EINTR))
|
||||||
{
|
{
|
||||||
CALL_CALLBACK(this, GSOCK_INPUT);
|
CALL_CALLBACK(this, GSOCK_INPUT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CALL_CALLBACK(this, GSOCK_LOST);
|
CALL_CALLBACK(this, GSOCK_LOST);
|
||||||
Shutdown();
|
Shutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1916,4 +1927,3 @@ GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf)
|
|||||||
}
|
}
|
||||||
#endif /* !defined(__VISAGECPP__) */
|
#endif /* !defined(__VISAGECPP__) */
|
||||||
#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
|
#endif /* wxUSE_SOCKETS || defined(__GSOCKET_STANDALONE__) */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user