/[guile]/guile/guile-core/libguile/dynl.c
ViewVC logotype

Diff of /guile/guile-core/libguile/dynl.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.63.2.3 by ttn, Thu Mar 14 05:26:15 2002 UTC revision 1.63.2.4 by mvo, Fri Oct 25 16:26:07 2002 UTC
# Line 237  SCM_DEFINE (scm_clear_registered_modules Line 237  SCM_DEFINE (scm_clear_registered_modules
237    
238  #ifdef DYNAMIC_LINKING  #ifdef DYNAMIC_LINKING
239    
240  #include "libltdl/ltdl.h"  #include "guile-ltdl.h"
241    
242  static void *  static void *
243  sysdep_dynl_link (const char *fname, const char *subr)  sysdep_dynl_link (const char *fname, const char *subr)
244  {  {
245    lt_dlhandle handle;    scm_lt_dlhandle handle;
246    handle = lt_dlopenext (fname);    handle = scm_lt_dlopenext (fname);
247    if (NULL == handle)    if (NULL == handle)
248      {      {
249        SCM fn;        SCM fn;
# Line 251  sysdep_dynl_link (const char *fname, con Line 251  sysdep_dynl_link (const char *fname, con
251    
252        SCM_ALLOW_INTS;        SCM_ALLOW_INTS;
253        fn = scm_makfrom0str (fname);        fn = scm_makfrom0str (fname);
254        msg = scm_makfrom0str (lt_dlerror ());        msg = scm_makfrom0str (scm_lt_dlerror ());
255        scm_misc_error (subr, "file: ~S, message: ~S", scm_list_2 (fn, msg));        scm_misc_error (subr, "file: ~S, message: ~S", scm_list_2 (fn, msg));
256      }      }
257    return (void *) handle;    return (void *) handle;
# Line 260  sysdep_dynl_link (const char *fname, con Line 260  sysdep_dynl_link (const char *fname, con
260  static void  static void
261  sysdep_dynl_unlink (void *handle, const char *subr)  sysdep_dynl_unlink (void *handle, const char *subr)
262  {  {
263    if (lt_dlclose ((lt_dlhandle) handle))    if (scm_lt_dlclose ((scm_lt_dlhandle) handle))
264      {      {
265        SCM_ALLOW_INTS;        SCM_ALLOW_INTS;
266        scm_misc_error (subr, (char *) lt_dlerror (), SCM_EOL);        scm_misc_error (subr, (char *) scm_lt_dlerror (), SCM_EOL);
267      }      }
268  }  }
269        
# Line 272  sysdep_dynl_func (const char *symb, void Line 272  sysdep_dynl_func (const char *symb, void
272  {  {
273    void *fptr;    void *fptr;
274    
275    fptr = lt_dlsym ((lt_dlhandle) handle, symb);    fptr = scm_lt_dlsym ((scm_lt_dlhandle) handle, symb);
276    if (!fptr)    if (!fptr)
277      {      {
278        SCM_ALLOW_INTS;        SCM_ALLOW_INTS;
279        scm_misc_error (subr, (char *) lt_dlerror (), SCM_EOL);        scm_misc_error (subr, (char *) scm_lt_dlerror (), SCM_EOL);
280      }      }
281    return fptr;    return fptr;
282  }  }
# Line 284  sysdep_dynl_func (const char *symb, void Line 284  sysdep_dynl_func (const char *symb, void
284  static void  static void
285  sysdep_dynl_init ()  sysdep_dynl_init ()
286  {  {
287    lt_dlinit ();    scm_lt_dlinit ();
288  }  }
289    
290  #else  #else

Legend:
Removed from v.1.63.2.3  
changed lines
  Added in v.1.63.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26