diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-10-05 23:55:48 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-10-05 23:55:48 -0700 |
commit | 30d54e446ae4137f3cb5db6495f865d1c51ffb54 (patch) | |
tree | da116dd77a8c64b4773b7fe542a3321b8dfdade6 /stdlib/except.tl | |
parent | 35e1645eacd6baa334e9107cdc65913427401942 (diff) | |
download | txr-30d54e446ae4137f3cb5db6495f865d1c51ffb54.tar.gz txr-30d54e446ae4137f3cb5db6495f865d1c51ffb54.tar.bz2 txr-30d54e446ae4137f3cb5db6495f865d1c51ffb54.zip |
unix: fix sock-opt test case.
On systems with true Unix heritage, like Solaris,
MacOS/Darwin, and undoubtedly various BSDs, getsockopt is
returning a bitmask value for some options , rather than 1.
For instance if we enable SO_REUSEADDR, and then read back the
value of the option, we get 4 and not 1. This is because the
value of the SO_REUSEADDR symbol itself is 4; it is a mask.
The kernel code is evidently just masking out the desired
option out of the option mask, and returning the mask value
without reducing it to 0 or 1.
* tests/014/socket-misc.tl: Test the result of sock-opt for
nonzero using nzerop rather than testing specifically for 1.
Diffstat (limited to 'stdlib/except.tl')
0 files changed, 0 insertions, 0 deletions