move more socket functions common to Winsock and BSD implementations to common code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-11-23 13:30:42 +00:00
parent 3a6ec3c880
commit 025644120d
8 changed files with 160 additions and 261 deletions

View File

@@ -0,0 +1,41 @@
///////////////////////////////////////////////////////////////////////////////
// Name: wx/private/socket.h
// Purpose: various wxSocket-related private declarations
// Author: Vadim Zeitlin
// Created: 2008-11-23
// RCS-ID: $Id$
// Copyright: (c) 2008 Vadim Zeitlin <vadim@wxwidgets.org>
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_PRIVATE_SOCKET_H_
#define _WX_PRIVATE_SOCKET_H_
// these definitions are for MSW when we don't use configure, otherwise these
// symbols are defined by configure
#ifndef WX_SOCKLEN_T
#define WX_SOCKLEN_T int
#endif
#ifndef SOCKOPTLEN_T
#define SOCKOPTLEN_T int
#endif
// define some symbols which winsock.h defines but traditional BSD headers
// don't
#ifndef INVALID_SOCKET
#define INVALID_SOCKET (-1)
#endif
#ifndef SOCKET_ERROR
#define SOCKET_ERROR (-1)
#endif
#if wxUSE_IPV6
typedef struct sockaddr_storage wxSockAddr;
#else
typedef struct sockaddr wxSockAddr;
#endif
#endif // _WX_PRIVATE_SOCKET_H_