summaryrefslogtreecommitdiffstats
path: root/sysif.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysif.c')
-rw-r--r--sysif.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sysif.c b/sysif.c
index def72149..d117729b 100644
--- a/sysif.c
+++ b/sysif.c
@@ -556,8 +556,6 @@ static val mkfifo_wrap(val path, val mode)
enum chm_state { chm_who, chm_perm, chm_nxtop, chm_comma };
enum chm_op { chm_add, chm_sub, chm_set };
-static val stat_wrap(val path);
-
static val chmod_wrap(val target, val mode)
{
val self = lit("chmod");
@@ -1128,7 +1126,7 @@ static val stat_impl(val obj, int (*statfn)(val, struct stat *),
#endif
}
-static val stat_wrap(val path)
+val stat_wrap(val path)
{
return stat_impl(path, do_stat, lit("stat"), path);
}
@@ -1138,11 +1136,6 @@ static val lstat_wrap(val path)
return stat_impl(path, do_lstat, lit("lstat"), path);
}
-val fstat_wrap(val stream)
-{
- return stat_impl(stream, do_stat, lit("fstat"), nil);
-}
-
#if HAVE_FILE_STAMP_CHANGE
#if HAVE_FUTIMENS
@@ -2372,9 +2365,12 @@ void sysif_init(void)
reg_fun(intern(lit("lutimes"), user_package), func_n5(wrap_lutimes));
#endif
- reg_fun(intern(lit("stat"), user_package), func_n1(stat_wrap));
+ {
+ val fn = func_n1(stat_wrap);
+ reg_fun(intern(lit("stat"), user_package), fn);
+ reg_fun(intern(lit("fstat"), user_package), fn);
+ }
reg_fun(intern(lit("lstat"), user_package), func_n1(lstat_wrap));
- reg_fun(intern(lit("fstat"), user_package), func_n1(fstat_wrap));
#if HAVE_SYS_STAT
#ifndef S_IFSOCK