mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-02 23:18:44 +00:00
- Python static hello world now 1.8mb - Python static fully loaded now 10mb - Python HTTPS client now uses MbedTLS - Python REPL now completes import stmts - Increase stack size for Python for now - Begin synthesizing posixpath and ntpath - Restore Python \N{UNICODE NAME} support - Restore Python NFKD symbol normalization - Add optimized code path for Intel SHA-NI - Get more Python unit tests passing faster - Get Python help() pagination working on NT - Python hashlib now supports MbedTLS PBKDF2 - Make memcpy/memmove/memcmp/bcmp/etc. faster - Add Mersenne Twister and Vigna to LIBC_RAND - Provide privileged __printf() for error code - Fix zipos opendir() so that it reports ENOTDIR - Add basic chmod() implementation for Windows NT - Add Cosmo's best functions to Python cosmo module - Pin function trace indent depth to that of caller - Show memory diagram on invalid access in MODE=dbg - Differentiate stack overflow on crash in MODE=dbg - Add stb_truetype and tools for analyzing font files - Upgrade to UNICODE 13 and reduce its binary footprint - COMPILE.COM now logs resource usage of build commands - Start implementing basic poll() support on bare metal - Set getauxval(AT_EXECFN) to GetModuleFileName() on NT - Add descriptions to strerror() in non-TINY build modes - Add COUNTBRANCH() macro to help with micro-optimizations - Make error / backtrace / asan / memory code more unbreakable - Add fast perfect C implementation of μ-Law and a-Law audio codecs - Make strtol() functions consistent with other libc implementations - Improve Linenoise implementation (see also github.com/jart/bestline) - COMPILE.COM now suppresses stdout/stderr of successful build commands
100 lines
4.4 KiB
C
100 lines
4.4 KiB
C
#ifndef COSMOPOLITAN_LIBC_RUNTIME_RUNTIME_H_
|
||
#define COSMOPOLITAN_LIBC_RUNTIME_RUNTIME_H_
|
||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||
COSMOPOLITAN_C_START_
|
||
/*───────────────────────────────────────────────────────────────────────────│─╗
|
||
│ cosmopolitan § runtime ─╬─│┼
|
||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||
|
||
typedef long jmp_buf[8] forcealign(CACHELINE);
|
||
|
||
extern int __argc; /* CRT */
|
||
extern char **__argv; /* CRT */
|
||
extern char **environ; /* CRT */
|
||
extern unsigned long *__auxv; /* CRT */
|
||
extern char program_executable_name[]; /* RII */
|
||
extern char *program_invocation_name; /* RII */
|
||
extern char *program_invocation_short_name; /* RII */
|
||
extern int ftrace; /* CRT */
|
||
extern uint64_t g_syscount; /* RII */
|
||
extern const uint64_t kStartTsc; /* RII */
|
||
extern const char kTmpPath[]; /* RII */
|
||
extern const char kNtSystemDirectory[]; /* RII */
|
||
extern const char kNtWindowsDirectory[]; /* RII */
|
||
extern unsigned char _base[] forcealign(PAGESIZE); /* αpε */
|
||
extern unsigned char _ehead[] forcealign(PAGESIZE); /* αpε */
|
||
extern unsigned char _etext[] forcealign(PAGESIZE); /* αpε */
|
||
extern unsigned char _edata[] forcealign(PAGESIZE); /* αpε */
|
||
extern unsigned char _end[] forcealign(FRAMESIZE); /* αpε */
|
||
extern unsigned char _ereal; /* αpε */
|
||
extern unsigned char __privileged_start; /* αpε */
|
||
extern unsigned char __test_start; /* αpε */
|
||
extern unsigned char __ro; /* αpε */
|
||
extern unsigned char *__relo_start[]; /* αpε */
|
||
extern unsigned char *__relo_end[]; /* αpε */
|
||
extern uint8_t __zip_start[]; /* αpε */
|
||
extern uint8_t __zip_end[]; /* αpε */
|
||
|
||
void mcount(void);
|
||
unsigned long getauxval(unsigned long);
|
||
void *mapanon(size_t) attributeallocsize((1));
|
||
int setjmp(jmp_buf) libcesque returnstwice paramsnonnull();
|
||
void longjmp(jmp_buf, int) libcesque wontreturn paramsnonnull();
|
||
int _setjmp(jmp_buf) libcesque returnstwice paramsnonnull();
|
||
void _longjmp(jmp_buf, int) libcesque wontreturn paramsnonnull();
|
||
void exit(int) wontreturn;
|
||
void _exit(int) libcesque wontreturn;
|
||
void _Exit(int) libcesque wontreturn;
|
||
void abort(void) wontreturn noinstrument;
|
||
int __cxa_atexit(void *, void *, void *) libcesque;
|
||
int atfork(void *, void *) libcesque;
|
||
int atexit(void (*)(void)) libcesque;
|
||
char *getenv(const char *) paramsnonnull() nosideeffect libcesque;
|
||
int putenv(char *) paramsnonnull();
|
||
int setenv(const char *, const char *, int) paramsnonnull();
|
||
int unsetenv(const char *);
|
||
int clearenv(void);
|
||
void fpreset(void);
|
||
int issetugid(void);
|
||
void *mmap(void *, uint64_t, int32_t, int32_t, int32_t, int64_t);
|
||
void *mremap(void *, size_t, size_t, int, ...);
|
||
int munmap(void *, uint64_t);
|
||
int mprotect(void *, uint64_t, int) privileged;
|
||
int msync(void *, size_t, int);
|
||
void *sbrk(intptr_t);
|
||
int brk(void *);
|
||
long fpathconf(int, int);
|
||
long pathconf(const char *, int);
|
||
int getgroups(int, uint32_t[]);
|
||
long gethostid(void);
|
||
int sethostid(long);
|
||
char *getlogin(void);
|
||
int getlogin_r(char *, size_t);
|
||
int lchown(const char *, uint32_t, uint32_t);
|
||
int getpagesize(void);
|
||
int syncfs(int);
|
||
int vhangup(void);
|
||
int getdtablesize(void);
|
||
int sethostname(const char *, size_t);
|
||
int acct(const char *);
|
||
|
||
bool _isheap(void *);
|
||
int NtGetVersion(void);
|
||
long missingno();
|
||
void __oom_hook(size_t);
|
||
void __print(const void *, size_t);
|
||
void __print_string(const char *);
|
||
void _loadxmm(void *);
|
||
void _peekall(void);
|
||
void _savexmm(void *);
|
||
void _weakfree(void *);
|
||
void free_s(void *) paramsnonnull() libcesque;
|
||
int close_s(int *) paramsnonnull() libcesque;
|
||
int OpenExecutable(void);
|
||
void ftrace_install(void);
|
||
long GetResourceLimit(int);
|
||
long GetMaxFd(void);
|
||
|
||
COSMOPOLITAN_C_END_
|
||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||
#endif /* COSMOPOLITAN_LIBC_RUNTIME_RUNTIME_H_ */
|