mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-12 17:27:56 +00:00
- Get SIGWINCH working again on the New Technology - Correctly handle O_NOFOLLOW in open() on Windows - Implement synthetic umask() functionality on Windows - Do a better job managing file execute access on Windows - Fill in `st_uid` and `st_gid` with username hash on Windows - Munge UNICODE control pictures into control codes on Windows - Do a better job ensuring Windows console settings are restored - Introduce KPRINTF_LOG environment variable to log kprintf to a file
72 lines
1.8 KiB
C
72 lines
1.8 KiB
C
#ifndef COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGACTION_INTERNAL_H_
|
|
#define COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGACTION_INTERNAL_H_
|
|
#include "libc/calls/struct/sigaction.h"
|
|
#include "libc/calls/struct/siginfo.h"
|
|
#include "libc/mem/alloca.h"
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
COSMOPOLITAN_C_START_
|
|
|
|
struct sigaction_linux {
|
|
void *sa_handler;
|
|
uint64_t sa_flags;
|
|
void *sa_restorer;
|
|
uint32_t sa_mask[2];
|
|
};
|
|
|
|
struct sigaction_freebsd {
|
|
void *sa_handler;
|
|
uint32_t sa_flags;
|
|
uint32_t sa_mask[4];
|
|
};
|
|
|
|
struct sigaction_openbsd {
|
|
void *sa_handler;
|
|
uint32_t sa_mask[1];
|
|
uint32_t sa_flags;
|
|
};
|
|
|
|
struct sigaction_netbsd {
|
|
void *sa_handler;
|
|
uint32_t sa_mask[4];
|
|
uint32_t sa_flags;
|
|
};
|
|
|
|
struct sigaction_xnu_in {
|
|
void *sa_handler;
|
|
void *sa_restorer;
|
|
uint32_t sa_mask[1];
|
|
uint32_t sa_flags;
|
|
};
|
|
|
|
struct sigaction_xnu_out {
|
|
void *sa_handler;
|
|
uint32_t sa_mask[1];
|
|
uint32_t sa_flags;
|
|
};
|
|
|
|
union metasigaction {
|
|
struct sigaction cosmo;
|
|
struct sigaction_linux linux;
|
|
struct sigaction_freebsd freebsd;
|
|
struct sigaction_openbsd openbsd;
|
|
struct sigaction_netbsd netbsd;
|
|
struct sigaction_xnu_in xnu_in;
|
|
struct sigaction_xnu_out xnu_out;
|
|
};
|
|
|
|
void __sigenter_xnu(int, struct siginfo *, void *);
|
|
void __sigenter_wsl(int, struct siginfo *, void *);
|
|
void __sigenter_netbsd(int, struct siginfo *, void *);
|
|
void __sigenter_freebsd(int, struct siginfo *, void *);
|
|
void __sigenter_openbsd(int, struct siginfo *, void *);
|
|
|
|
const char *DescribeSigaction(char[256], int, const struct sigaction *);
|
|
#define DescribeSigaction(rc, sa) DescribeSigaction(alloca(256), rc, sa)
|
|
|
|
void _init_onntconsoleevent(void);
|
|
void _init_wincrash(void);
|
|
void _check_sigwinch(void);
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGACTION_INTERNAL_H_ */
|