summaryrefslogtreecommitdiffstats
path: root/sysif.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-04-08 13:10:56 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-04-08 13:10:56 -0700
commit478ae133483a91b35028eca9666689669fe55015 (patch)
tree53ff027735fc2b9479bdc7d962b454ba636a065f /sysif.h
parent44638912c7353e46c5d2d9b6fe9362f662809f02 (diff)
downloadtxr-478ae133483a91b35028eca9666689669fe55015.tar.gz
txr-478ae133483a91b35028eca9666689669fe55015.tar.bz2
txr-478ae133483a91b35028eca9666689669fe55015.zip
New path slot in stat struct.
* ftw.c (ftw_callback): Pass path to stat_to_struct function. * socket.c (path_s): Variable definition removed from here. (sock_load_init): Do not intern path symbol here. * sysif.c (path_s): Variable definition moved here. (stat_to_struct): New parameter, path. Store its argument in the path slot of the structure. (stat_impl): New parameter, path. Pass argument to stat_to_struct. (statp, statl): Pass path down to stat_impl. (statf): Pass nil down as path argument of stat_impl. (sysif_init): Intern path symbol here. Add path_s to the slot list in the make_struct_type call which creates the stat structure type. * sysif.h (path_s): Declared here now. (stat_to_struct): Declaration updated. * txr.1: Documented new slot of stat structure and behavior of stat, lstat and fstat w.r.t. this slot.
Diffstat (limited to 'sysif.h')
-rw-r--r--sysif.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysif.h b/sysif.h
index f32c3f9b..c3a29ccc 100644
--- a/sysif.h
+++ b/sysif.h
@@ -31,7 +31,7 @@ extern val gid_k, rdev_k, size_k, blksize_k, blocks_k;
extern val atime_k, mtime_k, ctime_k;
extern val dev_s, ino_s, mode_s, nlink_s, uid_s;
extern val gid_s, rdev_s, size_s, blksize_s, blocks_s;
-extern val atime_s, mtime_s, ctime_s;
+extern val atime_s, mtime_s, ctime_s, path_s;
#if !HAVE_FTRUNCATE
typedef long off_t;
@@ -52,7 +52,7 @@ val exec_wrap(val file, val args_opt);
#endif
#if HAVE_SYS_STAT
struct stat;
-val stat_to_struct(struct stat st);
+val stat_to_struct(struct stat st, val path);
#endif
val statp(val path);
val statf(val path);