00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _tds_sysdep_public_h_
00021 #define _tds_sysdep_public_h_
00022
00023
00024
00025 #ifdef __cplusplus
00026 extern "C"
00027 {
00028 #endif
00029
00030
00031
00032
00033 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
00034 #include <windows.h>
00035 #define tds_sysdep_int16_type short
00036 #define tds_sysdep_int32_type int
00037 #define tds_sysdep_int64_type __int64
00038 #define tds_sysdep_real32_type float
00039 #define tds_sysdep_real64_type double
00040 #if !defined(WIN64) && !defined(_WIN64)
00041 #define tds_sysdep_intptr_type int
00042 #else
00043 #define tds_sysdep_intptr_type __int64
00044 #endif
00045 #endif
00046
00047 #ifndef tds_sysdep_int16_type
00048 #define tds_sysdep_int16_type short
00049 #endif
00050
00051 #ifndef tds_sysdep_int32_type
00052 #define tds_sysdep_int32_type int
00053 #endif
00054
00055 #ifndef tds_sysdep_int64_type
00056 #define tds_sysdep_int64_type long
00057 #endif
00058
00059 #ifndef tds_sysdep_real32_type
00060 #define tds_sysdep_real32_type float
00061 #endif
00062
00063 #ifndef tds_sysdep_real64_type
00064 #define tds_sysdep_real64_type double
00065 #endif
00066
00067 #ifndef tds_sysdep_intptr_type
00068 #define tds_sysdep_intptr_type long
00069 #endif
00070
00071 #if !defined(__WIN32__) && !defined(_WIN32) && !defined(WIN32)
00072 typedef int TDS_SYS_SOCKET;
00073 #define INVALID_SOCKET -1
00074 #define TDS_IS_SOCKET_INVALID(s) ((s) < 0)
00075 #else
00076 typedef SOCKET TDS_SYS_SOCKET;
00077 #define TDS_IS_SOCKET_INVALID(s) ((s) == INVALID_SOCKET)
00078 #endif
00079
00080 #if !defined(MSDBLIB) && !defined(SYBDBLIB)
00081 #define SYBDBLIB 1
00082 #endif
00083 #if defined(MSDBLIB) && defined(SYBDBLIB)
00084 #error MSDBLIB and SYBDBLIB cannot both be defined
00085 #endif
00086
00087 #ifdef __cplusplus
00088 }
00089 #endif
00090
00091 #endif