00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _tds_sysdep_private_h_
00021 #define _tds_sysdep_private_h_
00022
00023 static const char rcsid_tds_sysdep_private_h[] = "$Id: tds_sysdep_private.h,v 1.15 2004/10/28 12:42:12 freddy77 Exp $";
00024 static const void *const no_unused_tds_sysdep_private_h_warn[] = { rcsid_tds_sysdep_private_h, no_unused_tds_sysdep_private_h_warn };
00025
00026 #ifdef __cplusplus
00027 extern "C"
00028 {
00029 #if 0
00030 }
00031 #endif
00032 #endif
00033
00034 #ifdef __INCvxWorksh
00035 #include <ioLib.h>
00036 #endif
00037
00038 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
00039 #include <windows.h>
00040 #define READSOCKET(a,b,c) recv((a), (b), (c), 0L)
00041 #define WRITESOCKET(a,b,c) send((a), (b), (c), 0L)
00042 #define CLOSESOCKET(a) closesocket((a))
00043 #define IOCTLSOCKET(a,b,c) ioctlsocket((a), (b), (c))
00044 #define NETDB_REENTRANT 1
00045
00046 #define TDSSOCK_EINTR WSAEINTR
00047 #define TDSSOCK_EINPROGRESS WSAEWOULDBLOCK
00048 #define getpid() GetCurrentThreadId()
00049 #define sock_errno WSAGetLastError()
00050 #ifndef __MINGW32__
00051 typedef DWORD pid_t;
00052 #endif
00053 #define strcasecmp stricmp
00054 #define strncasecmp strnicmp
00055 #define atoll _atoi64
00056 #define vsnprintf _vsnprintf
00057
00058 #ifndef WIN32
00059 #define WIN32 1
00060 #endif
00061
00062 #define TDS_SDIR_SEPARATOR "\\"
00063
00064 #endif
00065
00066 #ifndef sock_errno
00067 #define sock_errno errno
00068 #endif
00069
00070 #ifndef TDSSOCK_EINTR
00071 #define TDSSOCK_EINTR EINTR
00072 #endif
00073
00074 #ifndef TDSSOCK_EINPROGRESS
00075 #define TDSSOCK_EINPROGRESS EINPROGRESS
00076 #endif
00077
00078 #ifndef READSOCKET
00079 #define READSOCKET(a,b,c) read((a), (b), (c))
00080 #endif
00081
00082 #ifndef WRITESOCKET
00083 #define WRITESOCKET(a,b,c) write((a), (b), (c))
00084 #endif
00085
00086 #ifndef CLOSESOCKET
00087 #define CLOSESOCKET(a) close((a))
00088 #endif
00089
00090 #ifndef IOCTLSOCKET
00091 #define IOCTLSOCKET(a,b,c) ioctl((a), (b), (c))
00092 #endif
00093
00094 #ifndef TDS_SDIR_SEPARATOR
00095 #define TDS_SDIR_SEPARATOR "/"
00096 #endif
00097
00098 #ifdef __cplusplus
00099 #if 0
00100 {
00101 #endif
00102 }
00103 #endif
00104
00105 #endif