commit | 93d4983ccf8297c01829cd18b51ab46fba674477 | [log] [tgz] |
---|---|---|
author | Guy Harris <guy@alum.mit.edu> | Sat Oct 07 17:00:30 2017 -0700 |
committer | Guy Harris <guy@alum.mit.edu> | Sat Oct 07 17:00:30 2017 -0700 |
tree | a7c5a0a415f30517a725410e1aac3ade9634d394 | |
parent | 799d0bd20e34928200ba90a686e31cbfba80ea83 [diff] |
socket() and accept() return INVALID_SOCKET on errors. On Windows, you're supposed to check against INVALID_SOCKET. On UN*X, you're supposed to check against -1, but, on UN*X, we define INVALID_SOCKET to be -1 so you can compare against INVALID_SOCKET on both platforms. That means that sock_open() should return INVALID_SOCKET on errors as well.