diff options
Diffstat (limited to 'src/interfaces/odbc/psqlodbc.c')
-rw-r--r-- | src/interfaces/odbc/psqlodbc.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/interfaces/odbc/psqlodbc.c b/src/interfaces/odbc/psqlodbc.c index 0df56ee1e76..a4598383fcd 100644 --- a/src/interfaces/odbc/psqlodbc.c +++ b/src/interfaces/odbc/psqlodbc.c @@ -33,8 +33,6 @@ GLOBAL_VALUES globals; -BOOL _init(void); -BOOL _fini(void); RETCODE SQL_API SQLDummyOrdinal(void); #ifdef WIN32 @@ -97,6 +95,20 @@ WSADATA wsaData; #define FALSE (BOOL)0 #endif +#ifdef __GNUC__ + +/* This function is called at library initialization time. */ + +static BOOL +__attribute__((constructor)) +init(void) +{ + getGlobalDefaults(DBMS_NAME, ODBCINST_INI, FALSE); + return TRUE; +} + +#else + /* These two functions do shared library initialziation on UNIX, well at least * on Linux. I don't know about other systems. */ |