mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +00:00
Get GCC to mostly build with Cosmo
This commit is contained in:
parent
2eb7148474
commit
9b55dbe417
54 changed files with 113 additions and 132 deletions
|
@ -7,12 +7,11 @@ COSMOPOLITAN_C_START_
|
|||
int dprintf(int, const char *, ...) printfesque(2) paramsnonnull((2));
|
||||
int vdprintf(int, const char *, va_list) paramsnonnull();
|
||||
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
|
||||
#if defined(COSMO) && !defined(__cplusplus)
|
||||
#define dprintf(FD, FMT, ...) (dprintf)(FD, PFLINK(FMT), ##__VA_ARGS__)
|
||||
#define vdprintf(FD, FMT, VA) (vdprintf)(FD, PFLINK(FMT), VA)
|
||||
|
||||
#endif /* GNU && !ANSI */
|
||||
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_DPRINTF_H_ */
|
||||
|
|
|
@ -47,7 +47,7 @@ __msabi extern typeof(WaitForSingleObject) *const __imp_WaitForSingleObject;
|
|||
__msabi extern typeof(GetExitCodeProcess) *const __imp_GetExitCodeProcess;
|
||||
__msabi extern typeof(UnmapViewOfFile) *const __imp_UnmapViewOfFile;
|
||||
|
||||
static noinstrument __msabi bool32
|
||||
static dontinstrument __msabi bool32
|
||||
BlockExecveConsoleEvent(uint32_t dwCtrlType) {
|
||||
// block SIGINT and SIGQUIT in execve() parent process
|
||||
return true;
|
||||
|
|
|
@ -67,7 +67,7 @@ getcontext:
|
|||
|
||||
.end
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
noasan noubsan noinstrument int getcontext(ucontext_t *uc) {
|
||||
noasan noubsan dontinstrument int getcontext(ucontext_t *uc) {
|
||||
asm volatile("movaps\t%%xmm0,%0" : /* no outputs */ : "m"(uc->__fpustate.xmm[0]));
|
||||
asm volatile("movaps\t%%xmm1,%0" : /* no outputs */ : "m"(uc->__fpustate.xmm[1]));
|
||||
asm volatile("movaps\t%%xmm2,%0" : /* no outputs */ : "m"(uc->__fpustate.xmm[2]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue