Fix some issues and do some code cleanup

This commit is contained in:
Justine Tunney 2022-05-23 10:15:53 -07:00
parent 1f229e4efc
commit 312ed5c67c
72 changed files with 880 additions and 982 deletions

View file

@ -12,6 +12,7 @@
#include "libc/dns/ent.h"
#include "libc/errno.h"
#include "libc/nt/enum/version.h"
#include "libc/nt/version.h"
#include "libc/runtime/runtime.h"
#include "libc/sock/sock.h"
#include "libc/sysv/consts/af.h"
@ -7146,9 +7147,9 @@ PyInit__socket(void)
if (TCP_USER_TIMEOUT) PyModule_AddIntMacro(m, TCP_USER_TIMEOUT);
if (TCP_SAVE_SYN) PyModule_AddIntMacro(m, TCP_SAVE_SYN);
if (TCP_SAVED_SYN) PyModule_AddIntMacro(m, TCP_SAVED_SYN);
if (TCP_KEEPCNT && (!IsWindows() || NtGetVersion() >= kNtVersionWindows10))
if (TCP_KEEPCNT && (!IsWindows() || IsAtLeastWindows10()))
PyModule_AddIntMacro(m, TCP_KEEPCNT);
if (TCP_FASTOPEN && (!IsWindows() || NtGetVersion() >= kNtVersionWindows10))
if (TCP_FASTOPEN && (!IsWindows() || IsAtLeastWindows10()))
PyModule_AddIntMacro(m, TCP_FASTOPEN);
if (TCP_FASTOPEN_CONNECT)
PyModule_AddIntMacro(m, TCP_FASTOPEN_CONNECT);