~ubuntu-branches/debian/sid/unixodbc/sid

« back to all changes in this revision

Viewing changes to DriverManager/__handles.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2004-10-15 03:07:52 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20041015030752-dzw4vhxlgycz3woj
Tags: 2.2.4-11
Brown paper bag me: conflicts do not write themselves just because
you add a line to the changelog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 *
28
28
 **********************************************************************
29
29
 *
30
 
 * $Id: __handles.c,v 1.1.1.1 2001/10/17 16:40:07 lurcher Exp $
 
30
 * $Id: __handles.c,v 1.4 2002/08/12 16:20:44 lurcher Exp $
31
31
 *
32
32
 * $Log: __handles.c,v $
 
33
 * Revision 1.4  2002/08/12 16:20:44  lurcher
 
34
 *
 
35
 * Make it try and find a working iconv set of encodings
 
36
 *
 
37
 * Revision 1.3  2002/08/12 13:17:52  lurcher
 
38
 *
 
39
 * Replicate the way the MS DM handles loading of driver libs, and allocating
 
40
 * handles in the driver. usage counting in the driver means that dlopen is
 
41
 * only called for the first use, and dlclose for the last. AllocHandle for
 
42
 * the driver environment is only called for the first time per driver
 
43
 * per application environment.
 
44
 *
 
45
 * Revision 1.2  2002/02/22 10:23:22  lurcher
 
46
 *
 
47
 * s/Trace File/TraceFile
 
48
 *
33
49
 * Revision 1.1.1.1  2001/10/17 16:40:07  lurcher
34
50
 *
35
51
 * First upload to SourceForge
180
196
#include <uodbc_stats.h>
181
197
#endif
182
198
 
183
 
static char const rcsid[]= "$RCSfile: __handles.c,v $ $Revision: 1.1.1.1 $";
 
199
static char const rcsid[]= "$RCSfile: __handles.c,v $ $Revision: 1.4 $";
184
200
 
185
201
/*
186
202
 * these are used to enable us to check if a handle is
309
325
}
310
326
 
311
327
/*
 
328
 * protection for lib loading and counting, reuse the lists mutex as this 
 
329
 * is the lowest level protection the DM uses
 
330
 */
 
331
 
 
332
void mutex_lib_entry( void )
 
333
{
 
334
    mutex_entry( &mutex_lists );
 
335
}
 
336
 
 
337
void mutex_lib_exit( void )
 
338
{
 
339
    mutex_exit( &mutex_lists );
 
340
}
 
341
 
 
342
/*
312
343
 * allocate and register a environment handle
313
344
 */
314
345
 
351
382
                    ( toupper( tracing_string[ 0 ] ) == 'O' &&
352
383
                    toupper( tracing_string[ 1 ] ) == 'N' ))
353
384
        {
354
 
            SQLGetPrivateProfileString( "ODBC", "Trace File", "/tmp/sql.log",
 
385
            SQLGetPrivateProfileString( "ODBC", "TraceFile", "/tmp/sql.log",
355
386
                    tracing_file, sizeof( tracing_file ), 
356
387
                    "odbcinst.ini" );
357
388
 
672
703
}
673
704
 
674
705
/*
 
706
 *  * get the statement root, for use in SQLEndTran and SQLTransact
 
707
 *   */
 
708
 
 
709
DMHSTMT __get_stmt_root( void )
 
710
{
 
711
    return statement_root;
 
712
}
 
713
 
 
714
/*
675
715
 * allocate and register a statement handle
676
716
 */
677
717