20 #ifndef _tds_sysdep_public_h_
21 #define _tds_sysdep_public_h_
28 #if (!defined(_MSC_VER) && defined(__cplusplus) && __cplusplus >= 201103L) || \
29 (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
31 #elif (defined(__sun) && defined(__SVR4)) || defined(__hpux)
32 # include <inttypes.h>
34 typedef signed char int8_t;
35 typedef unsigned char uint8_t;
39 # if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
40 # include <winsock2.h>
41 # include <ws2tcpip.h>
43 typedef signed short int16_t;
44 typedef unsigned short uint16_t;
45 typedef signed int int32_t;
46 typedef unsigned int uint32_t;
47 typedef signed __int64 int64_t;
48 typedef unsigned __int64 uint64_t;
50 typedef signed short int16_t;
51 typedef unsigned short uint16_t;
52 typedef signed int int32_t;
53 typedef unsigned int uint32_t;
54 typedef signed long long int64_t;
55 typedef unsigned long long uint64_t;
63 # if FLT_MANT_DIG == 24 && FLT_MAX_EXP == 128
64 # define tds_sysdep_real32_type float
65 # elif DBL_MANT_DIG == 24 && DBL_MAX_EXP == 128
66 # define tds_sysdep_real32_type double
67 # elif LDBL_MANT_DIG == 24 && LDBL_MAX_EXP == 128
68 # define tds_sysdep_real32_type long double
70 # if FLT_MANT_DIG == 53 && FLT_MAX_EXP == 1024
71 # define tds_sysdep_real64_type float
72 # elif DBL_MANT_DIG == 53 && DBL_MAX_EXP == 1024
73 # define tds_sysdep_real64_type double
74 # elif LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
75 # define tds_sysdep_real64_type long double
77 # if !defined(tds_sysdep_real32_type) || !defined(tds_sysdep_real64_type)
78 # error Some float type was not found!
81 # if FLT_DIG == 6 && FLT_MAX_10_EXP == 38
82 # define tds_sysdep_real32_type float
83 # elif DBL_DIG == 6 && DBL_MAX_10_EXP == 38
84 # define tds_sysdep_real32_type double
85 # elif LDBL_DIG == 6 && LDBL_MAX_10_EXP == 38
86 # define tds_sysdep_real32_type long double
88 # if FLT_DIG == 15 && FLT_MAX_10_EXP == 308
89 # define tds_sysdep_real64_type float
90 # elif DBL_DIG == 15 && DBL_MAX_10_EXP == 308
91 # define tds_sysdep_real64_type double
92 # elif LDBL_DIG == 15 && LDBL_MAX_10_EXP == 308
93 # define tds_sysdep_real64_type long double
98 #ifndef tds_sysdep_real32_type
99 #define tds_sysdep_real32_type float
102 #ifndef tds_sysdep_real64_type
103 #define tds_sysdep_real64_type double
106 #if !defined(MSDBLIB) && !defined(SYBDBLIB)
109 #if defined(MSDBLIB) && defined(SYBDBLIB)
110 #error MSDBLIB and SYBDBLIB cannot both be defined