File tree 1 file changed +15
-3
lines changed
1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 15
15
16
16
#include "environ.h"
17
17
#include "connection.h"
18
+ #include "dlg_specific.h"
18
19
#include "statement.h"
19
20
#include <stdlib.h>
20
21
#include <string.h>
21
22
23
+ extern GLOBAL_VALUES globals ;
24
+
22
25
/* The one instance of the handles */
23
26
ConnectionClass * conns [MAX_CONNECTIONS ];
24
27
25
28
26
29
RETCODE SQL_API SQLAllocEnv (HENV FAR * phenv )
27
30
{
28
- static char * func = "SQLAllocEnv" ;
29
-
30
- mylog ("**** in SQLAllocEnv ** \n" );
31
+ static char * 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);
31
43
32
44
* phenv = (HENV ) EN_Constructor ();
33
45
if ( ! * phenv ) {
You can’t perform that action at this time.
0 commit comments