mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Validate privileged code relationships
- Work towards improving non-optimized build support - Introduce MODE=zero which is -O0 without ASAN/UBSAN - Use system GCC when ~/.cosmo.mk has USE_SYSTEM_TOOLCHAIN=1 - Have package.com check .privileged code doesn't call non-privileged
This commit is contained in:
parent
01fd655097
commit
daf4454a06
82 changed files with 808 additions and 850 deletions
|
@ -1,9 +1,7 @@
|
|||
#ifndef COSMOPOLITAN_LIBC_CALLS_TERMIOS_H_
|
||||
#define COSMOPOLITAN_LIBC_CALLS_TERMIOS_H_
|
||||
#include "libc/calls/ioctl.h"
|
||||
#include "libc/calls/struct/termios.h"
|
||||
#include "libc/calls/struct/winsize.h"
|
||||
#include "libc/sysv/consts/termios.h"
|
||||
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
||||
COSMOPOLITAN_C_START_
|
||||
|
||||
|
@ -38,25 +36,6 @@ uint32_t cfgetispeed(const struct termios *);
|
|||
int tcsetwinsize(int, const struct winsize *);
|
||||
int tcgetwinsize(int, struct winsize *);
|
||||
|
||||
/*───────────────────────────────────────────────────────────────────────────│─╗
|
||||
│ cosmopolitan § teletypewriter » undiamonding ─╬─│┼
|
||||
╚────────────────────────────────────────────────────────────────────────────│*/
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
|
||||
#define tcsetattr(FD, OPT, TIO) tcsetattr_dispatch(FD, OPT, TIO)
|
||||
forceinline int tcsetattr_dispatch(int fd, int opt, const struct termios *tio) {
|
||||
if (__EQUIVALENT(opt, TCSANOW)) return ioctl(fd, TCSETS, (void *)tio);
|
||||
if (__EQUIVALENT(opt, TCSADRAIN)) return ioctl(fd, TCSETSW, (void *)tio);
|
||||
if (__EQUIVALENT(opt, TCSAFLUSH)) return ioctl(fd, TCSETSF, (void *)tio);
|
||||
return (tcsetattr)(fd, opt, tio);
|
||||
}
|
||||
|
||||
#define tcgetattr(FD, TIO) tcgetattr_dispatch(FD, TIO)
|
||||
forceinline int tcgetattr_dispatch(int fd, const struct termios *tio) {
|
||||
return ioctl(fd, TCGETS, (void *)tio);
|
||||
}
|
||||
|
||||
#endif /* GNUC && !ANSI */
|
||||
COSMOPOLITAN_C_END_
|
||||
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
||||
#endif /* COSMOPOLITAN_LIBC_CALLS_TERMIOS_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue