summaryrefslogtreecommitdiffstats
path: root/dynl.c
diff options
context:
space:
mode:
Diffstat (limited to 'dynl.c')
-rw-r--r--dynl.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/dynl.c b/dynl.c
index 8fcf7aa..3469199 100644
--- a/dynl.c
+++ b/dynl.c
@@ -1,18 +1,18 @@
-/* Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1997 Free Software Foundation, Inc.
- *
+/* Copyright (C) 1990-1999 Free Software Foundation, Inc.
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* 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, 59 Temple Place, Suite 330, Boston, MA 02111, USA.
*
* As a special exception, the Free Software Foundation gives permission
* for additional uses of the text contained in its release of GUILE.
@@ -36,7 +36,7 @@
*
* 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.
@@ -121,7 +121,7 @@ SCM l_dyn_main_call(symb, shl, args)
else dld_perror("DLDP");
if (!i) listundefs();
if (!func) {
- must_free_argv(argv, 0);
+ must_free_argv(argv);
ALLOW_INTS;
dld_perror("DLD");
return BOOL_F;
@@ -131,7 +131,7 @@ SCM l_dyn_main_call(symb, shl, args)
i = (*func) ((int)ilength(args), argv);
/* *loc_loadpath = oloadpath; */
DEFER_INTS;
- must_free_argv(argv, 0);
+ must_free_argv(argv);
ALLOW_INTS;
return MAKINUM(0L+i);
}
@@ -155,14 +155,11 @@ static iproc subr1s[] = {
{0, 0}};
void init_dynl()
{
-# ifndef RTL
- if (!execpath) execpath = scm_find_executable();
+ /* if (!execpath) execpath = scm_find_execpath(); */
if ((!execpath) || dld_init(execpath)) {
dld_perror("DLD:");
-/* wta(CAR(progargs), "couldn't init", "dld"); */
return;
}
-# endif
if (!dumped) {
init_iprocs(subr1s, tc7_subr_1);
make_subr(s_call, tc7_subr_2, l_dyn_call);
@@ -178,7 +175,8 @@ void init_dynl()
# ifdef hpux
# include "dl.h"
-# define SHL(obj) ((shl_t*)CDR(obj))
+# define P_SHL(obj) ((shl_t*)(&CDR(obj)))
+# define SHL(obj) (*P_SHL(obj))
int prinshl(exp, port, writing)
SCM exp; SCM port; int writing;
{
@@ -219,7 +217,7 @@ SCM l_dyn_call(symb, shl)
ASSERT(NIMP(symb) && STRINGP(symb), symb, ARG1, s_call);
ASSERT(NIMP(shl) && CAR(shl)==tc16_shl, shl, ARG2, s_call);
DEFER_INTS;
- if ((i = shl_findsym(&SHL(shl),
+ if ((i = shl_findsym(P_SHL(shl),
CHARS(symb),
TYPE_PROCEDURE, &func)) != 0) {
puts(" undef:"); puts(CHARS(symb));
@@ -237,13 +235,13 @@ SCM l_dyn_main_call(symb, shl, args)
SCM symb, shl, args;
{
int i;
- int (*func)P((int argc, char **argv)) = 0;
+ int (*func)P((int argc, char **argv)) = 0;
char **argv;
/* SCM oloadpath = *loc_loadpath; */
ASSERT(NIMP(symb) && STRINGP(symb), symb, ARG1, s_main_call);
ASSERT(NIMP(shl) && CAR(shl)==tc16_shl, shl, ARG2, s_main_call);
DEFER_INTS;
- if ((i = shl_findsym(&SHL(shl),
+ if ((i = shl_findsym(P_SHL(shl),
CHARS(symb),
TYPE_PROCEDURE, &func)) != 0) {
puts(" undef:"); puts(CHARS(symb));
@@ -255,7 +253,7 @@ SCM l_dyn_main_call(symb, shl, args)
i = (*func) ((int)ilength(args), argv);
/* *loc_loadpath = oloadpath; */
DEFER_INTS;
- must_free_argv(argv, 0);
+ must_free_argv(argv);
ALLOW_INTS;
return MAKINUM(0L+i);
}
@@ -444,7 +442,7 @@ SCM l_dyn_main_call(symb, shl, args)
SCM symb, shl, args;
{
int i;
- int (*func)P((int argc, char **argv)) = 0;
+ int (*func)P((int argc, char **argv)) = 0;
char **argv;
/* SCM oloadpath = *loc_loadpath; */
ASSERT(NIMP(symb) && STRINGP(symb), symb, ARG1, s_main_call);
@@ -572,12 +570,12 @@ SCM l_dyn_call(symb, shl)
OSErr err;
CFragSymbolClass symClass;
Str255 symName;
-
+
/* SCM oloadpath = *loc_loadpath; */
ASSERT(NIMP(symb) && STRINGP(symb), symb, ARG1, s_call);
ASSERT(NIMP(shl) && CAR(shl)==tc16_shl, shl, ARG2, s_call);
DEFER_INTS;
-
+
strcpy((char *)symName, CHARS(symb));
c2pstr((char *)symName);
err = FindSymbol((CFragConnectionID)SHL(shl), symName,
@@ -599,12 +597,12 @@ SCM l_dyn_main_call(symb, shl, args)
SCM symb, shl, args;
{
int i;
- int (*func)P((int argc, char **argv)) = 0;
+ int (*func)P((int argc, char **argv)) = 0;
char **argv;
OSErr err;
CFragSymbolClass symClass;
Str255 symName;
-
+
/* SCM oloadpath = *loc_loadpath; */
ASSERT(NIMP(symb) && STRINGP(symb), symb, ARG1, s_main_call);
ASSERT(NIMP(shl) && CAR(shl)==tc16_shl, shl, ARG2, s_main_call);
@@ -625,7 +623,7 @@ SCM l_dyn_main_call(symb, shl, args)
i = (*func) ((int)ilength(args), argv);
/* *loc_loadpath = oloadpath; */
DEFER_INTS;
- must_free_argv(argv, 0);
+ must_free_argv(argv);
ALLOW_INTS;
return MAKINUM(0L+i);
}