groupsock/include/NetCommon.h

Go to the documentation of this file.
00001 /**********
00002 This library is free software; you can redistribute it and/or modify it under
00003 the terms of the GNU Lesser General Public License as published by the
00004 Free Software Foundation; either version 2.1 of the License, or (at your
00005 option) any later version. (See <http://www.gnu.org/copyleft/lesser.html>.)
00006 
00007 This library is distributed in the hope that it will be useful, but WITHOUT
00008 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00009 FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
00010 more details.
00011 
00012 You should have received a copy of the GNU Lesser General Public License
00013 along with this library; if not, write to the Free Software Foundation, Inc.,
00014 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
00015 **********/
00016 /* "groupsock" interface
00017  * Copyright (c) 1996-2008 Live Networks, Inc.  All rights reserved.
00018  * Common include files, typically used for networking
00019  */
00020 
00021 #ifndef _NET_COMMON_H
00022 #define _NET_COMMON_H
00023 
00024 #if defined(IMN_PIM)
00025 #include "IMN_PIMNetCommon.h"
00026 
00027 #elif defined(__WIN32__) || defined(_WIN32) || defined(_WIN32_WCE)
00028 /* Windows */
00029 #if defined(WINNT) || defined(_WINNT) || defined(__BORLANDC__) || defined(__MINGW32__) || defined(_WIN32_WCE)
00030 #define _MSWSOCK_
00031 #include <winsock2.h>
00032 #include <ws2tcpip.h>
00033 #endif
00034 #include <windows.h>
00035 #include <string.h>
00036 
00037 #define closeSocket closesocket
00038 #define EWOULDBLOCK WSAEWOULDBLOCK
00039 
00040 #if defined(_WIN32_WCE)
00041 #define NO_STRSTREAM 1
00042 #endif
00043 
00044 /* Definitions of size-specific types: */
00045 typedef __int64 int64_t;
00046 typedef unsigned __int64 u_int64_t;
00047 typedef unsigned u_int32_t;
00048 typedef unsigned short u_int16_t;
00049 typedef unsigned char u_int8_t;
00050 
00051 #elif defined(VXWORKS)
00052 /* VxWorks */
00053 #include <time.h>
00054 #include <timers.h>
00055 #include <sys/times.h>
00056 #include <sockLib.h>
00057 #include <hostLib.h>
00058 #include <resolvLib.h>
00059 #include <ioLib.h>
00060 
00061 typedef unsigned int u_int32_t;
00062 typedef unsigned short u_int16_t;
00063 typedef unsigned char u_int8_t;
00064 
00065 #else
00066 /* Unix */
00067 #include <sys/types.h>
00068 #include <sys/socket.h>
00069 #include <sys/time.h>
00070 #include <netinet/in.h>
00071 #include <arpa/inet.h>
00072 #include <netdb.h>
00073 #include <unistd.h>
00074 #include <string.h>
00075 #include <stdlib.h>
00076 #include <errno.h>
00077 #include <strings.h>
00078 #include <ctype.h>
00079 #if defined(_QNX4)
00080 #include <sys/select.h>
00081 #include <unix.h>
00082 #endif
00083 
00084 #define closeSocket close
00085 
00086 #ifdef SOLARIS
00087 #define u_int64_t uint64_t
00088 #define u_int32_t uint32_t
00089 #define u_int16_t uint16_t
00090 #define u_int8_t uint8_t
00091 #endif
00092 #endif
00093 
00094 #ifndef SOCKLEN_T
00095 #define SOCKLEN_T int
00096 #endif
00097 
00098 #endif

Generated on Tue Oct 7 15:38:08 2008 for live by  doxygen 1.5.2