mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Make improvements
- This change fixes a bug that allowed unbuffered printf() output (to streams like stderr) to be truncated. This regression was introduced some time between now and the last release. - POSIX specifies all functions as thread safe by default. This change works towards cleaning up our use of the @threadsafe / @threadunsafe documentation annotations to reflect that. The goal is (1) to use @threadunsafe to document functions which POSIX say needn't be thread safe, and (2) use @threadsafe to document functions that we chose to implement as thread safe even though POSIX didn't mandate it. - Tidy up the clock_gettime() implementation. We're now trying out a cleaner approach to system call support that aims to maintain the Linux errno convention as long as possible. This also fixes bugs that existed previously, where the vDSO errno wasn't being translated properly. The gettimeofday() system call is now a wrapper for clock_gettime(), which reduces bloat in apps that use both. - The recently-introduced improvements to the execute bit on Windows has had bugs fixed. access(X_OK) on a directory on Windows now succeeds. fstat() will now perform the MZ/#! ReadFile() operation correctly. - Windows.h is no longer included in libc/isystem/, because it confused PCRE's build system into thinking Cosmopolitan is a WIN32 platform. Cosmo's Windows.h polyfill was never even really that good, since it only defines a subset of the subset of WIN32 APIs that Cosmo defines. - The setlongerjmp() / longerjmp() APIs are removed. While they're nice APIs that are superior to the standardized setjmp / longjmp functions, they weren't superior enough to not be dead code in the monorepo. If you use these APIs, please file an issue and they'll be restored. - The .com appending magic has now been removed from APE Loader.
This commit is contained in:
parent
b99512ac58
commit
ff77f2a6af
226 changed files with 708 additions and 2657 deletions
2
third_party/python/Modules/_threadmodule.c
vendored
2
third_party/python/Modules/_threadmodule.c
vendored
|
@ -20,7 +20,7 @@
|
|||
#include "libc/calls/struct/utsname.h"
|
||||
#include "libc/calls/struct/winsize.h"
|
||||
#include "libc/calls/syscall-sysv.internal.h"
|
||||
#include "libc/calls/sysparam.h"
|
||||
#include "libc/stdio/sysparam.h"
|
||||
#include "libc/calls/termios.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/dce.h"
|
||||
|
|
2
third_party/python/Modules/posixmodule.c
vendored
2
third_party/python/Modules/posixmodule.c
vendored
|
@ -22,7 +22,7 @@
|
|||
#include "libc/calls/struct/utsname.h"
|
||||
#include "libc/calls/struct/winsize.h"
|
||||
#include "libc/calls/syscall-sysv.internal.h"
|
||||
#include "libc/calls/sysparam.h"
|
||||
#include "libc/stdio/sysparam.h"
|
||||
#include "libc/calls/termios.h"
|
||||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/dce.h"
|
||||
|
|
2
third_party/python/Modules/timemodule.c
vendored
2
third_party/python/Modules/timemodule.c
vendored
|
@ -10,7 +10,7 @@
|
|||
#include "libc/calls/struct/tms.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/fmt/wintime.internal.h"
|
||||
#include "libc/nt/accounting.h"
|
||||
#include "libc/nt/runtime.h"
|
||||
#include "libc/runtime/clktck.h"
|
||||
|
|
28
third_party/python/PC/winreg.c
vendored
28
third_party/python/PC/winreg.c
vendored
|
@ -4,18 +4,44 @@
|
|||
│ Python 3 │
|
||||
│ https://docs.python.org/3/license.html │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/isystem/windows.h"
|
||||
#include "libc/nt/registry.h"
|
||||
#include "third_party/python/Include/abstract.h"
|
||||
#include "third_party/python/Include/ceval.h"
|
||||
#include "third_party/python/Include/listobject.h"
|
||||
#include "third_party/python/Include/longobject.h"
|
||||
#include "third_party/python/Include/modsupport.h"
|
||||
#include "third_party/python/Include/object.h"
|
||||
#include "third_party/python/Include/objimpl.h"
|
||||
#include "third_party/python/Include/pyerrors.h"
|
||||
#include "third_party/python/Include/pyhash.h"
|
||||
#include "third_party/python/Include/pymacro.h"
|
||||
#include "third_party/python/Include/structmember.h"
|
||||
|
||||
#undef NULL
|
||||
#define NULL 0
|
||||
|
||||
#define BOOL bool32
|
||||
#define DWORD32 uint32_t
|
||||
#define HKEY int64_t
|
||||
#define ULONG uint32_t
|
||||
#define ACCESS_MASK ULONG
|
||||
#define REGSAM ACCESS_MASK
|
||||
|
||||
#define HKEY_CLASSES_ROOT kNtHkeyClassesRoot
|
||||
#define HKEY_CURRENT_USER kNtHkeyCurrentUser
|
||||
#define HKEY_LOCAL_MACHINE kNtHkeyLocalMachine
|
||||
#define HKEY_USERS kNtHkeyUsers
|
||||
#define HKEY_PERFORMANCE_DATA kNtHkeyPerformanceData
|
||||
#define HKEY_PERFORMANCE_TEXT kNtHkeyPerformanceText
|
||||
#define HKEY_PERFORMANCE_NLSTEXT kNtHkeyPerformanceNlstext
|
||||
#define HKEY_CURRENT_CONFIG kNtHkeyCurrentConfig
|
||||
#define HKEY_DYN_DATA kNtHkeyDynData
|
||||
#define HKEY_CURRENT_USER_LOCAL_SETTINGS kNtHkeyCurrentUserLocalSettings
|
||||
#define KEY_READ kNtKeyRead
|
||||
#define KEY_WRITE kNtKeyWrite
|
||||
#define KEY_EXECUTE kNtKeyExecute
|
||||
#define KEY_ALL_ACCESS kNtKeyAllAccess
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue