Perform build and magnum tuning

Building o//third_party/python now takes 5 seconds on my PC

This change works towards modifying Python to use runtime dispatching
when appropriate. For example, when loading the magnums in the socket
module, it's a good idea to check if the magnum is zero, because that
means the local system platform doesn't support it.
This commit is contained in:
Justine Tunney 2021-08-10 10:26:13 -07:00
parent ee7e296339
commit d26d7ae0e4
1028 changed files with 6576 additions and 172777 deletions

View file

@ -1,38 +1,13 @@
/* clang-format off */
/* Time module */
#include "Python.h"
#include "third_party/python/Include/Python.h"
#include <ctype.h>
#include "libc/sock/select.h"
#include "libc/time/time.h"
#include "libc/time/struct/tm.h"
#include "libc/sysv/consts/rusage.h"
#ifdef HAVE_SYS_TIMES_H
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if defined(HAVE_SYS_RESOURCE_H)
#include <sys/resource.h>
#endif
#ifdef QUICKWIN
#include <io.h>
#endif
#if defined(__WATCOMC__) && !defined(__QNX__)
#include <i86.h>
#else
#ifdef MS_WINDOWS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include "pythread.h"
#endif /* MS_WINDOWS */
#endif /* !__WATCOMC__ || __QNX__ */
typedef int clockid_t;
#undef HAVE_CLOCK_SETTIME