mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 14:23:09 +00:00
wasi-libc: Deduplicate sources and headers with regards to upstream musl.
Unfortunately some duplicate files must remain in lib/libc/wasi/libc-top-half because they include internal headers *in the same directory* which have edits relative to upstream musl. Because C is an amazing language, there is no way to make it so that e.g. upstream musl's src/stdio/fputc.c includes wasi-libc's src/stdio/putc.h instead of the upstream putc.h. The preprocessor always searches the current directory first for quote includes. Anyway, this still takes us from 2.9M to 1.4M for the combination of lib/libc/wasi and lib/libc/include/wasm-wasi-musl, so I still call it a win.
This commit is contained in:
parent
31e7c95bd2
commit
05d8b565ad
19
lib/libc/include/wasm-wasi-musl/alloca.h
vendored
19
lib/libc/include/wasm-wasi-musl/alloca.h
vendored
@ -1,19 +0,0 @@
|
|||||||
#ifndef _ALLOCA_H
|
|
||||||
#define _ALLOCA_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __NEED_size_t
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
void *alloca(size_t);
|
|
||||||
|
|
||||||
#define alloca __builtin_alloca
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
25
lib/libc/include/wasm-wasi-musl/ar.h
vendored
25
lib/libc/include/wasm-wasi-musl/ar.h
vendored
@ -1,25 +0,0 @@
|
|||||||
#ifndef _AR_H
|
|
||||||
#define _AR_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define ARMAG "!<arch>\n"
|
|
||||||
#define SARMAG 8
|
|
||||||
#define ARFMAG "`\n"
|
|
||||||
|
|
||||||
struct ar_hdr {
|
|
||||||
char ar_name[16];
|
|
||||||
char ar_date[12];
|
|
||||||
char ar_uid[6], ar_gid[6];
|
|
||||||
char ar_mode[8];
|
|
||||||
char ar_size[10];
|
|
||||||
char ar_fmag[2];
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
35
lib/libc/include/wasm-wasi-musl/arpa/ftp.h
vendored
35
lib/libc/include/wasm-wasi-musl/arpa/ftp.h
vendored
@ -1,35 +0,0 @@
|
|||||||
#ifndef _ARPA_FTP_H
|
|
||||||
#define _ARPA_FTP_H
|
|
||||||
#define PRELIM 1
|
|
||||||
#define COMPLETE 2
|
|
||||||
#define CONTINUE 3
|
|
||||||
#define TRANSIENT 4
|
|
||||||
#define ERROR 5
|
|
||||||
#define TYPE_A 1
|
|
||||||
#define TYPE_E 2
|
|
||||||
#define TYPE_I 3
|
|
||||||
#define TYPE_L 4
|
|
||||||
#define FORM_N 1
|
|
||||||
#define FORM_T 2
|
|
||||||
#define FORM_C 3
|
|
||||||
#define STRU_F 1
|
|
||||||
#define STRU_R 2
|
|
||||||
#define STRU_P 3
|
|
||||||
#define MODE_S 1
|
|
||||||
#define MODE_B 2
|
|
||||||
#define MODE_C 3
|
|
||||||
#define REC_ESC '\377'
|
|
||||||
#define REC_EOR '\001'
|
|
||||||
#define REC_EOF '\002'
|
|
||||||
#define BLK_EOR 0x80
|
|
||||||
#define BLK_EOF 0x40
|
|
||||||
#define BLK_ERRORS 0x20
|
|
||||||
#define BLK_RESTART 0x10
|
|
||||||
#define BLK_BYTECOUNT 2
|
|
||||||
#ifdef FTP_NAMES
|
|
||||||
char *modenames[] = {"0", "Stream", "Block", "Compressed" };
|
|
||||||
char *strunames[] = {"0", "File", "Record", "Page" };
|
|
||||||
char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" };
|
|
||||||
char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" };
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
251
lib/libc/include/wasm-wasi-musl/arpa/telnet.h
vendored
251
lib/libc/include/wasm-wasi-musl/arpa/telnet.h
vendored
@ -1,251 +0,0 @@
|
|||||||
#ifndef _ARPA_TELNET_H
|
|
||||||
#define _ARPA_TELNET_H
|
|
||||||
|
|
||||||
#define IAC 255
|
|
||||||
#define DONT 254
|
|
||||||
#define DO 253
|
|
||||||
#define WONT 252
|
|
||||||
#define WILL 251
|
|
||||||
#define SB 250
|
|
||||||
#define GA 249
|
|
||||||
#define EL 248
|
|
||||||
#define EC 247
|
|
||||||
#define AYT 246
|
|
||||||
#define AO 245
|
|
||||||
#define IP 244
|
|
||||||
#define BREAK 243
|
|
||||||
#define DM 242
|
|
||||||
#define NOP 241
|
|
||||||
#define SE 240
|
|
||||||
#define EOR 239
|
|
||||||
#define ABORT 238
|
|
||||||
#define SUSP 237
|
|
||||||
#define xEOF 236
|
|
||||||
|
|
||||||
#define SYNCH 242
|
|
||||||
|
|
||||||
#define telcmds ((char [][6]){ "EOF", "SUSP", "ABORT", "EOR", "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC", "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0 })
|
|
||||||
|
|
||||||
#define TELCMD_FIRST xEOF
|
|
||||||
#define TELCMD_LAST IAC
|
|
||||||
#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \
|
|
||||||
(unsigned int)(x) >= TELCMD_FIRST)
|
|
||||||
#define TELCMD(x) telcmds[(x)-TELCMD_FIRST]
|
|
||||||
|
|
||||||
#define TELOPT_BINARY 0
|
|
||||||
#define TELOPT_ECHO 1
|
|
||||||
#define TELOPT_RCP 2
|
|
||||||
#define TELOPT_SGA 3
|
|
||||||
#define TELOPT_NAMS 4
|
|
||||||
#define TELOPT_STATUS 5
|
|
||||||
#define TELOPT_TM 6
|
|
||||||
#define TELOPT_RCTE 7
|
|
||||||
#define TELOPT_NAOL 8
|
|
||||||
#define TELOPT_NAOP 9
|
|
||||||
#define TELOPT_NAOCRD 10
|
|
||||||
#define TELOPT_NAOHTS 11
|
|
||||||
#define TELOPT_NAOHTD 12
|
|
||||||
#define TELOPT_NAOFFD 13
|
|
||||||
#define TELOPT_NAOVTS 14
|
|
||||||
#define TELOPT_NAOVTD 15
|
|
||||||
#define TELOPT_NAOLFD 16
|
|
||||||
#define TELOPT_XASCII 17
|
|
||||||
#define TELOPT_LOGOUT 18
|
|
||||||
#define TELOPT_BM 19
|
|
||||||
#define TELOPT_DET 20
|
|
||||||
#define TELOPT_SUPDUP 21
|
|
||||||
#define TELOPT_SUPDUPOUTPUT 22
|
|
||||||
#define TELOPT_SNDLOC 23
|
|
||||||
#define TELOPT_TTYPE 24
|
|
||||||
#define TELOPT_EOR 25
|
|
||||||
#define TELOPT_TUID 26
|
|
||||||
#define TELOPT_OUTMRK 27
|
|
||||||
#define TELOPT_TTYLOC 28
|
|
||||||
#define TELOPT_3270REGIME 29
|
|
||||||
#define TELOPT_X3PAD 30
|
|
||||||
#define TELOPT_NAWS 31
|
|
||||||
#define TELOPT_TSPEED 32
|
|
||||||
#define TELOPT_LFLOW 33
|
|
||||||
#define TELOPT_LINEMODE 34
|
|
||||||
#define TELOPT_XDISPLOC 35
|
|
||||||
#define TELOPT_OLD_ENVIRON 36
|
|
||||||
#define TELOPT_AUTHENTICATION 37/* Authenticate */
|
|
||||||
#define TELOPT_ENCRYPT 38
|
|
||||||
#define TELOPT_NEW_ENVIRON 39
|
|
||||||
#define TELOPT_EXOPL 255
|
|
||||||
|
|
||||||
|
|
||||||
#define NTELOPTS (1+TELOPT_NEW_ENVIRON)
|
|
||||||
#ifdef TELOPTS
|
|
||||||
char *telopts[NTELOPTS+1] = {
|
|
||||||
"BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME",
|
|
||||||
"STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP",
|
|
||||||
"NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS",
|
|
||||||
"NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO",
|
|
||||||
"DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT",
|
|
||||||
"SEND LOCATION", "TERMINAL TYPE", "END OF RECORD",
|
|
||||||
"TACACS UID", "OUTPUT MARKING", "TTYLOC",
|
|
||||||
"3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW",
|
|
||||||
"LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION",
|
|
||||||
"ENCRYPT", "NEW-ENVIRON",
|
|
||||||
0,
|
|
||||||
};
|
|
||||||
#define TELOPT_FIRST TELOPT_BINARY
|
|
||||||
#define TELOPT_LAST TELOPT_NEW_ENVIRON
|
|
||||||
#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST)
|
|
||||||
#define TELOPT(x) telopts[(x)-TELOPT_FIRST]
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define TELQUAL_IS 0
|
|
||||||
#define TELQUAL_SEND 1
|
|
||||||
#define TELQUAL_INFO 2
|
|
||||||
#define TELQUAL_REPLY 2
|
|
||||||
#define TELQUAL_NAME 3
|
|
||||||
|
|
||||||
#define LFLOW_OFF 0
|
|
||||||
#define LFLOW_ON 1
|
|
||||||
#define LFLOW_RESTART_ANY 2
|
|
||||||
#define LFLOW_RESTART_XON 3
|
|
||||||
|
|
||||||
|
|
||||||
#define LM_MODE 1
|
|
||||||
#define LM_FORWARDMASK 2
|
|
||||||
#define LM_SLC 3
|
|
||||||
|
|
||||||
#define MODE_EDIT 0x01
|
|
||||||
#define MODE_TRAPSIG 0x02
|
|
||||||
#define MODE_ACK 0x04
|
|
||||||
#define MODE_SOFT_TAB 0x08
|
|
||||||
#define MODE_LIT_ECHO 0x10
|
|
||||||
|
|
||||||
#define MODE_MASK 0x1f
|
|
||||||
|
|
||||||
#define MODE_FLOW 0x0100
|
|
||||||
#define MODE_ECHO 0x0200
|
|
||||||
#define MODE_INBIN 0x0400
|
|
||||||
#define MODE_OUTBIN 0x0800
|
|
||||||
#define MODE_FORCE 0x1000
|
|
||||||
|
|
||||||
#define SLC_SYNCH 1
|
|
||||||
#define SLC_BRK 2
|
|
||||||
#define SLC_IP 3
|
|
||||||
#define SLC_AO 4
|
|
||||||
#define SLC_AYT 5
|
|
||||||
#define SLC_EOR 6
|
|
||||||
#define SLC_ABORT 7
|
|
||||||
#define SLC_EOF 8
|
|
||||||
#define SLC_SUSP 9
|
|
||||||
#define SLC_EC 10
|
|
||||||
#define SLC_EL 11
|
|
||||||
#define SLC_EW 12
|
|
||||||
#define SLC_RP 13
|
|
||||||
#define SLC_LNEXT 14
|
|
||||||
#define SLC_XON 15
|
|
||||||
#define SLC_XOFF 16
|
|
||||||
#define SLC_FORW1 17
|
|
||||||
#define SLC_FORW2 18
|
|
||||||
|
|
||||||
#define NSLC 18
|
|
||||||
|
|
||||||
#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \
|
|
||||||
"ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \
|
|
||||||
"LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0,
|
|
||||||
#ifdef SLC_NAMES
|
|
||||||
char *slc_names[] = {
|
|
||||||
SLC_NAMELIST
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
extern char *slc_names[];
|
|
||||||
#define SLC_NAMES SLC_NAMELIST
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC)
|
|
||||||
#define SLC_NAME(x) slc_names[x]
|
|
||||||
|
|
||||||
#define SLC_NOSUPPORT 0
|
|
||||||
#define SLC_CANTCHANGE 1
|
|
||||||
#define SLC_VARIABLE 2
|
|
||||||
#define SLC_DEFAULT 3
|
|
||||||
#define SLC_LEVELBITS 0x03
|
|
||||||
|
|
||||||
#define SLC_FUNC 0
|
|
||||||
#define SLC_FLAGS 1
|
|
||||||
#define SLC_VALUE 2
|
|
||||||
|
|
||||||
#define SLC_ACK 0x80
|
|
||||||
#define SLC_FLUSHIN 0x40
|
|
||||||
#define SLC_FLUSHOUT 0x20
|
|
||||||
|
|
||||||
#define OLD_ENV_VAR 1
|
|
||||||
#define OLD_ENV_VALUE 0
|
|
||||||
#define NEW_ENV_VAR 0
|
|
||||||
#define NEW_ENV_VALUE 1
|
|
||||||
#define ENV_ESC 2
|
|
||||||
#define ENV_USERVAR 3
|
|
||||||
|
|
||||||
#define AUTH_WHO_CLIENT 0
|
|
||||||
#define AUTH_WHO_SERVER 1
|
|
||||||
#define AUTH_WHO_MASK 1
|
|
||||||
|
|
||||||
#define AUTH_HOW_ONE_WAY 0
|
|
||||||
#define AUTH_HOW_MUTUAL 2
|
|
||||||
#define AUTH_HOW_MASK 2
|
|
||||||
|
|
||||||
#define AUTHTYPE_NULL 0
|
|
||||||
#define AUTHTYPE_KERBEROS_V4 1
|
|
||||||
#define AUTHTYPE_KERBEROS_V5 2
|
|
||||||
#define AUTHTYPE_SPX 3
|
|
||||||
#define AUTHTYPE_MINK 4
|
|
||||||
#define AUTHTYPE_CNT 5
|
|
||||||
|
|
||||||
#define AUTHTYPE_TEST 99
|
|
||||||
|
|
||||||
#ifdef AUTH_NAMES
|
|
||||||
char *authtype_names[] = {
|
|
||||||
"NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0,
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
extern char *authtype_names[];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT)
|
|
||||||
#define AUTHTYPE_NAME(x) authtype_names[x]
|
|
||||||
|
|
||||||
#define ENCRYPT_IS 0
|
|
||||||
#define ENCRYPT_SUPPORT 1
|
|
||||||
#define ENCRYPT_REPLY 2
|
|
||||||
#define ENCRYPT_START 3
|
|
||||||
#define ENCRYPT_END 4
|
|
||||||
#define ENCRYPT_REQSTART 5
|
|
||||||
#define ENCRYPT_REQEND 6
|
|
||||||
#define ENCRYPT_ENC_KEYID 7
|
|
||||||
#define ENCRYPT_DEC_KEYID 8
|
|
||||||
#define ENCRYPT_CNT 9
|
|
||||||
|
|
||||||
#define ENCTYPE_ANY 0
|
|
||||||
#define ENCTYPE_DES_CFB64 1
|
|
||||||
#define ENCTYPE_DES_OFB64 2
|
|
||||||
#define ENCTYPE_CNT 3
|
|
||||||
|
|
||||||
#ifdef ENCRYPT_NAMES
|
|
||||||
char *encrypt_names[] = {
|
|
||||||
"IS", "SUPPORT", "REPLY", "START", "END",
|
|
||||||
"REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID",
|
|
||||||
0,
|
|
||||||
};
|
|
||||||
char *enctype_names[] = {
|
|
||||||
"ANY", "DES_CFB64", "DES_OFB64", 0,
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
extern char *encrypt_names[];
|
|
||||||
extern char *enctype_names[];
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT)
|
|
||||||
#define ENCRYPT_NAME(x) encrypt_names[x]
|
|
||||||
|
|
||||||
#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT)
|
|
||||||
#define ENCTYPE_NAME(x) enctype_names[x]
|
|
||||||
|
|
||||||
#endif
|
|
||||||
23
lib/libc/include/wasm-wasi-musl/assert.h
vendored
23
lib/libc/include/wasm-wasi-musl/assert.h
vendored
@ -1,23 +0,0 @@
|
|||||||
#include <features.h>
|
|
||||||
|
|
||||||
#undef assert
|
|
||||||
|
|
||||||
#ifdef NDEBUG
|
|
||||||
#define assert(x) (void)0
|
|
||||||
#else
|
|
||||||
#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
|
|
||||||
#define static_assert _Static_assert
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_Noreturn void __assert_fail (const char *, const char *, int, const char *);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
16
lib/libc/include/wasm-wasi-musl/bits/float.h
vendored
16
lib/libc/include/wasm-wasi-musl/bits/float.h
vendored
@ -1,16 +0,0 @@
|
|||||||
#define FLT_EVAL_METHOD 0
|
|
||||||
|
|
||||||
#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L
|
|
||||||
#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L
|
|
||||||
#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L
|
|
||||||
#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L
|
|
||||||
|
|
||||||
#define LDBL_MANT_DIG 113
|
|
||||||
#define LDBL_MIN_EXP (-16381)
|
|
||||||
#define LDBL_MAX_EXP 16384
|
|
||||||
|
|
||||||
#define LDBL_DIG 33
|
|
||||||
#define LDBL_MIN_10_EXP (-4931)
|
|
||||||
#define LDBL_MAX_10_EXP 4932
|
|
||||||
|
|
||||||
#define DECIMAL_DIG 36
|
|
||||||
@ -1 +0,0 @@
|
|||||||
#define IPC_STAT 2
|
|
||||||
2
lib/libc/include/wasm-wasi-musl/bits/reg.h
vendored
2
lib/libc/include/wasm-wasi-musl/bits/reg.h
vendored
@ -1,2 +0,0 @@
|
|||||||
#undef __WORDSIZE
|
|
||||||
#define __WORDSIZE 64
|
|
||||||
26
lib/libc/include/wasm-wasi-musl/byteswap.h
vendored
26
lib/libc/include/wasm-wasi-musl/byteswap.h
vendored
@ -1,26 +0,0 @@
|
|||||||
#ifndef _BYTESWAP_H
|
|
||||||
#define _BYTESWAP_H
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
static __inline uint16_t __bswap_16(uint16_t __x)
|
|
||||||
{
|
|
||||||
return __x<<8 | __x>>8;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline uint32_t __bswap_32(uint32_t __x)
|
|
||||||
{
|
|
||||||
return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline uint64_t __bswap_64(uint64_t __x)
|
|
||||||
{
|
|
||||||
return __bswap_32(__x)+0ULL<<32 | __bswap_32(__x>>32);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define bswap_16(x) __bswap_16(x)
|
|
||||||
#define bswap_32(x) __bswap_32(x)
|
|
||||||
#define bswap_64(x) __bswap_64(x)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
29
lib/libc/include/wasm-wasi-musl/cpio.h
vendored
29
lib/libc/include/wasm-wasi-musl/cpio.h
vendored
@ -1,29 +0,0 @@
|
|||||||
#ifndef _CPIO_H
|
|
||||||
#define _CPIO_H
|
|
||||||
|
|
||||||
#define MAGIC "070707"
|
|
||||||
|
|
||||||
#define C_IRUSR 000400
|
|
||||||
#define C_IWUSR 000200
|
|
||||||
#define C_IXUSR 000100
|
|
||||||
#define C_IRGRP 000040
|
|
||||||
#define C_IWGRP 000020
|
|
||||||
#define C_IXGRP 000010
|
|
||||||
#define C_IROTH 000004
|
|
||||||
#define C_IWOTH 000002
|
|
||||||
#define C_IXOTH 000001
|
|
||||||
|
|
||||||
#define C_ISUID 004000
|
|
||||||
#define C_ISGID 002000
|
|
||||||
#define C_ISVTX 001000
|
|
||||||
|
|
||||||
#define C_ISBLK 060000
|
|
||||||
#define C_ISCHR 020000
|
|
||||||
#define C_ISDIR 040000
|
|
||||||
#define C_ISFIFO 010000
|
|
||||||
#define C_ISSOCK 0140000
|
|
||||||
#define C_ISLNK 0120000
|
|
||||||
#define C_ISCTG 0110000
|
|
||||||
#define C_ISREG 0100000
|
|
||||||
|
|
||||||
#endif
|
|
||||||
20
lib/libc/include/wasm-wasi-musl/crypt.h
vendored
20
lib/libc/include/wasm-wasi-musl/crypt.h
vendored
@ -1,20 +0,0 @@
|
|||||||
#ifndef _CRYPT_H
|
|
||||||
#define _CRYPT_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct crypt_data {
|
|
||||||
int initialized;
|
|
||||||
char __buf[256];
|
|
||||||
};
|
|
||||||
|
|
||||||
char *crypt(const char *, const char *);
|
|
||||||
char *crypt_r(const char *, const char *, struct crypt_data *);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
77
lib/libc/include/wasm-wasi-musl/ctype.h
vendored
77
lib/libc/include/wasm-wasi-musl/ctype.h
vendored
@ -1,77 +0,0 @@
|
|||||||
#ifndef _CTYPE_H
|
|
||||||
#define _CTYPE_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
int isalnum(int);
|
|
||||||
int isalpha(int);
|
|
||||||
int isblank(int);
|
|
||||||
int iscntrl(int);
|
|
||||||
int isdigit(int);
|
|
||||||
int isgraph(int);
|
|
||||||
int islower(int);
|
|
||||||
int isprint(int);
|
|
||||||
int ispunct(int);
|
|
||||||
int isspace(int);
|
|
||||||
int isupper(int);
|
|
||||||
int isxdigit(int);
|
|
||||||
int tolower(int);
|
|
||||||
int toupper(int);
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
static __inline int __isspace(int _c)
|
|
||||||
{
|
|
||||||
return _c == ' ' || (unsigned)_c-'\t' < 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
#define isalpha(a) (0 ? isalpha(a) : (((unsigned)(a)|32)-'a') < 26)
|
|
||||||
#define isdigit(a) (0 ? isdigit(a) : ((unsigned)(a)-'0') < 10)
|
|
||||||
#define islower(a) (0 ? islower(a) : ((unsigned)(a)-'a') < 26)
|
|
||||||
#define isupper(a) (0 ? isupper(a) : ((unsigned)(a)-'A') < 26)
|
|
||||||
#define isprint(a) (0 ? isprint(a) : ((unsigned)(a)-0x20) < 0x5f)
|
|
||||||
#define isgraph(a) (0 ? isgraph(a) : ((unsigned)(a)-0x21) < 0x5e)
|
|
||||||
#define isspace(a) __isspace(a)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
|
||||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
|
|
||||||
|| defined(_BSD_SOURCE)
|
|
||||||
|
|
||||||
#define __NEED_locale_t
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
int isalnum_l(int, locale_t);
|
|
||||||
int isalpha_l(int, locale_t);
|
|
||||||
int isblank_l(int, locale_t);
|
|
||||||
int iscntrl_l(int, locale_t);
|
|
||||||
int isdigit_l(int, locale_t);
|
|
||||||
int isgraph_l(int, locale_t);
|
|
||||||
int islower_l(int, locale_t);
|
|
||||||
int isprint_l(int, locale_t);
|
|
||||||
int ispunct_l(int, locale_t);
|
|
||||||
int isspace_l(int, locale_t);
|
|
||||||
int isupper_l(int, locale_t);
|
|
||||||
int isxdigit_l(int, locale_t);
|
|
||||||
int tolower_l(int, locale_t);
|
|
||||||
int toupper_l(int, locale_t);
|
|
||||||
|
|
||||||
int isascii(int);
|
|
||||||
int toascii(int);
|
|
||||||
#define _tolower(a) ((a)|0x20)
|
|
||||||
#define _toupper(a) ((a)&0x5f)
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#define isascii(a) (0 ? isascii(a) : (unsigned)(a) < 128)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
80
lib/libc/include/wasm-wasi-musl/endian.h
vendored
80
lib/libc/include/wasm-wasi-musl/endian.h
vendored
@ -1,80 +0,0 @@
|
|||||||
#ifndef _ENDIAN_H
|
|
||||||
#define _ENDIAN_H
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
#define __NEED_uint16_t
|
|
||||||
#define __NEED_uint32_t
|
|
||||||
#define __NEED_uint64_t
|
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
#define __PDP_ENDIAN 3412
|
|
||||||
|
|
||||||
#define BIG_ENDIAN __BIG_ENDIAN
|
|
||||||
#define LITTLE_ENDIAN __LITTLE_ENDIAN
|
|
||||||
#define PDP_ENDIAN __PDP_ENDIAN
|
|
||||||
#define BYTE_ORDER __BYTE_ORDER
|
|
||||||
|
|
||||||
static __inline uint16_t __bswap16(uint16_t __x)
|
|
||||||
{
|
|
||||||
return __x<<8 | __x>>8;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline uint32_t __bswap32(uint32_t __x)
|
|
||||||
{
|
|
||||||
return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
|
|
||||||
}
|
|
||||||
|
|
||||||
static __inline uint64_t __bswap64(uint64_t __x)
|
|
||||||
{
|
|
||||||
return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
||||||
#define htobe16(x) __bswap16(x)
|
|
||||||
#define be16toh(x) __bswap16(x)
|
|
||||||
#define htobe32(x) __bswap32(x)
|
|
||||||
#define be32toh(x) __bswap32(x)
|
|
||||||
#define htobe64(x) __bswap64(x)
|
|
||||||
#define be64toh(x) __bswap64(x)
|
|
||||||
#define htole16(x) (uint16_t)(x)
|
|
||||||
#define le16toh(x) (uint16_t)(x)
|
|
||||||
#define htole32(x) (uint32_t)(x)
|
|
||||||
#define le32toh(x) (uint32_t)(x)
|
|
||||||
#define htole64(x) (uint64_t)(x)
|
|
||||||
#define le64toh(x) (uint64_t)(x)
|
|
||||||
#else
|
|
||||||
#define htobe16(x) (uint16_t)(x)
|
|
||||||
#define be16toh(x) (uint16_t)(x)
|
|
||||||
#define htobe32(x) (uint32_t)(x)
|
|
||||||
#define be32toh(x) (uint32_t)(x)
|
|
||||||
#define htobe64(x) (uint64_t)(x)
|
|
||||||
#define be64toh(x) (uint64_t)(x)
|
|
||||||
#define htole16(x) __bswap16(x)
|
|
||||||
#define le16toh(x) __bswap16(x)
|
|
||||||
#define htole32(x) __bswap32(x)
|
|
||||||
#define le32toh(x) __bswap32(x)
|
|
||||||
#define htole64(x) __bswap64(x)
|
|
||||||
#define le64toh(x) __bswap64(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
||||||
#define betoh16(x) __bswap16(x)
|
|
||||||
#define betoh32(x) __bswap32(x)
|
|
||||||
#define betoh64(x) __bswap64(x)
|
|
||||||
#define letoh16(x) (uint16_t)(x)
|
|
||||||
#define letoh32(x) (uint32_t)(x)
|
|
||||||
#define letoh64(x) (uint64_t)(x)
|
|
||||||
#else
|
|
||||||
#define betoh16(x) (uint16_t)(x)
|
|
||||||
#define betoh32(x) (uint32_t)(x)
|
|
||||||
#define betoh64(x) (uint64_t)(x)
|
|
||||||
#define letoh16(x) __bswap16(x)
|
|
||||||
#define letoh32(x) __bswap32(x)
|
|
||||||
#define letoh64(x) __bswap64(x)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
25
lib/libc/include/wasm-wasi-musl/err.h
vendored
25
lib/libc/include/wasm-wasi-musl/err.h
vendored
@ -1,25 +0,0 @@
|
|||||||
#ifndef _ERR_H
|
|
||||||
#define _ERR_H
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void warn(const char *, ...);
|
|
||||||
void vwarn(const char *, va_list);
|
|
||||||
void warnx(const char *, ...);
|
|
||||||
void vwarnx(const char *, va_list);
|
|
||||||
|
|
||||||
_Noreturn void err(int, const char *, ...);
|
|
||||||
_Noreturn void verr(int, const char *, va_list);
|
|
||||||
_Noreturn void errx(int, const char *, ...);
|
|
||||||
_Noreturn void verrx(int, const char *, va_list);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
40
lib/libc/include/wasm-wasi-musl/features.h
vendored
40
lib/libc/include/wasm-wasi-musl/features.h
vendored
@ -1,40 +0,0 @@
|
|||||||
#ifndef _FEATURES_H
|
|
||||||
#define _FEATURES_H
|
|
||||||
|
|
||||||
#if defined(_ALL_SOURCE) && !defined(_GNU_SOURCE)
|
|
||||||
#define _GNU_SOURCE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_DEFAULT_SOURCE) && !defined(_BSD_SOURCE)
|
|
||||||
#define _BSD_SOURCE 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \
|
|
||||||
&& !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \
|
|
||||||
&& !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__)
|
|
||||||
#define _BSD_SOURCE 1
|
|
||||||
#define _XOPEN_SOURCE 700
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
|
||||||
#define __restrict restrict
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __restrict
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
|
|
||||||
#define __inline inline
|
|
||||||
#elif !defined(__GNUC__)
|
|
||||||
#define __inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 201112L
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
#define _Noreturn __attribute__((__noreturn__))
|
|
||||||
#else
|
|
||||||
#define _Noreturn
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __REDIR(x,y) __typeof__(x) x __asm__(#y)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
47
lib/libc/include/wasm-wasi-musl/fmtmsg.h
vendored
47
lib/libc/include/wasm-wasi-musl/fmtmsg.h
vendored
@ -1,47 +0,0 @@
|
|||||||
#ifndef _FMTMSG_H
|
|
||||||
#define _FMTMSG_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MM_HARD 1
|
|
||||||
#define MM_SOFT 2
|
|
||||||
#define MM_FIRM 4
|
|
||||||
|
|
||||||
#define MM_APPL 8
|
|
||||||
#define MM_UTIL 16
|
|
||||||
#define MM_OPSYS 32
|
|
||||||
|
|
||||||
#define MM_RECOVER 64
|
|
||||||
#define MM_NRECOV 128
|
|
||||||
|
|
||||||
#define MM_PRINT 256
|
|
||||||
#define MM_CONSOLE 512
|
|
||||||
|
|
||||||
#define MM_NULLMC 0L
|
|
||||||
|
|
||||||
#define MM_HALT 1
|
|
||||||
#define MM_ERROR 2
|
|
||||||
#define MM_WARNING 3
|
|
||||||
#define MM_INFO 4
|
|
||||||
#define MM_NOSEV 0
|
|
||||||
|
|
||||||
#define MM_OK 0
|
|
||||||
#define MM_NOTOK (-1)
|
|
||||||
#define MM_NOMSG 1
|
|
||||||
#define MM_NOCON 4
|
|
||||||
|
|
||||||
#define MM_NULLLBL ((char*)0)
|
|
||||||
#define MM_NULLTXT ((char*)0)
|
|
||||||
#define MM_NULLACT ((char*)0)
|
|
||||||
#define MM_NULLTAG ((char*)0)
|
|
||||||
#define MM_NULLSEV 0
|
|
||||||
|
|
||||||
int fmtmsg(long, const char *, int, const char *, const char *, const char *);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
24
lib/libc/include/wasm-wasi-musl/fnmatch.h
vendored
24
lib/libc/include/wasm-wasi-musl/fnmatch.h
vendored
@ -1,24 +0,0 @@
|
|||||||
#ifndef _FNMATCH_H
|
|
||||||
#define _FNMATCH_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FNM_PATHNAME 0x1
|
|
||||||
#define FNM_NOESCAPE 0x2
|
|
||||||
#define FNM_PERIOD 0x4
|
|
||||||
#define FNM_LEADING_DIR 0x8
|
|
||||||
#define FNM_CASEFOLD 0x10
|
|
||||||
#define FNM_FILE_NAME FNM_PATHNAME
|
|
||||||
|
|
||||||
#define FNM_NOMATCH 1
|
|
||||||
#define FNM_NOSYS (-1)
|
|
||||||
|
|
||||||
int fnmatch(const char *, const char *, int);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
30
lib/libc/include/wasm-wasi-musl/getopt.h
vendored
30
lib/libc/include/wasm-wasi-musl/getopt.h
vendored
@ -1,30 +0,0 @@
|
|||||||
#ifndef _GETOPT_H
|
|
||||||
#define _GETOPT_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int getopt(int, char * const [], const char *);
|
|
||||||
extern char *optarg;
|
|
||||||
extern int optind, opterr, optopt, optreset;
|
|
||||||
|
|
||||||
struct option {
|
|
||||||
const char *name;
|
|
||||||
int has_arg;
|
|
||||||
int *flag;
|
|
||||||
int val;
|
|
||||||
};
|
|
||||||
|
|
||||||
int getopt_long(int, char *const *, const char *, const struct option *, int *);
|
|
||||||
int getopt_long_only(int, char *const *, const char *, const struct option *, int *);
|
|
||||||
|
|
||||||
#define no_argument 0
|
|
||||||
#define required_argument 1
|
|
||||||
#define optional_argument 2
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
24
lib/libc/include/wasm-wasi-musl/iconv.h
vendored
24
lib/libc/include/wasm-wasi-musl/iconv.h
vendored
@ -1,24 +0,0 @@
|
|||||||
#ifndef _ICONV_H
|
|
||||||
#define _ICONV_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
#define __NEED_size_t
|
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
typedef void *iconv_t;
|
|
||||||
|
|
||||||
iconv_t iconv_open(const char *, const char *);
|
|
||||||
size_t iconv(iconv_t, char **__restrict, size_t *__restrict, char **__restrict, size_t *__restrict);
|
|
||||||
int iconv_close(iconv_t);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
20
lib/libc/include/wasm-wasi-musl/iso646.h
vendored
20
lib/libc/include/wasm-wasi-musl/iso646.h
vendored
@ -1,20 +0,0 @@
|
|||||||
#ifndef _ISO646_H
|
|
||||||
#define _ISO646_H
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
|
|
||||||
#define and &&
|
|
||||||
#define and_eq &=
|
|
||||||
#define bitand &
|
|
||||||
#define bitor |
|
|
||||||
#define compl ~
|
|
||||||
#define not !
|
|
||||||
#define not_eq !=
|
|
||||||
#define or ||
|
|
||||||
#define or_eq |=
|
|
||||||
#define xor ^
|
|
||||||
#define xor_eq ^=
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
98
lib/libc/include/wasm-wasi-musl/langinfo.h
vendored
98
lib/libc/include/wasm-wasi-musl/langinfo.h
vendored
@ -1,98 +0,0 @@
|
|||||||
#ifndef _LANGINFO_H
|
|
||||||
#define _LANGINFO_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
#include <nl_types.h>
|
|
||||||
|
|
||||||
#define __NEED_locale_t
|
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
#define ABDAY_1 0x20000
|
|
||||||
#define ABDAY_2 0x20001
|
|
||||||
#define ABDAY_3 0x20002
|
|
||||||
#define ABDAY_4 0x20003
|
|
||||||
#define ABDAY_5 0x20004
|
|
||||||
#define ABDAY_6 0x20005
|
|
||||||
#define ABDAY_7 0x20006
|
|
||||||
|
|
||||||
#define DAY_1 0x20007
|
|
||||||
#define DAY_2 0x20008
|
|
||||||
#define DAY_3 0x20009
|
|
||||||
#define DAY_4 0x2000A
|
|
||||||
#define DAY_5 0x2000B
|
|
||||||
#define DAY_6 0x2000C
|
|
||||||
#define DAY_7 0x2000D
|
|
||||||
|
|
||||||
#define ABMON_1 0x2000E
|
|
||||||
#define ABMON_2 0x2000F
|
|
||||||
#define ABMON_3 0x20010
|
|
||||||
#define ABMON_4 0x20011
|
|
||||||
#define ABMON_5 0x20012
|
|
||||||
#define ABMON_6 0x20013
|
|
||||||
#define ABMON_7 0x20014
|
|
||||||
#define ABMON_8 0x20015
|
|
||||||
#define ABMON_9 0x20016
|
|
||||||
#define ABMON_10 0x20017
|
|
||||||
#define ABMON_11 0x20018
|
|
||||||
#define ABMON_12 0x20019
|
|
||||||
|
|
||||||
#define MON_1 0x2001A
|
|
||||||
#define MON_2 0x2001B
|
|
||||||
#define MON_3 0x2001C
|
|
||||||
#define MON_4 0x2001D
|
|
||||||
#define MON_5 0x2001E
|
|
||||||
#define MON_6 0x2001F
|
|
||||||
#define MON_7 0x20020
|
|
||||||
#define MON_8 0x20021
|
|
||||||
#define MON_9 0x20022
|
|
||||||
#define MON_10 0x20023
|
|
||||||
#define MON_11 0x20024
|
|
||||||
#define MON_12 0x20025
|
|
||||||
|
|
||||||
#define AM_STR 0x20026
|
|
||||||
#define PM_STR 0x20027
|
|
||||||
|
|
||||||
#define D_T_FMT 0x20028
|
|
||||||
#define D_FMT 0x20029
|
|
||||||
#define T_FMT 0x2002A
|
|
||||||
#define T_FMT_AMPM 0x2002B
|
|
||||||
|
|
||||||
#define ERA 0x2002C
|
|
||||||
#define ERA_D_FMT 0x2002E
|
|
||||||
#define ALT_DIGITS 0x2002F
|
|
||||||
#define ERA_D_T_FMT 0x20030
|
|
||||||
#define ERA_T_FMT 0x20031
|
|
||||||
|
|
||||||
#define CODESET 14
|
|
||||||
|
|
||||||
#define CRNCYSTR 0x4000F
|
|
||||||
|
|
||||||
#define RADIXCHAR 0x10000
|
|
||||||
#define THOUSEP 0x10001
|
|
||||||
#define YESEXPR 0x50000
|
|
||||||
#define NOEXPR 0x50001
|
|
||||||
|
|
||||||
#define _NL_LOCALE_NAME(cat) (((cat)<<16) | 0xffff)
|
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE)
|
|
||||||
#define NL_LOCALE_NAME(cat) _NL_LOCALE_NAME(cat)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
||||||
#define YESSTR 0x50002
|
|
||||||
#define NOSTR 0x50003
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char *nl_langinfo(nl_item);
|
|
||||||
char *nl_langinfo_l(nl_item, locale_t);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
15
lib/libc/include/wasm-wasi-musl/libgen.h
vendored
15
lib/libc/include/wasm-wasi-musl/libgen.h
vendored
@ -1,15 +0,0 @@
|
|||||||
#ifndef _LIBGEN_H
|
|
||||||
#define _LIBGEN_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
char *dirname(char *);
|
|
||||||
char *basename(char *);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
1
lib/libc/include/wasm-wasi-musl/memory.h
vendored
1
lib/libc/include/wasm-wasi-musl/memory.h
vendored
@ -1 +0,0 @@
|
|||||||
#include <string.h>
|
|
||||||
23
lib/libc/include/wasm-wasi-musl/monetary.h
vendored
23
lib/libc/include/wasm-wasi-musl/monetary.h
vendored
@ -1,23 +0,0 @@
|
|||||||
#ifndef _MONETARY_H
|
|
||||||
#define _MONETARY_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
#define __NEED_ssize_t
|
|
||||||
#define __NEED_size_t
|
|
||||||
#define __NEED_locale_t
|
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
ssize_t strfmon(char *__restrict, size_t, const char *__restrict, ...);
|
|
||||||
ssize_t strfmon_l(char *__restrict, size_t, locale_t, const char *__restrict, ...);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
41
lib/libc/include/wasm-wasi-musl/mqueue.h
vendored
41
lib/libc/include/wasm-wasi-musl/mqueue.h
vendored
@ -1,41 +0,0 @@
|
|||||||
#ifndef _MQUEUE_H
|
|
||||||
#define _MQUEUE_H
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
#define __NEED_size_t
|
|
||||||
#define __NEED_ssize_t
|
|
||||||
#define __NEED_pthread_attr_t
|
|
||||||
#define __NEED_time_t
|
|
||||||
#define __NEED_struct_timespec
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
typedef int mqd_t;
|
|
||||||
struct mq_attr {
|
|
||||||
long mq_flags, mq_maxmsg, mq_msgsize, mq_curmsgs, __unused[4];
|
|
||||||
};
|
|
||||||
struct sigevent;
|
|
||||||
|
|
||||||
int mq_close(mqd_t);
|
|
||||||
int mq_getattr(mqd_t, struct mq_attr *);
|
|
||||||
int mq_notify(mqd_t, const struct sigevent *);
|
|
||||||
mqd_t mq_open(const char *, int, ...);
|
|
||||||
ssize_t mq_receive(mqd_t, char *, size_t, unsigned *);
|
|
||||||
int mq_send(mqd_t, const char *, size_t, unsigned);
|
|
||||||
int mq_setattr(mqd_t, const struct mq_attr *__restrict, struct mq_attr *__restrict);
|
|
||||||
ssize_t mq_timedreceive(mqd_t, char *__restrict, size_t, unsigned *__restrict, const struct timespec *__restrict);
|
|
||||||
int mq_timedsend(mqd_t, const char *, size_t, unsigned, const struct timespec *);
|
|
||||||
int mq_unlink(const char *);
|
|
||||||
|
|
||||||
#if _REDIR_TIME64
|
|
||||||
__REDIR(mq_timedreceive, __mq_timedreceive_time64);
|
|
||||||
__REDIR(mq_timedsend, __mq_timedsend_time64);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
305
lib/libc/include/wasm-wasi-musl/netinet/icmp6.h
vendored
305
lib/libc/include/wasm-wasi-musl/netinet/icmp6.h
vendored
@ -1,305 +0,0 @@
|
|||||||
#ifndef _NETINET_ICMP6_H
|
|
||||||
#define _NETINET_ICMP6_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
|
|
||||||
#define ICMP6_FILTER 1
|
|
||||||
|
|
||||||
#define ICMP6_FILTER_BLOCK 1
|
|
||||||
#define ICMP6_FILTER_PASS 2
|
|
||||||
#define ICMP6_FILTER_BLOCKOTHERS 3
|
|
||||||
#define ICMP6_FILTER_PASSONLY 4
|
|
||||||
|
|
||||||
struct icmp6_filter {
|
|
||||||
uint32_t icmp6_filt[8];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct icmp6_hdr {
|
|
||||||
uint8_t icmp6_type;
|
|
||||||
uint8_t icmp6_code;
|
|
||||||
uint16_t icmp6_cksum;
|
|
||||||
union {
|
|
||||||
uint32_t icmp6_un_data32[1];
|
|
||||||
uint16_t icmp6_un_data16[2];
|
|
||||||
uint8_t icmp6_un_data8[4];
|
|
||||||
} icmp6_dataun;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define icmp6_data32 icmp6_dataun.icmp6_un_data32
|
|
||||||
#define icmp6_data16 icmp6_dataun.icmp6_un_data16
|
|
||||||
#define icmp6_data8 icmp6_dataun.icmp6_un_data8
|
|
||||||
#define icmp6_pptr icmp6_data32[0]
|
|
||||||
#define icmp6_mtu icmp6_data32[0]
|
|
||||||
#define icmp6_id icmp6_data16[0]
|
|
||||||
#define icmp6_seq icmp6_data16[1]
|
|
||||||
#define icmp6_maxdelay icmp6_data16[0]
|
|
||||||
|
|
||||||
#define ICMP6_DST_UNREACH 1
|
|
||||||
#define ICMP6_PACKET_TOO_BIG 2
|
|
||||||
#define ICMP6_TIME_EXCEEDED 3
|
|
||||||
#define ICMP6_PARAM_PROB 4
|
|
||||||
|
|
||||||
#define ICMP6_INFOMSG_MASK 0x80
|
|
||||||
|
|
||||||
#define ICMP6_ECHO_REQUEST 128
|
|
||||||
#define ICMP6_ECHO_REPLY 129
|
|
||||||
#define MLD_LISTENER_QUERY 130
|
|
||||||
#define MLD_LISTENER_REPORT 131
|
|
||||||
#define MLD_LISTENER_REDUCTION 132
|
|
||||||
|
|
||||||
#define ICMP6_DST_UNREACH_NOROUTE 0
|
|
||||||
#define ICMP6_DST_UNREACH_ADMIN 1
|
|
||||||
#define ICMP6_DST_UNREACH_BEYONDSCOPE 2
|
|
||||||
#define ICMP6_DST_UNREACH_ADDR 3
|
|
||||||
#define ICMP6_DST_UNREACH_NOPORT 4
|
|
||||||
|
|
||||||
#define ICMP6_TIME_EXCEED_TRANSIT 0
|
|
||||||
#define ICMP6_TIME_EXCEED_REASSEMBLY 1
|
|
||||||
|
|
||||||
#define ICMP6_PARAMPROB_HEADER 0
|
|
||||||
#define ICMP6_PARAMPROB_NEXTHEADER 1
|
|
||||||
#define ICMP6_PARAMPROB_OPTION 2
|
|
||||||
|
|
||||||
#define ICMP6_FILTER_WILLPASS(type, filterp) \
|
|
||||||
((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) == 0)
|
|
||||||
|
|
||||||
#define ICMP6_FILTER_WILLBLOCK(type, filterp) \
|
|
||||||
((((filterp)->icmp6_filt[(type) >> 5]) & (1 << ((type) & 31))) != 0)
|
|
||||||
|
|
||||||
#define ICMP6_FILTER_SETPASS(type, filterp) \
|
|
||||||
((((filterp)->icmp6_filt[(type) >> 5]) &= ~(1 << ((type) & 31))))
|
|
||||||
|
|
||||||
#define ICMP6_FILTER_SETBLOCK(type, filterp) \
|
|
||||||
((((filterp)->icmp6_filt[(type) >> 5]) |= (1 << ((type) & 31))))
|
|
||||||
|
|
||||||
#define ICMP6_FILTER_SETPASSALL(filterp) \
|
|
||||||
memset (filterp, 0, sizeof (struct icmp6_filter));
|
|
||||||
|
|
||||||
#define ICMP6_FILTER_SETBLOCKALL(filterp) \
|
|
||||||
memset (filterp, 0xFF, sizeof (struct icmp6_filter));
|
|
||||||
|
|
||||||
#define ND_ROUTER_SOLICIT 133
|
|
||||||
#define ND_ROUTER_ADVERT 134
|
|
||||||
#define ND_NEIGHBOR_SOLICIT 135
|
|
||||||
#define ND_NEIGHBOR_ADVERT 136
|
|
||||||
#define ND_REDIRECT 137
|
|
||||||
|
|
||||||
struct nd_router_solicit {
|
|
||||||
struct icmp6_hdr nd_rs_hdr;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define nd_rs_type nd_rs_hdr.icmp6_type
|
|
||||||
#define nd_rs_code nd_rs_hdr.icmp6_code
|
|
||||||
#define nd_rs_cksum nd_rs_hdr.icmp6_cksum
|
|
||||||
#define nd_rs_reserved nd_rs_hdr.icmp6_data32[0]
|
|
||||||
|
|
||||||
struct nd_router_advert {
|
|
||||||
struct icmp6_hdr nd_ra_hdr;
|
|
||||||
uint32_t nd_ra_reachable;
|
|
||||||
uint32_t nd_ra_retransmit;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define nd_ra_type nd_ra_hdr.icmp6_type
|
|
||||||
#define nd_ra_code nd_ra_hdr.icmp6_code
|
|
||||||
#define nd_ra_cksum nd_ra_hdr.icmp6_cksum
|
|
||||||
#define nd_ra_curhoplimit nd_ra_hdr.icmp6_data8[0]
|
|
||||||
#define nd_ra_flags_reserved nd_ra_hdr.icmp6_data8[1]
|
|
||||||
#define ND_RA_FLAG_MANAGED 0x80
|
|
||||||
#define ND_RA_FLAG_OTHER 0x40
|
|
||||||
#define ND_RA_FLAG_HOME_AGENT 0x20
|
|
||||||
#define nd_ra_router_lifetime nd_ra_hdr.icmp6_data16[1]
|
|
||||||
|
|
||||||
struct nd_neighbor_solicit {
|
|
||||||
struct icmp6_hdr nd_ns_hdr;
|
|
||||||
struct in6_addr nd_ns_target;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define nd_ns_type nd_ns_hdr.icmp6_type
|
|
||||||
#define nd_ns_code nd_ns_hdr.icmp6_code
|
|
||||||
#define nd_ns_cksum nd_ns_hdr.icmp6_cksum
|
|
||||||
#define nd_ns_reserved nd_ns_hdr.icmp6_data32[0]
|
|
||||||
|
|
||||||
struct nd_neighbor_advert {
|
|
||||||
struct icmp6_hdr nd_na_hdr;
|
|
||||||
struct in6_addr nd_na_target;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define nd_na_type nd_na_hdr.icmp6_type
|
|
||||||
#define nd_na_code nd_na_hdr.icmp6_code
|
|
||||||
#define nd_na_cksum nd_na_hdr.icmp6_cksum
|
|
||||||
#define nd_na_flags_reserved nd_na_hdr.icmp6_data32[0]
|
|
||||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
|
||||||
#define ND_NA_FLAG_ROUTER 0x80000000
|
|
||||||
#define ND_NA_FLAG_SOLICITED 0x40000000
|
|
||||||
#define ND_NA_FLAG_OVERRIDE 0x20000000
|
|
||||||
#else
|
|
||||||
#define ND_NA_FLAG_ROUTER 0x00000080
|
|
||||||
#define ND_NA_FLAG_SOLICITED 0x00000040
|
|
||||||
#define ND_NA_FLAG_OVERRIDE 0x00000020
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct nd_redirect {
|
|
||||||
struct icmp6_hdr nd_rd_hdr;
|
|
||||||
struct in6_addr nd_rd_target;
|
|
||||||
struct in6_addr nd_rd_dst;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define nd_rd_type nd_rd_hdr.icmp6_type
|
|
||||||
#define nd_rd_code nd_rd_hdr.icmp6_code
|
|
||||||
#define nd_rd_cksum nd_rd_hdr.icmp6_cksum
|
|
||||||
#define nd_rd_reserved nd_rd_hdr.icmp6_data32[0]
|
|
||||||
|
|
||||||
struct nd_opt_hdr {
|
|
||||||
uint8_t nd_opt_type;
|
|
||||||
uint8_t nd_opt_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ND_OPT_SOURCE_LINKADDR 1
|
|
||||||
#define ND_OPT_TARGET_LINKADDR 2
|
|
||||||
#define ND_OPT_PREFIX_INFORMATION 3
|
|
||||||
#define ND_OPT_REDIRECTED_HEADER 4
|
|
||||||
#define ND_OPT_MTU 5
|
|
||||||
#define ND_OPT_RTR_ADV_INTERVAL 7
|
|
||||||
#define ND_OPT_HOME_AGENT_INFO 8
|
|
||||||
|
|
||||||
struct nd_opt_prefix_info {
|
|
||||||
uint8_t nd_opt_pi_type;
|
|
||||||
uint8_t nd_opt_pi_len;
|
|
||||||
uint8_t nd_opt_pi_prefix_len;
|
|
||||||
uint8_t nd_opt_pi_flags_reserved;
|
|
||||||
uint32_t nd_opt_pi_valid_time;
|
|
||||||
uint32_t nd_opt_pi_preferred_time;
|
|
||||||
uint32_t nd_opt_pi_reserved2;
|
|
||||||
struct in6_addr nd_opt_pi_prefix;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ND_OPT_PI_FLAG_ONLINK 0x80
|
|
||||||
#define ND_OPT_PI_FLAG_AUTO 0x40
|
|
||||||
#define ND_OPT_PI_FLAG_RADDR 0x20
|
|
||||||
|
|
||||||
struct nd_opt_rd_hdr {
|
|
||||||
uint8_t nd_opt_rh_type;
|
|
||||||
uint8_t nd_opt_rh_len;
|
|
||||||
uint16_t nd_opt_rh_reserved1;
|
|
||||||
uint32_t nd_opt_rh_reserved2;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct nd_opt_mtu {
|
|
||||||
uint8_t nd_opt_mtu_type;
|
|
||||||
uint8_t nd_opt_mtu_len;
|
|
||||||
uint16_t nd_opt_mtu_reserved;
|
|
||||||
uint32_t nd_opt_mtu_mtu;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct mld_hdr {
|
|
||||||
struct icmp6_hdr mld_icmp6_hdr;
|
|
||||||
struct in6_addr mld_addr;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define mld_type mld_icmp6_hdr.icmp6_type
|
|
||||||
#define mld_code mld_icmp6_hdr.icmp6_code
|
|
||||||
#define mld_cksum mld_icmp6_hdr.icmp6_cksum
|
|
||||||
#define mld_maxdelay mld_icmp6_hdr.icmp6_data16[0]
|
|
||||||
#define mld_reserved mld_icmp6_hdr.icmp6_data16[1]
|
|
||||||
|
|
||||||
#define ICMP6_ROUTER_RENUMBERING 138
|
|
||||||
|
|
||||||
struct icmp6_router_renum {
|
|
||||||
struct icmp6_hdr rr_hdr;
|
|
||||||
uint8_t rr_segnum;
|
|
||||||
uint8_t rr_flags;
|
|
||||||
uint16_t rr_maxdelay;
|
|
||||||
uint32_t rr_reserved;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define rr_type rr_hdr.icmp6_type
|
|
||||||
#define rr_code rr_hdr.icmp6_code
|
|
||||||
#define rr_cksum rr_hdr.icmp6_cksum
|
|
||||||
#define rr_seqnum rr_hdr.icmp6_data32[0]
|
|
||||||
|
|
||||||
#define ICMP6_RR_FLAGS_TEST 0x80
|
|
||||||
#define ICMP6_RR_FLAGS_REQRESULT 0x40
|
|
||||||
#define ICMP6_RR_FLAGS_FORCEAPPLY 0x20
|
|
||||||
#define ICMP6_RR_FLAGS_SPECSITE 0x10
|
|
||||||
#define ICMP6_RR_FLAGS_PREVDONE 0x08
|
|
||||||
|
|
||||||
struct rr_pco_match {
|
|
||||||
uint8_t rpm_code;
|
|
||||||
uint8_t rpm_len;
|
|
||||||
uint8_t rpm_ordinal;
|
|
||||||
uint8_t rpm_matchlen;
|
|
||||||
uint8_t rpm_minlen;
|
|
||||||
uint8_t rpm_maxlen;
|
|
||||||
uint16_t rpm_reserved;
|
|
||||||
struct in6_addr rpm_prefix;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define RPM_PCO_ADD 1
|
|
||||||
#define RPM_PCO_CHANGE 2
|
|
||||||
#define RPM_PCO_SETGLOBAL 3
|
|
||||||
|
|
||||||
struct rr_pco_use {
|
|
||||||
uint8_t rpu_uselen;
|
|
||||||
uint8_t rpu_keeplen;
|
|
||||||
uint8_t rpu_ramask;
|
|
||||||
uint8_t rpu_raflags;
|
|
||||||
uint32_t rpu_vltime;
|
|
||||||
uint32_t rpu_pltime;
|
|
||||||
uint32_t rpu_flags;
|
|
||||||
struct in6_addr rpu_prefix;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK 0x20
|
|
||||||
#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO 0x10
|
|
||||||
|
|
||||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
|
||||||
#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80000000
|
|
||||||
#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40000000
|
|
||||||
#else
|
|
||||||
#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME 0x80
|
|
||||||
#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME 0x40
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct rr_result {
|
|
||||||
uint16_t rrr_flags;
|
|
||||||
uint8_t rrr_ordinal;
|
|
||||||
uint8_t rrr_matchedlen;
|
|
||||||
uint32_t rrr_ifid;
|
|
||||||
struct in6_addr rrr_prefix;
|
|
||||||
};
|
|
||||||
|
|
||||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
|
||||||
#define ICMP6_RR_RESULT_FLAGS_OOB 0x0002
|
|
||||||
#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0001
|
|
||||||
#else
|
|
||||||
#define ICMP6_RR_RESULT_FLAGS_OOB 0x0200
|
|
||||||
#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN 0x0100
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct nd_opt_adv_interval {
|
|
||||||
uint8_t nd_opt_adv_interval_type;
|
|
||||||
uint8_t nd_opt_adv_interval_len;
|
|
||||||
uint16_t nd_opt_adv_interval_reserved;
|
|
||||||
uint32_t nd_opt_adv_interval_ival;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct nd_opt_home_agent_info {
|
|
||||||
uint8_t nd_opt_home_agent_info_type;
|
|
||||||
uint8_t nd_opt_home_agent_info_len;
|
|
||||||
uint16_t nd_opt_home_agent_info_reserved;
|
|
||||||
uint16_t nd_opt_home_agent_info_preference;
|
|
||||||
uint16_t nd_opt_home_agent_info_lifetime;
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
45
lib/libc/include/wasm-wasi-musl/netinet/igmp.h
vendored
45
lib/libc/include/wasm-wasi-musl/netinet/igmp.h
vendored
@ -1,45 +0,0 @@
|
|||||||
#ifndef _NETINET_IGMP_H
|
|
||||||
#define _NETINET_IGMP_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
|
|
||||||
struct igmp {
|
|
||||||
uint8_t igmp_type;
|
|
||||||
uint8_t igmp_code;
|
|
||||||
uint16_t igmp_cksum;
|
|
||||||
struct in_addr igmp_group;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define IGMP_MINLEN 8
|
|
||||||
|
|
||||||
#define IGMP_MEMBERSHIP_QUERY 0x11
|
|
||||||
#define IGMP_V1_MEMBERSHIP_REPORT 0x12
|
|
||||||
#define IGMP_V2_MEMBERSHIP_REPORT 0x16
|
|
||||||
#define IGMP_V2_LEAVE_GROUP 0x17
|
|
||||||
|
|
||||||
#define IGMP_DVMRP 0x13
|
|
||||||
#define IGMP_PIM 0x14
|
|
||||||
#define IGMP_TRACE 0x15
|
|
||||||
|
|
||||||
#define IGMP_MTRACE_RESP 0x1e
|
|
||||||
#define IGMP_MTRACE 0x1f
|
|
||||||
|
|
||||||
#define IGMP_MAX_HOST_REPORT_DELAY 10
|
|
||||||
#define IGMP_TIMER_SCALE 10
|
|
||||||
|
|
||||||
#define IGMP_DELAYING_MEMBER 1
|
|
||||||
#define IGMP_IDLE_MEMBER 2
|
|
||||||
#define IGMP_LAZY_MEMBER 3
|
|
||||||
#define IGMP_SLEEPING_MEMBER 4
|
|
||||||
#define IGMP_AWAKENING_MEMBER 5
|
|
||||||
|
|
||||||
#define IGMP_v1_ROUTER 1
|
|
||||||
#define IGMP_v2_ROUTER 2
|
|
||||||
|
|
||||||
#define IGMP_HOST_MEMBERSHIP_QUERY IGMP_MEMBERSHIP_QUERY
|
|
||||||
#define IGMP_HOST_MEMBERSHIP_REPORT IGMP_V1_MEMBERSHIP_REPORT
|
|
||||||
#define IGMP_HOST_NEW_MEMBERSHIP_REPORT IGMP_V2_MEMBERSHIP_REPORT
|
|
||||||
#define IGMP_HOST_LEAVE_MESSAGE IGMP_V2_LEAVE_GROUP
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,9 +0,0 @@
|
|||||||
#ifndef _NETINET_IN_SYSTM_H
|
|
||||||
#define _NETINET_IN_SYSTM_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef uint16_t n_short;
|
|
||||||
typedef uint32_t n_long, n_time;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
199
lib/libc/include/wasm-wasi-musl/netinet/ip.h
vendored
199
lib/libc/include/wasm-wasi-musl/netinet/ip.h
vendored
@ -1,199 +0,0 @@
|
|||||||
#ifndef _NETINET_IP_H
|
|
||||||
#define _NETINET_IP_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
|
|
||||||
struct timestamp {
|
|
||||||
uint8_t len;
|
|
||||||
uint8_t ptr;
|
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
||||||
unsigned int flags:4;
|
|
||||||
unsigned int overflow:4;
|
|
||||||
#else
|
|
||||||
unsigned int overflow:4;
|
|
||||||
unsigned int flags:4;
|
|
||||||
#endif
|
|
||||||
uint32_t data[9];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct iphdr {
|
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
||||||
unsigned int ihl:4;
|
|
||||||
unsigned int version:4;
|
|
||||||
#else
|
|
||||||
unsigned int version:4;
|
|
||||||
unsigned int ihl:4;
|
|
||||||
#endif
|
|
||||||
uint8_t tos;
|
|
||||||
uint16_t tot_len;
|
|
||||||
uint16_t id;
|
|
||||||
uint16_t frag_off;
|
|
||||||
uint8_t ttl;
|
|
||||||
uint8_t protocol;
|
|
||||||
uint16_t check;
|
|
||||||
uint32_t saddr;
|
|
||||||
uint32_t daddr;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ip {
|
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
||||||
unsigned int ip_hl:4;
|
|
||||||
unsigned int ip_v:4;
|
|
||||||
#else
|
|
||||||
unsigned int ip_v:4;
|
|
||||||
unsigned int ip_hl:4;
|
|
||||||
#endif
|
|
||||||
uint8_t ip_tos;
|
|
||||||
uint16_t ip_len;
|
|
||||||
uint16_t ip_id;
|
|
||||||
uint16_t ip_off;
|
|
||||||
uint8_t ip_ttl;
|
|
||||||
uint8_t ip_p;
|
|
||||||
uint16_t ip_sum;
|
|
||||||
struct in_addr ip_src, ip_dst;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define IP_RF 0x8000
|
|
||||||
#define IP_DF 0x4000
|
|
||||||
#define IP_MF 0x2000
|
|
||||||
#define IP_OFFMASK 0x1fff
|
|
||||||
|
|
||||||
struct ip_timestamp {
|
|
||||||
uint8_t ipt_code;
|
|
||||||
uint8_t ipt_len;
|
|
||||||
uint8_t ipt_ptr;
|
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
||||||
unsigned int ipt_flg:4;
|
|
||||||
unsigned int ipt_oflw:4;
|
|
||||||
#else
|
|
||||||
unsigned int ipt_oflw:4;
|
|
||||||
unsigned int ipt_flg:4;
|
|
||||||
#endif
|
|
||||||
uint32_t data[9];
|
|
||||||
};
|
|
||||||
|
|
||||||
#define IPVERSION 4
|
|
||||||
#define IP_MAXPACKET 65535
|
|
||||||
|
|
||||||
#define IPTOS_ECN_MASK 0x03
|
|
||||||
#define IPTOS_ECN(x) ((x) & IPTOS_ECN_MASK)
|
|
||||||
#define IPTOS_ECN_NOT_ECT 0x00
|
|
||||||
#define IPTOS_ECN_ECT1 0x01
|
|
||||||
#define IPTOS_ECN_ECT0 0x02
|
|
||||||
#define IPTOS_ECN_CE 0x03
|
|
||||||
|
|
||||||
#define IPTOS_DSCP_MASK 0xfc
|
|
||||||
#define IPTOS_DSCP(x) ((x) & IPTOS_DSCP_MASK)
|
|
||||||
#define IPTOS_DSCP_AF11 0x28
|
|
||||||
#define IPTOS_DSCP_AF12 0x30
|
|
||||||
#define IPTOS_DSCP_AF13 0x38
|
|
||||||
#define IPTOS_DSCP_AF21 0x48
|
|
||||||
#define IPTOS_DSCP_AF22 0x50
|
|
||||||
#define IPTOS_DSCP_AF23 0x58
|
|
||||||
#define IPTOS_DSCP_AF31 0x68
|
|
||||||
#define IPTOS_DSCP_AF32 0x70
|
|
||||||
#define IPTOS_DSCP_AF33 0x78
|
|
||||||
#define IPTOS_DSCP_AF41 0x88
|
|
||||||
#define IPTOS_DSCP_AF42 0x90
|
|
||||||
#define IPTOS_DSCP_AF43 0x98
|
|
||||||
#define IPTOS_DSCP_EF 0xb8
|
|
||||||
|
|
||||||
#define IPTOS_CLASS_MASK 0xe0
|
|
||||||
#define IPTOS_CLASS(x) ((x) & IPTOS_CLASS_MASK)
|
|
||||||
#define IPTOS_CLASS_CS0 0x00
|
|
||||||
#define IPTOS_CLASS_CS1 0x20
|
|
||||||
#define IPTOS_CLASS_CS2 0x40
|
|
||||||
#define IPTOS_CLASS_CS3 0x60
|
|
||||||
#define IPTOS_CLASS_CS4 0x80
|
|
||||||
#define IPTOS_CLASS_CS5 0xa0
|
|
||||||
#define IPTOS_CLASS_CS6 0xc0
|
|
||||||
#define IPTOS_CLASS_CS7 0xe0
|
|
||||||
#define IPTOS_CLASS_DEFAULT IPTOS_CLASS_CS0
|
|
||||||
|
|
||||||
#define IPTOS_TOS_MASK 0x1E
|
|
||||||
#define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK)
|
|
||||||
#define IPTOS_LOWDELAY 0x10
|
|
||||||
#define IPTOS_THROUGHPUT 0x08
|
|
||||||
#define IPTOS_RELIABILITY 0x04
|
|
||||||
#define IPTOS_LOWCOST 0x02
|
|
||||||
#define IPTOS_MINCOST IPTOS_LOWCOST
|
|
||||||
|
|
||||||
#define IPTOS_PREC_MASK 0xe0
|
|
||||||
#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK)
|
|
||||||
#define IPTOS_PREC_NETCONTROL 0xe0
|
|
||||||
#define IPTOS_PREC_INTERNETCONTROL 0xc0
|
|
||||||
#define IPTOS_PREC_CRITIC_ECP 0xa0
|
|
||||||
#define IPTOS_PREC_FLASHOVERRIDE 0x80
|
|
||||||
#define IPTOS_PREC_FLASH 0x60
|
|
||||||
#define IPTOS_PREC_IMMEDIATE 0x40
|
|
||||||
#define IPTOS_PREC_PRIORITY 0x20
|
|
||||||
#define IPTOS_PREC_ROUTINE 0x00
|
|
||||||
|
|
||||||
#define IPOPT_COPY 0x80
|
|
||||||
#define IPOPT_CLASS_MASK 0x60
|
|
||||||
#define IPOPT_NUMBER_MASK 0x1f
|
|
||||||
|
|
||||||
#define IPOPT_COPIED(o) ((o) & IPOPT_COPY)
|
|
||||||
#define IPOPT_CLASS(o) ((o) & IPOPT_CLASS_MASK)
|
|
||||||
#define IPOPT_NUMBER(o) ((o) & IPOPT_NUMBER_MASK)
|
|
||||||
|
|
||||||
#define IPOPT_CONTROL 0x00
|
|
||||||
#define IPOPT_RESERVED1 0x20
|
|
||||||
#define IPOPT_DEBMEAS 0x40
|
|
||||||
#define IPOPT_MEASUREMENT IPOPT_DEBMEAS
|
|
||||||
#define IPOPT_RESERVED2 0x60
|
|
||||||
|
|
||||||
#define IPOPT_EOL 0
|
|
||||||
#define IPOPT_END IPOPT_EOL
|
|
||||||
#define IPOPT_NOP 1
|
|
||||||
#define IPOPT_NOOP IPOPT_NOP
|
|
||||||
|
|
||||||
#define IPOPT_RR 7
|
|
||||||
#define IPOPT_TS 68
|
|
||||||
#define IPOPT_TIMESTAMP IPOPT_TS
|
|
||||||
#define IPOPT_SECURITY 130
|
|
||||||
#define IPOPT_SEC IPOPT_SECURITY
|
|
||||||
#define IPOPT_LSRR 131
|
|
||||||
#define IPOPT_SATID 136
|
|
||||||
#define IPOPT_SID IPOPT_SATID
|
|
||||||
#define IPOPT_SSRR 137
|
|
||||||
#define IPOPT_RA 148
|
|
||||||
|
|
||||||
#define IPOPT_OPTVAL 0
|
|
||||||
#define IPOPT_OLEN 1
|
|
||||||
#define IPOPT_OFFSET 2
|
|
||||||
#define IPOPT_MINOFF 4
|
|
||||||
|
|
||||||
#define MAX_IPOPTLEN 40
|
|
||||||
|
|
||||||
#define IPOPT_TS_TSONLY 0
|
|
||||||
#define IPOPT_TS_TSANDADDR 1
|
|
||||||
#define IPOPT_TS_PRESPEC 3
|
|
||||||
|
|
||||||
#define IPOPT_SECUR_UNCLASS 0x0000
|
|
||||||
#define IPOPT_SECUR_CONFID 0xf135
|
|
||||||
#define IPOPT_SECUR_EFTO 0x789a
|
|
||||||
#define IPOPT_SECUR_MMMM 0xbc4d
|
|
||||||
#define IPOPT_SECUR_RESTR 0xaf13
|
|
||||||
#define IPOPT_SECUR_SECRET 0xd788
|
|
||||||
#define IPOPT_SECUR_TOPSECRET 0x6bc5
|
|
||||||
|
|
||||||
#define MAXTTL 255
|
|
||||||
#define IPDEFTTL 64
|
|
||||||
#define IPFRAGTTL 60
|
|
||||||
#define IPTTLDEC 1
|
|
||||||
|
|
||||||
#define IP_MSS 576
|
|
||||||
|
|
||||||
#define __UAPI_DEF_IPHDR 0
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
141
lib/libc/include/wasm-wasi-musl/netinet/ip6.h
vendored
141
lib/libc/include/wasm-wasi-musl/netinet/ip6.h
vendored
@ -1,141 +0,0 @@
|
|||||||
#ifndef _NETINET_IP6_H
|
|
||||||
#define _NETINET_IP6_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
|
|
||||||
struct ip6_hdr {
|
|
||||||
union {
|
|
||||||
struct ip6_hdrctl {
|
|
||||||
uint32_t ip6_un1_flow;
|
|
||||||
uint16_t ip6_un1_plen;
|
|
||||||
uint8_t ip6_un1_nxt;
|
|
||||||
uint8_t ip6_un1_hlim;
|
|
||||||
} ip6_un1;
|
|
||||||
uint8_t ip6_un2_vfc;
|
|
||||||
} ip6_ctlun;
|
|
||||||
struct in6_addr ip6_src;
|
|
||||||
struct in6_addr ip6_dst;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ip6_vfc ip6_ctlun.ip6_un2_vfc
|
|
||||||
#define ip6_flow ip6_ctlun.ip6_un1.ip6_un1_flow
|
|
||||||
#define ip6_plen ip6_ctlun.ip6_un1.ip6_un1_plen
|
|
||||||
#define ip6_nxt ip6_ctlun.ip6_un1.ip6_un1_nxt
|
|
||||||
#define ip6_hlim ip6_ctlun.ip6_un1.ip6_un1_hlim
|
|
||||||
#define ip6_hops ip6_ctlun.ip6_un1.ip6_un1_hlim
|
|
||||||
|
|
||||||
struct ip6_ext {
|
|
||||||
uint8_t ip6e_nxt;
|
|
||||||
uint8_t ip6e_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ip6_hbh {
|
|
||||||
uint8_t ip6h_nxt;
|
|
||||||
uint8_t ip6h_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ip6_dest {
|
|
||||||
uint8_t ip6d_nxt;
|
|
||||||
uint8_t ip6d_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ip6_rthdr {
|
|
||||||
uint8_t ip6r_nxt;
|
|
||||||
uint8_t ip6r_len;
|
|
||||||
uint8_t ip6r_type;
|
|
||||||
uint8_t ip6r_segleft;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ip6_rthdr0 {
|
|
||||||
uint8_t ip6r0_nxt;
|
|
||||||
uint8_t ip6r0_len;
|
|
||||||
uint8_t ip6r0_type;
|
|
||||||
uint8_t ip6r0_segleft;
|
|
||||||
uint8_t ip6r0_reserved;
|
|
||||||
uint8_t ip6r0_slmap[3];
|
|
||||||
struct in6_addr ip6r0_addr[];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ip6_frag {
|
|
||||||
uint8_t ip6f_nxt;
|
|
||||||
uint8_t ip6f_reserved;
|
|
||||||
uint16_t ip6f_offlg;
|
|
||||||
uint32_t ip6f_ident;
|
|
||||||
};
|
|
||||||
|
|
||||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
|
||||||
#define IP6F_OFF_MASK 0xfff8
|
|
||||||
#define IP6F_RESERVED_MASK 0x0006
|
|
||||||
#define IP6F_MORE_FRAG 0x0001
|
|
||||||
#else
|
|
||||||
#define IP6F_OFF_MASK 0xf8ff
|
|
||||||
#define IP6F_RESERVED_MASK 0x0600
|
|
||||||
#define IP6F_MORE_FRAG 0x0100
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct ip6_opt {
|
|
||||||
uint8_t ip6o_type;
|
|
||||||
uint8_t ip6o_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define IP6OPT_TYPE(o) ((o) & 0xc0)
|
|
||||||
#define IP6OPT_TYPE_SKIP 0x00
|
|
||||||
#define IP6OPT_TYPE_DISCARD 0x40
|
|
||||||
#define IP6OPT_TYPE_FORCEICMP 0x80
|
|
||||||
#define IP6OPT_TYPE_ICMP 0xc0
|
|
||||||
#define IP6OPT_TYPE_MUTABLE 0x20
|
|
||||||
|
|
||||||
#define IP6OPT_PAD1 0
|
|
||||||
#define IP6OPT_PADN 1
|
|
||||||
|
|
||||||
#define IP6OPT_JUMBO 0xc2
|
|
||||||
#define IP6OPT_NSAP_ADDR 0xc3
|
|
||||||
#define IP6OPT_TUNNEL_LIMIT 0x04
|
|
||||||
#define IP6OPT_ROUTER_ALERT 0x05
|
|
||||||
|
|
||||||
struct ip6_opt_jumbo {
|
|
||||||
uint8_t ip6oj_type;
|
|
||||||
uint8_t ip6oj_len;
|
|
||||||
uint8_t ip6oj_jumbo_len[4];
|
|
||||||
};
|
|
||||||
#define IP6OPT_JUMBO_LEN 6
|
|
||||||
|
|
||||||
struct ip6_opt_nsap {
|
|
||||||
uint8_t ip6on_type;
|
|
||||||
uint8_t ip6on_len;
|
|
||||||
uint8_t ip6on_src_nsap_len;
|
|
||||||
uint8_t ip6on_dst_nsap_len;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ip6_opt_tunnel {
|
|
||||||
uint8_t ip6ot_type;
|
|
||||||
uint8_t ip6ot_len;
|
|
||||||
uint8_t ip6ot_encap_limit;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ip6_opt_router {
|
|
||||||
uint8_t ip6or_type;
|
|
||||||
uint8_t ip6or_len;
|
|
||||||
uint8_t ip6or_value[2];
|
|
||||||
};
|
|
||||||
|
|
||||||
#if __BYTE_ORDER == __BIG_ENDIAN
|
|
||||||
#define IP6_ALERT_MLD 0x0000
|
|
||||||
#define IP6_ALERT_RSVP 0x0001
|
|
||||||
#define IP6_ALERT_AN 0x0002
|
|
||||||
#else
|
|
||||||
#define IP6_ALERT_MLD 0x0000
|
|
||||||
#define IP6_ALERT_RSVP 0x0100
|
|
||||||
#define IP6_ALERT_AN 0x0200
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
193
lib/libc/include/wasm-wasi-musl/netinet/ip_icmp.h
vendored
193
lib/libc/include/wasm-wasi-musl/netinet/ip_icmp.h
vendored
@ -1,193 +0,0 @@
|
|||||||
#ifndef _NETINET_IP_ICMP_H
|
|
||||||
#define _NETINET_IP_ICMP_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <netinet/ip.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct icmphdr {
|
|
||||||
uint8_t type;
|
|
||||||
uint8_t code;
|
|
||||||
uint16_t checksum;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
uint16_t id;
|
|
||||||
uint16_t sequence;
|
|
||||||
} echo;
|
|
||||||
uint32_t gateway;
|
|
||||||
struct {
|
|
||||||
uint16_t __unused;
|
|
||||||
uint16_t mtu;
|
|
||||||
} frag;
|
|
||||||
uint8_t reserved[4];
|
|
||||||
} un;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ICMP_ECHOREPLY 0
|
|
||||||
#define ICMP_DEST_UNREACH 3
|
|
||||||
#define ICMP_SOURCE_QUENCH 4
|
|
||||||
#define ICMP_REDIRECT 5
|
|
||||||
#define ICMP_ECHO 8
|
|
||||||
#define ICMP_TIME_EXCEEDED 11
|
|
||||||
#define ICMP_PARAMETERPROB 12
|
|
||||||
#define ICMP_TIMESTAMP 13
|
|
||||||
#define ICMP_TIMESTAMPREPLY 14
|
|
||||||
#define ICMP_INFO_REQUEST 15
|
|
||||||
#define ICMP_INFO_REPLY 16
|
|
||||||
#define ICMP_ADDRESS 17
|
|
||||||
#define ICMP_ADDRESSREPLY 18
|
|
||||||
#define NR_ICMP_TYPES 18
|
|
||||||
|
|
||||||
|
|
||||||
#define ICMP_NET_UNREACH 0
|
|
||||||
#define ICMP_HOST_UNREACH 1
|
|
||||||
#define ICMP_PROT_UNREACH 2
|
|
||||||
#define ICMP_PORT_UNREACH 3
|
|
||||||
#define ICMP_FRAG_NEEDED 4
|
|
||||||
#define ICMP_SR_FAILED 5
|
|
||||||
#define ICMP_NET_UNKNOWN 6
|
|
||||||
#define ICMP_HOST_UNKNOWN 7
|
|
||||||
#define ICMP_HOST_ISOLATED 8
|
|
||||||
#define ICMP_NET_ANO 9
|
|
||||||
#define ICMP_HOST_ANO 10
|
|
||||||
#define ICMP_NET_UNR_TOS 11
|
|
||||||
#define ICMP_HOST_UNR_TOS 12
|
|
||||||
#define ICMP_PKT_FILTERED 13
|
|
||||||
#define ICMP_PREC_VIOLATION 14
|
|
||||||
#define ICMP_PREC_CUTOFF 15
|
|
||||||
#define NR_ICMP_UNREACH 15
|
|
||||||
|
|
||||||
#define ICMP_REDIR_NET 0
|
|
||||||
#define ICMP_REDIR_HOST 1
|
|
||||||
#define ICMP_REDIR_NETTOS 2
|
|
||||||
#define ICMP_REDIR_HOSTTOS 3
|
|
||||||
|
|
||||||
#define ICMP_EXC_TTL 0
|
|
||||||
#define ICMP_EXC_FRAGTIME 1
|
|
||||||
|
|
||||||
|
|
||||||
struct icmp_ra_addr {
|
|
||||||
uint32_t ira_addr;
|
|
||||||
uint32_t ira_preference;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct icmp {
|
|
||||||
uint8_t icmp_type;
|
|
||||||
uint8_t icmp_code;
|
|
||||||
uint16_t icmp_cksum;
|
|
||||||
union {
|
|
||||||
uint8_t ih_pptr;
|
|
||||||
struct in_addr ih_gwaddr;
|
|
||||||
struct ih_idseq {
|
|
||||||
uint16_t icd_id;
|
|
||||||
uint16_t icd_seq;
|
|
||||||
} ih_idseq;
|
|
||||||
uint32_t ih_void;
|
|
||||||
|
|
||||||
struct ih_pmtu {
|
|
||||||
uint16_t ipm_void;
|
|
||||||
uint16_t ipm_nextmtu;
|
|
||||||
} ih_pmtu;
|
|
||||||
|
|
||||||
struct ih_rtradv {
|
|
||||||
uint8_t irt_num_addrs;
|
|
||||||
uint8_t irt_wpa;
|
|
||||||
uint16_t irt_lifetime;
|
|
||||||
} ih_rtradv;
|
|
||||||
} icmp_hun;
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
uint32_t its_otime;
|
|
||||||
uint32_t its_rtime;
|
|
||||||
uint32_t its_ttime;
|
|
||||||
} id_ts;
|
|
||||||
struct {
|
|
||||||
struct ip idi_ip;
|
|
||||||
} id_ip;
|
|
||||||
struct icmp_ra_addr id_radv;
|
|
||||||
uint32_t id_mask;
|
|
||||||
uint8_t id_data[1];
|
|
||||||
} icmp_dun;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define icmp_pptr icmp_hun.ih_pptr
|
|
||||||
#define icmp_gwaddr icmp_hun.ih_gwaddr
|
|
||||||
#define icmp_id icmp_hun.ih_idseq.icd_id
|
|
||||||
#define icmp_seq icmp_hun.ih_idseq.icd_seq
|
|
||||||
#define icmp_void icmp_hun.ih_void
|
|
||||||
#define icmp_pmvoid icmp_hun.ih_pmtu.ipm_void
|
|
||||||
#define icmp_nextmtu icmp_hun.ih_pmtu.ipm_nextmtu
|
|
||||||
#define icmp_num_addrs icmp_hun.ih_rtradv.irt_num_addrs
|
|
||||||
#define icmp_wpa icmp_hun.ih_rtradv.irt_wpa
|
|
||||||
#define icmp_lifetime icmp_hun.ih_rtradv.irt_lifetime
|
|
||||||
#define icmp_otime icmp_dun.id_ts.its_otime
|
|
||||||
#define icmp_rtime icmp_dun.id_ts.its_rtime
|
|
||||||
#define icmp_ttime icmp_dun.id_ts.its_ttime
|
|
||||||
#define icmp_ip icmp_dun.id_ip.idi_ip
|
|
||||||
#define icmp_radv icmp_dun.id_radv
|
|
||||||
#define icmp_mask icmp_dun.id_mask
|
|
||||||
#define icmp_data icmp_dun.id_data
|
|
||||||
|
|
||||||
#define ICMP_MINLEN 8
|
|
||||||
#define ICMP_TSLEN (8 + 3 * sizeof (n_time))
|
|
||||||
#define ICMP_MASKLEN 12
|
|
||||||
#define ICMP_ADVLENMIN (8 + sizeof (struct ip) + 8)
|
|
||||||
#define ICMP_ADVLEN(p) (8 + ((p)->icmp_ip.ip_hl << 2) + 8)
|
|
||||||
|
|
||||||
#define ICMP_UNREACH 3
|
|
||||||
#define ICMP_SOURCEQUENCH 4
|
|
||||||
#define ICMP_ROUTERADVERT 9
|
|
||||||
#define ICMP_ROUTERSOLICIT 10
|
|
||||||
#define ICMP_TIMXCEED 11
|
|
||||||
#define ICMP_PARAMPROB 12
|
|
||||||
#define ICMP_TSTAMP 13
|
|
||||||
#define ICMP_TSTAMPREPLY 14
|
|
||||||
#define ICMP_IREQ 15
|
|
||||||
#define ICMP_IREQREPLY 16
|
|
||||||
#define ICMP_MASKREQ 17
|
|
||||||
#define ICMP_MASKREPLY 18
|
|
||||||
#define ICMP_MAXTYPE 18
|
|
||||||
|
|
||||||
#define ICMP_UNREACH_NET 0
|
|
||||||
#define ICMP_UNREACH_HOST 1
|
|
||||||
#define ICMP_UNREACH_PROTOCOL 2
|
|
||||||
#define ICMP_UNREACH_PORT 3
|
|
||||||
#define ICMP_UNREACH_NEEDFRAG 4
|
|
||||||
#define ICMP_UNREACH_SRCFAIL 5
|
|
||||||
#define ICMP_UNREACH_NET_UNKNOWN 6
|
|
||||||
#define ICMP_UNREACH_HOST_UNKNOWN 7
|
|
||||||
#define ICMP_UNREACH_ISOLATED 8
|
|
||||||
#define ICMP_UNREACH_NET_PROHIB 9
|
|
||||||
#define ICMP_UNREACH_HOST_PROHIB 10
|
|
||||||
#define ICMP_UNREACH_TOSNET 11
|
|
||||||
#define ICMP_UNREACH_TOSHOST 12
|
|
||||||
#define ICMP_UNREACH_FILTER_PROHIB 13
|
|
||||||
#define ICMP_UNREACH_HOST_PRECEDENCE 14
|
|
||||||
#define ICMP_UNREACH_PRECEDENCE_CUTOFF 15
|
|
||||||
|
|
||||||
#define ICMP_REDIRECT_NET 0
|
|
||||||
#define ICMP_REDIRECT_HOST 1
|
|
||||||
#define ICMP_REDIRECT_TOSNET 2
|
|
||||||
#define ICMP_REDIRECT_TOSHOST 3
|
|
||||||
|
|
||||||
#define ICMP_TIMXCEED_INTRANS 0
|
|
||||||
#define ICMP_TIMXCEED_REASS 1
|
|
||||||
|
|
||||||
#define ICMP_PARAMPROB_OPTABSENT 1
|
|
||||||
|
|
||||||
#define ICMP_INFOTYPE(type) \
|
|
||||||
((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
|
|
||||||
(type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
|
|
||||||
(type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
|
|
||||||
(type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
|
|
||||||
(type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
305
lib/libc/include/wasm-wasi-musl/netinet/tcp.h
vendored
305
lib/libc/include/wasm-wasi-musl/netinet/tcp.h
vendored
@ -1,305 +0,0 @@
|
|||||||
#ifndef _NETINET_TCP_H
|
|
||||||
#define _NETINET_TCP_H
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
#define TCP_NODELAY 1
|
|
||||||
#define TCP_MAXSEG 2
|
|
||||||
#define TCP_CORK 3
|
|
||||||
#define TCP_KEEPIDLE 4
|
|
||||||
#define TCP_KEEPINTVL 5
|
|
||||||
#define TCP_KEEPCNT 6
|
|
||||||
#define TCP_SYNCNT 7
|
|
||||||
#define TCP_LINGER2 8
|
|
||||||
#define TCP_DEFER_ACCEPT 9
|
|
||||||
#define TCP_WINDOW_CLAMP 10
|
|
||||||
#define TCP_INFO 11
|
|
||||||
#define TCP_QUICKACK 12
|
|
||||||
#define TCP_CONGESTION 13
|
|
||||||
#define TCP_MD5SIG 14
|
|
||||||
#define TCP_THIN_LINEAR_TIMEOUTS 16
|
|
||||||
#define TCP_THIN_DUPACK 17
|
|
||||||
#define TCP_USER_TIMEOUT 18
|
|
||||||
#define TCP_REPAIR 19
|
|
||||||
#define TCP_REPAIR_QUEUE 20
|
|
||||||
#define TCP_QUEUE_SEQ 21
|
|
||||||
#define TCP_REPAIR_OPTIONS 22
|
|
||||||
#define TCP_FASTOPEN 23
|
|
||||||
#define TCP_TIMESTAMP 24
|
|
||||||
#define TCP_NOTSENT_LOWAT 25
|
|
||||||
#define TCP_CC_INFO 26
|
|
||||||
#define TCP_SAVE_SYN 27
|
|
||||||
#define TCP_SAVED_SYN 28
|
|
||||||
#define TCP_REPAIR_WINDOW 29
|
|
||||||
#define TCP_FASTOPEN_CONNECT 30
|
|
||||||
#define TCP_ULP 31
|
|
||||||
#define TCP_MD5SIG_EXT 32
|
|
||||||
#define TCP_FASTOPEN_KEY 33
|
|
||||||
#define TCP_FASTOPEN_NO_COOKIE 34
|
|
||||||
#define TCP_ZEROCOPY_RECEIVE 35
|
|
||||||
#define TCP_INQ 36
|
|
||||||
#define TCP_TX_DELAY 37
|
|
||||||
|
|
||||||
#define TCP_CM_INQ TCP_INQ
|
|
||||||
|
|
||||||
#define TCP_ESTABLISHED 1
|
|
||||||
#define TCP_SYN_SENT 2
|
|
||||||
#define TCP_SYN_RECV 3
|
|
||||||
#define TCP_FIN_WAIT1 4
|
|
||||||
#define TCP_FIN_WAIT2 5
|
|
||||||
#define TCP_TIME_WAIT 6
|
|
||||||
#define TCP_CLOSE 7
|
|
||||||
#define TCP_CLOSE_WAIT 8
|
|
||||||
#define TCP_LAST_ACK 9
|
|
||||||
#define TCP_LISTEN 10
|
|
||||||
#define TCP_CLOSING 11
|
|
||||||
|
|
||||||
enum {
|
|
||||||
TCP_NLA_PAD,
|
|
||||||
TCP_NLA_BUSY,
|
|
||||||
TCP_NLA_RWND_LIMITED,
|
|
||||||
TCP_NLA_SNDBUF_LIMITED,
|
|
||||||
TCP_NLA_DATA_SEGS_OUT,
|
|
||||||
TCP_NLA_TOTAL_RETRANS,
|
|
||||||
TCP_NLA_PACING_RATE,
|
|
||||||
TCP_NLA_DELIVERY_RATE,
|
|
||||||
TCP_NLA_SND_CWND,
|
|
||||||
TCP_NLA_REORDERING,
|
|
||||||
TCP_NLA_MIN_RTT,
|
|
||||||
TCP_NLA_RECUR_RETRANS,
|
|
||||||
TCP_NLA_DELIVERY_RATE_APP_LMT,
|
|
||||||
TCP_NLA_SNDQ_SIZE,
|
|
||||||
TCP_NLA_CA_STATE,
|
|
||||||
TCP_NLA_SND_SSTHRESH,
|
|
||||||
TCP_NLA_DELIVERED,
|
|
||||||
TCP_NLA_DELIVERED_CE,
|
|
||||||
TCP_NLA_BYTES_SENT,
|
|
||||||
TCP_NLA_BYTES_RETRANS,
|
|
||||||
TCP_NLA_DSACK_DUPS,
|
|
||||||
TCP_NLA_REORD_SEEN,
|
|
||||||
TCP_NLA_SRTT,
|
|
||||||
TCP_NLA_TIMEOUT_REHASH,
|
|
||||||
TCP_NLA_BYTES_NOTSENT,
|
|
||||||
TCP_NLA_EDT,
|
|
||||||
TCP_NLA_TTL,
|
|
||||||
};
|
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
||||||
#define TCPOPT_EOL 0
|
|
||||||
#define TCPOPT_NOP 1
|
|
||||||
#define TCPOPT_MAXSEG 2
|
|
||||||
#define TCPOPT_WINDOW 3
|
|
||||||
#define TCPOPT_SACK_PERMITTED 4
|
|
||||||
#define TCPOPT_SACK 5
|
|
||||||
#define TCPOPT_TIMESTAMP 8
|
|
||||||
#define TCPOLEN_SACK_PERMITTED 2
|
|
||||||
#define TCPOLEN_WINDOW 3
|
|
||||||
#define TCPOLEN_MAXSEG 4
|
|
||||||
#define TCPOLEN_TIMESTAMP 10
|
|
||||||
|
|
||||||
#define SOL_TCP 6
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
typedef uint32_t tcp_seq;
|
|
||||||
|
|
||||||
#define TH_FIN 0x01
|
|
||||||
#define TH_SYN 0x02
|
|
||||||
#define TH_RST 0x04
|
|
||||||
#define TH_PUSH 0x08
|
|
||||||
#define TH_ACK 0x10
|
|
||||||
#define TH_URG 0x20
|
|
||||||
|
|
||||||
struct tcphdr {
|
|
||||||
#ifdef _GNU_SOURCE
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__extension__
|
|
||||||
#endif
|
|
||||||
union { struct {
|
|
||||||
|
|
||||||
uint16_t source;
|
|
||||||
uint16_t dest;
|
|
||||||
uint32_t seq;
|
|
||||||
uint32_t ack_seq;
|
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
||||||
uint16_t res1:4;
|
|
||||||
uint16_t doff:4;
|
|
||||||
uint16_t fin:1;
|
|
||||||
uint16_t syn:1;
|
|
||||||
uint16_t rst:1;
|
|
||||||
uint16_t psh:1;
|
|
||||||
uint16_t ack:1;
|
|
||||||
uint16_t urg:1;
|
|
||||||
uint16_t res2:2;
|
|
||||||
#else
|
|
||||||
uint16_t doff:4;
|
|
||||||
uint16_t res1:4;
|
|
||||||
uint16_t res2:2;
|
|
||||||
uint16_t urg:1;
|
|
||||||
uint16_t ack:1;
|
|
||||||
uint16_t psh:1;
|
|
||||||
uint16_t rst:1;
|
|
||||||
uint16_t syn:1;
|
|
||||||
uint16_t fin:1;
|
|
||||||
#endif
|
|
||||||
uint16_t window;
|
|
||||||
uint16_t check;
|
|
||||||
uint16_t urg_ptr;
|
|
||||||
|
|
||||||
}; struct {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint16_t th_sport;
|
|
||||||
uint16_t th_dport;
|
|
||||||
uint32_t th_seq;
|
|
||||||
uint32_t th_ack;
|
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
||||||
uint8_t th_x2:4;
|
|
||||||
uint8_t th_off:4;
|
|
||||||
#else
|
|
||||||
uint8_t th_off:4;
|
|
||||||
uint8_t th_x2:4;
|
|
||||||
#endif
|
|
||||||
uint8_t th_flags;
|
|
||||||
uint16_t th_win;
|
|
||||||
uint16_t th_sum;
|
|
||||||
uint16_t th_urp;
|
|
||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
|
||||||
}; };
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
|
||||||
#define TCPI_OPT_TIMESTAMPS 1
|
|
||||||
#define TCPI_OPT_SACK 2
|
|
||||||
#define TCPI_OPT_WSCALE 4
|
|
||||||
#define TCPI_OPT_ECN 8
|
|
||||||
|
|
||||||
#define TCP_CA_Open 0
|
|
||||||
#define TCP_CA_Disorder 1
|
|
||||||
#define TCP_CA_CWR 2
|
|
||||||
#define TCP_CA_Recovery 3
|
|
||||||
#define TCP_CA_Loss 4
|
|
||||||
|
|
||||||
enum tcp_fastopen_client_fail {
|
|
||||||
TFO_STATUS_UNSPEC,
|
|
||||||
TFO_COOKIE_UNAVAILABLE,
|
|
||||||
TFO_DATA_NOT_ACKED,
|
|
||||||
TFO_SYN_RETRANSMITTED,
|
|
||||||
};
|
|
||||||
|
|
||||||
struct tcp_info {
|
|
||||||
uint8_t tcpi_state;
|
|
||||||
uint8_t tcpi_ca_state;
|
|
||||||
uint8_t tcpi_retransmits;
|
|
||||||
uint8_t tcpi_probes;
|
|
||||||
uint8_t tcpi_backoff;
|
|
||||||
uint8_t tcpi_options;
|
|
||||||
uint8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4;
|
|
||||||
uint8_t tcpi_delivery_rate_app_limited : 1, tcpi_fastopen_client_fail : 2;
|
|
||||||
uint32_t tcpi_rto;
|
|
||||||
uint32_t tcpi_ato;
|
|
||||||
uint32_t tcpi_snd_mss;
|
|
||||||
uint32_t tcpi_rcv_mss;
|
|
||||||
uint32_t tcpi_unacked;
|
|
||||||
uint32_t tcpi_sacked;
|
|
||||||
uint32_t tcpi_lost;
|
|
||||||
uint32_t tcpi_retrans;
|
|
||||||
uint32_t tcpi_fackets;
|
|
||||||
uint32_t tcpi_last_data_sent;
|
|
||||||
uint32_t tcpi_last_ack_sent;
|
|
||||||
uint32_t tcpi_last_data_recv;
|
|
||||||
uint32_t tcpi_last_ack_recv;
|
|
||||||
uint32_t tcpi_pmtu;
|
|
||||||
uint32_t tcpi_rcv_ssthresh;
|
|
||||||
uint32_t tcpi_rtt;
|
|
||||||
uint32_t tcpi_rttvar;
|
|
||||||
uint32_t tcpi_snd_ssthresh;
|
|
||||||
uint32_t tcpi_snd_cwnd;
|
|
||||||
uint32_t tcpi_advmss;
|
|
||||||
uint32_t tcpi_reordering;
|
|
||||||
uint32_t tcpi_rcv_rtt;
|
|
||||||
uint32_t tcpi_rcv_space;
|
|
||||||
uint32_t tcpi_total_retrans;
|
|
||||||
uint64_t tcpi_pacing_rate;
|
|
||||||
uint64_t tcpi_max_pacing_rate;
|
|
||||||
uint64_t tcpi_bytes_acked;
|
|
||||||
uint64_t tcpi_bytes_received;
|
|
||||||
uint32_t tcpi_segs_out;
|
|
||||||
uint32_t tcpi_segs_in;
|
|
||||||
uint32_t tcpi_notsent_bytes;
|
|
||||||
uint32_t tcpi_min_rtt;
|
|
||||||
uint32_t tcpi_data_segs_in;
|
|
||||||
uint32_t tcpi_data_segs_out;
|
|
||||||
uint64_t tcpi_delivery_rate;
|
|
||||||
uint64_t tcpi_busy_time;
|
|
||||||
uint64_t tcpi_rwnd_limited;
|
|
||||||
uint64_t tcpi_sndbuf_limited;
|
|
||||||
uint32_t tcpi_delivered;
|
|
||||||
uint32_t tcpi_delivered_ce;
|
|
||||||
uint64_t tcpi_bytes_sent;
|
|
||||||
uint64_t tcpi_bytes_retrans;
|
|
||||||
uint32_t tcpi_dsack_dups;
|
|
||||||
uint32_t tcpi_reord_seen;
|
|
||||||
uint32_t tcpi_rcv_ooopack;
|
|
||||||
uint32_t tcpi_snd_wnd;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define TCP_MD5SIG_MAXKEYLEN 80
|
|
||||||
|
|
||||||
#define TCP_MD5SIG_FLAG_PREFIX 0x1
|
|
||||||
#define TCP_MD5SIG_FLAG_IFINDEX 0x2
|
|
||||||
|
|
||||||
struct tcp_md5sig {
|
|
||||||
struct sockaddr_storage tcpm_addr;
|
|
||||||
uint8_t tcpm_flags;
|
|
||||||
uint8_t tcpm_prefixlen;
|
|
||||||
uint16_t tcpm_keylen;
|
|
||||||
int tcpm_ifindex;
|
|
||||||
uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct tcp_diag_md5sig {
|
|
||||||
uint8_t tcpm_family;
|
|
||||||
uint8_t tcpm_prefixlen;
|
|
||||||
uint16_t tcpm_keylen;
|
|
||||||
uint32_t tcpm_addr[4];
|
|
||||||
uint8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN];
|
|
||||||
};
|
|
||||||
|
|
||||||
#define TCP_REPAIR_ON 1
|
|
||||||
#define TCP_REPAIR_OFF 0
|
|
||||||
#define TCP_REPAIR_OFF_NO_WP -1
|
|
||||||
|
|
||||||
struct tcp_repair_window {
|
|
||||||
uint32_t snd_wl1;
|
|
||||||
uint32_t snd_wnd;
|
|
||||||
uint32_t max_window;
|
|
||||||
uint32_t rcv_wnd;
|
|
||||||
uint32_t rcv_wup;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define TCP_RECEIVE_ZEROCOPY_FLAG_TLB_CLEAN_HINT 0x1
|
|
||||||
|
|
||||||
struct tcp_zerocopy_receive {
|
|
||||||
uint64_t address;
|
|
||||||
uint32_t length;
|
|
||||||
uint32_t recv_skip_hint;
|
|
||||||
uint32_t inq;
|
|
||||||
int32_t err;
|
|
||||||
uint64_t copybuf_address;
|
|
||||||
int32_t copybuf_len;
|
|
||||||
uint32_t flags;
|
|
||||||
uint64_t msg_control;
|
|
||||||
uint64_t msg_controllen;
|
|
||||||
uint32_t msg_flags;
|
|
||||||
uint32_t reserved;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
46
lib/libc/include/wasm-wasi-musl/netinet/udp.h
vendored
46
lib/libc/include/wasm-wasi-musl/netinet/udp.h
vendored
@ -1,46 +0,0 @@
|
|||||||
#ifndef _NETINET_UDP_H
|
|
||||||
#define _NETINET_UDP_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
|
||||||
#define uh_sport source
|
|
||||||
#define uh_dport dest
|
|
||||||
#define uh_ulen len
|
|
||||||
#define uh_sum check
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct udphdr {
|
|
||||||
uint16_t uh_sport;
|
|
||||||
uint16_t uh_dport;
|
|
||||||
uint16_t uh_ulen;
|
|
||||||
uint16_t uh_sum;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define UDP_CORK 1
|
|
||||||
#define UDP_ENCAP 100
|
|
||||||
#define UDP_NO_CHECK6_TX 101
|
|
||||||
#define UDP_NO_CHECK6_RX 102
|
|
||||||
#define UDP_SEGMENT 103
|
|
||||||
#define UDP_GRO 104
|
|
||||||
|
|
||||||
#define UDP_ENCAP_ESPINUDP_NON_IKE 1
|
|
||||||
#define UDP_ENCAP_ESPINUDP 2
|
|
||||||
#define UDP_ENCAP_L2TPINUDP 3
|
|
||||||
#define UDP_ENCAP_GTP0 4
|
|
||||||
#define UDP_ENCAP_GTP1U 5
|
|
||||||
#define UDP_ENCAP_RXRPC 6
|
|
||||||
#define TCP_ENCAP_ESPINTCP 7
|
|
||||||
|
|
||||||
#define SOL_UDP 17
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,62 +0,0 @@
|
|||||||
#ifndef _NETPACKET_PACKET_H
|
|
||||||
#define _NETPACKET_PACKET_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct sockaddr_ll {
|
|
||||||
unsigned short sll_family, sll_protocol;
|
|
||||||
int sll_ifindex;
|
|
||||||
unsigned short sll_hatype;
|
|
||||||
unsigned char sll_pkttype, sll_halen;
|
|
||||||
unsigned char sll_addr[8];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct packet_mreq {
|
|
||||||
int mr_ifindex;
|
|
||||||
unsigned short int mr_type, mr_alen;
|
|
||||||
unsigned char mr_address[8];
|
|
||||||
};
|
|
||||||
|
|
||||||
#define PACKET_HOST 0
|
|
||||||
#define PACKET_BROADCAST 1
|
|
||||||
#define PACKET_MULTICAST 2
|
|
||||||
#define PACKET_OTHERHOST 3
|
|
||||||
#define PACKET_OUTGOING 4
|
|
||||||
#define PACKET_LOOPBACK 5
|
|
||||||
#define PACKET_FASTROUTE 6
|
|
||||||
|
|
||||||
#define PACKET_ADD_MEMBERSHIP 1
|
|
||||||
#define PACKET_DROP_MEMBERSHIP 2
|
|
||||||
#define PACKET_RECV_OUTPUT 3
|
|
||||||
#define PACKET_RX_RING 5
|
|
||||||
#define PACKET_STATISTICS 6
|
|
||||||
#define PACKET_COPY_THRESH 7
|
|
||||||
#define PACKET_AUXDATA 8
|
|
||||||
#define PACKET_ORIGDEV 9
|
|
||||||
#define PACKET_VERSION 10
|
|
||||||
#define PACKET_HDRLEN 11
|
|
||||||
#define PACKET_RESERVE 12
|
|
||||||
#define PACKET_TX_RING 13
|
|
||||||
#define PACKET_LOSS 14
|
|
||||||
#define PACKET_VNET_HDR 15
|
|
||||||
#define PACKET_TX_TIMESTAMP 16
|
|
||||||
#define PACKET_TIMESTAMP 17
|
|
||||||
#define PACKET_FANOUT 18
|
|
||||||
#define PACKET_TX_HAS_OFF 19
|
|
||||||
#define PACKET_QDISC_BYPASS 20
|
|
||||||
#define PACKET_ROLLOVER_STATS 21
|
|
||||||
#define PACKET_FANOUT_DATA 22
|
|
||||||
#define PACKET_IGNORE_OUTGOING 23
|
|
||||||
|
|
||||||
#define PACKET_MR_MULTICAST 0
|
|
||||||
#define PACKET_MR_PROMISC 1
|
|
||||||
#define PACKET_MR_ALLMULTI 2
|
|
||||||
#define PACKET_MR_UNICAST 3
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
22
lib/libc/include/wasm-wasi-musl/nl_types.h
vendored
22
lib/libc/include/wasm-wasi-musl/nl_types.h
vendored
@ -1,22 +0,0 @@
|
|||||||
#ifndef _NL_TYPES_H
|
|
||||||
#define _NL_TYPES_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define NL_SETD 1
|
|
||||||
#define NL_CAT_LOCALE 1
|
|
||||||
|
|
||||||
typedef int nl_item;
|
|
||||||
typedef void *nl_catd;
|
|
||||||
|
|
||||||
nl_catd catopen (const char *, int);
|
|
||||||
char *catgets (nl_catd, int, int, const char *);
|
|
||||||
int catclose (nl_catd);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
62
lib/libc/include/wasm-wasi-musl/regex.h
vendored
62
lib/libc/include/wasm-wasi-musl/regex.h
vendored
@ -1,62 +0,0 @@
|
|||||||
#ifndef _REGEX_H
|
|
||||||
#define _REGEX_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
#define __NEED_regoff_t
|
|
||||||
#define __NEED_size_t
|
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
typedef struct re_pattern_buffer {
|
|
||||||
size_t re_nsub;
|
|
||||||
void *__opaque, *__padding[4];
|
|
||||||
size_t __nsub2;
|
|
||||||
char __padding2;
|
|
||||||
} regex_t;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
regoff_t rm_so;
|
|
||||||
regoff_t rm_eo;
|
|
||||||
} regmatch_t;
|
|
||||||
|
|
||||||
#define REG_EXTENDED 1
|
|
||||||
#define REG_ICASE 2
|
|
||||||
#define REG_NEWLINE 4
|
|
||||||
#define REG_NOSUB 8
|
|
||||||
|
|
||||||
#define REG_NOTBOL 1
|
|
||||||
#define REG_NOTEOL 2
|
|
||||||
|
|
||||||
#define REG_OK 0
|
|
||||||
#define REG_NOMATCH 1
|
|
||||||
#define REG_BADPAT 2
|
|
||||||
#define REG_ECOLLATE 3
|
|
||||||
#define REG_ECTYPE 4
|
|
||||||
#define REG_EESCAPE 5
|
|
||||||
#define REG_ESUBREG 6
|
|
||||||
#define REG_EBRACK 7
|
|
||||||
#define REG_EPAREN 8
|
|
||||||
#define REG_EBRACE 9
|
|
||||||
#define REG_BADBR 10
|
|
||||||
#define REG_ERANGE 11
|
|
||||||
#define REG_ESPACE 12
|
|
||||||
#define REG_BADRPT 13
|
|
||||||
|
|
||||||
#define REG_ENOSYS -1
|
|
||||||
|
|
||||||
int regcomp(regex_t *__restrict, const char *__restrict, int);
|
|
||||||
int regexec(const regex_t *__restrict, const char *__restrict, size_t, regmatch_t *__restrict, int);
|
|
||||||
void regfree(regex_t *);
|
|
||||||
|
|
||||||
size_t regerror(int, const regex_t *__restrict, char *__restrict, size_t);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
63
lib/libc/include/wasm-wasi-musl/search.h
vendored
63
lib/libc/include/wasm-wasi-musl/search.h
vendored
@ -1,63 +0,0 @@
|
|||||||
#ifndef _SEARCH_H
|
|
||||||
#define _SEARCH_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
#define __NEED_size_t
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
typedef enum { FIND, ENTER } ACTION;
|
|
||||||
typedef enum { preorder, postorder, endorder, leaf } VISIT;
|
|
||||||
|
|
||||||
typedef struct entry {
|
|
||||||
char *key;
|
|
||||||
void *data;
|
|
||||||
} ENTRY;
|
|
||||||
|
|
||||||
int hcreate(size_t);
|
|
||||||
void hdestroy(void);
|
|
||||||
ENTRY *hsearch(ENTRY, ACTION);
|
|
||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
|
||||||
struct hsearch_data {
|
|
||||||
struct __tab *__tab;
|
|
||||||
unsigned int __unused1;
|
|
||||||
unsigned int __unused2;
|
|
||||||
};
|
|
||||||
|
|
||||||
int hcreate_r(size_t, struct hsearch_data *);
|
|
||||||
void hdestroy_r(struct hsearch_data *);
|
|
||||||
int hsearch_r(ENTRY, ACTION, ENTRY **, struct hsearch_data *);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void insque(void *, void *);
|
|
||||||
void remque(void *);
|
|
||||||
|
|
||||||
void *lsearch(const void *, void *, size_t *, size_t,
|
|
||||||
int (*)(const void *, const void *));
|
|
||||||
void *lfind(const void *, const void *, size_t *, size_t,
|
|
||||||
int (*)(const void *, const void *));
|
|
||||||
|
|
||||||
void *tdelete(const void *__restrict, void **__restrict, int(*)(const void *, const void *));
|
|
||||||
void *tfind(const void *, void *const *, int(*)(const void *, const void *));
|
|
||||||
void *tsearch(const void *, void **, int (*)(const void *, const void *));
|
|
||||||
void twalk(const void *, void (*)(const void *, VISIT, int));
|
|
||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
|
||||||
struct qelem {
|
|
||||||
struct qelem *q_forw, *q_back;
|
|
||||||
char q_data[1];
|
|
||||||
};
|
|
||||||
|
|
||||||
void tdestroy(void *, void (*)(void *));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
39
lib/libc/include/wasm-wasi-musl/semaphore.h
vendored
39
lib/libc/include/wasm-wasi-musl/semaphore.h
vendored
@ -1,39 +0,0 @@
|
|||||||
#ifndef _SEMAPHORE_H
|
|
||||||
#define _SEMAPHORE_H
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
#define __NEED_time_t
|
|
||||||
#define __NEED_struct_timespec
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
#define SEM_FAILED ((sem_t *)0)
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
volatile int __val[4*sizeof(long)/sizeof(int)];
|
|
||||||
} sem_t;
|
|
||||||
|
|
||||||
int sem_close(sem_t *);
|
|
||||||
int sem_destroy(sem_t *);
|
|
||||||
int sem_getvalue(sem_t *__restrict, int *__restrict);
|
|
||||||
int sem_init(sem_t *, int, unsigned);
|
|
||||||
sem_t *sem_open(const char *, int, ...);
|
|
||||||
int sem_post(sem_t *);
|
|
||||||
int sem_timedwait(sem_t *__restrict, const struct timespec *__restrict);
|
|
||||||
int sem_trywait(sem_t *);
|
|
||||||
int sem_unlink(const char *);
|
|
||||||
int sem_wait(sem_t *);
|
|
||||||
|
|
||||||
#if _REDIR_TIME64
|
|
||||||
__REDIR(sem_timedwait, __sem_timedwait_time64);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
20
lib/libc/include/wasm-wasi-musl/stdalign.h
vendored
20
lib/libc/include/wasm-wasi-musl/stdalign.h
vendored
@ -1,20 +0,0 @@
|
|||||||
#ifndef _STDALIGN_H
|
|
||||||
#define _STDALIGN_H
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
|
|
||||||
/* this whole header only works in C11 or with compiler extensions */
|
|
||||||
#if __STDC_VERSION__ < 201112L && defined( __GNUC__)
|
|
||||||
#define _Alignas(t) __attribute__((__aligned__(t)))
|
|
||||||
#define _Alignof(t) __alignof__(t)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define alignas _Alignas
|
|
||||||
#define alignof _Alignof
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __alignas_is_defined 1
|
|
||||||
#define __alignof_is_defined 1
|
|
||||||
|
|
||||||
#endif
|
|
||||||
14
lib/libc/include/wasm-wasi-musl/stdbool.h
vendored
14
lib/libc/include/wasm-wasi-musl/stdbool.h
vendored
@ -1,14 +0,0 @@
|
|||||||
#ifndef _STDBOOL_H
|
|
||||||
#define _STDBOOL_H
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
|
|
||||||
#define true 1
|
|
||||||
#define false 0
|
|
||||||
#define bool _Bool
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __bool_true_false_are_defined 1
|
|
||||||
|
|
||||||
#endif
|
|
||||||
117
lib/libc/include/wasm-wasi-musl/stdint.h
vendored
117
lib/libc/include/wasm-wasi-musl/stdint.h
vendored
@ -1,117 +0,0 @@
|
|||||||
#ifndef _STDINT_H
|
|
||||||
#define _STDINT_H
|
|
||||||
|
|
||||||
#define __NEED_int8_t
|
|
||||||
#define __NEED_int16_t
|
|
||||||
#define __NEED_int32_t
|
|
||||||
#define __NEED_int64_t
|
|
||||||
|
|
||||||
#define __NEED_uint8_t
|
|
||||||
#define __NEED_uint16_t
|
|
||||||
#define __NEED_uint32_t
|
|
||||||
#define __NEED_uint64_t
|
|
||||||
|
|
||||||
#define __NEED_intptr_t
|
|
||||||
#define __NEED_uintptr_t
|
|
||||||
|
|
||||||
#define __NEED_intmax_t
|
|
||||||
#define __NEED_uintmax_t
|
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
typedef int8_t int_fast8_t;
|
|
||||||
typedef int64_t int_fast64_t;
|
|
||||||
|
|
||||||
typedef int8_t int_least8_t;
|
|
||||||
typedef int16_t int_least16_t;
|
|
||||||
typedef int32_t int_least32_t;
|
|
||||||
typedef int64_t int_least64_t;
|
|
||||||
|
|
||||||
typedef uint8_t uint_fast8_t;
|
|
||||||
typedef uint64_t uint_fast64_t;
|
|
||||||
|
|
||||||
typedef uint8_t uint_least8_t;
|
|
||||||
typedef uint16_t uint_least16_t;
|
|
||||||
typedef uint32_t uint_least32_t;
|
|
||||||
typedef uint64_t uint_least64_t;
|
|
||||||
|
|
||||||
#define INT8_MIN (-1-0x7f)
|
|
||||||
#define INT16_MIN (-1-0x7fff)
|
|
||||||
#define INT32_MIN (-1-0x7fffffff)
|
|
||||||
#define INT64_MIN (-1-0x7fffffffffffffff)
|
|
||||||
|
|
||||||
#define INT8_MAX (0x7f)
|
|
||||||
#define INT16_MAX (0x7fff)
|
|
||||||
#define INT32_MAX (0x7fffffff)
|
|
||||||
#define INT64_MAX (0x7fffffffffffffff)
|
|
||||||
|
|
||||||
#define UINT8_MAX (0xff)
|
|
||||||
#define UINT16_MAX (0xffff)
|
|
||||||
#define UINT32_MAX (0xffffffffu)
|
|
||||||
#define UINT64_MAX (0xffffffffffffffffu)
|
|
||||||
|
|
||||||
#define INT_FAST8_MIN INT8_MIN
|
|
||||||
#define INT_FAST64_MIN INT64_MIN
|
|
||||||
|
|
||||||
#define INT_LEAST8_MIN INT8_MIN
|
|
||||||
#define INT_LEAST16_MIN INT16_MIN
|
|
||||||
#define INT_LEAST32_MIN INT32_MIN
|
|
||||||
#define INT_LEAST64_MIN INT64_MIN
|
|
||||||
|
|
||||||
#define INT_FAST8_MAX INT8_MAX
|
|
||||||
#define INT_FAST64_MAX INT64_MAX
|
|
||||||
|
|
||||||
#define INT_LEAST8_MAX INT8_MAX
|
|
||||||
#define INT_LEAST16_MAX INT16_MAX
|
|
||||||
#define INT_LEAST32_MAX INT32_MAX
|
|
||||||
#define INT_LEAST64_MAX INT64_MAX
|
|
||||||
|
|
||||||
#define UINT_FAST8_MAX UINT8_MAX
|
|
||||||
#define UINT_FAST64_MAX UINT64_MAX
|
|
||||||
|
|
||||||
#define UINT_LEAST8_MAX UINT8_MAX
|
|
||||||
#define UINT_LEAST16_MAX UINT16_MAX
|
|
||||||
#define UINT_LEAST32_MAX UINT32_MAX
|
|
||||||
#define UINT_LEAST64_MAX UINT64_MAX
|
|
||||||
|
|
||||||
#define INTMAX_MIN INT64_MIN
|
|
||||||
#define INTMAX_MAX INT64_MAX
|
|
||||||
#define UINTMAX_MAX UINT64_MAX
|
|
||||||
|
|
||||||
#define WINT_MIN 0U
|
|
||||||
#define WINT_MAX UINT32_MAX
|
|
||||||
|
|
||||||
#if L'\0'-1 > 0
|
|
||||||
#define WCHAR_MAX (0xffffffffu+L'\0')
|
|
||||||
#define WCHAR_MIN (0+L'\0')
|
|
||||||
#else
|
|
||||||
#define WCHAR_MAX (0x7fffffff+L'\0')
|
|
||||||
#define WCHAR_MIN (-1-0x7fffffff+L'\0')
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SIG_ATOMIC_MIN INT32_MIN
|
|
||||||
#define SIG_ATOMIC_MAX INT32_MAX
|
|
||||||
|
|
||||||
#include <bits/stdint.h>
|
|
||||||
|
|
||||||
#define INT8_C(c) c
|
|
||||||
#define INT16_C(c) c
|
|
||||||
#define INT32_C(c) c
|
|
||||||
|
|
||||||
#define UINT8_C(c) c
|
|
||||||
#define UINT16_C(c) c
|
|
||||||
#define UINT32_C(c) c ## U
|
|
||||||
|
|
||||||
#if UINTPTR_MAX == UINT64_MAX
|
|
||||||
#define INT64_C(c) c ## L
|
|
||||||
#define UINT64_C(c) c ## UL
|
|
||||||
#define INTMAX_C(c) c ## L
|
|
||||||
#define UINTMAX_C(c) c ## UL
|
|
||||||
#else
|
|
||||||
#define INT64_C(c) c ## LL
|
|
||||||
#define UINT64_C(c) c ## ULL
|
|
||||||
#define INTMAX_C(c) c ## LL
|
|
||||||
#define UINTMAX_C(c) c ## ULL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
34
lib/libc/include/wasm-wasi-musl/stdio_ext.h
vendored
34
lib/libc/include/wasm-wasi-musl/stdio_ext.h
vendored
@ -1,34 +0,0 @@
|
|||||||
#ifndef _STDIO_EXT_H
|
|
||||||
#define _STDIO_EXT_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#define FSETLOCKING_QUERY 0
|
|
||||||
#define FSETLOCKING_INTERNAL 1
|
|
||||||
#define FSETLOCKING_BYCALLER 2
|
|
||||||
|
|
||||||
void _flushlbf(void);
|
|
||||||
int __fsetlocking(FILE *, int);
|
|
||||||
int __fwriting(FILE *);
|
|
||||||
int __freading(FILE *);
|
|
||||||
int __freadable(FILE *);
|
|
||||||
int __fwritable(FILE *);
|
|
||||||
int __flbf(FILE *);
|
|
||||||
size_t __fbufsize(FILE *);
|
|
||||||
size_t __fpending(FILE *);
|
|
||||||
int __fpurge(FILE *);
|
|
||||||
|
|
||||||
size_t __freadahead(FILE *);
|
|
||||||
const char *__freadptr(FILE *, size_t *);
|
|
||||||
void __freadptrinc(FILE *, size_t);
|
|
||||||
void __fseterr(FILE *);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
#ifndef _STDNORETURN_H
|
|
||||||
#define _STDNORETURN_H
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#include <features.h>
|
|
||||||
#define noreturn _Noreturn
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
139
lib/libc/include/wasm-wasi-musl/stropts.h
vendored
139
lib/libc/include/wasm-wasi-musl/stropts.h
vendored
@ -1,139 +0,0 @@
|
|||||||
#ifndef _STROPTS_H
|
|
||||||
#define _STROPTS_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __SID ('S' << 8)
|
|
||||||
|
|
||||||
#define I_NREAD (__SID | 1)
|
|
||||||
#define I_PUSH (__SID | 2)
|
|
||||||
#define I_POP (__SID | 3)
|
|
||||||
#define I_LOOK (__SID | 4)
|
|
||||||
#define I_FLUSH (__SID | 5)
|
|
||||||
#define I_SRDOPT (__SID | 6)
|
|
||||||
#define I_GRDOPT (__SID | 7)
|
|
||||||
#define I_STR (__SID | 8)
|
|
||||||
#define I_SETSIG (__SID | 9)
|
|
||||||
#define I_GETSIG (__SID |10)
|
|
||||||
#define I_FIND (__SID |11)
|
|
||||||
#define I_LINK (__SID |12)
|
|
||||||
#define I_UNLINK (__SID |13)
|
|
||||||
#define I_PEEK (__SID |15)
|
|
||||||
#define I_FDINSERT (__SID |16)
|
|
||||||
#define I_SENDFD (__SID |17)
|
|
||||||
#define I_RECVFD (__SID |14)
|
|
||||||
#define I_SWROPT (__SID |19)
|
|
||||||
#define I_GWROPT (__SID |20)
|
|
||||||
#define I_LIST (__SID |21)
|
|
||||||
#define I_PLINK (__SID |22)
|
|
||||||
#define I_PUNLINK (__SID |23)
|
|
||||||
#define I_FLUSHBAND (__SID |28)
|
|
||||||
#define I_CKBAND (__SID |29)
|
|
||||||
#define I_GETBAND (__SID |30)
|
|
||||||
#define I_ATMARK (__SID |31)
|
|
||||||
#define I_SETCLTIME (__SID |32)
|
|
||||||
#define I_GETCLTIME (__SID |33)
|
|
||||||
#define I_CANPUT (__SID |34)
|
|
||||||
|
|
||||||
#define FMNAMESZ 8
|
|
||||||
|
|
||||||
#define FLUSHR 0x01
|
|
||||||
#define FLUSHW 0x02
|
|
||||||
#define FLUSHRW 0x03
|
|
||||||
#define FLUSHBAND 0x04
|
|
||||||
|
|
||||||
#define S_INPUT 0x0001
|
|
||||||
#define S_HIPRI 0x0002
|
|
||||||
#define S_OUTPUT 0x0004
|
|
||||||
#define S_MSG 0x0008
|
|
||||||
#define S_ERROR 0x0010
|
|
||||||
#define S_HANGUP 0x0020
|
|
||||||
#define S_RDNORM 0x0040
|
|
||||||
#define S_WRNORM S_OUTPUT
|
|
||||||
#define S_RDBAND 0x0080
|
|
||||||
#define S_WRBAND 0x0100
|
|
||||||
#define S_BANDURG 0x0200
|
|
||||||
|
|
||||||
#define RS_HIPRI 0x01
|
|
||||||
|
|
||||||
#define RNORM 0x0000
|
|
||||||
#define RMSGD 0x0001
|
|
||||||
#define RMSGN 0x0002
|
|
||||||
#define RPROTDAT 0x0004
|
|
||||||
#define RPROTDIS 0x0008
|
|
||||||
#define RPROTNORM 0x0010
|
|
||||||
#define RPROTMASK 0x001C
|
|
||||||
|
|
||||||
#define SNDZERO 0x001
|
|
||||||
#define SNDPIPE 0x002
|
|
||||||
|
|
||||||
#define ANYMARK 0x01
|
|
||||||
#define LASTMARK 0x02
|
|
||||||
|
|
||||||
#define MUXID_ALL (-1)
|
|
||||||
|
|
||||||
#define MSG_HIPRI 0x01
|
|
||||||
#define MSG_ANY 0x02
|
|
||||||
#define MSG_BAND 0x04
|
|
||||||
|
|
||||||
#define MORECTL 1
|
|
||||||
#define MOREDATA 2
|
|
||||||
|
|
||||||
struct bandinfo {
|
|
||||||
unsigned char bi_pri;
|
|
||||||
int bi_flag;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct strbuf {
|
|
||||||
int maxlen;
|
|
||||||
int len;
|
|
||||||
char *buf;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct strpeek {
|
|
||||||
struct strbuf ctlbuf;
|
|
||||||
struct strbuf databuf;
|
|
||||||
unsigned flags;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct strfdinsert {
|
|
||||||
struct strbuf ctlbuf;
|
|
||||||
struct strbuf databuf;
|
|
||||||
unsigned flags;
|
|
||||||
int fildes;
|
|
||||||
int offset;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct strioctl {
|
|
||||||
int ic_cmd;
|
|
||||||
int ic_timout;
|
|
||||||
int ic_len;
|
|
||||||
char *ic_dp;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct strrecvfd {
|
|
||||||
int fd;
|
|
||||||
int uid;
|
|
||||||
int gid;
|
|
||||||
char __fill[8];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct str_mlist {
|
|
||||||
char l_name[FMNAMESZ + 1];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct str_list {
|
|
||||||
int sl_nmods;
|
|
||||||
struct str_mlist *sl_modlist;
|
|
||||||
};
|
|
||||||
|
|
||||||
int isastream(int);
|
|
||||||
int ioctl(int, int, ...);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
2
lib/libc/include/wasm-wasi-musl/sys/dir.h
vendored
2
lib/libc/include/wasm-wasi-musl/sys/dir.h
vendored
@ -1,2 +0,0 @@
|
|||||||
#include <dirent.h>
|
|
||||||
#define direct dirent
|
|
||||||
2
lib/libc/include/wasm-wasi-musl/sys/errno.h
vendored
2
lib/libc/include/wasm-wasi-musl/sys/errno.h
vendored
@ -1,2 +0,0 @@
|
|||||||
#warning redirecting incorrect #include <sys/errno.h> to <errno.h>
|
|
||||||
#include <errno.h>
|
|
||||||
26
lib/libc/include/wasm-wasi-musl/sys/eventfd.h
vendored
26
lib/libc/include/wasm-wasi-musl/sys/eventfd.h
vendored
@ -1,26 +0,0 @@
|
|||||||
#ifndef _SYS_EVENTFD_H
|
|
||||||
#define _SYS_EVENTFD_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
|
|
||||||
typedef uint64_t eventfd_t;
|
|
||||||
|
|
||||||
#define EFD_SEMAPHORE 1
|
|
||||||
#define EFD_CLOEXEC O_CLOEXEC
|
|
||||||
#define EFD_NONBLOCK O_NONBLOCK
|
|
||||||
|
|
||||||
int eventfd(unsigned int, int);
|
|
||||||
int eventfd_read(int, eventfd_t *);
|
|
||||||
int eventfd_write(int, eventfd_t);
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* sys/eventfd.h */
|
|
||||||
2
lib/libc/include/wasm-wasi-musl/sys/fcntl.h
vendored
2
lib/libc/include/wasm-wasi-musl/sys/fcntl.h
vendored
@ -1,2 +0,0 @@
|
|||||||
#warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
21
lib/libc/include/wasm-wasi-musl/sys/file.h
vendored
21
lib/libc/include/wasm-wasi-musl/sys/file.h
vendored
@ -1,21 +0,0 @@
|
|||||||
#ifndef _SYS_FILE_H
|
|
||||||
#define _SYS_FILE_H
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define LOCK_SH 1
|
|
||||||
#define LOCK_EX 2
|
|
||||||
#define LOCK_NB 4
|
|
||||||
#define LOCK_UN 8
|
|
||||||
|
|
||||||
#define L_SET 0
|
|
||||||
#define L_INCR 1
|
|
||||||
#define L_XTND 2
|
|
||||||
|
|
||||||
int flock(int, int);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
2
lib/libc/include/wasm-wasi-musl/sys/poll.h
vendored
2
lib/libc/include/wasm-wasi-musl/sys/poll.h
vendored
@ -1,2 +0,0 @@
|
|||||||
#warning redirecting incorrect #include <sys/poll.h> to <poll.h>
|
|
||||||
#include <poll.h>
|
|
||||||
9
lib/libc/include/wasm-wasi-musl/sys/reg.h
vendored
9
lib/libc/include/wasm-wasi-musl/sys/reg.h
vendored
@ -1,9 +0,0 @@
|
|||||||
#ifndef _SYS_REG_H
|
|
||||||
#define _SYS_REG_H
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#include <bits/reg.h>
|
|
||||||
|
|
||||||
#endif
|
|
||||||
2
lib/libc/include/wasm-wasi-musl/sys/signal.h
vendored
2
lib/libc/include/wasm-wasi-musl/sys/signal.h
vendored
@ -1,2 +0,0 @@
|
|||||||
#warning redirecting incorrect #include <sys/signal.h> to <signal.h>
|
|
||||||
#include <signal.h>
|
|
||||||
@ -1 +0,0 @@
|
|||||||
#include <stropts.h>
|
|
||||||
36
lib/libc/include/wasm-wasi-musl/sys/sysinfo.h
vendored
36
lib/libc/include/wasm-wasi-musl/sys/sysinfo.h
vendored
@ -1,36 +0,0 @@
|
|||||||
#ifndef _SYS_SYSINFO_H
|
|
||||||
#define _SYS_SYSINFO_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SI_LOAD_SHIFT 16
|
|
||||||
|
|
||||||
struct sysinfo {
|
|
||||||
unsigned long uptime;
|
|
||||||
unsigned long loads[3];
|
|
||||||
unsigned long totalram;
|
|
||||||
unsigned long freeram;
|
|
||||||
unsigned long sharedram;
|
|
||||||
unsigned long bufferram;
|
|
||||||
unsigned long totalswap;
|
|
||||||
unsigned long freeswap;
|
|
||||||
unsigned short procs, pad;
|
|
||||||
unsigned long totalhigh;
|
|
||||||
unsigned long freehigh;
|
|
||||||
unsigned mem_unit;
|
|
||||||
char __reserved[256];
|
|
||||||
};
|
|
||||||
|
|
||||||
int sysinfo (struct sysinfo *);
|
|
||||||
int get_nprocs_conf (void);
|
|
||||||
int get_nprocs (void);
|
|
||||||
long get_phys_pages (void);
|
|
||||||
long get_avphys_pages (void);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
28
lib/libc/include/wasm-wasi-musl/sys/timeb.h
vendored
28
lib/libc/include/wasm-wasi-musl/sys/timeb.h
vendored
@ -1,28 +0,0 @@
|
|||||||
#ifndef _SYS_TIMEB_H
|
|
||||||
#define _SYS_TIMEB_H
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
#define __NEED_time_t
|
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
struct timeb {
|
|
||||||
time_t time;
|
|
||||||
unsigned short millitm;
|
|
||||||
short timezone, dstflag;
|
|
||||||
};
|
|
||||||
|
|
||||||
int ftime(struct timeb *);
|
|
||||||
|
|
||||||
#if _REDIR_TIME64
|
|
||||||
__REDIR(ftime, __ftime64);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
103
lib/libc/include/wasm-wasi-musl/sys/timex.h
vendored
103
lib/libc/include/wasm-wasi-musl/sys/timex.h
vendored
@ -1,103 +0,0 @@
|
|||||||
#ifndef _SYS_TIMEX_H
|
|
||||||
#define _SYS_TIMEX_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __NEED_clockid_t
|
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
#include <sys/time.h>
|
|
||||||
|
|
||||||
struct ntptimeval {
|
|
||||||
struct timeval time;
|
|
||||||
long maxerror, esterror;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct timex {
|
|
||||||
unsigned modes;
|
|
||||||
long offset, freq, maxerror, esterror;
|
|
||||||
int status;
|
|
||||||
long constant, precision, tolerance;
|
|
||||||
struct timeval time;
|
|
||||||
long tick, ppsfreq, jitter;
|
|
||||||
int shift;
|
|
||||||
long stabil, jitcnt, calcnt, errcnt, stbcnt;
|
|
||||||
int tai;
|
|
||||||
int __padding[11];
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ADJ_OFFSET 0x0001
|
|
||||||
#define ADJ_FREQUENCY 0x0002
|
|
||||||
#define ADJ_MAXERROR 0x0004
|
|
||||||
#define ADJ_ESTERROR 0x0008
|
|
||||||
#define ADJ_STATUS 0x0010
|
|
||||||
#define ADJ_TIMECONST 0x0020
|
|
||||||
#define ADJ_TAI 0x0080
|
|
||||||
#define ADJ_SETOFFSET 0x0100
|
|
||||||
#define ADJ_MICRO 0x1000
|
|
||||||
#define ADJ_NANO 0x2000
|
|
||||||
#define ADJ_TICK 0x4000
|
|
||||||
#define ADJ_OFFSET_SINGLESHOT 0x8001
|
|
||||||
#define ADJ_OFFSET_SS_READ 0xa001
|
|
||||||
|
|
||||||
#define MOD_OFFSET ADJ_OFFSET
|
|
||||||
#define MOD_FREQUENCY ADJ_FREQUENCY
|
|
||||||
#define MOD_MAXERROR ADJ_MAXERROR
|
|
||||||
#define MOD_ESTERROR ADJ_ESTERROR
|
|
||||||
#define MOD_STATUS ADJ_STATUS
|
|
||||||
#define MOD_TIMECONST ADJ_TIMECONST
|
|
||||||
#define MOD_CLKB ADJ_TICK
|
|
||||||
#define MOD_CLKA ADJ_OFFSET_SINGLESHOT
|
|
||||||
#define MOD_TAI ADJ_TAI
|
|
||||||
#define MOD_MICRO ADJ_MICRO
|
|
||||||
#define MOD_NANO ADJ_NANO
|
|
||||||
|
|
||||||
#define STA_PLL 0x0001
|
|
||||||
#define STA_PPSFREQ 0x0002
|
|
||||||
#define STA_PPSTIME 0x0004
|
|
||||||
#define STA_FLL 0x0008
|
|
||||||
|
|
||||||
#define STA_INS 0x0010
|
|
||||||
#define STA_DEL 0x0020
|
|
||||||
#define STA_UNSYNC 0x0040
|
|
||||||
#define STA_FREQHOLD 0x0080
|
|
||||||
|
|
||||||
#define STA_PPSSIGNAL 0x0100
|
|
||||||
#define STA_PPSJITTER 0x0200
|
|
||||||
#define STA_PPSWANDER 0x0400
|
|
||||||
#define STA_PPSERROR 0x0800
|
|
||||||
|
|
||||||
#define STA_CLOCKERR 0x1000
|
|
||||||
#define STA_NANO 0x2000
|
|
||||||
#define STA_MODE 0x4000
|
|
||||||
#define STA_CLK 0x8000
|
|
||||||
|
|
||||||
#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \
|
|
||||||
STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
|
|
||||||
|
|
||||||
#define TIME_OK 0
|
|
||||||
#define TIME_INS 1
|
|
||||||
#define TIME_DEL 2
|
|
||||||
#define TIME_OOP 3
|
|
||||||
#define TIME_WAIT 4
|
|
||||||
#define TIME_ERROR 5
|
|
||||||
#define TIME_BAD TIME_ERROR
|
|
||||||
|
|
||||||
#define MAXTC 6
|
|
||||||
|
|
||||||
int adjtimex(struct timex *);
|
|
||||||
int clock_adjtime(clockid_t, struct timex *);
|
|
||||||
|
|
||||||
#if _REDIR_TIME64
|
|
||||||
__REDIR(adjtimex, __adjtimex_time64);
|
|
||||||
__REDIR(clock_adjtime, __clock_adjtime64);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
#ifndef _SYS_TTYDEFAULTS_H
|
|
||||||
#define _SYS_TTYDEFAULTS_H
|
|
||||||
|
|
||||||
#define TTYDEF_IFLAG (BRKINT | ISTRIP | ICRNL | IMAXBEL | IXON | IXANY)
|
|
||||||
#define TTYDEF_OFLAG (OPOST | ONLCR | XTABS)
|
|
||||||
#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
|
|
||||||
#define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL)
|
|
||||||
#define TTYDEF_SPEED (B9600)
|
|
||||||
#define CTRL(x) ((x)&037)
|
|
||||||
#define CEOF CTRL('d')
|
|
||||||
|
|
||||||
#define CEOL '\0'
|
|
||||||
#define CSTATUS '\0'
|
|
||||||
|
|
||||||
#define CERASE 0177
|
|
||||||
#define CINTR CTRL('c')
|
|
||||||
#define CKILL CTRL('u')
|
|
||||||
#define CMIN 1
|
|
||||||
#define CQUIT 034
|
|
||||||
#define CSUSP CTRL('z')
|
|
||||||
#define CTIME 0
|
|
||||||
#define CDSUSP CTRL('y')
|
|
||||||
#define CSTART CTRL('q')
|
|
||||||
#define CSTOP CTRL('s')
|
|
||||||
#define CLNEXT CTRL('v')
|
|
||||||
#define CDISCARD CTRL('o')
|
|
||||||
#define CWERASE CTRL('w')
|
|
||||||
#define CREPRINT CTRL('r')
|
|
||||||
#define CEOT CEOF
|
|
||||||
#define CBRK CEOL
|
|
||||||
#define CRPRNT CREPRINT
|
|
||||||
#define CFLUSH CDISCARD
|
|
||||||
|
|
||||||
#endif
|
|
||||||
29
lib/libc/include/wasm-wasi-musl/sys/utsname.h
vendored
29
lib/libc/include/wasm-wasi-musl/sys/utsname.h
vendored
@ -1,29 +0,0 @@
|
|||||||
#ifndef _SYS_UTSNAME_H
|
|
||||||
#define _SYS_UTSNAME_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
struct utsname {
|
|
||||||
char sysname[65];
|
|
||||||
char nodename[65];
|
|
||||||
char release[65];
|
|
||||||
char version[65];
|
|
||||||
char machine[65];
|
|
||||||
#ifdef _GNU_SOURCE
|
|
||||||
char domainname[65];
|
|
||||||
#else
|
|
||||||
char __domainname[65];
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
int uname (struct utsname *);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
1
lib/libc/include/wasm-wasi-musl/syscall.h
vendored
1
lib/libc/include/wasm-wasi-musl/syscall.h
vendored
@ -1 +0,0 @@
|
|||||||
#include <sys/syscall.h>
|
|
||||||
21
lib/libc/include/wasm-wasi-musl/sysexits.h
vendored
21
lib/libc/include/wasm-wasi-musl/sysexits.h
vendored
@ -1,21 +0,0 @@
|
|||||||
#ifndef _SYSEXITS_H
|
|
||||||
#define _SYSEXITS_H
|
|
||||||
#define EX_OK 0
|
|
||||||
#define EX__BASE 64
|
|
||||||
#define EX_USAGE 64
|
|
||||||
#define EX_DATAERR 65
|
|
||||||
#define EX_NOINPUT 66
|
|
||||||
#define EX_NOUSER 67
|
|
||||||
#define EX_NOHOST 68
|
|
||||||
#define EX_UNAVAILABLE 69
|
|
||||||
#define EX_SOFTWARE 70
|
|
||||||
#define EX_OSERR 71
|
|
||||||
#define EX_OSFILE 72
|
|
||||||
#define EX_CANTCREAT 73
|
|
||||||
#define EX_IOERR 74
|
|
||||||
#define EX_TEMPFAIL 75
|
|
||||||
#define EX_PROTOCOL 76
|
|
||||||
#define EX_NOPERM 77
|
|
||||||
#define EX_CONFIG 78
|
|
||||||
#define EX__MAX 78
|
|
||||||
#endif
|
|
||||||
33
lib/libc/include/wasm-wasi-musl/tar.h
vendored
33
lib/libc/include/wasm-wasi-musl/tar.h
vendored
@ -1,33 +0,0 @@
|
|||||||
#ifndef _TAR_H
|
|
||||||
#define _TAR_H
|
|
||||||
|
|
||||||
#define TSUID 04000
|
|
||||||
#define TSGID 02000
|
|
||||||
#define TSVTX 01000
|
|
||||||
#define TUREAD 00400
|
|
||||||
#define TUWRITE 00200
|
|
||||||
#define TUEXEC 00100
|
|
||||||
#define TGREAD 00040
|
|
||||||
#define TGWRITE 00020
|
|
||||||
#define TGEXEC 00010
|
|
||||||
#define TOREAD 00004
|
|
||||||
#define TOWRITE 00002
|
|
||||||
#define TOEXEC 00001
|
|
||||||
|
|
||||||
#define REGTYPE '0'
|
|
||||||
#define AREGTYPE '\0'
|
|
||||||
#define LNKTYPE '1'
|
|
||||||
#define SYMTYPE '2'
|
|
||||||
#define CHRTYPE '3'
|
|
||||||
#define BLKTYPE '4'
|
|
||||||
#define DIRTYPE '5'
|
|
||||||
#define FIFOTYPE '6'
|
|
||||||
#define CONTTYPE '7'
|
|
||||||
|
|
||||||
#define TMAGIC "ustar"
|
|
||||||
#define TMAGLEN 6
|
|
||||||
|
|
||||||
#define TVERSION "00"
|
|
||||||
#define TVERSLEN 2
|
|
||||||
|
|
||||||
#endif
|
|
||||||
270
lib/libc/include/wasm-wasi-musl/tgmath.h
vendored
270
lib/libc/include/wasm-wasi-musl/tgmath.h
vendored
@ -1,270 +0,0 @@
|
|||||||
#ifndef _TGMATH_H
|
|
||||||
#define _TGMATH_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
the return types are only correct with gcc (__GNUC__)
|
|
||||||
otherwise they are long double or long double complex
|
|
||||||
|
|
||||||
the long double version of a function is never chosen when
|
|
||||||
sizeof(double) == sizeof(long double)
|
|
||||||
(but the return type is set correctly with gcc)
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <math.h>
|
|
||||||
#include <complex.h>
|
|
||||||
|
|
||||||
#define __IS_FP(x) (sizeof((x)+1ULL) == sizeof((x)+1.0f))
|
|
||||||
#define __IS_CX(x) (__IS_FP(x) && sizeof(x) == sizeof((x)+I))
|
|
||||||
#define __IS_REAL(x) (__IS_FP(x) && 2*sizeof(x) == sizeof((x)+I))
|
|
||||||
|
|
||||||
#define __FLT(x) (__IS_REAL(x) && sizeof(x) == sizeof(float))
|
|
||||||
#define __LDBL(x) (__IS_REAL(x) && sizeof(x) == sizeof(long double) && sizeof(long double) != sizeof(double))
|
|
||||||
|
|
||||||
#define __FLTCX(x) (__IS_CX(x) && sizeof(x) == sizeof(float complex))
|
|
||||||
#define __DBLCX(x) (__IS_CX(x) && sizeof(x) == sizeof(double complex))
|
|
||||||
#define __LDBLCX(x) (__IS_CX(x) && sizeof(x) == sizeof(long double complex) && sizeof(long double) != sizeof(double))
|
|
||||||
|
|
||||||
/* return type */
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
/*
|
|
||||||
the result must be casted to the right type
|
|
||||||
(otherwise the result type is determined by the conversion
|
|
||||||
rules applied to all the function return types so it is long
|
|
||||||
double or long double complex except for integral functions)
|
|
||||||
|
|
||||||
this cannot be done in c99, so the typeof gcc extension is
|
|
||||||
used and that the type of ?: depends on wether an operand is
|
|
||||||
a null pointer constant or not
|
|
||||||
(in c11 _Generic can be used)
|
|
||||||
|
|
||||||
the c arguments below must be integer constant expressions
|
|
||||||
so they can be in null pointer constants
|
|
||||||
(__IS_FP above was carefully chosen this way)
|
|
||||||
*/
|
|
||||||
/* if c then t else void */
|
|
||||||
#define __type1(c,t) __typeof__(*(0?(t*)0:(void*)!(c)))
|
|
||||||
/* if c then t1 else t2 */
|
|
||||||
#define __type2(c,t1,t2) __typeof__(*(0?(__type1(c,t1)*)0:(__type1(!(c),t2)*)0))
|
|
||||||
/* cast to double when x is integral, otherwise use typeof(x) */
|
|
||||||
#define __RETCAST(x) ( \
|
|
||||||
__type2(__IS_FP(x), __typeof__(x), double))
|
|
||||||
/* 2 args case, should work for complex types (cpow) */
|
|
||||||
#define __RETCAST_2(x, y) ( \
|
|
||||||
__type2(__IS_FP(x) && __IS_FP(y), \
|
|
||||||
__typeof__((x)+(y)), \
|
|
||||||
__typeof__((x)+(y)+1.0)))
|
|
||||||
/* 3 args case (fma only) */
|
|
||||||
#define __RETCAST_3(x, y, z) ( \
|
|
||||||
__type2(__IS_FP(x) && __IS_FP(y) && __IS_FP(z), \
|
|
||||||
__typeof__((x)+(y)+(z)), \
|
|
||||||
__typeof__((x)+(y)+(z)+1.0)))
|
|
||||||
/* drop complex from the type of x */
|
|
||||||
/* TODO: wrong when sizeof(long double)==sizeof(double) */
|
|
||||||
#define __RETCAST_REAL(x) ( \
|
|
||||||
__type2(__IS_FP(x) && sizeof((x)+I) == sizeof(float complex), float, \
|
|
||||||
__type2(sizeof((x)+1.0+I) == sizeof(double complex), double, \
|
|
||||||
long double)))
|
|
||||||
/* add complex to the type of x */
|
|
||||||
#define __RETCAST_CX(x) (__typeof__(__RETCAST(x)0+I))
|
|
||||||
#else
|
|
||||||
#define __RETCAST(x)
|
|
||||||
#define __RETCAST_2(x, y)
|
|
||||||
#define __RETCAST_3(x, y, z)
|
|
||||||
#define __RETCAST_REAL(x)
|
|
||||||
#define __RETCAST_CX(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* function selection */
|
|
||||||
|
|
||||||
#define __tg_real_nocast(fun, x) ( \
|
|
||||||
__FLT(x) ? fun ## f (x) : \
|
|
||||||
__LDBL(x) ? fun ## l (x) : \
|
|
||||||
fun(x) )
|
|
||||||
|
|
||||||
#define __tg_real(fun, x) (__RETCAST(x)__tg_real_nocast(fun, x))
|
|
||||||
|
|
||||||
#define __tg_real_2_1(fun, x, y) (__RETCAST(x)( \
|
|
||||||
__FLT(x) ? fun ## f (x, y) : \
|
|
||||||
__LDBL(x) ? fun ## l (x, y) : \
|
|
||||||
fun(x, y) ))
|
|
||||||
|
|
||||||
#define __tg_real_2(fun, x, y) (__RETCAST_2(x, y)( \
|
|
||||||
__FLT(x) && __FLT(y) ? fun ## f (x, y) : \
|
|
||||||
__LDBL((x)+(y)) ? fun ## l (x, y) : \
|
|
||||||
fun(x, y) ))
|
|
||||||
|
|
||||||
#define __tg_complex(fun, x) (__RETCAST_CX(x)( \
|
|
||||||
__FLTCX((x)+I) && __IS_FP(x) ? fun ## f (x) : \
|
|
||||||
__LDBLCX((x)+I) ? fun ## l (x) : \
|
|
||||||
fun(x) ))
|
|
||||||
|
|
||||||
#define __tg_complex_retreal(fun, x) (__RETCAST_REAL(x)( \
|
|
||||||
__FLTCX((x)+I) && __IS_FP(x) ? fun ## f (x) : \
|
|
||||||
__LDBLCX((x)+I) ? fun ## l (x) : \
|
|
||||||
fun(x) ))
|
|
||||||
|
|
||||||
#define __tg_real_complex(fun, x) (__RETCAST(x)( \
|
|
||||||
__FLTCX(x) ? c ## fun ## f (x) : \
|
|
||||||
__DBLCX(x) ? c ## fun (x) : \
|
|
||||||
__LDBLCX(x) ? c ## fun ## l (x) : \
|
|
||||||
__FLT(x) ? fun ## f (x) : \
|
|
||||||
__LDBL(x) ? fun ## l (x) : \
|
|
||||||
fun(x) ))
|
|
||||||
|
|
||||||
/* special cases */
|
|
||||||
|
|
||||||
#define __tg_real_remquo(x, y, z) (__RETCAST_2(x, y)( \
|
|
||||||
__FLT(x) && __FLT(y) ? remquof(x, y, z) : \
|
|
||||||
__LDBL((x)+(y)) ? remquol(x, y, z) : \
|
|
||||||
remquo(x, y, z) ))
|
|
||||||
|
|
||||||
#define __tg_real_fma(x, y, z) (__RETCAST_3(x, y, z)( \
|
|
||||||
__FLT(x) && __FLT(y) && __FLT(z) ? fmaf(x, y, z) : \
|
|
||||||
__LDBL((x)+(y)+(z)) ? fmal(x, y, z) : \
|
|
||||||
fma(x, y, z) ))
|
|
||||||
|
|
||||||
#define __tg_real_complex_pow(x, y) (__RETCAST_2(x, y)( \
|
|
||||||
__FLTCX((x)+(y)) && __IS_FP(x) && __IS_FP(y) ? cpowf(x, y) : \
|
|
||||||
__FLTCX((x)+(y)) ? cpow(x, y) : \
|
|
||||||
__DBLCX((x)+(y)) ? cpow(x, y) : \
|
|
||||||
__LDBLCX((x)+(y)) ? cpowl(x, y) : \
|
|
||||||
__FLT(x) && __FLT(y) ? powf(x, y) : \
|
|
||||||
__LDBL((x)+(y)) ? powl(x, y) : \
|
|
||||||
pow(x, y) ))
|
|
||||||
|
|
||||||
#define __tg_real_complex_fabs(x) (__RETCAST_REAL(x)( \
|
|
||||||
__FLTCX(x) ? cabsf(x) : \
|
|
||||||
__DBLCX(x) ? cabs(x) : \
|
|
||||||
__LDBLCX(x) ? cabsl(x) : \
|
|
||||||
__FLT(x) ? fabsf(x) : \
|
|
||||||
__LDBL(x) ? fabsl(x) : \
|
|
||||||
fabs(x) ))
|
|
||||||
|
|
||||||
/* suppress any macros in math.h or complex.h */
|
|
||||||
|
|
||||||
#undef acos
|
|
||||||
#undef acosh
|
|
||||||
#undef asin
|
|
||||||
#undef asinh
|
|
||||||
#undef atan
|
|
||||||
#undef atan2
|
|
||||||
#undef atanh
|
|
||||||
#undef carg
|
|
||||||
#undef cbrt
|
|
||||||
#undef ceil
|
|
||||||
#undef cimag
|
|
||||||
#undef conj
|
|
||||||
#undef copysign
|
|
||||||
#undef cos
|
|
||||||
#undef cosh
|
|
||||||
#undef cproj
|
|
||||||
#undef creal
|
|
||||||
#undef erf
|
|
||||||
#undef erfc
|
|
||||||
#undef exp
|
|
||||||
#undef exp2
|
|
||||||
#undef expm1
|
|
||||||
#undef fabs
|
|
||||||
#undef fdim
|
|
||||||
#undef floor
|
|
||||||
#undef fma
|
|
||||||
#undef fmax
|
|
||||||
#undef fmin
|
|
||||||
#undef fmod
|
|
||||||
#undef frexp
|
|
||||||
#undef hypot
|
|
||||||
#undef ilogb
|
|
||||||
#undef ldexp
|
|
||||||
#undef lgamma
|
|
||||||
#undef llrint
|
|
||||||
#undef llround
|
|
||||||
#undef log
|
|
||||||
#undef log10
|
|
||||||
#undef log1p
|
|
||||||
#undef log2
|
|
||||||
#undef logb
|
|
||||||
#undef lrint
|
|
||||||
#undef lround
|
|
||||||
#undef nearbyint
|
|
||||||
#undef nextafter
|
|
||||||
#undef nexttoward
|
|
||||||
#undef pow
|
|
||||||
#undef remainder
|
|
||||||
#undef remquo
|
|
||||||
#undef rint
|
|
||||||
#undef round
|
|
||||||
#undef scalbln
|
|
||||||
#undef scalbn
|
|
||||||
#undef sin
|
|
||||||
#undef sinh
|
|
||||||
#undef sqrt
|
|
||||||
#undef tan
|
|
||||||
#undef tanh
|
|
||||||
#undef tgamma
|
|
||||||
#undef trunc
|
|
||||||
|
|
||||||
/* tg functions */
|
|
||||||
|
|
||||||
#define acos(x) __tg_real_complex(acos, (x))
|
|
||||||
#define acosh(x) __tg_real_complex(acosh, (x))
|
|
||||||
#define asin(x) __tg_real_complex(asin, (x))
|
|
||||||
#define asinh(x) __tg_real_complex(asinh, (x))
|
|
||||||
#define atan(x) __tg_real_complex(atan, (x))
|
|
||||||
#define atan2(x,y) __tg_real_2(atan2, (x), (y))
|
|
||||||
#define atanh(x) __tg_real_complex(atanh, (x))
|
|
||||||
#define carg(x) __tg_complex_retreal(carg, (x))
|
|
||||||
#define cbrt(x) __tg_real(cbrt, (x))
|
|
||||||
#define ceil(x) __tg_real(ceil, (x))
|
|
||||||
#define cimag(x) __tg_complex_retreal(cimag, (x))
|
|
||||||
#define conj(x) __tg_complex(conj, (x))
|
|
||||||
#define copysign(x,y) __tg_real_2(copysign, (x), (y))
|
|
||||||
#define cos(x) __tg_real_complex(cos, (x))
|
|
||||||
#define cosh(x) __tg_real_complex(cosh, (x))
|
|
||||||
#define cproj(x) __tg_complex(cproj, (x))
|
|
||||||
#define creal(x) __tg_complex_retreal(creal, (x))
|
|
||||||
#define erf(x) __tg_real(erf, (x))
|
|
||||||
#define erfc(x) __tg_real(erfc, (x))
|
|
||||||
#define exp(x) __tg_real_complex(exp, (x))
|
|
||||||
#define exp2(x) __tg_real(exp2, (x))
|
|
||||||
#define expm1(x) __tg_real(expm1, (x))
|
|
||||||
#define fabs(x) __tg_real_complex_fabs(x)
|
|
||||||
#define fdim(x,y) __tg_real_2(fdim, (x), (y))
|
|
||||||
#define floor(x) __tg_real(floor, (x))
|
|
||||||
#define fma(x,y,z) __tg_real_fma((x), (y), (z))
|
|
||||||
#define fmax(x,y) __tg_real_2(fmax, (x), (y))
|
|
||||||
#define fmin(x,y) __tg_real_2(fmin, (x), (y))
|
|
||||||
#define fmod(x,y) __tg_real_2(fmod, (x), (y))
|
|
||||||
#define frexp(x,y) __tg_real_2_1(frexp, (x), (y))
|
|
||||||
#define hypot(x,y) __tg_real_2(hypot, (x), (y))
|
|
||||||
#define ilogb(x) __tg_real_nocast(ilogb, (x))
|
|
||||||
#define ldexp(x,y) __tg_real_2_1(ldexp, (x), (y))
|
|
||||||
#define lgamma(x) __tg_real(lgamma, (x))
|
|
||||||
#define llrint(x) __tg_real_nocast(llrint, (x))
|
|
||||||
#define llround(x) __tg_real_nocast(llround, (x))
|
|
||||||
#define log(x) __tg_real_complex(log, (x))
|
|
||||||
#define log10(x) __tg_real(log10, (x))
|
|
||||||
#define log1p(x) __tg_real(log1p, (x))
|
|
||||||
#define log2(x) __tg_real(log2, (x))
|
|
||||||
#define logb(x) __tg_real(logb, (x))
|
|
||||||
#define lrint(x) __tg_real_nocast(lrint, (x))
|
|
||||||
#define lround(x) __tg_real_nocast(lround, (x))
|
|
||||||
#define nearbyint(x) __tg_real(nearbyint, (x))
|
|
||||||
#define nextafter(x,y) __tg_real_2(nextafter, (x), (y))
|
|
||||||
#define nexttoward(x,y) __tg_real_2(nexttoward, (x), (y))
|
|
||||||
#define pow(x,y) __tg_real_complex_pow((x), (y))
|
|
||||||
#define remainder(x,y) __tg_real_2(remainder, (x), (y))
|
|
||||||
#define remquo(x,y,z) __tg_real_remquo((x), (y), (z))
|
|
||||||
#define rint(x) __tg_real(rint, (x))
|
|
||||||
#define round(x) __tg_real(round, (x))
|
|
||||||
#define scalbln(x,y) __tg_real_2_1(scalbln, (x), (y))
|
|
||||||
#define scalbn(x,y) __tg_real_2_1(scalbn, (x), (y))
|
|
||||||
#define sin(x) __tg_real_complex(sin, (x))
|
|
||||||
#define sinh(x) __tg_real_complex(sinh, (x))
|
|
||||||
#define sqrt(x) __tg_real_complex(sqrt, (x))
|
|
||||||
#define tan(x) __tg_real_complex(tan, (x))
|
|
||||||
#define tanh(x) __tg_real_complex(tanh, (x))
|
|
||||||
#define tgamma(x) __tg_real(tgamma, (x))
|
|
||||||
#define trunc(x) __tg_real(trunc, (x))
|
|
||||||
|
|
||||||
#endif
|
|
||||||
93
lib/libc/include/wasm-wasi-musl/threads.h
vendored
93
lib/libc/include/wasm-wasi-musl/threads.h
vendored
@ -1,93 +0,0 @@
|
|||||||
#ifndef _THREADS_H
|
|
||||||
#define _THREADS_H
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
typedef unsigned long thrd_t;
|
|
||||||
#else
|
|
||||||
typedef struct __pthread *thrd_t;
|
|
||||||
#define thread_local _Thread_local
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef int once_flag;
|
|
||||||
typedef unsigned tss_t;
|
|
||||||
typedef int (*thrd_start_t)(void *);
|
|
||||||
typedef void (*tss_dtor_t)(void *);
|
|
||||||
|
|
||||||
#define __NEED_cnd_t
|
|
||||||
#define __NEED_mtx_t
|
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
#define TSS_DTOR_ITERATIONS 4
|
|
||||||
|
|
||||||
enum {
|
|
||||||
thrd_success = 0,
|
|
||||||
thrd_busy = 1,
|
|
||||||
thrd_error = 2,
|
|
||||||
thrd_nomem = 3,
|
|
||||||
thrd_timedout = 4,
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
|
||||||
mtx_plain = 0,
|
|
||||||
mtx_recursive = 1,
|
|
||||||
mtx_timed = 2,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define ONCE_FLAG_INIT 0
|
|
||||||
|
|
||||||
int thrd_create(thrd_t *, thrd_start_t, void *);
|
|
||||||
_Noreturn void thrd_exit(int);
|
|
||||||
|
|
||||||
int thrd_detach(thrd_t);
|
|
||||||
int thrd_join(thrd_t, int *);
|
|
||||||
|
|
||||||
int thrd_sleep(const struct timespec *, struct timespec *);
|
|
||||||
void thrd_yield(void);
|
|
||||||
|
|
||||||
thrd_t thrd_current(void);
|
|
||||||
int thrd_equal(thrd_t, thrd_t);
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#define thrd_equal(A, B) ((A) == (B))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void call_once(once_flag *, void (*)(void));
|
|
||||||
|
|
||||||
int mtx_init(mtx_t *, int);
|
|
||||||
void mtx_destroy(mtx_t *);
|
|
||||||
|
|
||||||
int mtx_lock(mtx_t *);
|
|
||||||
int mtx_timedlock(mtx_t *__restrict, const struct timespec *__restrict);
|
|
||||||
int mtx_trylock(mtx_t *);
|
|
||||||
int mtx_unlock(mtx_t *);
|
|
||||||
|
|
||||||
int cnd_init(cnd_t *);
|
|
||||||
void cnd_destroy(cnd_t *);
|
|
||||||
|
|
||||||
int cnd_broadcast(cnd_t *);
|
|
||||||
int cnd_signal(cnd_t *);
|
|
||||||
|
|
||||||
int cnd_timedwait(cnd_t *__restrict, mtx_t *__restrict, const struct timespec *__restrict);
|
|
||||||
int cnd_wait(cnd_t *, mtx_t *);
|
|
||||||
|
|
||||||
int tss_create(tss_t *, tss_dtor_t);
|
|
||||||
void tss_delete(tss_t);
|
|
||||||
|
|
||||||
int tss_set(tss_t, void *);
|
|
||||||
void *tss_get(tss_t);
|
|
||||||
|
|
||||||
#if _REDIR_TIME64
|
|
||||||
__REDIR(thrd_sleep, __thrd_sleep_time64);
|
|
||||||
__REDIR(mtx_timedlock, __mtx_timedlock_time64);
|
|
||||||
__REDIR(cnd_timedwait, __cnd_timedwait_time64);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
29
lib/libc/include/wasm-wasi-musl/uchar.h
vendored
29
lib/libc/include/wasm-wasi-musl/uchar.h
vendored
@ -1,29 +0,0 @@
|
|||||||
#ifndef _UCHAR_H
|
|
||||||
#define _UCHAR_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __cplusplus < 201103L
|
|
||||||
typedef unsigned short char16_t;
|
|
||||||
typedef unsigned char32_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define __NEED_mbstate_t
|
|
||||||
#define __NEED_size_t
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
size_t c16rtomb(char *__restrict, char16_t, mbstate_t *__restrict);
|
|
||||||
size_t mbrtoc16(char16_t *__restrict, const char *__restrict, size_t, mbstate_t *__restrict);
|
|
||||||
|
|
||||||
size_t c32rtomb(char *__restrict, char32_t, mbstate_t *__restrict);
|
|
||||||
size_t mbrtoc32(char32_t *__restrict, const char *__restrict, size_t, mbstate_t *__restrict);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
29
lib/libc/include/wasm-wasi-musl/utime.h
vendored
29
lib/libc/include/wasm-wasi-musl/utime.h
vendored
@ -1,29 +0,0 @@
|
|||||||
#ifndef _UTIME_H
|
|
||||||
#define _UTIME_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
#define __NEED_time_t
|
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
struct utimbuf {
|
|
||||||
time_t actime;
|
|
||||||
time_t modtime;
|
|
||||||
};
|
|
||||||
|
|
||||||
int utime (const char *, const struct utimbuf *);
|
|
||||||
|
|
||||||
#if _REDIR_TIME64
|
|
||||||
__REDIR(utime, __utime64);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
39
lib/libc/include/wasm-wasi-musl/values.h
vendored
39
lib/libc/include/wasm-wasi-musl/values.h
vendored
@ -1,39 +0,0 @@
|
|||||||
#ifndef _VALUES_H
|
|
||||||
#define _VALUES_H
|
|
||||||
|
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
#define CHARBITS (sizeof(char) * 8)
|
|
||||||
#define SHORTBITS (sizeof(short) * 8)
|
|
||||||
#define INTBITS (sizeof(int) * 8)
|
|
||||||
#define LONGBITS (sizeof(long) * 8)
|
|
||||||
#define PTRBITS (sizeof(char *) * 8)
|
|
||||||
#define DOUBLEBITS (sizeof(double) * 8)
|
|
||||||
#define FLOATBITS (sizeof(float) * 8)
|
|
||||||
|
|
||||||
#define MINSHORT SHRT_MIN
|
|
||||||
#define MININT INT_MIN
|
|
||||||
#define MINLONG LONG_MIN
|
|
||||||
|
|
||||||
#define MAXSHORT SHRT_MAX
|
|
||||||
#define MAXINT INT_MAX
|
|
||||||
#define MAXLONG LONG_MAX
|
|
||||||
|
|
||||||
#define HIBITS MINSHORT
|
|
||||||
#define HIBITL MINLONG
|
|
||||||
|
|
||||||
#include <float.h>
|
|
||||||
|
|
||||||
#define MAXDOUBLE DBL_MAX
|
|
||||||
#undef MAXFLOAT
|
|
||||||
#define MAXFLOAT FLT_MAX
|
|
||||||
#define MINDOUBLE DBL_MIN
|
|
||||||
#define MINFLOAT FLT_MIN
|
|
||||||
#define DMINEXP DBL_MIN_EXP
|
|
||||||
#define FMINEXP FLT_MIN_EXP
|
|
||||||
#define DMAXEXP DBL_MAX_EXP
|
|
||||||
#define FMAXEXP FLT_MAX_EXP
|
|
||||||
|
|
||||||
#define BITSPERBYTE CHAR_BIT
|
|
||||||
|
|
||||||
#endif
|
|
||||||
79
lib/libc/include/wasm-wasi-musl/wctype.h
vendored
79
lib/libc/include/wasm-wasi-musl/wctype.h
vendored
@ -1,79 +0,0 @@
|
|||||||
#ifndef _WCTYPE_H
|
|
||||||
#define _WCTYPE_H
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <features.h>
|
|
||||||
|
|
||||||
#define __NEED_wint_t
|
|
||||||
#define __NEED_wctype_t
|
|
||||||
|
|
||||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
|
||||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
||||||
#define __NEED_locale_t
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <bits/alltypes.h>
|
|
||||||
|
|
||||||
typedef const int * wctrans_t;
|
|
||||||
|
|
||||||
#undef WEOF
|
|
||||||
#define WEOF 0xffffffffU
|
|
||||||
|
|
||||||
#undef iswdigit
|
|
||||||
|
|
||||||
int iswalnum(wint_t);
|
|
||||||
int iswalpha(wint_t);
|
|
||||||
int iswblank(wint_t);
|
|
||||||
int iswcntrl(wint_t);
|
|
||||||
int iswdigit(wint_t);
|
|
||||||
int iswgraph(wint_t);
|
|
||||||
int iswlower(wint_t);
|
|
||||||
int iswprint(wint_t);
|
|
||||||
int iswpunct(wint_t);
|
|
||||||
int iswspace(wint_t);
|
|
||||||
int iswupper(wint_t);
|
|
||||||
int iswxdigit(wint_t);
|
|
||||||
int iswctype(wint_t, wctype_t);
|
|
||||||
wint_t towctrans(wint_t, wctrans_t);
|
|
||||||
wint_t towlower(wint_t);
|
|
||||||
wint_t towupper(wint_t);
|
|
||||||
wctrans_t wctrans(const char *);
|
|
||||||
wctype_t wctype(const char *);
|
|
||||||
|
|
||||||
#ifndef __cplusplus
|
|
||||||
#undef iswdigit
|
|
||||||
#define iswdigit(a) (0 ? iswdigit(a) : ((unsigned)(a)-'0') < 10)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
|
||||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
||||||
|
|
||||||
int iswalnum_l(wint_t, locale_t);
|
|
||||||
int iswalpha_l(wint_t, locale_t);
|
|
||||||
int iswblank_l(wint_t, locale_t);
|
|
||||||
int iswcntrl_l(wint_t, locale_t);
|
|
||||||
int iswdigit_l(wint_t, locale_t);
|
|
||||||
int iswgraph_l(wint_t, locale_t);
|
|
||||||
int iswlower_l(wint_t, locale_t);
|
|
||||||
int iswprint_l(wint_t, locale_t);
|
|
||||||
int iswpunct_l(wint_t, locale_t);
|
|
||||||
int iswspace_l(wint_t, locale_t);
|
|
||||||
int iswupper_l(wint_t, locale_t);
|
|
||||||
int iswxdigit_l(wint_t, locale_t);
|
|
||||||
int iswctype_l(wint_t, wctype_t, locale_t);
|
|
||||||
wint_t towlower_l(wint_t, locale_t);
|
|
||||||
wint_t towupper_l(wint_t, locale_t);
|
|
||||||
wint_t towctrans_l(wint_t, wctrans_t, locale_t);
|
|
||||||
wctrans_t wctrans_l(const char *, locale_t);
|
|
||||||
wctype_t wctype_l(const char *, locale_t);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
#define _DIRENT_HAVE_D_RECLEN
|
|
||||||
#define _DIRENT_HAVE_D_OFF
|
|
||||||
#define _DIRENT_HAVE_D_TYPE
|
|
||||||
|
|
||||||
struct dirent {
|
|
||||||
ino_t d_ino;
|
|
||||||
off_t d_off;
|
|
||||||
unsigned short d_reclen;
|
|
||||||
unsigned char d_type;
|
|
||||||
char d_name[256];
|
|
||||||
};
|
|
||||||
@ -1,134 +0,0 @@
|
|||||||
#define EPERM 1
|
|
||||||
#define ENOENT 2
|
|
||||||
#define ESRCH 3
|
|
||||||
#define EINTR 4
|
|
||||||
#define EIO 5
|
|
||||||
#define ENXIO 6
|
|
||||||
#define E2BIG 7
|
|
||||||
#define ENOEXEC 8
|
|
||||||
#define EBADF 9
|
|
||||||
#define ECHILD 10
|
|
||||||
#define EAGAIN 11
|
|
||||||
#define ENOMEM 12
|
|
||||||
#define EACCES 13
|
|
||||||
#define EFAULT 14
|
|
||||||
#define ENOTBLK 15
|
|
||||||
#define EBUSY 16
|
|
||||||
#define EEXIST 17
|
|
||||||
#define EXDEV 18
|
|
||||||
#define ENODEV 19
|
|
||||||
#define ENOTDIR 20
|
|
||||||
#define EISDIR 21
|
|
||||||
#define EINVAL 22
|
|
||||||
#define ENFILE 23
|
|
||||||
#define EMFILE 24
|
|
||||||
#define ENOTTY 25
|
|
||||||
#define ETXTBSY 26
|
|
||||||
#define EFBIG 27
|
|
||||||
#define ENOSPC 28
|
|
||||||
#define ESPIPE 29
|
|
||||||
#define EROFS 30
|
|
||||||
#define EMLINK 31
|
|
||||||
#define EPIPE 32
|
|
||||||
#define EDOM 33
|
|
||||||
#define ERANGE 34
|
|
||||||
#define EDEADLK 35
|
|
||||||
#define ENAMETOOLONG 36
|
|
||||||
#define ENOLCK 37
|
|
||||||
#define ENOSYS 38
|
|
||||||
#define ENOTEMPTY 39
|
|
||||||
#define ELOOP 40
|
|
||||||
#define EWOULDBLOCK EAGAIN
|
|
||||||
#define ENOMSG 42
|
|
||||||
#define EIDRM 43
|
|
||||||
#define ECHRNG 44
|
|
||||||
#define EL2NSYNC 45
|
|
||||||
#define EL3HLT 46
|
|
||||||
#define EL3RST 47
|
|
||||||
#define ELNRNG 48
|
|
||||||
#define EUNATCH 49
|
|
||||||
#define ENOCSI 50
|
|
||||||
#define EL2HLT 51
|
|
||||||
#define EBADE 52
|
|
||||||
#define EBADR 53
|
|
||||||
#define EXFULL 54
|
|
||||||
#define ENOANO 55
|
|
||||||
#define EBADRQC 56
|
|
||||||
#define EBADSLT 57
|
|
||||||
#define EDEADLOCK EDEADLK
|
|
||||||
#define EBFONT 59
|
|
||||||
#define ENOSTR 60
|
|
||||||
#define ENODATA 61
|
|
||||||
#define ETIME 62
|
|
||||||
#define ENOSR 63
|
|
||||||
#define ENONET 64
|
|
||||||
#define ENOPKG 65
|
|
||||||
#define EREMOTE 66
|
|
||||||
#define ENOLINK 67
|
|
||||||
#define EADV 68
|
|
||||||
#define ESRMNT 69
|
|
||||||
#define ECOMM 70
|
|
||||||
#define EPROTO 71
|
|
||||||
#define EMULTIHOP 72
|
|
||||||
#define EDOTDOT 73
|
|
||||||
#define EBADMSG 74
|
|
||||||
#define EOVERFLOW 75
|
|
||||||
#define ENOTUNIQ 76
|
|
||||||
#define EBADFD 77
|
|
||||||
#define EREMCHG 78
|
|
||||||
#define ELIBACC 79
|
|
||||||
#define ELIBBAD 80
|
|
||||||
#define ELIBSCN 81
|
|
||||||
#define ELIBMAX 82
|
|
||||||
#define ELIBEXEC 83
|
|
||||||
#define EILSEQ 84
|
|
||||||
#define ERESTART 85
|
|
||||||
#define ESTRPIPE 86
|
|
||||||
#define EUSERS 87
|
|
||||||
#define ENOTSOCK 88
|
|
||||||
#define EDESTADDRREQ 89
|
|
||||||
#define EMSGSIZE 90
|
|
||||||
#define EPROTOTYPE 91
|
|
||||||
#define ENOPROTOOPT 92
|
|
||||||
#define EPROTONOSUPPORT 93
|
|
||||||
#define ESOCKTNOSUPPORT 94
|
|
||||||
#define EOPNOTSUPP 95
|
|
||||||
#define ENOTSUP EOPNOTSUPP
|
|
||||||
#define EPFNOSUPPORT 96
|
|
||||||
#define EAFNOSUPPORT 97
|
|
||||||
#define EADDRINUSE 98
|
|
||||||
#define EADDRNOTAVAIL 99
|
|
||||||
#define ENETDOWN 100
|
|
||||||
#define ENETUNREACH 101
|
|
||||||
#define ENETRESET 102
|
|
||||||
#define ECONNABORTED 103
|
|
||||||
#define ECONNRESET 104
|
|
||||||
#define ENOBUFS 105
|
|
||||||
#define EISCONN 106
|
|
||||||
#define ENOTCONN 107
|
|
||||||
#define ESHUTDOWN 108
|
|
||||||
#define ETOOMANYREFS 109
|
|
||||||
#define ETIMEDOUT 110
|
|
||||||
#define ECONNREFUSED 111
|
|
||||||
#define EHOSTDOWN 112
|
|
||||||
#define EHOSTUNREACH 113
|
|
||||||
#define EALREADY 114
|
|
||||||
#define EINPROGRESS 115
|
|
||||||
#define ESTALE 116
|
|
||||||
#define EUCLEAN 117
|
|
||||||
#define ENOTNAM 118
|
|
||||||
#define ENAVAIL 119
|
|
||||||
#define EISNAM 120
|
|
||||||
#define EREMOTEIO 121
|
|
||||||
#define EDQUOT 122
|
|
||||||
#define ENOMEDIUM 123
|
|
||||||
#define EMEDIUMTYPE 124
|
|
||||||
#define ECANCELED 125
|
|
||||||
#define ENOKEY 126
|
|
||||||
#define EKEYEXPIRED 127
|
|
||||||
#define EKEYREVOKED 128
|
|
||||||
#define EKEYREJECTED 129
|
|
||||||
#define EOWNERDEAD 130
|
|
||||||
#define ENOTRECOVERABLE 131
|
|
||||||
#define ERFKILL 132
|
|
||||||
#define EHWPOISON 133
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
#define O_CREAT 0100
|
|
||||||
#define O_EXCL 0200
|
|
||||||
#define O_NOCTTY 0400
|
|
||||||
#define O_TRUNC 01000
|
|
||||||
#define O_APPEND 02000
|
|
||||||
#define O_NONBLOCK 04000
|
|
||||||
#define O_DSYNC 010000
|
|
||||||
#define O_SYNC 04010000
|
|
||||||
#define O_RSYNC 04010000
|
|
||||||
#define O_DIRECTORY 0200000
|
|
||||||
#define O_NOFOLLOW 0400000
|
|
||||||
#define O_CLOEXEC 02000000
|
|
||||||
|
|
||||||
#define O_ASYNC 020000
|
|
||||||
#define O_DIRECT 040000
|
|
||||||
#define O_LARGEFILE 0100000
|
|
||||||
#define O_NOATIME 01000000
|
|
||||||
#define O_PATH 010000000
|
|
||||||
#define O_TMPFILE 020200000
|
|
||||||
#define O_NDELAY O_NONBLOCK
|
|
||||||
|
|
||||||
#define F_DUPFD 0
|
|
||||||
#define F_GETFD 1
|
|
||||||
#define F_SETFD 2
|
|
||||||
#define F_GETFL 3
|
|
||||||
#define F_SETFL 4
|
|
||||||
|
|
||||||
#define F_SETOWN 8
|
|
||||||
#define F_GETOWN 9
|
|
||||||
#define F_SETSIG 10
|
|
||||||
#define F_GETSIG 11
|
|
||||||
|
|
||||||
#if __LONG_MAX == 0x7fffffffL
|
|
||||||
#define F_GETLK 12
|
|
||||||
#define F_SETLK 13
|
|
||||||
#define F_SETLKW 14
|
|
||||||
#else
|
|
||||||
#define F_GETLK 5
|
|
||||||
#define F_SETLK 6
|
|
||||||
#define F_SETLKW 7
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define F_SETOWN_EX 15
|
|
||||||
#define F_GETOWN_EX 16
|
|
||||||
|
|
||||||
#define F_GETOWNER_UIDS 17
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
#define FE_ALL_EXCEPT 0
|
|
||||||
#define FE_TONEAREST 0
|
|
||||||
|
|
||||||
typedef unsigned long fexcept_t;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned long __cw;
|
|
||||||
} fenv_t;
|
|
||||||
|
|
||||||
#define FE_DFL_ENV ((const fenv_t *) -1)
|
|
||||||
@ -1,115 +0,0 @@
|
|||||||
#define _IOC(a,b,c,d) ( ((a)<<30) | ((b)<<8) | (c) | ((d)<<16) )
|
|
||||||
#define _IOC_NONE 0U
|
|
||||||
#define _IOC_WRITE 1U
|
|
||||||
#define _IOC_READ 2U
|
|
||||||
|
|
||||||
#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0)
|
|
||||||
#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c))
|
|
||||||
#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c))
|
|
||||||
#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c))
|
|
||||||
|
|
||||||
#define TCGETS 0x5401
|
|
||||||
#define TCSETS 0x5402
|
|
||||||
#define TCSETSW 0x5403
|
|
||||||
#define TCSETSF 0x5404
|
|
||||||
#define TCGETA 0x5405
|
|
||||||
#define TCSETA 0x5406
|
|
||||||
#define TCSETAW 0x5407
|
|
||||||
#define TCSETAF 0x5408
|
|
||||||
#define TCSBRK 0x5409
|
|
||||||
#define TCXONC 0x540A
|
|
||||||
#define TCFLSH 0x540B
|
|
||||||
#define TIOCEXCL 0x540C
|
|
||||||
#define TIOCNXCL 0x540D
|
|
||||||
#define TIOCSCTTY 0x540E
|
|
||||||
#define TIOCGPGRP 0x540F
|
|
||||||
#define TIOCSPGRP 0x5410
|
|
||||||
#define TIOCOUTQ 0x5411
|
|
||||||
#define TIOCSTI 0x5412
|
|
||||||
#define TIOCGWINSZ 0x5413
|
|
||||||
#define TIOCSWINSZ 0x5414
|
|
||||||
#define TIOCMGET 0x5415
|
|
||||||
#define TIOCMBIS 0x5416
|
|
||||||
#define TIOCMBIC 0x5417
|
|
||||||
#define TIOCMSET 0x5418
|
|
||||||
#define TIOCGSOFTCAR 0x5419
|
|
||||||
#define TIOCSSOFTCAR 0x541A
|
|
||||||
#define FIONREAD 0x541B
|
|
||||||
#define TIOCINQ FIONREAD
|
|
||||||
#define TIOCLINUX 0x541C
|
|
||||||
#define TIOCCONS 0x541D
|
|
||||||
#define TIOCGSERIAL 0x541E
|
|
||||||
#define TIOCSSERIAL 0x541F
|
|
||||||
#define TIOCPKT 0x5420
|
|
||||||
#define FIONBIO 0x5421
|
|
||||||
#define TIOCNOTTY 0x5422
|
|
||||||
#define TIOCSETD 0x5423
|
|
||||||
#define TIOCGETD 0x5424
|
|
||||||
#define TCSBRKP 0x5425
|
|
||||||
#define TIOCSBRK 0x5427
|
|
||||||
#define TIOCCBRK 0x5428
|
|
||||||
#define TIOCGSID 0x5429
|
|
||||||
#define TIOCGRS485 0x542E
|
|
||||||
#define TIOCSRS485 0x542F
|
|
||||||
#define TIOCGPTN 0x80045430
|
|
||||||
#define TIOCSPTLCK 0x40045431
|
|
||||||
#define TIOCGDEV 0x80045432
|
|
||||||
#define TCGETX 0x5432
|
|
||||||
#define TCSETX 0x5433
|
|
||||||
#define TCSETXF 0x5434
|
|
||||||
#define TCSETXW 0x5435
|
|
||||||
#define TIOCSIG 0x40045436
|
|
||||||
#define TIOCVHANGUP 0x5437
|
|
||||||
#define TIOCGPKT 0x80045438
|
|
||||||
#define TIOCGPTLCK 0x80045439
|
|
||||||
#define TIOCGEXCL 0x80045440
|
|
||||||
#define TIOCGPTPEER 0x5441
|
|
||||||
#define TIOCGISO7816 0x80285442
|
|
||||||
#define TIOCSISO7816 0xc0285443
|
|
||||||
|
|
||||||
#define FIONCLEX 0x5450
|
|
||||||
#define FIOCLEX 0x5451
|
|
||||||
#define FIOASYNC 0x5452
|
|
||||||
#define TIOCSERCONFIG 0x5453
|
|
||||||
#define TIOCSERGWILD 0x5454
|
|
||||||
#define TIOCSERSWILD 0x5455
|
|
||||||
#define TIOCGLCKTRMIOS 0x5456
|
|
||||||
#define TIOCSLCKTRMIOS 0x5457
|
|
||||||
#define TIOCSERGSTRUCT 0x5458
|
|
||||||
#define TIOCSERGETLSR 0x5459
|
|
||||||
#define TIOCSERGETMULTI 0x545A
|
|
||||||
#define TIOCSERSETMULTI 0x545B
|
|
||||||
|
|
||||||
#define TIOCMIWAIT 0x545C
|
|
||||||
#define TIOCGICOUNT 0x545D
|
|
||||||
#define FIOQSIZE 0x5460
|
|
||||||
|
|
||||||
#define TIOCM_LE 0x001
|
|
||||||
#define TIOCM_DTR 0x002
|
|
||||||
#define TIOCM_RTS 0x004
|
|
||||||
#define TIOCM_ST 0x008
|
|
||||||
#define TIOCM_SR 0x010
|
|
||||||
#define TIOCM_CTS 0x020
|
|
||||||
#define TIOCM_CAR 0x040
|
|
||||||
#define TIOCM_RNG 0x080
|
|
||||||
#define TIOCM_DSR 0x100
|
|
||||||
#define TIOCM_CD TIOCM_CAR
|
|
||||||
#define TIOCM_RI TIOCM_RNG
|
|
||||||
#define TIOCM_OUT1 0x2000
|
|
||||||
#define TIOCM_OUT2 0x4000
|
|
||||||
#define TIOCM_LOOP 0x8000
|
|
||||||
|
|
||||||
#define FIOSETOWN 0x8901
|
|
||||||
#define SIOCSPGRP 0x8902
|
|
||||||
#define FIOGETOWN 0x8903
|
|
||||||
#define SIOCGPGRP 0x8904
|
|
||||||
#define SIOCATMARK 0x8905
|
|
||||||
#if __LONG_MAX == 0x7fffffff
|
|
||||||
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
|
|
||||||
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])
|
|
||||||
#else
|
|
||||||
#define SIOCGSTAMP 0x8906
|
|
||||||
#define SIOCGSTAMPNS 0x8907
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <bits/ioctl_fix.h>
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
struct ipc_perm {
|
|
||||||
key_t __ipc_perm_key;
|
|
||||||
uid_t uid;
|
|
||||||
gid_t gid;
|
|
||||||
uid_t cuid;
|
|
||||||
gid_t cgid;
|
|
||||||
mode_t mode;
|
|
||||||
int __ipc_perm_seq;
|
|
||||||
long __pad1;
|
|
||||||
long __pad2;
|
|
||||||
};
|
|
||||||
@ -1 +0,0 @@
|
|||||||
#define IPC_STAT 2
|
|
||||||
@ -1 +0,0 @@
|
|||||||
#include <linux/kd.h>
|
|
||||||
@ -1 +0,0 @@
|
|||||||
typedef uint32_t Elf_Symndx;
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
struct msqid_ds {
|
|
||||||
struct ipc_perm msg_perm;
|
|
||||||
time_t msg_stime;
|
|
||||||
time_t msg_rtime;
|
|
||||||
time_t msg_ctime;
|
|
||||||
unsigned long msg_cbytes;
|
|
||||||
msgqnum_t msg_qnum;
|
|
||||||
msglen_t msg_qbytes;
|
|
||||||
pid_t msg_lspid;
|
|
||||||
pid_t msg_lrpid;
|
|
||||||
unsigned long __unused[2];
|
|
||||||
};
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
struct semid_ds {
|
|
||||||
struct ipc_perm sem_perm;
|
|
||||||
time_t sem_otime;
|
|
||||||
time_t sem_ctime;
|
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
|
||||||
unsigned short sem_nsems;
|
|
||||||
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
|
|
||||||
#else
|
|
||||||
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
|
|
||||||
unsigned short sem_nsems;
|
|
||||||
#endif
|
|
||||||
long __unused3;
|
|
||||||
long __unused4;
|
|
||||||
};
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
#define SHMLBA 4096
|
|
||||||
|
|
||||||
struct shmid_ds {
|
|
||||||
struct ipc_perm shm_perm;
|
|
||||||
size_t shm_segsz;
|
|
||||||
time_t shm_atime;
|
|
||||||
time_t shm_dtime;
|
|
||||||
time_t shm_ctime;
|
|
||||||
pid_t shm_cpid;
|
|
||||||
pid_t shm_lpid;
|
|
||||||
unsigned long shm_nattch;
|
|
||||||
unsigned long __pad1;
|
|
||||||
unsigned long __pad2;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct shminfo {
|
|
||||||
unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4];
|
|
||||||
};
|
|
||||||
|
|
||||||
struct shm_info {
|
|
||||||
int __used_ids;
|
|
||||||
unsigned long shm_tot, shm_rss, shm_swp;
|
|
||||||
unsigned long __swap_attempts, __swap_successes;
|
|
||||||
};
|
|
||||||
@ -1 +0,0 @@
|
|||||||
#include <linux/soundcard.h>
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
struct statfs {
|
|
||||||
unsigned long f_type, f_bsize;
|
|
||||||
fsblkcnt_t f_blocks, f_bfree, f_bavail;
|
|
||||||
fsfilcnt_t f_files, f_ffree;
|
|
||||||
fsid_t f_fsid;
|
|
||||||
unsigned long f_namelen, f_frsize, f_flags, f_spare[4];
|
|
||||||
};
|
|
||||||
@ -1,166 +0,0 @@
|
|||||||
struct termios {
|
|
||||||
tcflag_t c_iflag;
|
|
||||||
tcflag_t c_oflag;
|
|
||||||
tcflag_t c_cflag;
|
|
||||||
tcflag_t c_lflag;
|
|
||||||
cc_t c_line;
|
|
||||||
cc_t c_cc[NCCS];
|
|
||||||
speed_t __c_ispeed;
|
|
||||||
speed_t __c_ospeed;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define VINTR 0
|
|
||||||
#define VQUIT 1
|
|
||||||
#define VERASE 2
|
|
||||||
#define VKILL 3
|
|
||||||
#define VEOF 4
|
|
||||||
#define VTIME 5
|
|
||||||
#define VMIN 6
|
|
||||||
#define VSWTC 7
|
|
||||||
#define VSTART 8
|
|
||||||
#define VSTOP 9
|
|
||||||
#define VSUSP 10
|
|
||||||
#define VEOL 11
|
|
||||||
#define VREPRINT 12
|
|
||||||
#define VDISCARD 13
|
|
||||||
#define VWERASE 14
|
|
||||||
#define VLNEXT 15
|
|
||||||
#define VEOL2 16
|
|
||||||
|
|
||||||
#define IGNBRK 0000001
|
|
||||||
#define BRKINT 0000002
|
|
||||||
#define IGNPAR 0000004
|
|
||||||
#define PARMRK 0000010
|
|
||||||
#define INPCK 0000020
|
|
||||||
#define ISTRIP 0000040
|
|
||||||
#define INLCR 0000100
|
|
||||||
#define IGNCR 0000200
|
|
||||||
#define ICRNL 0000400
|
|
||||||
#define IUCLC 0001000
|
|
||||||
#define IXON 0002000
|
|
||||||
#define IXANY 0004000
|
|
||||||
#define IXOFF 0010000
|
|
||||||
#define IMAXBEL 0020000
|
|
||||||
#define IUTF8 0040000
|
|
||||||
|
|
||||||
#define OPOST 0000001
|
|
||||||
#define OLCUC 0000002
|
|
||||||
#define ONLCR 0000004
|
|
||||||
#define OCRNL 0000010
|
|
||||||
#define ONOCR 0000020
|
|
||||||
#define ONLRET 0000040
|
|
||||||
#define OFILL 0000100
|
|
||||||
#define OFDEL 0000200
|
|
||||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE)
|
|
||||||
#define NLDLY 0000400
|
|
||||||
#define NL0 0000000
|
|
||||||
#define NL1 0000400
|
|
||||||
#define CRDLY 0003000
|
|
||||||
#define CR0 0000000
|
|
||||||
#define CR1 0001000
|
|
||||||
#define CR2 0002000
|
|
||||||
#define CR3 0003000
|
|
||||||
#define TABDLY 0014000
|
|
||||||
#define TAB0 0000000
|
|
||||||
#define TAB1 0004000
|
|
||||||
#define TAB2 0010000
|
|
||||||
#define TAB3 0014000
|
|
||||||
#define BSDLY 0020000
|
|
||||||
#define BS0 0000000
|
|
||||||
#define BS1 0020000
|
|
||||||
#define FFDLY 0100000
|
|
||||||
#define FF0 0000000
|
|
||||||
#define FF1 0100000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define VTDLY 0040000
|
|
||||||
#define VT0 0000000
|
|
||||||
#define VT1 0040000
|
|
||||||
|
|
||||||
#define B0 0000000
|
|
||||||
#define B50 0000001
|
|
||||||
#define B75 0000002
|
|
||||||
#define B110 0000003
|
|
||||||
#define B134 0000004
|
|
||||||
#define B150 0000005
|
|
||||||
#define B200 0000006
|
|
||||||
#define B300 0000007
|
|
||||||
#define B600 0000010
|
|
||||||
#define B1200 0000011
|
|
||||||
#define B1800 0000012
|
|
||||||
#define B2400 0000013
|
|
||||||
#define B4800 0000014
|
|
||||||
#define B9600 0000015
|
|
||||||
#define B19200 0000016
|
|
||||||
#define B38400 0000017
|
|
||||||
|
|
||||||
#define B57600 0010001
|
|
||||||
#define B115200 0010002
|
|
||||||
#define B230400 0010003
|
|
||||||
#define B460800 0010004
|
|
||||||
#define B500000 0010005
|
|
||||||
#define B576000 0010006
|
|
||||||
#define B921600 0010007
|
|
||||||
#define B1000000 0010010
|
|
||||||
#define B1152000 0010011
|
|
||||||
#define B1500000 0010012
|
|
||||||
#define B2000000 0010013
|
|
||||||
#define B2500000 0010014
|
|
||||||
#define B3000000 0010015
|
|
||||||
#define B3500000 0010016
|
|
||||||
#define B4000000 0010017
|
|
||||||
|
|
||||||
#define CSIZE 0000060
|
|
||||||
#define CS5 0000000
|
|
||||||
#define CS6 0000020
|
|
||||||
#define CS7 0000040
|
|
||||||
#define CS8 0000060
|
|
||||||
#define CSTOPB 0000100
|
|
||||||
#define CREAD 0000200
|
|
||||||
#define PARENB 0000400
|
|
||||||
#define PARODD 0001000
|
|
||||||
#define HUPCL 0002000
|
|
||||||
#define CLOCAL 0004000
|
|
||||||
|
|
||||||
#define ISIG 0000001
|
|
||||||
#define ICANON 0000002
|
|
||||||
#define ECHO 0000010
|
|
||||||
#define ECHOE 0000020
|
|
||||||
#define ECHOK 0000040
|
|
||||||
#define ECHONL 0000100
|
|
||||||
#define NOFLSH 0000200
|
|
||||||
#define TOSTOP 0000400
|
|
||||||
#define IEXTEN 0100000
|
|
||||||
|
|
||||||
#define TCOOFF 0
|
|
||||||
#define TCOON 1
|
|
||||||
#define TCIOFF 2
|
|
||||||
#define TCION 3
|
|
||||||
|
|
||||||
#define TCIFLUSH 0
|
|
||||||
#define TCOFLUSH 1
|
|
||||||
#define TCIOFLUSH 2
|
|
||||||
|
|
||||||
#define TCSANOW 0
|
|
||||||
#define TCSADRAIN 1
|
|
||||||
#define TCSAFLUSH 2
|
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|
||||||
#define EXTA 0000016
|
|
||||||
#define EXTB 0000017
|
|
||||||
#define CBAUD 0010017
|
|
||||||
#define CBAUDEX 0010000
|
|
||||||
#define CIBAUD 002003600000
|
|
||||||
#define CMSPAR 010000000000
|
|
||||||
#define CRTSCTS 020000000000
|
|
||||||
|
|
||||||
#define XCASE 0000004
|
|
||||||
#define ECHOCTL 0001000
|
|
||||||
#define ECHOPRT 0002000
|
|
||||||
#define ECHOKE 0004000
|
|
||||||
#define FLUSHO 0010000
|
|
||||||
#define PENDIN 0040000
|
|
||||||
#define EXTPROC 0200000
|
|
||||||
|
|
||||||
#define XTABS 0014000
|
|
||||||
#endif
|
|
||||||
@ -1 +0,0 @@
|
|||||||
#include <linux/vt.h>
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user