Fix some issues and do some code cleanup

This commit is contained in:
Justine Tunney 2022-05-23 10:15:53 -07:00
parent 1f229e4efc
commit 312ed5c67c
72 changed files with 880 additions and 982 deletions

View file

@ -1573,18 +1573,6 @@ syscon sock SOCK_NONBLOCK 0x0800 0x0800 0x20000000 0x4000 0x20000000
syscon sock SOCK_DCCP 6 0 0 0 0 0 # what is it?
syscon sock SOCK_PACKET 10 0 0 0 0 0 # what is it?
syscon prsnlty ADDR_COMPAT_LAYOUT 0x0200000 0 0 0 0 0 # linux only
syscon prsnlty READ_IMPLIES_EXEC 0x0400000 0 0 0 0 0 # linux only
syscon prsnlty ADDR_LIMIT_3GB 0x8000000 0 0 0 0 0 # linux only
syscon prsnlty FDPIC_FUNCPTRS 0x0080000 0 0 0 0 0 # linux only
syscon prsnlty STICKY_TIMEOUTS 0x4000000 0 0 0 0 0 # linux only
syscon prsnlty MMAP_PAGE_ZERO 0x0100000 0 0 0 0 0 # linux only
syscon prsnlty ADDR_LIMIT_32BIT 0x0800000 0 0 0 0 0 # linux only
syscon prsnlty WHOLE_SECONDS 0x2000000 0 0 0 0 0 # linux only
syscon prsnlty ADDR_NO_RANDOMIZE 0x0040000 0 0 0 0 0 # linux only
syscon prsnlty SHORT_INODE 0x1000000 0 0 0 0 0 # linux only
syscon prsnlty UNAME26 0x0020000 0 0 0 0 0 # linux only
syscon misc TH_FIN 1 1 1 1 1 1 # consensus
syscon misc TH_SYN 2 2 2 2 2 2 # consensus
syscon misc TH_RST 4 4 4 4 4 4 # consensus

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon prsnlty,ADDR_COMPAT_LAYOUT,0x0200000,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon prsnlty,ADDR_LIMIT_32BIT,0x0800000,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon prsnlty,ADDR_LIMIT_3GB,0x8000000,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon prsnlty,ADDR_NO_RANDOMIZE,0x0040000,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon prsnlty,FDPIC_FUNCPTRS,0x0080000,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon prsnlty,MMAP_PAGE_ZERO,0x0100000,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon prsnlty,READ_IMPLIES_EXEC,0x0400000,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon prsnlty,SHORT_INODE,0x1000000,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon prsnlty,STICKY_TIMEOUTS,0x4000000,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon prsnlty,UNAME26,0x0020000,0,0,0,0,0

View file

@ -1,2 +0,0 @@
#include "libc/sysv/consts/syscon.internal.h"
.syscon prsnlty,WHOLE_SECONDS,0x2000000,0,0,0,0,0

View file

@ -1,34 +1,17 @@
#ifndef COSMOPOLITAN_LIBC_SYSV_CONSTS_PERSONALITY_H_
#define COSMOPOLITAN_LIBC_SYSV_CONSTS_PERSONALITY_H_
#include "libc/runtime/symbolic.h"
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
extern const long ADDR_COMPAT_LAYOUT;
extern const long READ_IMPLIES_EXEC;
extern const long ADDR_LIMIT_3GB;
extern const long FDPIC_FUNCPTRS;
extern const long STICKY_TIMEOUTS;
extern const long MMAP_PAGE_ZERO;
extern const long ADDR_LIMIT_32BIT;
extern const long WHOLE_SECONDS;
extern const long ADDR_NO_RANDOMIZE;
extern const long SHORT_INODE;
extern const long UNAME26;
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#define ADDR_COMPAT_LAYOUT SYMBOLIC(ADDR_COMPAT_LAYOUT)
#define READ_IMPLIES_EXEC SYMBOLIC(READ_IMPLIES_EXEC)
#define ADDR_LIMIT_3GB SYMBOLIC(ADDR_LIMIT_3GB)
#define FDPIC_FUNCPTRS SYMBOLIC(FDPIC_FUNCPTRS)
#define STICKY_TIMEOUTS SYMBOLIC(STICKY_TIMEOUTS)
#define MMAP_PAGE_ZERO SYMBOLIC(MMAP_PAGE_ZERO)
#define ADDR_LIMIT_32BIT SYMBOLIC(ADDR_LIMIT_32BIT)
#define WHOLE_SECONDS SYMBOLIC(WHOLE_SECONDS)
#define ADDR_NO_RANDOMIZE SYMBOLIC(ADDR_NO_RANDOMIZE)
#define SHORT_INODE SYMBOLIC(SHORT_INODE)
#define UNAME26 SYMBOLIC(UNAME26)
#define ADDR_COMPAT_LAYOUT 0x0200000
#define READ_IMPLIES_EXEC 0x0400000
#define ADDR_LIMIT_3GB 0x8000000
#define FDPIC_FUNCPTRS 0x0080000
#define STICKY_TIMEOUTS 0x4000000
#define MMAP_PAGE_ZERO 0x0100000
#define ADDR_LIMIT_32BIT 0x0800000
#define WHOLE_SECONDS 0x2000000
#define ADDR_NO_RANDOMIZE 0x0040000
#define SHORT_INODE 0x1000000
#define UNAME26 0x0020000
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_PERSONALITY_H_ */