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.19 2005/10/07 10:23:45 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(DOS32X)
00050 #define READSOCKET(a,b,c) recv((a), (b), (c), 0L)
00051 #define WRITESOCKET(a,b,c) send((a), (b), (c), 0L)
00052 #define CLOSESOCKET(a) closesocket((a))
00053 #define IOCTLSOCKET(a,b,c) ioctlsocket((a), (b), (char*)(c))
00054 #define select select_s
00055 typedef int pid_t;
00056 #define strcasecmp stricmp
00057 #define strncasecmp strnicmp
00058 #define vsnprintf _vsnprintf
00059
00060 #define getpid() _gethostid()
00061 #endif
00062
00063 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
00064 #include <windows.h>
00065 #define READSOCKET(a,b,c) recv((a), (b), (c), 0L)
00066 #define WRITESOCKET(a,b,c) send((a), (b), (c), 0L)
00067 #define CLOSESOCKET(a) closesocket((a))
00068 #define IOCTLSOCKET(a,b,c) ioctlsocket((a), (b), (c))
00069 #define NETDB_REENTRANT 1
00070
00071 #define TDSSOCK_EINTR WSAEINTR
00072 #define TDSSOCK_EINPROGRESS WSAEWOULDBLOCK
00073 #define sock_errno WSAGetLastError()
00074 #ifndef __MINGW32__
00075 typedef DWORD pid_t;
00076 #endif
00077 #define strcasecmp stricmp
00078 #define strncasecmp strnicmp
00079 #define atoll _atoi64
00080 #define vsnprintf _vsnprintf
00081
00082 #ifndef WIN32
00083 #define WIN32 1
00084 #endif
00085
00086 #define TDS_SDIR_SEPARATOR "\\"
00087
00088 #endif
00089
00090 #ifndef sock_errno
00091 #define sock_errno errno
00092 #endif
00093
00094 #ifndef TDSSOCK_EINTR
00095 #define TDSSOCK_EINTR EINTR
00096 #endif
00097
00098 #ifndef TDSSOCK_EINPROGRESS
00099 #define TDSSOCK_EINPROGRESS EINPROGRESS
00100 #endif
00101
00102 #ifndef READSOCKET
00103 #define READSOCKET(a,b,c) read((a), (b), (c))
00104 #endif
00105
00106 #ifndef WRITESOCKET
00107 #define WRITESOCKET(a,b,c) write((a), (b), (c))
00108 #endif
00109
00110 #ifndef CLOSESOCKET
00111 #define CLOSESOCKET(a) close((a))
00112 #endif
00113
00114 #ifndef IOCTLSOCKET
00115 #define IOCTLSOCKET(a,b,c) ioctl((a), (b), (c))
00116 #endif
00117
00118 #ifndef TDS_SDIR_SEPARATOR
00119 #define TDS_SDIR_SEPARATOR "/"
00120 #endif
00121
00122 #ifdef __cplusplus
00123 #if 0
00124 {
00125 #endif
00126 }
00127 #endif
00128
00129 #endif