Subject: C shared lib question
To: None <>
From: Johnny C. Lam <>
List: current-users
Date: 03/08/2000 21:59:10
I'm porting the ODBC driver for PostgreSQL to NetBSD, but I'm having
the following problem.  The code currently defines two functions _init
and _fini to call "constructor" and "destructor" code for the shared

BOOL _init (void)
	return TRUE;

Is there a more portable C construct to ensure that a function is
called when a shared library is loaded, much like a global static C++
object's constructor?

     -- Johnny C. Lam <>
        Department of Statistics, Carnegie Mellon University