*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
*
* As a special exception, the Free Software Foundation gives permission
* for additional uses of the text contained in its release of GUILE.
*
* If you write modifications of your own for GUILE, it is your choice
* whether to permit this exception to apply to your modifications.
- * If you do not wish that, delete this exception notice.
- */
+ * If you do not wish that, delete this exception notice. */
/* "dynl.c" dynamically link&load object files.
Author: Aubrey Jaffer
BIND_TOGETHER ||
BIND_VERBOSE || DYNAMIC_PATH, 0L);
if (NULL==shl)
+ {
+ SCM_ALLOW_INTS;
scm_misc_error (subr, "dynamic linking failed", SCM_EOL);
+ }
return shl;
}
void *handle;
char *subr;
{
- int status;
-
- SCM_DEFER_INTS;
- status = shl_unload ((shl_t) handle);
- SCM_ALLOW_INTS;
- if (status)
- scm_misc_error (subr, "dynamic unlinking failed", SCM_EOL);
+ if (shl_unload ((shl_t) handle))
+ {
+ SCM_ALLOW_INTS;
+ scm_misc_error (subr, "dynamic unlinking failed", SCM_EOL);
+ }
}
static void *
{
int status, i;
struct shl_symbol *sym;
- SCM_DEFER_INTS;
+
status = shl_getsymbols((shl_t) handle, TYPE_PROCEDURE,
EXPORT_SYMBOLS, malloc, &sym);
- SCM_ALLOW_INTS;
+
for (i=0; i<status; ++i) {
if (strcmp(symb, sym[i].name) == 0) return sym[i].value;
}
+
+ SCM_ALLOW_INTS;
scm_misc_error (subr, "undefined function",
scm_cons (scm_makfrom0str (symb), SCM_EOL));
}