summaryrefslogtreecommitdiffstats
path: root/unix/tclLoadAix.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclLoadAix.c')
-rw-r--r--unix/tclLoadAix.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/unix/tclLoadAix.c b/unix/tclLoadAix.c
index 17fca04..59bccbf 100644
--- a/unix/tclLoadAix.c
+++ b/unix/tclLoadAix.c
@@ -9,7 +9,7 @@
* different from the notice used elsewhere in Tcl. The file has been
* modified to incorporate the file dlfcn.h in-line.
*
- * Copyright © 1992,1993,1995,1996, Jens-Uwe Mager, Helios Software GmbH
+ * Copyright (c) 1992,1993,1995,1996, Jens-Uwe Mager, Helios Software GmbH
* Not derived from licensed software.
*
* Permission is granted to freely use, copy, modify, and redistribute
@@ -23,7 +23,7 @@
/*
* @(#)dlfcn.c 1.7 revision of 95/08/14 19:08:38
- * This is an unpublished work copyright © 1992 HELIOS Software GmbH
+ * This is an unpublished work copyright (c) 1992 HELIOS Software GmbH
* 30159 Hannover, Germany
*/
@@ -98,7 +98,7 @@ dlopen(
const char *path,
int mode)
{
- ModulePtr mp;
+ register ModulePtr mp;
static void *mainModule;
/*
@@ -134,7 +134,7 @@ dlopen(
return NULL;
}
- mp->name = malloc(strlen(path) + 1);
+ mp->name = malloc((unsigned) (strlen(path) + 1));
strcpy(mp->name, path);
/*
@@ -191,7 +191,7 @@ dlopen(
*/
if (mode & RTLD_GLOBAL) {
- ModulePtr mp1;
+ register ModulePtr mp1;
for (mp1 = mp->next; mp1; mp1 = mp1->next) {
if (loadbind(0, mp1->entry, mp->entry) == -1) {
@@ -211,7 +211,7 @@ dlopen(
if (mp->info = (struct dl_info *)dlsym(mp, "dl_info")) {
if (mp->info->init) {
- mp->info->init();
+ (*mp->info->init)();
}
} else {
errvalid = 0;
@@ -224,7 +224,7 @@ dlopen(
if (mp->cdtors = (CdtorPtr) dlsym(mp, "__cdtors")) {
while (mp->cdtors->init) {
- mp->cdtors->init();
+ (*mp->cdtors->init)();
mp->cdtors++;
}
} else {
@@ -243,7 +243,7 @@ static void
caterr(
char *s)
{
- char *p = s;
+ register char *p = s;
while (*p >= '0' && *p <= '9') {
p++;
@@ -282,9 +282,9 @@ dlsym(
void *handle,
const char *symbol)
{
- ModulePtr mp = (ModulePtr)handle;
- ExportPtr ep;
- int i;
+ register ModulePtr mp = (ModulePtr)handle;
+ register ExportPtr ep;
+ register int i;
/*
* Could speed up the search, but I assume that one assigns the result to
@@ -317,21 +317,21 @@ int
dlclose(
void *handle)
{
- ModulePtr mp = (ModulePtr)handle;
+ register ModulePtr mp = (ModulePtr)handle;
int result;
- ModulePtr mp1;
+ register ModulePtr mp1;
if (--mp->refCnt > 0) {
return 0;
}
if (mp->info && mp->info->fini) {
- mp->info->fini();
+ (*mp->info->fini)();
}
if (mp->cdtors) {
while (mp->cdtors->term) {
- mp->cdtors->term();
+ (*mp->cdtors->term)();
mp->cdtors++;
}
}
@@ -343,8 +343,8 @@ dlclose(
}
if (mp->exports) {
- ExportPtr ep;
- int i;
+ register ExportPtr ep;
+ register int i;
for (ep = mp->exports, i = mp->nExports; i; i--, ep++) {
if (ep->name) {
free(ep->name);
@@ -541,7 +541,7 @@ readExports(
tmpsym[SYMNMLEN] = '\0';
symname = tmpsym;
}
- ep->name = malloc(strlen(symname) + 1);
+ ep->name = malloc((unsigned) (strlen(symname) + 1));
strcpy(ep->name, symname);
ep->addr = (void *)((unsigned long)
mp->entry + ls->l_value - shdata.s_vaddr);