Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5ab642f

Browse files
committed
Provide a hack to let initialization happen on platforms for which
psqlodbc.c's constructor-making techniques do not work.
1 parenteb9033c commit5ab642f

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

‎src/interfaces/odbc/environ.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,31 @@
1515

1616
#include"environ.h"
1717
#include"connection.h"
18+
#include"dlg_specific.h"
1819
#include"statement.h"
1920
#include<stdlib.h>
2021
#include<string.h>
2122

23+
externGLOBAL_VALUESglobals;
24+
2225
/* The one instance of the handles */
2326
ConnectionClass*conns[MAX_CONNECTIONS];
2427

2528

2629
RETCODESQL_APISQLAllocEnv(HENVFAR*phenv)
2730
{
28-
staticchar*func="SQLAllocEnv";
29-
30-
mylog("**** in SQLAllocEnv ** \n");
31+
staticchar*func="SQLAllocEnv";
32+
33+
mylog("**** in SQLAllocEnv ** \n");
34+
35+
/*
36+
* Hack for systems on which none of the constructor-making techniques
37+
* in psqlodbc.c work: if globals appears not to have been initialized,
38+
* then cause it to be initialized. Since this should be the first
39+
* function called in this shared library, doing it here should work.
40+
*/
41+
if (globals.socket_buffersize <=0)
42+
getGlobalDefaults(DBMS_NAME,ODBCINST_INI, FALSE);
3143

3244
*phenv= (HENV)EN_Constructor();
3345
if ( !*phenv) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp