mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
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:
parent
ee7e296339
commit
d26d7ae0e4
1028 changed files with 6576 additions and 172777 deletions
56
third_party/python/Include/py_curses.h
vendored
56
third_party/python/Include/py_curses.h
vendored
|
@ -1,43 +1,6 @@
|
|||
|
||||
#ifndef Py_CURSES_H
|
||||
#define Py_CURSES_H
|
||||
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
** On Mac OS X 10.2 [n]curses.h and stdlib.h use different guards
|
||||
** against multiple definition of wchar_t.
|
||||
*/
|
||||
#ifdef _BSD_WCHAR_T_DEFINED_
|
||||
#define _WCHAR_T
|
||||
#endif
|
||||
#endif /* __APPLE__ */
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
/*
|
||||
** On FreeBSD, [n]curses.h and stdlib.h/wchar.h use different guards
|
||||
** against multiple definition of wchar_t and wint_t.
|
||||
*/
|
||||
#ifdef _XOPEN_SOURCE_EXTENDED
|
||||
#ifndef __FreeBSD_version
|
||||
#include <osreldate.h>
|
||||
#endif
|
||||
#if __FreeBSD_version >= 500000
|
||||
#ifndef __wchar_t
|
||||
#define __wchar_t
|
||||
#endif
|
||||
#ifndef __wint_t
|
||||
#define __wint_t
|
||||
#endif
|
||||
#else
|
||||
#ifndef _WCHAR_T
|
||||
#define _WCHAR_T
|
||||
#endif
|
||||
#ifndef _WINT_T
|
||||
#define _WINT_T
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
/* clang-format off */
|
||||
|
||||
#if !defined(HAVE_CURSES_IS_PAD) && defined(WINDOW_HAS_FLAGS)
|
||||
/* The following definition is necessary for ncurses 5.7; without it,
|
||||
|
@ -46,12 +9,6 @@
|
|||
#define NCURSES_OPAQUE 0
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NCURSES_H
|
||||
#include <ncurses.h>
|
||||
#else
|
||||
#include <curses.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NCURSES_H
|
||||
/* configure was checking <curses.h>, but we will
|
||||
use <ncurses.h>, which has some or all these features. */
|
||||
|
@ -66,9 +23,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
#define PyCurses_API_pointers 4
|
||||
|
||||
|
@ -169,10 +124,5 @@ static PyObject *PyCurses_ ## X (PyObject *self) \
|
|||
Py_INCREF(Py_None); \
|
||||
return Py_None; }
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !defined(Py_CURSES_H) */
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue