This file is indexed.

/usr/i686-w64-mingw32/include/odbcss.h is in mingw-w64-i686-dev 2.0.3-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
/**
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is part of the w64 mingw-runtime package.
 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 */
#ifndef __ODBCSS
#define __ODBCSS

#include <_mingw_unicode.h>

#ifdef __cplusplus
extern "C" {
#endif

#define SQL_MAX_SQLSERVERNAME 128

#define SQL_COPT_SS_BASE 1200
#define SQL_COPT_SS_REMOTE_PWD (SQL_COPT_SS_BASE+1)
#define SQL_COPT_SS_USE_PROC_FOR_PREP (SQL_COPT_SS_BASE+2)
#define SQL_COPT_SS_INTEGRATED_SECURITY (SQL_COPT_SS_BASE+3)
#define SQL_COPT_SS_PRESERVE_CURSORS (SQL_COPT_SS_BASE+4)
#define SQL_COPT_SS_USER_DATA (SQL_COPT_SS_BASE+5)
#define SQL_COPT_SS_ENLIST_IN_DTC SQL_ATTR_ENLIST_IN_DTC
#define SQL_COPT_SS_ENLIST_IN_XA SQL_ATTR_ENLIST_IN_XA

#define SQL_COPT_SS_FALLBACK_CONNECT (SQL_COPT_SS_BASE+10)
#define SQL_COPT_SS_PERF_DATA (SQL_COPT_SS_BASE+11)
#define SQL_COPT_SS_PERF_DATA_LOG (SQL_COPT_SS_BASE+12)
#define SQL_COPT_SS_PERF_QUERY_INTERVAL (SQL_COPT_SS_BASE+13)
#define SQL_COPT_SS_PERF_QUERY_LOG (SQL_COPT_SS_BASE+14)
#define SQL_COPT_SS_PERF_QUERY (SQL_COPT_SS_BASE+15)
#define SQL_COPT_SS_PERF_DATA_LOG_NOW (SQL_COPT_SS_BASE+16)
#define SQL_COPT_SS_QUOTED_IDENT (SQL_COPT_SS_BASE+17)
#define SQL_COPT_SS_ANSI_NPW (SQL_COPT_SS_BASE+18)
#define SQL_COPT_SS_BCP (SQL_COPT_SS_BASE+19)
#define SQL_COPT_SS_TRANSLATE (SQL_COPT_SS_BASE+20)
#define SQL_COPT_SS_ATTACHDBFILENAME (SQL_COPT_SS_BASE+21)
#define SQL_COPT_SS_CONCAT_NULL (SQL_COPT_SS_BASE+22)
#define SQL_COPT_SS_ENCRYPT (SQL_COPT_SS_BASE+23)

#define SQL_COPT_SS_MAX_USED SQL_COPT_SS_ENCRYPT

#define SQL_SOPT_SS_BASE 1225
#define SQL_SOPT_SS_TEXTPTR_LOGGING (SQL_SOPT_SS_BASE+0)
#define SQL_SOPT_SS_CURRENT_COMMAND (SQL_SOPT_SS_BASE+1)
#define SQL_SOPT_SS_HIDDEN_COLUMNS (SQL_SOPT_SS_BASE+2)
#define SQL_SOPT_SS_NOBROWSETABLE (SQL_SOPT_SS_BASE+3)
#define SQL_SOPT_SS_REGIONALIZE (SQL_SOPT_SS_BASE+4)
#define SQL_SOPT_SS_CURSOR_OPTIONS (SQL_SOPT_SS_BASE+5)
#define SQL_SOPT_SS_NOCOUNT_STATUS (SQL_SOPT_SS_BASE+6)
#define SQL_SOPT_SS_DEFER_PREPARE (SQL_SOPT_SS_BASE+7)

#define SQL_SOPT_SS_MAX_USED SQL_SOPT_SS_DEFER_PREPARE

#define SQL_COPT_SS_BASE_EX 1240
#define SQL_COPT_SS_BROWSE_CONNECT (SQL_COPT_SS_BASE_EX+1)
#define SQL_COPT_SS_BROWSE_SERVER (SQL_COPT_SS_BASE_EX+2)
#define SQL_COPT_SS_WARN_ON_CP_ERROR (SQL_COPT_SS_BASE_EX+3)

#define SQL_COPT_SS_CONNECTION_DEAD (SQL_COPT_SS_BASE_EX+4)

#define SQL_COPT_SS_BROWSE_CACHE_DATA (SQL_COPT_SS_BASE_EX+5)

#define SQL_COPT_SS_RESET_CONNECTION (SQL_COPT_SS_BASE_EX+6)

#define SQL_COPT_SS_EX_MAX_USED SQL_COPT_SS_RESET_CONNECTION

#define SQL_UP_OFF 0L
#define SQL_UP_ON 1L
#define SQL_UP_ON_DROP 2L
#define SQL_UP_DEFAULT SQL_UP_ON

#define SQL_IS_OFF 0L
#define SQL_IS_ON 1L
#define SQL_IS_DEFAULT SQL_IS_OFF

#define SQL_PC_OFF 0L
#define SQL_PC_ON 1L
#define SQL_PC_DEFAULT SQL_PC_OFF

#define SQL_UD_NOTSET NULL

#define SQL_XL_OFF 0L
#define SQL_XL_ON 1L
#define SQL_XL_DEFAULT SQL_XL_ON

#define SQL_FB_OFF 0L
#define SQL_FB_ON 1L
#define SQL_FB_DEFAULT SQL_FB_OFF

#define SQL_BCP_OFF 0L
#define SQL_BCP_ON 1L
#define SQL_BCP_DEFAULT SQL_BCP_OFF

#define SQL_QI_OFF 0L
#define SQL_QI_ON 1L
#define SQL_QI_DEFAULT SQL_QI_ON

#define SQL_AD_OFF 0L
#define SQL_AD_ON 1L
#define SQL_AD_DEFAULT SQL_AD_ON

#define SQL_CN_OFF 0L
#define SQL_CN_ON 1L
#define SQL_CN_DEFAULT SQL_CN_ON

#define SQL_TL_OFF 0L
#define SQL_TL_ON 1L
#define SQL_TL_DEFAULT SQL_TL_ON

#define SQL_HC_OFF 0L
#define SQL_HC_ON 1L
#define SQL_HC_DEFAULT SQL_HC_OFF

#define SQL_NB_OFF 0L
#define SQL_NB_ON 1L
#define SQL_NB_DEFAULT SQL_NB_OFF

#define SQL_RE_OFF 0L
#define SQL_RE_ON 1L
#define SQL_RE_DEFAULT SQL_RE_OFF

#define SQL_CO_OFF 0L
#define SQL_CO_FFO 1L
#define SQL_CO_AF 2L
#define SQL_CO_FFO_AF (SQL_CO_FFO|SQL_CO_AF)
#define SQL_CO_FIREHOSE_AF 4L
#define SQL_CO_DEFAULT SQL_CO_OFF

#define SQL_NC_OFF 0L
#define SQL_NC_ON 1L

#define SQL_DP_OFF 0L
#define SQL_DP_ON 1L

#define SQL_EN_OFF 0L
#define SQL_EN_ON 1L

#define SQL_MORE_INFO_NO 0L
#define SQL_MORE_INFO_YES 1L

#define SQL_CACHE_DATA_NO 0L
#define SQL_CACHE_DATA_YES 1L

#define SQL_RESET_YES 1L

#define SQL_WARN_NO 0L
#define SQL_WARN_YES 1L

#define SQL_CURSOR_FAST_FORWARD_ONLY 8

#define SQL_CA_SS_BASE 1200
#define SQL_CA_SS_COLUMN_SSTYPE (SQL_CA_SS_BASE+0)
#define SQL_CA_SS_COLUMN_UTYPE (SQL_CA_SS_BASE+1)
#define SQL_CA_SS_NUM_ORDERS (SQL_CA_SS_BASE+2)
#define SQL_CA_SS_COLUMN_ORDER (SQL_CA_SS_BASE+3)
#define SQL_CA_SS_COLUMN_VARYLEN (SQL_CA_SS_BASE+4)
#define SQL_CA_SS_NUM_COMPUTES (SQL_CA_SS_BASE+5)
#define SQL_CA_SS_COMPUTE_ID (SQL_CA_SS_BASE+6)
#define SQL_CA_SS_COMPUTE_BYLIST (SQL_CA_SS_BASE+7)
#define SQL_CA_SS_COLUMN_ID (SQL_CA_SS_BASE+8)
#define SQL_CA_SS_COLUMN_OP (SQL_CA_SS_BASE+9)
#define SQL_CA_SS_COLUMN_SIZE (SQL_CA_SS_BASE+10)
#define SQL_CA_SS_COLUMN_HIDDEN (SQL_CA_SS_BASE+11)
#define SQL_CA_SS_COLUMN_KEY (SQL_CA_SS_BASE+12)

#define SQL_CA_SS_COLUMN_COLLATION (SQL_CA_SS_BASE+14)
#define SQL_CA_SS_VARIANT_TYPE (SQL_CA_SS_BASE+15)
#define SQL_CA_SS_VARIANT_SQL_TYPE (SQL_CA_SS_BASE+16)
#define SQL_CA_SS_VARIANT_SERVER_TYPE (SQL_CA_SS_BASE+17)
#define SQL_CA_SS_MAX_USED (SQL_CA_SS_BASE+18)

#define SQLTEXT 0x23
#define SQLVARBINARY 0x25
#define SQLINTN 0x26
#define SQLVARCHAR 0x27
#define SQLBINARY 0x2d
#define SQLIMAGE 0x22
#define SQLCHARACTER 0x2f
#define SQLINT1 0x30
#define SQLBIT 0x32
#define SQLINT2 0x34
#define SQLINT4 0x38
#define SQLMONEY 0x3c
#define SQLDATETIME 0x3d
#define SQLFLT8 0x3e
#define SQLFLTN 0x6d
#define SQLMONEYN 0x6e
#define SQLDATETIMN 0x6f
#define SQLFLT4 0x3b
#define SQLMONEY4 0x7a
#define SQLDATETIM4 0x3a

#define SQLDECIMAL 0x6a
#define SQLNUMERIC 0x6c

#define SQLUNIQUEID 0x24
#define SQLBIGCHAR 0xaf
#define SQLBIGVARCHAR 0xa7
#define SQLBIGBINARY 0xad
#define SQLBIGVARBINARY 0xa5
#define SQLBITN 0x68
#define SQLNCHAR 0xef
#define SQLNVARCHAR 0xe7
#define SQLNTEXT 0x63

#define SQLINT8 0x7f
#define SQLVARIANT 0x62

#define SQLudtBINARY 3
#define SQLudtBIT 16
#define SQLudtBITN 0
#define SQLudtCHAR 1
#define SQLudtDATETIM4 22
#define SQLudtDATETIME 12
#define SQLudtDATETIMN 15
#define SQLudtDECML 24
#define SQLudtDECMLN 26
#define SQLudtFLT4 23
#define SQLudtFLT8 8
#define SQLudtFLTN 14
#define SQLudtIMAGE 20
#define SQLudtINT1 5
#define SQLudtINT2 6
#define SQLudtINT4 7
#define SQLudtINTN 13
#define SQLudtMONEY 11
#define SQLudtMONEY4 21
#define SQLudtMONEYN 17
#define SQLudtNUM 10
#define SQLudtNUMN 25
#define SQLudtSYSNAME 18
#define SQLudtTEXT 19
#define SQLudtTIMESTAMP 80
#define SQLudtUNIQUEIDENTIFIER 0
#define SQLudtVARBINARY 4
#define SQLudtVARCHAR 2
#define MIN_USER_DATATYPE 256

#define SQLAOPSTDEV 0x30
#define SQLAOPSTDEVP 0x31
#define SQLAOPVAR 0x32
#define SQLAOPVARP 0x33
#define SQLAOPCNT 0x4b
#define SQLAOPSUM 0x4d
#define SQLAOPAVG 0x4f
#define SQLAOPMIN 0x51
#define SQLAOPMAX 0x52
#define SQLAOPANY 0x53
#define SQLAOPNOOP 0x56

#define SQL_INFO_SS_FIRST 1199
#define SQL_INFO_SS_NETLIB_NAMEW (SQL_INFO_SS_FIRST+0)
#define SQL_INFO_SS_NETLIB_NAMEA (SQL_INFO_SS_FIRST+1)
#define SQL_INFO_SS_MAX_USED SQL_INFO_SS_NETLIB_NAMEA

#define SQL_INFO_SS_NETLIB_NAME __MINGW_NAME_AW(SQL_INFO_SS_NETLIB_NAME)

#define SQL_SS_VARIANT -150

#define SQL_DIAG_SS_BASE (-1150)
#define SQL_DIAG_SS_MSGSTATE (SQL_DIAG_SS_BASE)
#define SQL_DIAG_SS_SEVERITY (SQL_DIAG_SS_BASE-1)
#define SQL_DIAG_SS_SRVNAME (SQL_DIAG_SS_BASE-2)
#define SQL_DIAG_SS_PROCNAME (SQL_DIAG_SS_BASE-3)
#define SQL_DIAG_SS_LINE (SQL_DIAG_SS_BASE-4)

#define SQL_DIAG_DFC_SS_BASE (-200)
#define SQL_DIAG_DFC_SS_ALTER_DATABASE (SQL_DIAG_DFC_SS_BASE-0)
#define SQL_DIAG_DFC_SS_CHECKPOINT (SQL_DIAG_DFC_SS_BASE-1)
#define SQL_DIAG_DFC_SS_CONDITION (SQL_DIAG_DFC_SS_BASE-2)
#define SQL_DIAG_DFC_SS_CREATE_DATABASE (SQL_DIAG_DFC_SS_BASE-3)
#define SQL_DIAG_DFC_SS_CREATE_DEFAULT (SQL_DIAG_DFC_SS_BASE-4)
#define SQL_DIAG_DFC_SS_CREATE_PROCEDURE (SQL_DIAG_DFC_SS_BASE-5)
#define SQL_DIAG_DFC_SS_CREATE_RULE (SQL_DIAG_DFC_SS_BASE-6)
#define SQL_DIAG_DFC_SS_CREATE_TRIGGER (SQL_DIAG_DFC_SS_BASE-7)
#define SQL_DIAG_DFC_SS_CURSOR_DECLARE (SQL_DIAG_DFC_SS_BASE-8)
#define SQL_DIAG_DFC_SS_CURSOR_OPEN (SQL_DIAG_DFC_SS_BASE-9)
#define SQL_DIAG_DFC_SS_CURSOR_FETCH (SQL_DIAG_DFC_SS_BASE-10)
#define SQL_DIAG_DFC_SS_CURSOR_CLOSE (SQL_DIAG_DFC_SS_BASE-11)
#define SQL_DIAG_DFC_SS_DEALLOCATE_CURSOR (SQL_DIAG_DFC_SS_BASE-12)
#define SQL_DIAG_DFC_SS_DBCC (SQL_DIAG_DFC_SS_BASE-13)
#define SQL_DIAG_DFC_SS_DISK (SQL_DIAG_DFC_SS_BASE-14)
#define SQL_DIAG_DFC_SS_DROP_DATABASE (SQL_DIAG_DFC_SS_BASE-15)
#define SQL_DIAG_DFC_SS_DROP_DEFAULT (SQL_DIAG_DFC_SS_BASE-16)
#define SQL_DIAG_DFC_SS_DROP_PROCEDURE (SQL_DIAG_DFC_SS_BASE-17)
#define SQL_DIAG_DFC_SS_DROP_RULE (SQL_DIAG_DFC_SS_BASE-18)
#define SQL_DIAG_DFC_SS_DROP_TRIGGER (SQL_DIAG_DFC_SS_BASE-19)
#define SQL_DIAG_DFC_SS_DUMP_DATABASE (SQL_DIAG_DFC_SS_BASE-20)
#define SQL_DIAG_DFC_SS_DUMP_TABLE (SQL_DIAG_DFC_SS_BASE-21)
#define SQL_DIAG_DFC_SS_DUMP_TRANSACTION (SQL_DIAG_DFC_SS_BASE-22)
#define SQL_DIAG_DFC_SS_GOTO (SQL_DIAG_DFC_SS_BASE-23)
#define SQL_DIAG_DFC_SS_INSERT_BULK (SQL_DIAG_DFC_SS_BASE-24)
#define SQL_DIAG_DFC_SS_KILL (SQL_DIAG_DFC_SS_BASE-25)
#define SQL_DIAG_DFC_SS_LOAD_DATABASE (SQL_DIAG_DFC_SS_BASE-26)
#define SQL_DIAG_DFC_SS_LOAD_HEADERONLY (SQL_DIAG_DFC_SS_BASE-27)
#define SQL_DIAG_DFC_SS_LOAD_TABLE (SQL_DIAG_DFC_SS_BASE-28)
#define SQL_DIAG_DFC_SS_LOAD_TRANSACTION (SQL_DIAG_DFC_SS_BASE-29)
#define SQL_DIAG_DFC_SS_PRINT (SQL_DIAG_DFC_SS_BASE-30)
#define SQL_DIAG_DFC_SS_RAISERROR (SQL_DIAG_DFC_SS_BASE-31)
#define SQL_DIAG_DFC_SS_READTEXT (SQL_DIAG_DFC_SS_BASE-32)
#define SQL_DIAG_DFC_SS_RECONFIGURE (SQL_DIAG_DFC_SS_BASE-33)
#define SQL_DIAG_DFC_SS_RETURN (SQL_DIAG_DFC_SS_BASE-34)
#define SQL_DIAG_DFC_SS_SELECT_INTO (SQL_DIAG_DFC_SS_BASE-35)
#define SQL_DIAG_DFC_SS_SET (SQL_DIAG_DFC_SS_BASE-36)
#define SQL_DIAG_DFC_SS_SET_IDENTITY_INSERT (SQL_DIAG_DFC_SS_BASE-37)
#define SQL_DIAG_DFC_SS_SET_ROW_COUNT (SQL_DIAG_DFC_SS_BASE-38)
#define SQL_DIAG_DFC_SS_SET_STATISTICS (SQL_DIAG_DFC_SS_BASE-39)
#define SQL_DIAG_DFC_SS_SET_TEXTSIZE (SQL_DIAG_DFC_SS_BASE-40)
#define SQL_DIAG_DFC_SS_SETUSER (SQL_DIAG_DFC_SS_BASE-41)
#define SQL_DIAG_DFC_SS_SHUTDOWN (SQL_DIAG_DFC_SS_BASE-42)
#define SQL_DIAG_DFC_SS_TRANS_BEGIN (SQL_DIAG_DFC_SS_BASE-43)
#define SQL_DIAG_DFC_SS_TRANS_COMMIT (SQL_DIAG_DFC_SS_BASE-44)
#define SQL_DIAG_DFC_SS_TRANS_PREPARE (SQL_DIAG_DFC_SS_BASE-45)
#define SQL_DIAG_DFC_SS_TRANS_ROLLBACK (SQL_DIAG_DFC_SS_BASE-46)
#define SQL_DIAG_DFC_SS_TRANS_SAVE (SQL_DIAG_DFC_SS_BASE-47)
#define SQL_DIAG_DFC_SS_TRUNCATE_TABLE (SQL_DIAG_DFC_SS_BASE-48)
#define SQL_DIAG_DFC_SS_UPDATE_STATISTICS (SQL_DIAG_DFC_SS_BASE-49)
#define SQL_DIAG_DFC_SS_UPDATETEXT (SQL_DIAG_DFC_SS_BASE-50)
#define SQL_DIAG_DFC_SS_USE (SQL_DIAG_DFC_SS_BASE-51)
#define SQL_DIAG_DFC_SS_WAITFOR (SQL_DIAG_DFC_SS_BASE-52)
#define SQL_DIAG_DFC_SS_WRITETEXT (SQL_DIAG_DFC_SS_BASE-53)
#define SQL_DIAG_DFC_SS_DENY (SQL_DIAG_DFC_SS_BASE-54)
#define SQL_DIAG_DFC_SS_SET_XCTLVL (SQL_DIAG_DFC_SS_BASE-55)

#define EX_ANY 0
#define EX_INFO 10
#define EX_MAXISEVERITY EX_INFO
#define EX_MISSING 11
#define EX_TYPE 12
#define EX_DEADLOCK 13
#define EX_PERMIT 14
#define EX_SYNTAX 15
#define EX_USER 16
#define EX_RESOURCE 17
#define EX_INTOK 18
#define MAXUSEVERITY EX_INTOK
#define EX_LIMIT 19
#define EX_CMDFATAL 20
#define MINFATALERR EX_CMDFATAL
#define EX_DBFATAL 21
#define EX_TABCORRUPT 22
#define EX_DBCORRUPT 23
#define EX_HARDWARE 24
#define EX_CONTROL 25

#ifndef MAXNUMERICLEN

#define DBMAXCHAR (8000+1)
#define MAXNAME (SQL_MAX_SQLSERVERNAME+1)

#if defined(UNICODE)
  typedef wchar_t DBCHAR;
#else
  typedef char DBCHAR;
#endif
  typedef unsigned char DBBINARY;
  typedef unsigned char DBTINYINT;
  typedef short DBSMALLINT;
  typedef unsigned short DBUSMALLINT;
  typedef double DBFLT8;
  typedef unsigned char DBBIT;
  typedef unsigned char DBBOOL;
  typedef float DBFLT4;
  typedef DBFLT4 DBREAL;
  typedef UINT DBUBOOL;

  typedef struct dbvarychar {
    DBSMALLINT len;
    DBCHAR str[DBMAXCHAR];
  } DBVARYCHAR;

  typedef struct dbvarybin {
    DBSMALLINT len;
    BYTE array[DBMAXCHAR];
  } DBVARYBIN;

  typedef struct dbmoney {
    LONG mnyhigh;
    ULONG mnylow;
  } DBMONEY;

  typedef struct dbdatetime {
    LONG dtdays;
    ULONG dttime;
  } DBDATETIME;

  typedef struct dbdatetime4 {
    USHORT numdays;
    USHORT nummins;
  } DBDATETIM4;

  typedef LONG DBMONEY4;

#define DBNUM_PREC_TYPE BYTE
#define DBNUM_SCALE_TYPE BYTE
#define DBNUM_VAL_TYPE BYTE

#if (ODBCVER < 0x0300)
#define MAXNUMERICLEN 16

  typedef struct dbnumeric {
    DBNUM_PREC_TYPE precision;
    DBNUM_SCALE_TYPE scale;
    BYTE sign;
    DBNUM_VAL_TYPE val[MAXNUMERICLEN];
  } DBNUMERIC;
  typedef DBNUMERIC DBDECIMAL;
#else
#define MAXNUMERICLEN SQL_MAX_NUMERIC_LEN
  typedef SQL_NUMERIC_STRUCT DBNUMERIC;
  typedef SQL_NUMERIC_STRUCT DBDECIMAL;
#endif
#endif

#ifndef INT
  typedef int INT;
  typedef long DBINT;
#ifndef _LPCBYTE_DEFINED
#define _LPCBYTE_DEFINED
  typedef const LPBYTE LPCBYTE;
#endif
  typedef DBINT *LPDBINT;
#endif

  typedef struct sqlperf {
    DWORD TimerResolution;
    DWORD SQLidu;
    DWORD SQLiduRows;
    DWORD SQLSelects;
    DWORD SQLSelectRows;
    DWORD Transactions;
    DWORD SQLPrepares;
    DWORD ExecDirects;
    DWORD SQLExecutes;
    DWORD CursorOpens;
    DWORD CursorSize;
    DWORD CursorUsed;
    LDOUBLE PercentCursorUsed;
    LDOUBLE AvgFetchTime;
    LDOUBLE AvgCursorSize;
    LDOUBLE AvgCursorUsed;
    DWORD SQLFetchTime;
    DWORD SQLFetchCount;
    DWORD CurrentStmtCount;
    DWORD MaxOpenStmt;
    DWORD SumOpenStmt;
    DWORD CurrentConnectionCount;
    DWORD MaxConnectionsOpened;
    DWORD SumConnectionsOpened;
    DWORD SumConnectiontime;
    LDOUBLE AvgTimeOpened;
    DWORD ServerRndTrips;
    DWORD BuffersSent;
    DWORD BuffersRec;
    DWORD BytesSent;
    DWORD BytesRec;
    DWORD msExecutionTime;
    DWORD msNetWorkServerTime;
  } SQLPERF;

#define SQL_PERF_START 1
#define SQL_PERF_STOP 2

#define SQL_SS_DL_DEFAULT TEXT("STATS.LOG")
#define SQL_SS_QL_DEFAULT TEXT("QUERY.LOG")
#define SQL_SS_QI_DEFAULT 30000

#define SUCCEED 1
#define FAIL 0
#define SUCCEED_ABORT 2
#define SUCCEED_ASYNC 3

#define DB_IN 1
#define DB_OUT 2

#define BCPMAXERRS 1
#define BCPFIRST 2
#define BCPLAST 3
#define BCPBATCH 4
#define BCPKEEPNULLS 5
#define BCPABORT 6
#define BCPODBC 7
#define BCPKEEPIDENTITY 8
#define BCP6xFILEFMT 9
#define BCPHINTSA 10
#define BCPHINTSW 11
#define BCPFILECP 12
#define BCPUNICODEFILE 13
#define BCPTEXTFILE 14
#define BCPFILEFMT 15

#define BCPFILECP_ACP 0
#define BCPFILECP_OEMCP 1
#define BCPFILECP_RAW (-1)

#define SQL_VARLEN_DATA (-10)

  DBINT SQL_API bcp_batch(HDBC);
  RETCODE SQL_API bcp_bind(HDBC,LPCBYTE,INT,DBINT,LPCBYTE,INT,INT,INT);
  RETCODE SQL_API bcp_colfmt(HDBC,INT,BYTE,INT,DBINT,LPCBYTE,INT,INT);
  RETCODE SQL_API bcp_collen(HDBC,DBINT,INT);
  RETCODE SQL_API bcp_colptr(HDBC,LPCBYTE,INT);
  RETCODE SQL_API bcp_columns(HDBC,INT);
  RETCODE SQL_API bcp_control(HDBC,INT,void *);
  DBINT SQL_API bcp_done(HDBC);
  RETCODE SQL_API bcp_exec(HDBC,LPDBINT);
  RETCODE SQL_API bcp_getcolfmt(HDBC,INT,INT,void *,INT,INT *);
  RETCODE SQL_API bcp_initA(HDBC,LPCSTR,LPCSTR,LPCSTR,INT);
  RETCODE SQL_API bcp_initW(HDBC,LPCWSTR,LPCWSTR,LPCWSTR,INT);
  RETCODE SQL_API bcp_moretext(HDBC,DBINT,LPCBYTE);
  RETCODE SQL_API bcp_readfmtA(HDBC,LPCSTR);
  RETCODE SQL_API bcp_readfmtW(HDBC,LPCWSTR);
  RETCODE SQL_API bcp_sendrow(HDBC);
  RETCODE SQL_API bcp_setcolfmt(HDBC,INT,INT,void *,INT);
  RETCODE SQL_API bcp_writefmtA(HDBC,LPCSTR);
  RETCODE SQL_API bcp_writefmtW(HDBC,LPCWSTR);
  CHAR *SQL_API dbprtypeA(INT);
  WCHAR *SQL_API dbprtypeW(INT);

#define bcp_init __MINGW_NAME_AW(bcp_init)
#define bcp_readfmt __MINGW_NAME_AW(bcp_readfmt)
#define bcp_writefmt __MINGW_NAME_AW(bcp_writefmt)
#define dbprtype __MINGW_NAME_AW(dbprtype)
#define BCPHINTS __MINGW_NAME_AW(BCPHINTS)

  SQLRETURN SQL_API SQLLinkedServers(SQLHSTMT);
  SQLRETURN SQL_API SQLLinkedCatalogsA(SQLHSTMT,LPCSTR,SWORD);
  SQLRETURN SQL_API SQLLinkedCatalogsW(SQLHSTMT,LPCWSTR,SWORD);
  HANDLE SQL_API SQLInitEnumServers(WCHAR *pwchServerName,WCHAR *pwchInstanceName);
  RETCODE SQL_API SQLGetNextEnumeration(HANDLE hEnumHandle,BYTE *prgEnumData,INT *piEnumLength);
  RETCODE SQL_API SQLCloseEnumServers(HANDLE hEnumHandle);

#define SQLLinkedCatalogs __MINGW_NAME_AW(SQLLinkedCatalogs)

#define BCP_FMT_TYPE 0x01
#define BCP_FMT_INDICATOR_LEN 0x02
#define BCP_FMT_DATA_LEN 0x03
#define BCP_FMT_TERMINATOR 0x04
#define BCP_FMT_SERVER_COL 0x05
#define BCP_FMT_COLLATION 0x06
#define BCP_FMT_COLLATION_ID 0x07

#define SQL_FAST_CONNECT (SQL_COPT_SS_BASE+0)

#define SQL_FC_OFF 0L
#define SQL_FC_ON 1L
#define SQL_FC_DEFAULT SQL_FC_OFF
#define SQL_COPT_SS_ANSI_OEM (SQL_COPT_SS_BASE+6)
#define SQL_AO_OFF 0L
#define SQL_AO_ON 1L
#define SQL_AO_DEFAULT SQL_AO_OFF

#define SQL_REMOTE_PWD SQL_COPT_SS_REMOTE_PWD
#define SQL_USE_PROCEDURE_FOR_PREPARE SQL_COPT_SS_USE_PROC_FOR_PREP
#define SQL_INTEGRATED_SECURITY SQL_COPT_SS_INTEGRATED_SECURITY
#define SQL_PRESERVE_CURSORS SQL_COPT_SS_PRESERVE_CURSORS
#define SQL_TEXTPTR_LOGGING SQL_SOPT_SS_TEXTPTR_LOGGING
#define SQL_CA_SS_BASE_COLUMN_NAME SQL_DESC_BASE_COLUMN_NAME
#define SQLDECIMALN 0x6a
#define SQLNUMERICN 0x6c

#ifdef __cplusplus
}
#endif
#endif