summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-12 10:44:21 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-12 10:44:21 +0000
commitdda5dc00cff334cac373096d444a0fd59e716124 (patch)
treed9ab9c1dc4cede235a3bbaea653c07f38ea880b9 /dln.c
parent51e25545aeb1555051b95c5b31b4f3ca6ec6b6fe (diff)
* array.c: moved to ANSI function style from K&R function style.
(used protoize on windows, so still K&R remains on #ifdef part of other platforms. And `foo _((boo))' stuff is still there) [ruby-dev:26975] * bignum.c, class.c, compar.c, dir.c, dln.c, dmyext.c, enum.c, enumerator.c, error.c, eval.c, file.c, gc.c, hash.c, inits.c, io.c, main.c, marshal.c, math.c, numeric.c, object.c, pack.c, prec.c, process.c, random.c, range.c, re.c, regcomp.c, regenc.c, regerror.c, regexec.c, regparse.c, regparse.h, ruby.c, signal.c, sprintf.c, st.c, string.c, struct.c, time.c, util.h, variable.c, version.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/dln.c b/dln.c
index 6093b33..6a3f969 100644
--- a/dln.c
+++ b/dln.c
@@ -89,7 +89,7 @@ char *getenv();
# include <image.h>
#endif
-int eaccess();
+int eaccess(const char *, int);
#ifndef NO_DLN_LOAD
@@ -107,9 +107,7 @@ int eaccess();
#endif
static int
-init_funcname_len(buf, file)
- char **buf;
- const char *file;
+init_funcname_len(char **buf, const char *file)
{
char *p;
const char *slash;
@@ -1161,7 +1159,7 @@ dln_sym(name)
#endif
static const char *
-dln_strerror()
+dln_strerror(void)
{
#ifdef USE_DLN_A_OUT
char *strerror();
@@ -1262,8 +1260,7 @@ aix_loaderror(const char *pathname)
#endif /* NO_DLN_LOAD */
void*
-dln_load(file)
- const char *file;
+dln_load(const char *file)
{
#ifdef NO_DLN_LOAD
rb_raise(rb_eLoadError, "this executable file can't load extension libraries");
@@ -1606,12 +1603,10 @@ dln_load(file)
return 0; /* dummy return */
}
-static char *dln_find_1();
+static char *dln_find_1(char *fname, char *path, int exe_flag);
char *
-dln_find_exe(fname, path)
- const char *fname;
- const char *path;
+dln_find_exe(const char *fname, const char *path)
{
if (!path) {
path = getenv(PATH_ENV);
@@ -1628,9 +1623,7 @@ dln_find_exe(fname, path)
}
char *
-dln_find_file(fname, path)
- const char *fname;
- const char *path;
+dln_find_file(const char *fname, const char *path)
{
#ifndef __MACOS__
if (!path) path = ".";
@@ -1672,10 +1665,7 @@ conv_to_posix_path(win32, posix, len)
static char fbuf[MAXPATHLEN];
static char *
-dln_find_1(fname, path, exe_flag)
- char *fname;
- char *path;
- int exe_flag; /* non 0 if looking for executable. */
+dln_find_1(char *fname, char *path, int exe_flag /* non 0 if looking for executable. */)
{
register char *dp;
register char *ep;