#if !defined( IN_TCPIP_H )
#define IN_TCPIP_H
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <netdb.h>
#include <errno.h>
#if defined( TCPIP_IBM )
# ifdef __WATCOMC__
# if ENAMETOOLONG != 35
# error "ENAMETOOLONG: value unknown"
# endif
# if ENOTEMPTY != 39
# error "ENOTEMPTY: value unknown"
# endif
# undef ENAMETOOLONG
# undef ENOTEMPTY
# include <nerrno.h>
# undef ENAMETOOLONG
# undef ENOTEMPTY
# define ENAMETOOLONG 35
# define ENOTEMPTY 39
# endif
# include <types.h>
# if !defined( TCPIP_IBM_NOHIDE )
# define send IbmSockSend
# define recv IbmSockRecv
# endif
#endif
#if defined( TCPIP_IBM )
# define BSD_SELECT
# include <sys/select.h>
# include <sys/time.h>
# include <nerrno.h>
# include <utils.h>
# if defined( MICROSOFT )
# define SOCK_ERRNO (tcperrno())
# else
# define SOCK_ERRNO (sock_errno())
# endif
# define HOST_ERRNO (h_errno)
# define SockClose(S) soclose(S)
# define SockInit() (!sock_init())
# define SockSend IbmSockSend
# define SockRecv IbmSockRecv
const char *HostStrError(int HostErrno);
const char *SockStrError(int SockErrno);
int IbmSockSend (int Socket, const void *Buffer, int Len, int Flags);
int IbmSockRecv (int Socket, const void *Buffer, int Len, int Flags);
#if !defined( h_errno )
extern int h_errno;
#endif
#elif defined( __unix )
# if defined( sgi )
# include <bstring.h>
# endif
# if defined( sunos )
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
# else
# include <sys/select.h>
# endif
# include <sys/time.h>
# include <errno.h>
# include <arpa/inet.h>
# define SOCK_ERRNO errno
# define HOST_ERRNO h_errno
# define SockClose(S) close(S)
# define SockInit() TRUE
# define SockSend send
# define SockRecv recv
# define SockStrError(E) strerror(E)
const char *HostStrError( int HostErrno );
#else
# error Undefined version of TCP/IP specified
#endif
#endif