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 #undef TDS_RCSID
00024 #if defined(__GNUC__) && __GNUC__ >= 3
00025 #define TDS_RCSID(name, id) \
00026 static const char rcsid_##name[] __attribute__ ((unused)) = id
00027 #else
00028 #define TDS_RCSID(name, id) \
00029 static const char rcsid_##name[] = id; \
00030 static const void *const no_unused_##name##_warn[] = { rcsid_##name, no_unused_##name##_warn }
00031 #endif
00032
00033 TDS_RCSID(tds_sysdep_private_h, "$Id: tds_sysdep_private.h,v 1.18 2005/08/09 10:57:55 freddy77 Exp $");
00034
00035 #define TDS_ADDITIONAL_SPACE 0
00036
00037 #ifdef __cplusplus
00038 extern "C"
00039 {
00040 #if 0
00041 }
00042 #endif
00043 #endif
00044
00045 #ifdef __INCvxWorksh
00046 #include <ioLib.h>
00047 #endif
00048
00049 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
00050 #include <windows.h>
00051 #define READSOCKET(a,b,c) recv((a), (b), (c), 0L)
00052 #define WRITESOCKET(a,b,c) send((a), (b), (c), 0L)
00053 #define CLOSESOCKET(a) closesocket((a))
00054 #define IOCTLSOCKET(a,b,c) ioctlsocket((a), (b), (c))
00055 #define NETDB_REENTRANT 1
00056
00057 #define TDSSOCK_EINTR WSAEINTR
00058 #define TDSSOCK_EINPROGRESS WSAEWOULDBLOCK
00059 #define sock_errno WSAGetLastError()
00060 #ifndef __MINGW32__
00061 typedef DWORD pid_t;
00062 #endif
00063 #define strcasecmp stricmp
00064 #define strncasecmp strnicmp
00065 #define atoll _atoi64
00066 #define vsnprintf _vsnprintf
00067
00068 #ifndef WIN32
00069 #define WIN32 1
00070 #endif
00071
00072 #define TDS_SDIR_SEPARATOR "\\"
00073
00074 #endif
00075
00076 #ifndef sock_errno
00077 #define sock_errno errno
00078 #endif
00079
00080 #ifndef TDSSOCK_EINTR
00081 #define TDSSOCK_EINTR EINTR
00082 #endif
00083
00084 #ifndef TDSSOCK_EINPROGRESS
00085 #define TDSSOCK_EINPROGRESS EINPROGRESS
00086 #endif
00087
00088 #ifndef READSOCKET
00089 #define READSOCKET(a,b,c) read((a), (b), (c))
00090 #endif
00091
00092 #ifndef WRITESOCKET
00093 #define WRITESOCKET(a,b,c) write((a), (b), (c))
00094 #endif
00095
00096 #ifndef CLOSESOCKET
00097 #define CLOSESOCKET(a) close((a))
00098 #endif
00099
00100 #ifndef IOCTLSOCKET
00101 #define IOCTLSOCKET(a,b,c) ioctl((a), (b), (c))
00102 #endif
00103
00104 #ifndef TDS_SDIR_SEPARATOR
00105 #define TDS_SDIR_SEPARATOR "/"
00106 #endif
00107
00108 #ifdef __cplusplus
00109 #if 0
00110 {
00111 #endif
00112 }
00113 #endif
00114
00115 #endif