On Fri, Oct 17, 2008 at 4:47 PM, Barry Smith <bsmith at mcs.anl.gov> wrote: >> >> 2) Add appropriate typedefs for PestcDLHandle, an enumeration >> PetscDLFlags, and routines PetscDLOpen, PetscDLClose, and PetscDLSym. >> This would abstract the handling of the different dlopen-like family >> of functions across platforms, in a way similar to what GNU libtool >> does. > > I worry that dlopen()/dlsym() may not be the right level of abstraction to > match (for example the Windows approach) a general idea of "dynamic" > libraries. > Especially dlsym(). > > I guess it is ok to add them, but I hate to add stuff, you know. >
Just to make it clear, I'm not actually adding stuff. I'll just provide and additional layer of calls that will remove the current calls to dlopen()/LoadLibrary() in 'src/sys/dll/dl.c' and move them to an additional file named 'src/sys/dll/dlimpl.c' implementing PetscDLOpen/PetscDLClose/PetscDLSym as appropriate for windows/unix-like as appropriate. In the future, this separation will make it easier to support other dlopen-like API's. BTW, help me a bit: remeber to wipe-out the petsc-dev-dalcinl repo and put there a fresh clone of petsc-dev (perhaps a pull & update is enough?) -- Lisandro Dalc?n --------------- Centro Internacional de M?todos Computacionales en Ingenier?a (CIMEC) Instituto de Desarrollo Tecnol?gico para la Industria Qu?mica (INTEC) Consejo Nacional de Investigaciones Cient?ficas y T?cnicas (CONICET) PTLC - G?emes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594
