00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _VOSDEFS_HH_
00026 #define _VOSDEFS_HH_
00027
00028 #if defined(_WIN32) && defined(_MSC_VER)
00029 # include <vos/corelibs/vosconfig-vc7.h>
00030 #else
00031 # include <vos/corelibs/vosconfig.h>
00032 #endif
00033
00034 #ifdef USE_STRSTREAM
00035 #include <strstream>
00036 #else
00037 #include <sstream>
00038 #endif
00039
00040 #if defined(_WIN32) && defined(_MSC_VER)
00041 # pragma warning (disable : 4250)
00042 # pragma warning (disable : 4290) // warns about throw()
00043 # pragma warning (disable : 4995)
00044 # pragma warning (disable : 4251)
00045 # pragma warning (disable : 4003)
00046 # pragma warning (disable : 4275)
00047 #endif
00048
00049 #if defined(_WIN32) && defined(_MSC_VER)
00050 # ifdef VOS_EXPORTS
00051 # define VOS_API __declspec(dllexport)
00052 # else
00053 # define VOS_API __declspec(dllimport)
00054 # endif
00055 #else
00056 # define VOS_API
00057 #endif
00058
00059 #ifdef HAVE_SYS_SOCKET_H
00060 # include <sys/socket.h>
00061 # include <netinet/in.h>
00062 # include <netinet/tcp.h>
00063 # include <netdb.h>
00064 #else
00065 # ifdef HAVE_LIBWS2_32
00066 # include <winsock2.h>
00067 # define VOS_USE_WINSOCK2
00068 # else
00069 # warning we do not have a header file for the socket functions, things will probably fail
00070 # endif
00071 #endif
00072
00073 #include <boost/thread/thread.hpp>
00074
00075 #ifndef HAVE_SNPRINTF
00076 # include "snprintf.hh"
00077 #endif
00078
00079 #include <time.h>
00080 #include <string.h>
00081 #include <sys/types.h>
00082 #include <stdio.h>
00083
00084 #ifdef HAVE_SYS_TIME_H
00085 # include <sys/time.h>
00086 #endif
00087
00088 #ifdef HAVE_UNISTD_H
00089 # include <unistd.h>
00090 #endif
00091
00092 #ifdef SSL_SUPPORT
00093 #include <openssl/ssl.h>
00094 #include <openssl/rand.h>
00095 #include <openssl/err.h>
00096 #else
00097 #define X509 void
00098 #define SSL_CTX void
00099 #define X509_STORE_CTX void
00100 #define SSL void
00101 #endif
00102
00103
00104 #define VOS_DEFAULT_TIMEOUT 30.0
00105
00106
00107
00108
00109 namespace VOS
00110 {
00111 using namespace std;
00112 }
00113
00114 #endif