diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-08-15 08:19:04 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-08-15 08:45:15 -0700 |
commit | 35a94efcc6eb5a844c0e463fe0be88cd882099a8 (patch) | |
tree | c8b0211978c15c2857c17bdcdda6276fe6a7042c /stdlib | |
parent | e447b1ad43730410ec96cda54c580c043885b530 (diff) | |
download | txr-35a94efcc6eb5a844c0e463fe0be88cd882099a8.tar.gz txr-35a94efcc6eb5a844c0e463fe0be88cd882099a8.tar.bz2 txr-35a94efcc6eb5a844c0e463fe0be88cd882099a8.zip |
getaddrinfo: implement canonname.
Paul A. Patience noted that the canonname_s variable is not
used in the C code. This indicates that the AI_CANONNAME
functionality of getaddrinfo isn't implemented. Let's do that.
* stdlib/socket.tl (sockaddr): New slot, canonname.
(addrinfo): Default canonname to nil, not 0, since it is
a string that may be absent.
* socket.c (getaddrinfo_wrap): If the first address object has
a non-null ai_canonname and it was requested via the flags,
then stick that name into every returned structure.
* txr.1: Documented.
Diffstat (limited to 'stdlib')
-rw-r--r-- | stdlib/socket.tl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/socket.tl b/stdlib/socket.tl index 58f81e61..e07bea6b 100644 --- a/stdlib/socket.tl +++ b/stdlib/socket.tl @@ -25,6 +25,7 @@ ;; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. (defstruct sockaddr nil + canonname ;; from getaddrinfo (:static family nil)) (defstruct sockaddr-in sockaddr @@ -46,7 +47,7 @@ (family 0) (socktype 0) (protocol 0) - (canonname 0)) + canonname) (defvarl shut-rd 0) (defvarl shut-wr 1) |