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 char rcsid_tds_sysdep_private_h[] = "$Id: tds_sysdep_private.h,v 1.11 2003/12/29 16:08:03 freddy77 Exp $";
00024 static void *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 WSAEINPROGRESS
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 #endif
00063
00064 #ifndef sock_errno
00065 #define sock_errno errno
00066 #endif
00067
00068 #ifndef TDSSOCK_EINTR
00069 #define TDSSOCK_EINTR EINTR
00070 #endif
00071
00072 #ifndef TDSSOCK_EINPROGRESS
00073 #define TDSSOCK_EINPROGRESS EINPROGRESS
00074 #endif
00075
00076 #ifndef READSOCKET
00077 #define READSOCKET(a,b,c) read((a), (b), (c))
00078 #endif
00079
00080 #ifndef WRITESOCKET
00081 #define WRITESOCKET(a,b,c) write((a), (b), (c))
00082 #endif
00083
00084 #ifndef CLOSESOCKET
00085 #define CLOSESOCKET(a) close((a))
00086 #endif
00087
00088 #ifndef IOCTLSOCKET
00089 #define IOCTLSOCKET(a,b,c) ioctl((a), (b), (c))
00090 #endif
00091
00092 #ifdef __cplusplus
00093 #if 0
00094 {
00095 #endif
00096 }
00097 #endif
00098
00099 #endif