diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-04-08 13:10:56 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-04-08 13:10:56 -0700 |
commit | 478ae133483a91b35028eca9666689669fe55015 (patch) | |
tree | 53ff027735fc2b9479bdc7d962b454ba636a065f /socket.c | |
parent | 44638912c7353e46c5d2d9b6fe9362f662809f02 (diff) | |
download | txr-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 'socket.c')
-rw-r--r-- | socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -50,6 +50,7 @@ #include "args.h" #include "struct.h" #include "arith.h" +#include "sysif.h" #include "socket.h" #define MIN(A, B) ((A) < (B) ? (A) : (B)) @@ -76,7 +77,7 @@ struct dgram_stream { val sockaddr_in_s, sockaddr_in6_s, sockaddr_un_s, addrinfo_s; val flags_s, family_s, socktype_s, protocol_s, addr_s, canonname_s; -val port_s, flow_info_s, scope_id_s, path_s; +val port_s, flow_info_s, scope_id_s; static val ipv4_addr_to_num(struct in_addr *src) { @@ -1073,7 +1074,6 @@ void sock_load_init(void) port_s = intern(lit("port"), user_package); flow_info_s = intern(lit("flow-info"), user_package); scope_id_s = intern(lit("scope-id"), user_package); - path_s = intern(lit("path"), user_package); #ifdef HAVE_GETADDRINFO reg_fun(intern(lit("getaddrinfo"), user_package), func_n3o(getaddrinfo_wrap, 1)); |