Fix of last fix
[bpt/guile.git] / libguile / dynl-dld.c
index f9cec27..f3c24c2 100644 (file)
@@ -64,49 +64,53 @@ listundefs ()
 }
 
 static void *
-sysdep_dynl_link (fname, subr)
-     char *fname;
-     char *subr;
+sysdep_dynl_link (fname, int flags, subr)
+     const char *fname;
+     int flags;
+     const char *subr;
 {
     int status;
 
     status = dld_link (fname);
     if (status)
+      {
+       SCM_ALLOW_INTS;
        scm_misc_error (subr, dld_strerror (status), SCM_EOL);
+      }
     return fname;
 }
 
 static void
 sysdep_dynl_unlink (handle, subr)
      void *handle;
-     char *subr;
+     const char *subr;
 {
     int status;
 
-    SCM_DEFER_INTS;
     status = dld_unlink_by_file ((char *)fname, 1);
-    SCM_ALLOW_INTS;
     if (status)
+      {
+       SCM_ALLOW_INTS;
        scm_misc_error (s_dynamic_unlink, dld_strerror (status), SCM_EOL);
+      }
 }
 
 static void *
 sysdep_dynl_func (symb, handle, subr)
-     char *symb;
+     const char *symb;
      void *handle;
-     char *subr;
+     const char *subr;
 {
     void *func;
 
-    SCM_DEFER_INTS;
     func = (void *) dld_get_func (func);
     if (func == 0)
        scm_misc_error (subr, dld_strerror (dld_errno), SCM_EOL);
     if (!dld_function_executable_p (func)) {
        listundefs ();
+       SCM_ALLOW_INTS;
        scm_misc_error (subr, "unresolved symbols remain", SCM_EOL);
     }
-    SCM_ALLOW_INTS;
     return func;
 }