Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / include / sqltypes.h
blobfcc713550c94a6545a3abf8df837f472b587e7f6
1 #ifndef _SQLTYPES_H
2 #define _SQLTYPES_H
3 #if __GNUC__ >=3
4 #pragma GCC system_header
5 #endif
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 #define SQL_API __stdcall
11 #ifndef RC_INVOKED
12 #define __need_wchar_t
13 #include <stddef.h>
14 typedef signed char SCHAR;
15 typedef long SDWORD;
16 typedef short SWORD;
17 typedef ULONG UDWORD;
18 typedef USHORT UWORD;
19 typedef signed long SLONG;
20 typedef signed short SSHORT;
21 typedef double SDOUBLE;
22 typedef double LDOUBLE;
23 typedef float SFLOAT;
24 typedef PVOID PTR;
25 typedef PVOID HENV;
26 typedef PVOID HDBC;
27 typedef PVOID HSTMT;
28 typedef short RETCODE;
29 typedef UCHAR SQLCHAR;
30 typedef SCHAR SQLSCHAR;
31 typedef SDWORD SQLINTEGER;
32 typedef SWORD SQLSMALLINT;
33 #ifndef __WIN64
34 typedef UDWORD SQLUINTEGER;
35 #endif
36 typedef UWORD SQLUSMALLINT;
37 typedef PVOID SQLPOINTER;
38 #if (ODBCVER >= 0x0300)
39 typedef void* SQLHANDLE;
40 typedef SQLHANDLE SQLHENV;
41 typedef SQLHANDLE SQLHDBC;
42 typedef SQLHANDLE SQLHSTMT;
43 typedef SQLHANDLE SQLHDESC;
44 #else
45 typedef void* SQLHENV;
46 typedef void* SQLHDBC;
47 typedef void* SQLHSTMT;
48 #endif
49 typedef SQLSMALLINT SQLRETURN;
50 typedef HWND SQLHWND;
51 typedef ULONG BOOKMARK;
52 #ifdef _WIN64
53 typedef INT64 SQLLEN;
54 typedef INT64 SQLROWOFFSET;
55 typedef UINT64 SQLROWCOUNT;
56 typedef UINT64 SQLULEN;
57 typedef UINT64 SQLTRANSID;
58 typedef unsigned long SQLSETPOSIROW;
59 #else
60 #define SQLLEN SQLINTEGER
61 #define SQLROWOFFSET SQLINTEGER
62 #define SQLROWCOUNT SQLUINTEGER
63 #define SQLULEN SQLUINTEGER
64 #define SQLTRANSID DWORD
65 #define SQLSETPOSIROW SQLUSMALLINT
66 #endif
67 typedef wchar_t SQLWCHAR;
68 #ifdef UNICODE
69 typedef SQLWCHAR SQLTCHAR;
70 #else
71 typedef SQLCHAR SQLTCHAR;
72 #endif /* UNICODE */
73 #if (ODBCVER >= 0x0300)
74 typedef unsigned char SQLDATE;
75 typedef unsigned char SQLDECIMAL;
76 typedef double SQLDOUBLE;
77 typedef double SQLFLOAT;
78 typedef unsigned char SQLNUMERIC;
79 typedef float SQLREAL;
80 typedef unsigned char SQLTIME;
81 typedef unsigned char SQLTIMESTAMP;
82 typedef unsigned char SQLVARCHAR;
83 #define ODBCINT64 __int64
84 typedef __int64 SQLBIGINT;
85 typedef unsigned __int64 SQLUBIGINT;
86 #endif
88 typedef struct tagDATE_STRUCT {
89 SQLSMALLINT year;
90 SQLUSMALLINT month;
91 SQLUSMALLINT day;
92 } DATE_STRUCT;
93 typedef struct tagTIME_STRUCT {
94 SQLUSMALLINT hour;
95 SQLUSMALLINT minute;
96 SQLUSMALLINT second;
97 } TIME_STRUCT;
98 typedef struct tagTIMESTAMP_STRUCT {
99 SQLSMALLINT year;
100 SQLUSMALLINT month;
101 SQLUSMALLINT day;
102 SQLUSMALLINT hour;
103 SQLUSMALLINT minute;
104 SQLUSMALLINT second;
105 SQLUINTEGER fraction;
106 } TIMESTAMP_STRUCT;
107 #if (ODBCVER >= 0x0300)
108 typedef DATE_STRUCT SQL_DATE_STRUCT;
109 typedef TIME_STRUCT SQL_TIME_STRUCT;
110 typedef TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT;
111 typedef enum {
112 SQL_IS_YEAR = 1,SQL_IS_MONTH,SQL_IS_DAY,SQL_IS_HOUR,
113 SQL_IS_MINUTE,SQL_IS_SECOND,SQL_IS_YEAR_TO_MONTH,SQL_IS_DAY_TO_HOUR,
114 SQL_IS_DAY_TO_MINUTE,SQL_IS_DAY_TO_SECOND,SQL_IS_HOUR_TO_MINUTE,
115 SQL_IS_HOUR_TO_SECOND,SQL_IS_MINUTE_TO_SECOND
116 } SQLINTERVAL;
117 typedef struct tagSQL_YEAR_MONTH {
118 SQLUINTEGER year;
119 SQLUINTEGER month;
120 } SQL_YEAR_MONTH_STRUCT;
121 typedef struct tagSQL_DAY_SECOND {
122 SQLUINTEGER day;
123 SQLUINTEGER hour;
124 SQLUINTEGER minute;
125 SQLUINTEGER second;
126 SQLUINTEGER fraction;
127 } SQL_DAY_SECOND_STRUCT;
128 typedef struct tagSQL_INTERVAL_STRUCT {
129 SQLINTERVAL interval_type;
130 SQLSMALLINT interval_sign;
131 union {
132 SQL_YEAR_MONTH_STRUCT year_month;
133 SQL_DAY_SECOND_STRUCT day_second;
134 } intval;
135 } SQL_INTERVAL_STRUCT;
136 #define SQL_MAX_NUMERIC_LEN 16
137 typedef struct tagSQL_NUMERIC_STRUCT {
138 SQLCHAR precision;
139 SQLSCHAR scale;
140 SQLCHAR sign;
141 SQLCHAR val[SQL_MAX_NUMERIC_LEN];
142 } SQL_NUMERIC_STRUCT;
143 #endif /* ODBCVER >= 0x0300 */
144 #if (ODBCVER >= 0x0350)
146 #ifdef _GUID_DEFINED
147 # warning _GUID_DEFINED is deprecated, use GUID_DEFINED instead
148 #endif
150 #if defined _GUID_DEFINED || defined GUID_DEFINED
151 typedef GUID SQLGUID;
152 #else
153 typedef struct tagSQLGUID{
154 DWORD Data1;
155 WORD Data2;
156 WORD Data3;
157 BYTE Data4[ 8 ];
158 } SQLGUID;
159 #endif /* GUID_DEFINED */
160 #endif /* ODBCVER >= 0x0350 */
161 #endif /* RC_INVOKED */
162 #ifdef __cplusplus
164 #endif
165 #endif