data_type large_stringclasses 3
values | source large_stringclasses 29
values | code large_stringlengths 98 49.4M | filepath large_stringlengths 5 161 ⌀ | message large_stringclasses 234
values | commit large_stringclasses 234
values | subject large_stringclasses 418
values | critique large_stringlengths 101 1.26M ⌀ | metadata dict |
|---|---|---|---|---|---|---|---|---|
source | musl | #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;
... | include/netinet/ip6.h | null | null | null | null | null |
source | musl | #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;
... | include/netinet/ip_icmp.h | null | null | null | null | null |
source | musl | #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_IN... | include/netinet/tcp.h | null | null | null | null | null |
source | musl | #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;
... | include/netinet/udp.h | null | null | null | null | null |
source | musl | #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;
unsi... | include/netpacket/packet.h | null | null | null | null | null |
source | musl | #ifndef _SCSI_SCSI_H
#define _SCSI_SCSI_H
#define TEST_UNIT_READY 0x00
#define REZERO_UNIT 0x01
#define REQUEST_SENSE 0x03
#define FORMAT_UNIT 0x04
#define READ_BLOCK_LIMITS 0x05
#define REASSIGN_BLOCKS 0x07
#define READ_6 0x08
#define WRITE_6 0x0a
#define SEEK_6 0x0b
#define READ_REVERSE 0x0f
#define WRITE_FILEMARKS ... | include/scsi/scsi.h | null | null | null | null | null |
source | musl | #ifndef _SCSI_IOCTL_H
#define _SCSI_IOCTL_H
#define SCSI_IOCTL_SEND_COMMAND 1
#define SCSI_IOCTL_TEST_UNIT_READY 2
#define SCSI_IOCTL_BENCHMARK_COMMAND 3
#define SCSI_IOCTL_SYNC 4
#define SCSI_IOCTL_START_UNIT 5
#define SCSI_IOCTL_STOP_UNIT 6
#define SCSI_IOCTL_DOORLOCK 0x5380
#define SCSI_IOCTL_DOORUNLOCK 0x5381
#endi... | include/scsi/scsi_ioctl.h | null | null | null | null | null |
source | musl | #ifndef _SCSI_SG_H
#define _SCSI_SG_H
#define SG_DXFER_NONE -1
#define SG_DXFER_TO_DEV -2
#define SG_DXFER_FROM_DEV -3
#define SG_DXFER_TO_FROM_DEV -4
#define SG_FLAG_DIRECT_IO 1
#define SG_FLAG_LUN_INHIBIT 2
#define SG_FLAG_NO_DXFER 0x10000
#define SG_INFO_OK_MASK 0x1
#define SG_INFO_OK 0x0
#define SG_INFO_CHECK 0x1
... | include/scsi/sg.h | null | null | null | null | null |
source | musl | #ifndef _SYS_ACCT_H
#define _SYS_ACCT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#include <time.h>
#include <stdint.h>
#define ACCT_COMM 16
typedef uint16_t comp_t;
struct acct {
char ac_flag;
uint16_t ac_uid;
uint16_t ac_gid;
uint16_t ac_tty;
uint32_t ac_btime;
comp_t ac_utime;
comp_t a... | include/sys/acct.h | null | null | null | null | null |
source | musl | #ifndef _SYS_AUXV_H
#define _SYS_AUXV_H
#ifdef __cplusplus
extern "C" {
#endif
#include <elf.h>
#include <bits/hwcap.h>
unsigned long getauxval(unsigned long);
#ifdef __cplusplus
}
#endif
#endif | include/sys/auxv.h | null | null | null | null | null |
source | musl | #ifndef _SYS_CACHECTL_H
#define _SYS_CACHECTL_H
#ifdef __cplusplus
extern "C" {
#endif
#define ICACHE (1<<0)
#define DCACHE (1<<1)
#define BCACHE (ICACHE|DCACHE)
#define CACHEABLE 0
#define UNCACHEABLE 1
int cachectl(void *, int, int);
int cacheflush(void *, int, int);
int _flush_cache(void *, int, int);
#ifdef __... | include/sys/cachectl.h | null | null | null | null | null |
source | musl | #ifndef _SYS_EPOLL_H
#define _SYS_EPOLL_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#define __NEED_sigset_t
#include <bits/alltypes.h>
#define EPOLL_CLOEXEC O_CLOEXEC
#define EPOLL_NONBLOCK O_NONBLOCK
enum EPOLL_EVENTS { __EPOLL_DUM... | include/sys/epoll.h | null | null | null | null | null |
source | musl | #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 event... | include/sys/eventfd.h | null | null | null | null | null |
source | musl | #ifndef _FANOTIFY_H
#define _FANOTIFY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/statfs.h>
struct fanotify_event_metadata {
unsigned event_len;
unsigned char vers;
unsigned char reserved;
unsigned short metadata_len;
unsigned long long mask
#ifdef __GNUC__
__attribute__((__aligned__(8)))
#endif
;
... | include/sys/fanotify.h | null | null | null | null | null |
source | musl | #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 | include/sys/file.h | null | null | null | null | null |
source | musl | #ifndef _SYS_FSUID_H
#define _SYS_FSUID_H
#ifdef __cplusplus
extern "C" {
#endif
#define __NEED_uid_t
#define __NEED_gid_t
#include <bits/alltypes.h>
int setfsuid(uid_t);
int setfsgid(gid_t);
#ifdef __cplusplus
}
#endif
#endif | include/sys/fsuid.h | null | null | null | null | null |
source | musl | #ifndef _SYS_INOTIFY_H
#define _SYS_INOTIFY_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <fcntl.h>
struct inotify_event {
int wd;
uint32_t mask, cookie, len;
char name[];
};
#define IN_CLOEXEC O_CLOEXEC
#define IN_NONBLOCK O_NONBLOCK
#define IN_ACCESS 0x00000001
#define IN_MODIFY... | include/sys/inotify.h | null | null | null | null | null |
source | musl | #ifndef _SYS_IO_H
#define _SYS_IO_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#include <bits/io.h>
int iopl(int);
int ioperm(unsigned long, unsigned long, int);
#ifdef __cplusplus
}
#endif
#endif | include/sys/io.h | null | null | null | null | null |
source | musl | #ifndef _SYS_IOCTL_H
#define _SYS_IOCTL_H
#ifdef __cplusplus
extern "C" {
#endif
#define __NEED_struct_winsize
#include <bits/alltypes.h>
#include <bits/ioctl.h>
#define N_TTY 0
#define N_SLIP 1
#define N_MOUSE 2
#define N_PPP 3
#define N_STRIP 4
#define N_AX25 5... | include/sys/ioctl.h | null | null | null | null | null |
source | musl | #ifndef _SYS_IPC_H
#define _SYS_IPC_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_uid_t
#define __NEED_gid_t
#define __NEED_mode_t
#define __NEED_key_t
#include <bits/alltypes.h>
#define __ipc_perm_key __key
#define __ipc_perm_seq __seq
#if defined(_GNU_SOURCE) || defined(_BSD_SOURC... | include/sys/ipc.h | null | null | null | null | null |
source | musl | #ifndef _SYS_KLOG_H
#define _SYS_KLOG_H
#ifdef __cplusplus
extern "C" {
#endif
int klogctl (int, char *, int);
#ifdef __cplusplus
}
#endif
#endif | include/sys/klog.h | null | null | null | null | null |
source | musl | #ifndef _SYS_MEMBARRIER_H
#define _SYS_MEMBARRIER_H
#define MEMBARRIER_CMD_QUERY 0
#define MEMBARRIER_CMD_GLOBAL 1
#define MEMBARRIER_CMD_GLOBAL_EXPEDITED 2
#define MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED 4
#define MEMBARRIER_CMD_PRIVATE_EXPEDITED 8
#define MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED 16
#define MEMBARR... | include/sys/membarrier.h | null | null | null | null | null |
source | musl | #ifndef _SYS_MMAN_H
#define _SYS_MMAN_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_mode_t
#define __NEED_size_t
#define __NEED_off_t
#if defined(_GNU_SOURCE)
#define __NEED_ssize_t
#endif
#include <bits/alltypes.h>
#define MAP_FAILED ((void *) -1)
#define MAP_SHARED 0x01
#defi... | include/sys/mman.h | null | null | null | null | null |
source | musl | #ifndef _SYS_MOUNT_H
#define _SYS_MOUNT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/ioctl.h>
#define BLKROSET _IO(0x12, 93)
#define BLKROGET _IO(0x12, 94)
#define BLKRRPART _IO(0x12, 95)
#define BLKGETSIZE _IO(0x12, 96)
#define BLKFLSBUF _IO(0x12, 97)
#define BLKRASET _IO(0x12, 98)
#define BLKRAGE... | include/sys/mount.h | null | null | null | null | null |
source | musl | #ifndef _SYS_MSG_H
#define _SYS_MSG_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/ipc.h>
#define __NEED_pid_t
#define __NEED_key_t
#define __NEED_time_t
#define __NEED_size_t
#define __NEED_ssize_t
#include <bits/alltypes.h>
typedef unsigned long msgqnum_t;
typedef unsigned long msglen_t;
#include <bits/... | include/sys/msg.h | null | null | null | null | null |
source | musl | #ifndef _SYS_MTIO_H
#define _SYS_MTIO_H
#include <sys/types.h>
#include <sys/ioctl.h>
struct mtop {
short mt_op;
int mt_count;
};
#define _IOT_mtop _IOT (_IOTS (short), 1, _IOTS (int), 1, 0, 0)
#define _IOT_mtget _IOT (_IOTS (long), 7, 0, 0, 0, 0)
#define _IOT_mtpos _IOT_SIMPLE (long)
#define _IOT_mtconfiginfo _IO... | include/sys/mtio.h | null | null | null | null | null |
source | musl | #ifndef _SYS_PARAM_H
#define _SYS_PARAM_H
#define MAXSYMLINKS 20
#define MAXHOSTNAMELEN 64
#define MAXNAMLEN 255
#define MAXPATHLEN 4096
#define NBBY 8
#define NGROUPS 32
#define CANBSIZ 255
#define NOFILE 256
#define NCARGS 131072
#define DEV_BSIZE 512
#define NOGROUP (-1)
#undef MIN
#undef MAX
#define MIN(a,b) (((a... | include/sys/param.h | null | null | null | null | null |
source | musl | #ifndef _PERSONALITY_H
#define _PERSONALITY_H
#ifdef __cplusplus
extern "C" {
#endif
#define UNAME26 0x0020000
#define ADDR_NO_RANDOMIZE 0x0040000
#define FDPIC_FUNCPTRS 0x0080000
#define MMAP_PAGE_ZERO 0x0100000
#define ADDR_COMPAT_LAYOUT 0x0200000
#define READ_IMPLIES_EXEC 0x0400000
#define ADD... | include/sys/personality.h | null | null | null | null | null |
source | musl | #ifndef _SYS_PRCTL_H
#define _SYS_PRCTL_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#define PR_SET_PDEATHSIG 1
#define PR_GET_PDEATHSIG 2
#define PR_GET_DUMPABLE 3
#define PR_SET_DUMPABLE 4
#define PR_GET_UNALIGN 5
#define PR_SET_UNALIGN 6
#define PR_UNALIGN_NOPRINT 1
#define PR_UNALIGN_SI... | include/sys/prctl.h | null | null | null | null | null |
source | musl | #ifndef _SYS_PROCFS_H
#define _SYS_PROCFS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/time.h>
#include <sys/types.h>
#include <sys/user.h>
struct elf_siginfo {
int si_signo;
int si_code;
int si_errno;
};
struct elf_prstatus {
struct elf_siginfo pr_info;
short int pr_cursig;
unsigned long int pr_sigp... | include/sys/procfs.h | null | null | null | null | null |
source | musl | #ifndef _SYS_PTRACE_H
#define _SYS_PTRACE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#define PTRACE_TRACEME 0
#define PT_TRACE_ME PTRACE_TRACEME
#define PTRACE_PEEKTEXT 1
#define PTRACE_PEEKDATA 2
#define PTRACE_PEEKUSER 3
#define PTRACE_POKETEXT 4
#define PTRACE_POKEDATA 5
#define PTRACE_POKEUSER ... | include/sys/ptrace.h | null | null | null | null | null |
source | musl | #ifndef _SYS_QUOTA_H
#define _SYS_QUOTA_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#define _LINUX_QUOTA_VERSION 2
#define dbtob(num) ((num) << 10)
#define btodb(num) ((num) >> 10)
#define fs_to_dq_blocks(num, blksize) (((num) * (blksize)) / 1024)
#define MAX_IQ_TIME 604800
#define MAX_DQ_TIME 604... | include/sys/quota.h | null | null | null | null | null |
source | musl | #ifndef _SYS_RANDOM_H
#define _SYS_RANDOM_H
#ifdef __cplusplus
extern "C" {
#endif
#define __NEED_size_t
#define __NEED_ssize_t
#include <bits/alltypes.h>
#define GRND_NONBLOCK 0x0001
#define GRND_RANDOM 0x0002
#define GRND_INSECURE 0x0004
ssize_t getrandom(void *, size_t, unsigned);
#ifdef __cplusplus
}
#endif
#en... | include/sys/random.h | null | null | null | null | null |
source | musl | #ifndef _SYS_REBOOT_H
#define _SYS_REBOOT_H
#ifdef __cplusplus
extern "C" {
#endif
#define RB_AUTOBOOT 0x01234567
#define RB_HALT_SYSTEM 0xcdef0123
#define RB_ENABLE_CAD 0x89abcdef
#define RB_DISABLE_CAD 0
#define RB_POWER_OFF 0x4321fedc
#define RB_SW_SUSPEND 0xd000fce2
#define RB_KEXEC 0x45584543
... | include/sys/reboot.h | null | null | null | null | null |
source | musl | #ifndef _SYS_REG_H
#define _SYS_REG_H
#include <limits.h>
#include <unistd.h>
#include <bits/alltypes.h>
#undef __WORDSIZE
#if __LONG_MAX == 0x7fffffffL
#define __WORDSIZE 32
#else
#define __WORDSIZE 64
#endif
#include <bits/reg.h>
#endif | include/sys/reg.h | null | null | null | null | null |
source | musl | #ifndef _SYS_RESOURCE_H
#define _SYS_RESOURCE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#include <sys/time.h>
#define __NEED_id_t
#ifdef _GNU_SOURCE
#define __NEED_pid_t
#endif
#include <bits/alltypes.h>
#include <bits/resource.h>
typedef unsigned long long rlim_t;
struct rlimit {
rlim_t rl... | include/sys/resource.h | null | null | null | null | null |
source | musl | #ifndef _SYS_SELECT_H
#define _SYS_SELECT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_size_t
#define __NEED_time_t
#define __NEED_suseconds_t
#define __NEED_struct_timeval
#define __NEED_struct_timespec
#define __NEED_sigset_t
#include <bits/alltypes.h>
#define FD_SETSIZE 1024
typ... | include/sys/select.h | null | null | null | null | null |
source | musl | #ifndef _SYS_SEM_H
#define _SYS_SEM_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_size_t
#define __NEED_pid_t
#define __NEED_time_t
#ifdef _GNU_SOURCE
#define __NEED_struct_timespec
#endif
#include <bits/alltypes.h>
#include <sys/ipc.h>
#define SEM_UNDO 0x1000
#define GETPID 11
#def... | include/sys/sem.h | null | null | null | null | null |
source | musl | #ifndef _SYS_SENDFILE_H
#define _SYS_SENDFILE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#include <unistd.h>
ssize_t sendfile(int, int, off_t *, size_t);
#if defined(_LARGEFILE64_SOURCE)
#define sendfile64 sendfile
#define off64_t off_t
#endif
#ifdef __cplusplus
}
#endif
#endif | include/sys/sendfile.h | null | null | null | null | null |
source | musl | #ifndef _SYS_SHM_H
#define _SYS_SHM_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_time_t
#define __NEED_size_t
#define __NEED_pid_t
#include <bits/alltypes.h>
#include <sys/ipc.h>
#ifdef _GNU_SOURCE
#define __used_ids used_ids
#define __swap_attempts swap_attempts
#define __swap_su... | include/sys/shm.h | null | null | null | null | null |
source | musl | #ifndef _SYS_SIGNALFD_H
#define _SYS_SIGNALFD_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <fcntl.h>
#define __NEED_sigset_t
#include <bits/alltypes.h>
#define SFD_CLOEXEC O_CLOEXEC
#define SFD_NONBLOCK O_NONBLOCK
int signalfd(int, const sigset_t *, int);
struct signalfd_siginfo {
uint3... | include/sys/signalfd.h | null | null | null | null | null |
source | musl | #ifndef _SYS_SOCKET_H
#define _SYS_SOCKET_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_socklen_t
#define __NEED_sa_family_t
#define __NEED_size_t
#define __NEED_ssize_t
#define __NEED_uid_t
#define __NEED_pid_t
#define __NEED_gid_t
#define __NEED_struct_iovec
#include <bits/alltypes.... | include/sys/socket.h | null | null | null | null | null |
source | musl | #ifndef _SYS_STAT_H
#define _SYS_STAT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_dev_t
#define __NEED_ino_t
#define __NEED_mode_t
#define __NEED_nlink_t
#define __NEED_uid_t
#define __NEED_gid_t
#define __NEED_off_t
#define __NEED_time_t
#define __NEED_blksize_t
#define __NEED_blkcn... | include/sys/stat.h | null | null | null | null | null |
source | musl | #ifndef _SYS_STATFS_H
#define _SYS_STATFS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#include <sys/statvfs.h>
typedef struct __fsid_t {
int __val[2];
} fsid_t;
#include <bits/statfs.h>
int statfs (const char *, struct statfs *);
int fstatfs (int, struct statfs *);
#if defined(_LARGEFILE64_SO... | include/sys/statfs.h | null | null | null | null | null |
source | musl | #ifndef _SYS_STATVFS_H
#define _SYS_STATVFS_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_fsblkcnt_t
#define __NEED_fsfilcnt_t
#include <bits/alltypes.h>
struct statvfs {
unsigned long f_bsize, f_frsize;
fsblkcnt_t f_blocks, f_bfree, f_bavail;
fsfilcnt_t f_files, f_ffree, f_favail... | include/sys/statvfs.h | null | null | null | null | null |
source | musl | #ifndef _SYS_SWAP_H
#define _SYS_SWAP_H
#ifdef __cplusplus
extern "C" {
#endif
#define SWAP_FLAG_PREFER 0x8000
#define SWAP_FLAG_PRIO_MASK 0x7fff
#define SWAP_FLAG_PRIO_SHIFT 0
#define SWAP_FLAG_DISCARD 0x10000
int swapon (const char *, int);
int swapoff (const char *);
#ifdef __cplusplus
}
#en... | include/sys/swap.h | null | null | null | null | null |
source | musl | #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 ... | include/sys/sysinfo.h | null | null | null | null | null |
source | musl | #ifndef _SYS_SYSMACROS_H
#define _SYS_SYSMACROS_H
#define major(x) \
((unsigned)( (((x)>>31>>1) & 0xfffff000) | (((x)>>8) & 0x00000fff) ))
#define minor(x) \
((unsigned)( (((x)>>12) & 0xffffff00) | ((x) & 0x000000ff) ))
#define makedev(x,y) ( \
(((x)&0xfffff000ULL) << 32) | \
(((x)&0x00000fffULL) << 8) | \... | include/sys/sysmacros.h | null | null | null | null | null |
source | musl | #ifndef _SYS_TIME_H
#define _SYS_TIME_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#include <sys/select.h>
int gettimeofday (struct timeval *__restrict, void *__restrict);
#define ITIMER_REAL 0
#define ITIMER_VIRTUAL 1
#define ITIMER_PROF 2
struct itimerval {
struct timeval it_interval;
s... | include/sys/time.h | null | null | null | null | null |
source | musl | #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
... | include/sys/timeb.h | null | null | null | null | null |
source | musl | #ifndef _SYS_TIMERFD_H
#define _SYS_TIMERFD_H
#ifdef __cplusplus
extern "C" {
#endif
#include <time.h>
#include <fcntl.h>
#define TFD_NONBLOCK O_NONBLOCK
#define TFD_CLOEXEC O_CLOEXEC
#define TFD_TIMER_ABSTIME 1
#define TFD_TIMER_CANCEL_ON_SET (1 << 1)
struct itimerspec;
int timerfd_create(int, int);
int timerfd_... | include/sys/timerfd.h | null | null | null | null | null |
source | musl | #ifndef _SYS_TIMES_H
#define _SYS_TIMES_H
#ifdef __cplusplus
extern "C" {
#endif
#define __NEED_clock_t
#include <bits/alltypes.h>
struct tms {
clock_t tms_utime;
clock_t tms_stime;
clock_t tms_cutime;
clock_t tms_cstime;
};
clock_t times (struct tms *);
#ifdef __cplusplus
}
#endif
#endif | include/sys/times.h | null | null | null | null | null |
source | musl | #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;
lo... | include/sys/timex.h | null | null | null | null | null |
source | musl | #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... | include/sys/ttydefaults.h | null | null | null | null | null |
source | musl | #ifndef _SYS_TYPES_H
#define _SYS_TYPES_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_ino_t
#define __NEED_dev_t
#define __NEED_uid_t
#define __NEED_gid_t
#define __NEED_mode_t
#define __NEED_nlink_t
#define __NEED_off_t
#define __NEED_pid_t
#define __NEED_size_t
#define __NEED_ssize_t... | include/sys/types.h | null | null | null | null | null |
source | musl | #ifndef _SYS_UIO_H
#define _SYS_UIO_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_size_t
#define __NEED_ssize_t
#define __NEED_struct_iovec
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define __NEED_off_t
#endif
#ifdef _GNU_SOURCE
#define __NEED_pid_t
#endif
#include <bits/all... | include/sys/uio.h | null | null | null | null | null |
source | musl | #ifndef _SYS_UN_H
#define _SYS_UN_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_sa_family_t
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define __NEED_size_t
#endif
#include <bits/alltypes.h>
struct sockaddr_un {
sa_family_t sun_family;
char sun_path[108];
};
#if defined(_GN... | include/sys/un.h | null | null | null | null | null |
source | musl | #ifndef _SYS_USER_H
#define _SYS_USER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <limits.h>
#include <stdint.h>
#include <unistd.h>
#include <bits/alltypes.h>
#undef __WORDSIZE
#if __LONG_MAX == 0x7fffffffL
#define __WORDSIZE 32
#else
#define __WORDSIZE 64
#endif
#include <bits/user.h>
#ifdef __cplusplus
}
... | include/sys/user.h | null | null | null | null | null |
source | musl | #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 (stru... | include/sys/utsname.h | null | null | null | null | null |
source | musl | #ifndef _SYS_WAIT_H
#define _SYS_WAIT_H
#ifdef __cplusplus
extern "C" {
#endif
#include <features.h>
#define __NEED_pid_t
#define __NEED_id_t
#include <bits/alltypes.h>
typedef enum {
P_ALL = 0,
P_PID = 1,
P_PGID = 2,
P_PIDFD = 3
} idtype_t;
pid_t wait (int *);
pid_t waitpid (pid_t, int *, int );
#if defined(_... | include/sys/wait.h | null | null | null | null | null |
source | musl | #ifndef _SYS_XATTR_H
#define _SYS_XATTR_H
#ifdef __cplusplus
extern "C" {
#endif
#define __NEED_ssize_t
#define __NEED_size_t
#include <bits/alltypes.h>
#define XATTR_CREATE 1
#define XATTR_REPLACE 2
ssize_t getxattr(const char *, const char *, void *, size_t);
ssize_t lgetxattr(const char *, const char *, void *, s... | include/sys/xattr.h | null | null | null | null | null |
source | musl | #include <stddef.h>
#include "dynlink.h"
#include "libc.h"
#ifndef START
#define START "_dlstart"
#endif
#define SHARED
#include "crt_arch.h"
#ifndef GETFUNCSYM
#define GETFUNCSYM(fp, sym, got) do { \
hidden void sym(); \
static void (*static_func_ptr)() = sym; \
__asm__ __volatile__ ( "" : "+m"(static_func_ptr)... | ldso/dlstart.c | null | null | null | null | null |
source | musl | #define _GNU_SOURCE
#define SYSCALL_NO_TLS 1
#include <stdlib.h>
#include <stdarg.h>
#include <stddef.h>
#include <string.h>
#include <unistd.h>
#include <stdint.h>
#include <elf.h>
#include <sys/mman.h>
#include <limits.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <errno.h>
#include <link.h>
#include <setjmp.h... | ldso/dynlink.c | null | null | null | null | null |
source | musl | #include <aio.h>
#include <pthread.h>
#include <semaphore.h>
#include <limits.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/auxv.h>
#include "syscall.h"
#include "atomic.h"
#include "pthread_impl.h"
#include "aio_impl.h"
#define malloc __libc_malloc
#define calloc __libc_calloc
#define re... | src/aio/aio.c | null | null | null | null | null |
source | musl | #include <aio.h>
#include <errno.h>
#include <time.h>
#include "atomic.h"
#include "pthread_impl.h"
#include "aio_impl.h"
int aio_suspend(const struct aiocb *const cbs[], int cnt, const struct timespec *ts)
{
int i, tid = 0, ret, expect = 0;
struct timespec at;
volatile int dummy_fut = 0, *pfut;
int nzcnt = 0;
co... | src/aio/aio_suspend.c | null | null | null | null | null |
source | musl | #include <aio.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include "pthread_impl.h"
struct lio_state {
struct sigevent *sev;
int cnt;
struct aiocb *cbs[];
};
static int lio_wait(struct lio_state *st)
{
int i, err, got_err = 0;
int cnt = st->cnt;
struct aiocb **cbs = st->cbs;
for (;;) {
for... | src/aio/lio_listio.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
// FIXME: Hull et al. "Implementing the complex arcsine and arccosine functions using exception handling" 1997
/* acos(z) = pi/2 - asin(z) */
double complex cacos(double complex z)
{
z = casin(z);
return CMPLX(M_PI_2 - creal(z), -cimag(z));
} | src/complex/cacos.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
// FIXME
static const float float_pi_2 = M_PI_2;
float complex cacosf(float complex z)
{
z = casinf(z);
return CMPLXF(float_pi_2 - crealf(z), -cimagf(z));
} | src/complex/cacosf.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double complex cacoshl(long double complex z)
{
return cacosh(z);
}
#else
long double complex cacoshl(long double complex z)
{
int zineg = signbit(cimagl(z));
z = cacosl(z);
if (zineg) return CMPLXL(cimagl(z), -creall(z));
else ... | src/complex/cacoshl.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double complex cacosl(long double complex z)
{
return cacos(z);
}
#else
// FIXME
#define PI_2 1.57079632679489661923132169163975144L
long double complex cacosl(long double complex z)
{
z = casinl(z);
return CMPLXL(PI_2 - creall(z), -cima... | src/complex/cacosl.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
// FIXME
/* asin(z) = -i log(i z + sqrt(1 - z*z)) */
double complex casin(double complex z)
{
double complex w;
double x, y;
x = creal(z);
y = cimag(z);
w = CMPLX(1.0 - (x - y)*(x + y), -2.0*x*y);
double complex r = clog(CMPLX(-y, x) + csqrt(w));
return CMPLX(cimag(r), -creal(r));
} | src/complex/casin.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
// FIXME
float complex casinf(float complex z)
{
float complex w;
float x, y;
x = crealf(z);
y = cimagf(z);
w = CMPLXF(1.0 - (x - y)*(x + y), -2.0*x*y);
float complex r = clogf(CMPLXF(-y, x) + csqrtf(w));
return CMPLXF(cimagf(r), -crealf(r));
} | src/complex/casinf.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
/* asinh(z) = -i asin(i z) */
double complex casinh(double complex z)
{
z = casin(CMPLX(-cimag(z), creal(z)));
return CMPLX(cimag(z), -creal(z));
} | src/complex/casinh.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
float complex casinhf(float complex z)
{
z = casinf(CMPLXF(-cimagf(z), crealf(z)));
return CMPLXF(cimagf(z), -crealf(z));
} | src/complex/casinhf.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double complex casinhl(long double complex z)
{
return casinh(z);
}
#else
long double complex casinhl(long double complex z)
{
z = casinl(CMPLXL(-cimagl(z), creall(z)));
return CMPLXL(cimagl(z), -creall(z));
}
#endif | src/complex/casinhl.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double complex casinl(long double complex z)
{
return casin(z);
}
#else
// FIXME
long double complex casinl(long double complex z)
{
long double complex w;
long double x, y;
x = creall(z);
y = cimagl(z);
w = CMPLXL(1.0 - (x - y)*(x +... | src/complex/casinl.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
//FIXME
long double complex ccoshl(long double complex z)
{
return ccosh(z);
} | src/complex/ccoshl.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
//FIXME
long double complex cexpl(long double complex z)
{
return cexp(z);
} | src/complex/cexpl.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
// FIXME
/* log(z) = log(|z|) + i arg(z) */
double complex clog(double complex z)
{
double r, phi;
r = cabs(z);
phi = carg(z);
return CMPLX(log(r), phi);
} | src/complex/clog.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
// FIXME
float complex clogf(float complex z)
{
float r, phi;
r = cabsf(z);
phi = cargf(z);
return CMPLXF(logf(r), phi);
} | src/complex/clogf.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double complex clogl(long double complex z)
{
return clog(z);
}
#else
// FIXME
long double complex clogl(long double complex z)
{
long double r, phi;
r = cabsl(z);
phi = cargl(z);
return CMPLXL(logl(r), phi);
}
#endif | src/complex/clogl.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
/* pow(z, c) = exp(c log(z)), See C99 G.6.4.1 */
double complex cpow(double complex z, double complex c)
{
return cexp(c * clog(z));
} | src/complex/cpow.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
float complex cpowf(float complex z, float complex c)
{
return cexpf(c * clogf(z));
} | src/complex/cpowf.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
long double complex cpowl(long double complex z, long double complex c)
{
return cpow(z, c);
}
#else
long double complex cpowl(long double complex z, long double complex c)
{
return cexpl(c * clogl(z));
}
#endif | src/complex/cpowl.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
//FIXME
long double complex csinhl(long double complex z)
{
return csinh(z);
} | src/complex/csinhl.c | null | null | null | null | null |
source | musl | /* origin: FreeBSD /usr/src/lib/msun/src/s_csqrt.c */
/*-
* Copyright (c) 2007 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
*
* are met:
* notice, this list of conditions and the following disclaimer.
* notice, this list of conditions and the following disclaimer in the
* documentation and/or ... | src/complex/csqrt.c | null | null | null | null | null |
source | musl | /* origin: FreeBSD /usr/src/lib/msun/src/s_csqrtf.c */
/*-
* Copyright (c) 2007 David Schultz <das@FreeBSD.ORG>
* All rights reserved.
*
* are met:
* notice, this list of conditions and the following disclaimer.
* notice, this list of conditions and the following disclaimer in the
* documentation and/or... | src/complex/csqrtf.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
//FIXME
long double complex csqrtl(long double complex z)
{
return csqrt(z);
} | src/complex/csqrtl.c | null | null | null | null | null |
source | musl | #include "complex_impl.h"
//FIXME
long double complex ctanhl(long double complex z)
{
return ctanh(z);
} | src/complex/ctanhl.c | null | null | null | null | null |
source | musl | #include <unistd.h>
#include <stdio.h>
#include <errno.h>
size_t confstr(int name, char *buf, size_t len)
{
const char *s = "";
if (!name) {
s = "/bin:/usr/bin";
} else if ((name&~4U)!=1 && name-_CS_POSIX_V6_ILP32_OFF32_CFLAGS>35U) {
errno = EINVAL;
return 0;
}
// snprintf is overkill but avoid wasting code... | src/conf/confstr.c | null | null | null | null | null |
source | musl | #include <unistd.h>
#include <limits.h>
#include <errno.h>
long fpathconf(int fd, int name)
{
static const short values[] = {
[_PC_LINK_MAX] = _POSIX_LINK_MAX,
[_PC_MAX_CANON] = _POSIX_MAX_CANON,
[_PC_MAX_INPUT] = _POSIX_MAX_INPUT,
[_PC_NAME_MAX] = NAME_MAX,
[_PC_PATH_MAX] = PATH_MAX,
[_PC_PIPE_BUF] = PIP... | src/conf/fpathconf.c | null | null | null | null | null |
source | musl | #include <sys/sysinfo.h>
#include <unistd.h>
int get_nprocs_conf()
{
return sysconf(_SC_NPROCESSORS_CONF);
}
int get_nprocs()
{
return sysconf(_SC_NPROCESSORS_ONLN);
}
long get_phys_pages()
{
return sysconf(_SC_PHYS_PAGES);
}
long get_avphys_pages()
{
return sysconf(_SC_AVPHYS_PAGES);
} | src/conf/legacy.c | null | null | null | null | null |
source | musl | #include <unistd.h>
#include <limits.h>
#include <errno.h>
#include <sys/resource.h>
#include <signal.h>
#include <sys/sysinfo.h>
#include <sys/auxv.h>
#include "syscall.h"
#include "libc.h"
#define JT(x) (-256|(x))
#define VER JT(1)
#define JT_ARG_MAX JT(2)
#define JT_MQ_PRIO_MAX JT(3)
#define JT_PAGE_SIZE JT(4)
#def... | src/conf/sysconf.c | null | null | null | null | null |
source | musl | #include <unistd.h>
#include <crypt.h>
char *crypt(const char *key, const char *salt)
{
/* This buffer is sufficiently large for all
* currently-supported hash types. It needs to be updated if
* longer hashes are added. The cast to struct crypt_data * is
* purely to meet the public API requirements of the crypt... | src/crypt/crypt.c | null | null | null | null | null |
source | musl | /* Modified by Rich Felker in for inclusion in musl libc, based on
* Solar Designer's second size-optimized version sent to the musl
* mailing list. */
/*
* The crypt_blowfish homepage is:
*
* http://www.openwall.com/crypt/
*
* This code comes from John the Ripper password cracker, with reentrant
* and crypt(3... | src/crypt/crypt_blowfish.c | null | null | null | null | null |
source | musl | /*
* This version has been further modified by Rich Felker, primary author
* and maintainer of musl libc, to remove table generation code and
* replaced all runtime-generated constant tables with static-initialized
* tables in the binary, in the interest of minimizing non-shareable
* memory usage and stack size re... | src/crypt/crypt_des.c | null | null | null | null | null |
source | musl | #ifndef CRYPT_DES_H
#define CRYPT_DES_H
#include <stdint.h>
struct expanded_key {
uint32_t l[16], r[16];
};
hidden void __des_setkey(const unsigned char *, struct expanded_key *);
hidden void __do_des(uint32_t, uint32_t, uint32_t *, uint32_t *,
uint32_t, uint32_t, const struct expanded_key *);
... | src/crypt/crypt_des.h | null | null | null | null | null |
source | musl | /*
* md5 crypt implementation
*
* original md5 crypt design is from Poul-Henning Kamp
* this implementation was created based on the code in freebsd
* at least 32bit int is assumed, key is limited and $1$ prefix is mandatory,
* on error "*" is returned
*/
#include <string.h>
#include <stdint.h>
/* public domain... | src/crypt/crypt_md5.c | null | null | null | null | null |
source | musl | #include <crypt.h>
char *__crypt_r(const char *key, const char *salt, struct crypt_data *data)
{
/* Per the crypt_r API, the caller has provided a pointer to
* struct crypt_data; however, this implementation does not
* use the structure to store any internal state, and treats
* it purely as a char buffer for st... | src/crypt/crypt_r.c | null | null | null | null | null |
source | musl | /*
* public domain sha256 crypt implementation
*
* original sha crypt design: http://people.redhat.com/drepper/SHA-crypt.txt
* in this implementation at least 32bit int is assumed,
* key length is limited, the $5$ prefix is mandatory, '\n' and ':' is rejected
* in the salt and rounds= setting must contain a valid... | src/crypt/crypt_sha256.c | null | null | null | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.