~ubuntu-branches/ubuntu/trusty/psqlodbc/trusty-proposed

« back to all changes in this revision

Viewing changes to connection.h

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Berg
  • Date: 2011-04-05 14:48:23 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20110405144823-n77supsa1hjj0ik6
Tags: 1:09.00.0200-1
* New upstream release.
* Fix installing {A,W}/usr/lib/odbc.  Closes: #618210.
* Convert to 3.0 (quilt).
* Remove psqlodbc-580878.diff: implemented upstream.
* Remove psqlodbc-585476.diff: was caused by #519006 which is now closed.
* Update description, suggested by Martin Eberhard Schauer.
  Closes: #565611.
* New maintainer.  Closes: #472818.

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
#define __CONNECTION_H__
11
11
 
12
12
#include "psqlodbc.h"
 
13
#include <time.h>
13
14
 
14
15
#include <stdlib.h>
15
16
#include <string.h>
85
86
 
86
87
/* AutoCommit functions */
87
88
#define CC_is_in_autocommit(x)          (x->transact_status & CONN_IN_AUTOCOMMIT)
 
89
#define CC_does_autocommit(x) (CONN_IN_AUTOCOMMIT == ((x)->transact_status & (CONN_IN_AUTOCOMMIT | CONN_IN_MANUAL_TRANSACTION)))
 
90
#define CC_loves_visible_trans(x) ((0 == ((x)->transact_status & CONN_IN_AUTOCOMMIT)) || (0 != ((x)->transact_status & CONN_IN_MANUAL_TRANSACTION)))
88
91
 
89
92
/* Transaction in/not functions */
90
93
#define CC_set_in_trans(x)      (x->transact_status |= CONN_IN_TRANSACTION)
206
209
#define AUTH_REQ_CRYPT          4
207
210
#define AUTH_REQ_MD5            5
208
211
#define AUTH_REQ_SCM_CREDS      6
 
212
#define AUTH_REQ_GSS            7
 
213
#define AUTH_REQ_GSS_CONT       8
 
214
#define AUTH_REQ_SSPI           9
209
215
 
210
216
/*      Startup Packet sizes */
211
217
#define SM_DATABASE             64
283
289
        char            conn_settings[LARGE_REGISTRY_LEN];
284
290
        char            protocol[SMALL_REGISTRY_LEN];
285
291
        char            port[SMALL_REGISTRY_LEN];
286
 
        char            sslmode[SMALL_REGISTRY_LEN];
 
292
        char            sslmode[16];
287
293
        char            onlyread[SMALL_REGISTRY_LEN];
288
294
        char            fake_oid_index[SMALL_REGISTRY_LEN];
289
295
        char            show_oid_column[SMALL_REGISTRY_LEN];
308
314
        signed char     cvt_null_date_string;
309
315
        signed char     autocommit_public;
310
316
        signed char     accessible_only;
 
317
        signed char     gssauth_use_gssapi;
311
318
        UInt4           extra_opts;
312
319
#ifdef  _HANDLE_ENLIST_IN_DTC_
313
320
        signed char     xa_opt;
371
378
struct col_info
372
379
{
373
380
        Int2            num_reserved_cols;
 
381
        Int2            refcnt;
374
382
        QResultClass    *result;
375
383
        pgNAME          schema_name;
376
384
        pgNAME          table_name;
377
385
        OID             table_oid;
 
386
        time_t          acc_time;
378
387
};
 
388
#define free_col_info_contents(coli) \
 
389
{ \
 
390
        if (NULL != coli->result) \
 
391
                QR_Destructor(coli->result); \
 
392
        coli->result = NULL; \
 
393
        NULL_THE_NAME(coli->schema_name); \
 
394
        NULL_THE_NAME(coli->table_name); \
 
395
        coli->table_oid = 0; \
 
396
        coli->refcnt = 0; \
 
397
        coli->acc_time = 0; \
 
398
}
379
399
#define col_info_initialize(coli) (memset(coli, 0, sizeof(COL_INFO)))
380
400
 
381
401
 /* Translation DLL entry points */
446
466
        int             be_key; /* auth code needed to send cancel */
447
467
        UInt4           isolation;
448
468
        char            *current_schema;
 
469
        StatementClass  *stmt_in_extquery;
449
470
        Int2            max_identifier_length;
450
471
        Int2            num_discardp;
451
472
        char            **discardp;
457
478
        pgNAME          tableIns;
458
479
#ifdef  USE_SSPI
459
480
        UInt4           svcs_allowed;
 
481
        UInt4           auth_svcs;
460
482
#endif /* USE_SSPI */
461
483
#if defined(WIN_MULTITHREAD_SUPPORT)
462
484
        CRITICAL_SECTION        cs;