working on it
This commit is contained in:
parent
56a6e78765
commit
35a88970c2
1094 changed files with 51093 additions and 51 deletions
61
05/musl-final/include/sys/epoll.h
Normal file
61
05/musl-final/include/sys/epoll.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
#ifndef _SYS_EPOLL_H
|
||||
#define _SYS_EPOLL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define __NEED_sigset_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#define EPOLL_CLOEXEC 02000000
|
||||
#define EPOLL_NONBLOCK 04000
|
||||
|
||||
enum EPOLL_EVENTS { __EPOLL_DUMMY };
|
||||
#define EPOLLIN 0x001
|
||||
#define EPOLLPRI 0x002
|
||||
#define EPOLLOUT 0x004
|
||||
#define EPOLLRDNORM 0x040
|
||||
#define EPOLLRDBAND 0x080
|
||||
#define EPOLLWRNORM 0x100
|
||||
#define EPOLLWRBAND 0x200
|
||||
#define EPOLLMSG 0x400
|
||||
#define EPOLLERR 0x008
|
||||
#define EPOLLHUP 0x010
|
||||
#define EPOLLRDHUP 0x2000
|
||||
#define EPOLLONESHOT (1U<<30)
|
||||
#define EPOLLET (1U<<31)
|
||||
|
||||
#define EPOLL_CTL_ADD 1
|
||||
#define EPOLL_CTL_DEL 2
|
||||
#define EPOLL_CTL_MOD 3
|
||||
|
||||
typedef union epoll_data {
|
||||
void *ptr;
|
||||
int fd;
|
||||
uint32_t u32;
|
||||
uint64_t u64;
|
||||
} epoll_data_t;
|
||||
|
||||
struct epoll_event {
|
||||
uint32_t events;
|
||||
epoll_data_t data;
|
||||
} __attribute__ ((__packed__));
|
||||
|
||||
|
||||
int epoll_create(int);
|
||||
int epoll_create1(int);
|
||||
int epoll_ctl(int, int, int, struct epoll_event *);
|
||||
int epoll_wait(int, struct epoll_event *, int, int);
|
||||
int epoll_pwait(int, struct epoll_event *, int, int, const sigset_t *);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* sys/epoll.h */
|
21
05/musl-final/include/sys/file.h
Normal file
21
05/musl-final/include/sys/file.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef _SYS_FILE_H
|
||||
#define _SYS_FILE_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||
|
||||
#define LOCK_SH 1
|
||||
#define LOCK_EX 2
|
||||
#define LOCK_NB 4
|
||||
#define LOCK_UN 8
|
||||
|
||||
extern int flock(int, int);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
14
05/musl-final/include/sys/ioctl.h
Normal file
14
05/musl-final/include/sys/ioctl.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef _SYS_IOCTL_H
|
||||
#define _SYS_IOCTL_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bits/ioctl.h>
|
||||
|
||||
int ioctl (int, int, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
23
05/musl-final/include/sys/ipc.h
Normal file
23
05/musl-final/include/sys/ipc.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
#ifndef _SYS_IPC_H
|
||||
#define _SYS_IPC_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define __NEED_uid_t
|
||||
#define __NEED_gid_t
|
||||
#define __NEED_mode_t
|
||||
#define __NEED_key_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#include <bits/ipc.h>
|
||||
|
||||
key_t ftok (const char *, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
8
05/musl-final/include/sys/kd.h
Normal file
8
05/musl-final/include/sys/kd.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef _SYS_KD_H
|
||||
#define _SYS_KD_H
|
||||
|
||||
#define _LINUX_TYPES_H
|
||||
#include <linux/kd.h>
|
||||
#undef _LINUX_TYPES_H
|
||||
|
||||
#endif
|
14
05/musl-final/include/sys/klog.h
Normal file
14
05/musl-final/include/sys/klog.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#ifndef _SYS_KLOG_H
|
||||
#define _SYS_KLOG_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int klogctl (int, char *, int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
37
05/musl-final/include/sys/mman.h
Normal file
37
05/musl-final/include/sys/mman.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
#ifndef _SYS_MMAN_H
|
||||
#define _SYS_MMAN_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define __NEED_mode_t
|
||||
#define __NEED_size_t
|
||||
#define __NEED_off_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#include <bits/mman.h>
|
||||
|
||||
void *mmap (void *, size_t, int, int, int, off_t);
|
||||
int munmap (void *, size_t);
|
||||
|
||||
int mprotect (void *, size_t, int);
|
||||
int msync (void *, size_t, int);
|
||||
|
||||
int posix_madvise (void *, size_t, int);
|
||||
|
||||
int mlock (const void *, size_t);
|
||||
int munlock (const void *, size_t);
|
||||
int mlockall (int);
|
||||
int munlockall (void);
|
||||
|
||||
/* linux extension */
|
||||
void *mremap (void *, size_t, size_t, int, ...);
|
||||
|
||||
int shm_open (const char *, int, mode_t);
|
||||
int shm_unlink (const char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
28
05/musl-final/include/sys/mount.h
Normal file
28
05/musl-final/include/sys/mount.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef _SYS_MOUNT_H
|
||||
#define _SYS_MOUNT_H
|
||||
|
||||
#define MS_RDONLY 1
|
||||
#define MS_NOSUID 2
|
||||
#define MS_NODEV 4
|
||||
#define MS_NOEXEC 8
|
||||
#define MS_SYNCHRONOUS 16
|
||||
#define MS_REMOUNT 32
|
||||
#define MS_MANDLOCK 64
|
||||
#define S_WRITE 128
|
||||
#define S_APPEND 256
|
||||
#define S_IMMUTABLE 512
|
||||
#define MS_NOATIME 1024
|
||||
#define MS_NODIRATIME 2048
|
||||
#define MS_BIND 4096
|
||||
#define MS_MOVE 8192
|
||||
#define MS_SILENT 32768
|
||||
|
||||
#define MS_MGC_VAL 0xc0ed0000
|
||||
|
||||
#define MNT_FORCE 1
|
||||
|
||||
int mount(const char *, const char *, const char *, unsigned long, const void *);
|
||||
int umount(const char *);
|
||||
int umount2(const char *, int);
|
||||
|
||||
#endif
|
36
05/musl-final/include/sys/msg.h
Normal file
36
05/musl-final/include/sys/msg.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#ifndef _SYS_MSG_H
|
||||
#define _SYS_MSG_H
|
||||
|
||||
#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;
|
||||
|
||||
struct msqid_ds
|
||||
{
|
||||
struct ipc_perm msg_perm;
|
||||
time_t msg_stime;
|
||||
time_t msg_rtime;
|
||||
time_t msg_ctime;
|
||||
msgqnum_t msg_qnum;
|
||||
msglen_t msg_qbytes;
|
||||
pid_t msg_lspid;
|
||||
pid_t msd_lrpid;
|
||||
};
|
||||
|
||||
#define MSG_NOERROR 010000
|
||||
|
||||
int msgctl (int, int, struct msqid_ds *);
|
||||
int msgget (key_t, int);
|
||||
int msgrcv (int, void *, size_t, long, int);
|
||||
int msgsnd (int, const void *, size_t, int);
|
||||
|
||||
#endif
|
276
05/musl-final/include/sys/mtio.h
Normal file
276
05/musl-final/include/sys/mtio.h
Normal file
|
@ -0,0 +1,276 @@
|
|||
/* Structures and definitions for magnetic tape I/O control commands.
|
||||
Copyright (C) 1996-2020 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by H. Bergman <hennus@cybercomm.nl>. */
|
||||
|
||||
#ifndef _SYS_MTIO_H
|
||||
#define _SYS_MTIO_H 1
|
||||
|
||||
/* Get necessary definitions from system and kernel headers. */
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
|
||||
/* Structure for MTIOCTOP - magnetic tape operation command. */
|
||||
struct mtop
|
||||
{
|
||||
short int mt_op; /* Operations defined below. */
|
||||
int mt_count; /* How many of them. */
|
||||
};
|
||||
#define _IOT_mtop /* Hurd ioctl type field. */ \
|
||||
_IOT (_IOTS (short), 1, _IOTS (int), 1, 0, 0)
|
||||
|
||||
/* Magnetic Tape operations [Not all operations supported by all drivers]. */
|
||||
#define MTRESET 0 /* +reset drive in case of problems. */
|
||||
#define MTFSF 1 /* Forward space over FileMark,
|
||||
* position at first record of next file. */
|
||||
#define MTBSF 2 /* Backward space FileMark (position before FM). */
|
||||
#define MTFSR 3 /* Forward space record. */
|
||||
#define MTBSR 4 /* Backward space record. */
|
||||
#define MTWEOF 5 /* Write an end-of-file record (mark). */
|
||||
#define MTREW 6 /* Rewind. */
|
||||
#define MTOFFL 7 /* Rewind and put the drive offline (eject?). */
|
||||
#define MTNOP 8 /* No op, set status only (read with MTIOCGET). */
|
||||
#define MTRETEN 9 /* Retension tape. */
|
||||
#define MTBSFM 10 /* +backward space FileMark, position at FM. */
|
||||
#define MTFSFM 11 /* +forward space FileMark, position at FM. */
|
||||
#define MTEOM 12 /* Goto end of recorded media (for appending files).
|
||||
MTEOM positions after the last FM, ready for
|
||||
appending another file. */
|
||||
#define MTERASE 13 /* Erase tape -- be careful! */
|
||||
|
||||
#define MTRAS1 14 /* Run self test 1 (nondestructive). */
|
||||
#define MTRAS2 15 /* Run self test 2 (destructive). */
|
||||
#define MTRAS3 16 /* Reserved for self test 3. */
|
||||
|
||||
#define MTSETBLK 20 /* Set block length (SCSI). */
|
||||
#define MTSETDENSITY 21 /* Set tape density (SCSI). */
|
||||
#define MTSEEK 22 /* Seek to block (Tandberg, etc.). */
|
||||
#define MTTELL 23 /* Tell block (Tandberg, etc.). */
|
||||
#define MTSETDRVBUFFER 24 /* Set the drive buffering according to SCSI-2.
|
||||
Ordinary buffered operation with code 1. */
|
||||
#define MTFSS 25 /* Space forward over setmarks. */
|
||||
#define MTBSS 26 /* Space backward over setmarks. */
|
||||
#define MTWSM 27 /* Write setmarks. */
|
||||
|
||||
#define MTLOCK 28 /* Lock the drive door. */
|
||||
#define MTUNLOCK 29 /* Unlock the drive door. */
|
||||
#define MTLOAD 30 /* Execute the SCSI load command. */
|
||||
#define MTUNLOAD 31 /* Execute the SCSI unload command. */
|
||||
#define MTCOMPRESSION 32/* Control compression with SCSI mode page 15. */
|
||||
#define MTSETPART 33 /* Change the active tape partition. */
|
||||
#define MTMKPART 34 /* Format the tape with one or two partitions. */
|
||||
|
||||
/* structure for MTIOCGET - mag tape get status command */
|
||||
|
||||
struct mtget
|
||||
{
|
||||
long int mt_type; /* Type of magtape device. */
|
||||
long int mt_resid; /* Residual count: (not sure)
|
||||
number of bytes ignored, or
|
||||
number of files not skipped, or
|
||||
number of records not skipped. */
|
||||
/* The following registers are device dependent. */
|
||||
long int mt_dsreg; /* Status register. */
|
||||
long int mt_gstat; /* Generic (device independent) status. */
|
||||
long int mt_erreg; /* Error register. */
|
||||
/* The next two fields are not always used. */
|
||||
int mt_fileno; /* Number of current file on tape. */
|
||||
int mt_blkno; /* Current block number. */
|
||||
};
|
||||
#define _IOT_mtget /* Hurd ioctl type field. */ \
|
||||
_IOT (_IOTS (long), 7, 0, 0, 0, 0)
|
||||
|
||||
|
||||
/* Constants for mt_type. Not all of these are supported, and
|
||||
these are not all of the ones that are supported. */
|
||||
#define MT_ISUNKNOWN 0x01
|
||||
#define MT_ISQIC02 0x02 /* Generic QIC-02 tape streamer. */
|
||||
#define MT_ISWT5150 0x03 /* Wangtek 5150EQ, QIC-150, QIC-02. */
|
||||
#define MT_ISARCHIVE_5945L2 0x04 /* Archive 5945L-2, QIC-24, QIC-02?. */
|
||||
#define MT_ISCMSJ500 0x05 /* CMS Jumbo 500 (QIC-02?). */
|
||||
#define MT_ISTDC3610 0x06 /* Tandberg 6310, QIC-24. */
|
||||
#define MT_ISARCHIVE_VP60I 0x07 /* Archive VP60i, QIC-02. */
|
||||
#define MT_ISARCHIVE_2150L 0x08 /* Archive Viper 2150L. */
|
||||
#define MT_ISARCHIVE_2060L 0x09 /* Archive Viper 2060L. */
|
||||
#define MT_ISARCHIVESC499 0x0A /* Archive SC-499 QIC-36 controller. */
|
||||
#define MT_ISQIC02_ALL_FEATURES 0x0F /* Generic QIC-02 with all features. */
|
||||
#define MT_ISWT5099EEN24 0x11 /* Wangtek 5099-een24, 60MB, QIC-24. */
|
||||
#define MT_ISTEAC_MT2ST 0x12 /* Teac MT-2ST 155mb drive,
|
||||
Teac DC-1 card (Wangtek type). */
|
||||
#define MT_ISEVEREX_FT40A 0x32 /* Everex FT40A (QIC-40). */
|
||||
#define MT_ISDDS1 0x51 /* DDS device without partitions. */
|
||||
#define MT_ISDDS2 0x52 /* DDS device with partitions. */
|
||||
#define MT_ISSCSI1 0x71 /* Generic ANSI SCSI-1 tape unit. */
|
||||
#define MT_ISSCSI2 0x72 /* Generic ANSI SCSI-2 tape unit. */
|
||||
|
||||
/* QIC-40/80/3010/3020 ftape supported drives.
|
||||
20bit vendor ID + 0x800000 (see vendors.h in ftape distribution). */
|
||||
#define MT_ISFTAPE_UNKNOWN 0x800000 /* obsolete */
|
||||
#define MT_ISFTAPE_FLAG 0x800000
|
||||
|
||||
struct mt_tape_info
|
||||
{
|
||||
long int t_type; /* Device type id (mt_type). */
|
||||
char *t_name; /* Descriptive name. */
|
||||
};
|
||||
|
||||
#define MT_TAPE_INFO \
|
||||
{ \
|
||||
{MT_ISUNKNOWN, "Unknown type of tape device"}, \
|
||||
{MT_ISQIC02, "Generic QIC-02 tape streamer"}, \
|
||||
{MT_ISWT5150, "Wangtek 5150, QIC-150"}, \
|
||||
{MT_ISARCHIVE_5945L2, "Archive 5945L-2"}, \
|
||||
{MT_ISCMSJ500, "CMS Jumbo 500"}, \
|
||||
{MT_ISTDC3610, "Tandberg TDC 3610, QIC-24"}, \
|
||||
{MT_ISARCHIVE_VP60I, "Archive VP60i, QIC-02"}, \
|
||||
{MT_ISARCHIVE_2150L, "Archive Viper 2150L"}, \
|
||||
{MT_ISARCHIVE_2060L, "Archive Viper 2060L"}, \
|
||||
{MT_ISARCHIVESC499, "Archive SC-499 QIC-36 controller"}, \
|
||||
{MT_ISQIC02_ALL_FEATURES, "Generic QIC-02 tape, all features"}, \
|
||||
{MT_ISWT5099EEN24, "Wangtek 5099-een24, 60MB"}, \
|
||||
{MT_ISTEAC_MT2ST, "Teac MT-2ST 155mb data cassette drive"}, \
|
||||
{MT_ISEVEREX_FT40A, "Everex FT40A, QIC-40"}, \
|
||||
{MT_ISSCSI1, "Generic SCSI-1 tape"}, \
|
||||
{MT_ISSCSI2, "Generic SCSI-2 tape"}, \
|
||||
{0, NULL} \
|
||||
}
|
||||
|
||||
|
||||
/* Structure for MTIOCPOS - mag tape get position command. */
|
||||
|
||||
struct mtpos
|
||||
{
|
||||
long int mt_blkno; /* Current block number. */
|
||||
};
|
||||
#define _IOT_mtpos /* Hurd ioctl type field. */ \
|
||||
_IOT_SIMPLE (long)
|
||||
|
||||
|
||||
/* Structure for MTIOCGETCONFIG/MTIOCSETCONFIG primarily intended
|
||||
as an interim solution for QIC-02 until DDI is fully implemented. */
|
||||
struct mtconfiginfo
|
||||
{
|
||||
long int mt_type; /* Drive type. */
|
||||
long int ifc_type; /* Interface card type. */
|
||||
unsigned short int irqnr; /* IRQ number to use. */
|
||||
unsigned short int dmanr; /* DMA channel to use. */
|
||||
unsigned short int port; /* IO port base address. */
|
||||
|
||||
unsigned long int debug; /* Debugging flags. */
|
||||
|
||||
unsigned have_dens:1;
|
||||
unsigned have_bsf:1;
|
||||
unsigned have_fsr:1;
|
||||
unsigned have_bsr:1;
|
||||
unsigned have_eod:1;
|
||||
unsigned have_seek:1;
|
||||
unsigned have_tell:1;
|
||||
unsigned have_ras1:1;
|
||||
unsigned have_ras2:1;
|
||||
unsigned have_ras3:1;
|
||||
unsigned have_qfa:1;
|
||||
|
||||
unsigned pad1:5;
|
||||
char reserved[10];
|
||||
};
|
||||
#define _IOT_mtconfiginfo /* Hurd ioctl type field. */ \
|
||||
_IOT (_IOTS (long), 2, _IOTS (short), 3, _IOTS (long), 1) /* XXX wrong */
|
||||
|
||||
|
||||
/* Magnetic tape I/O control commands. */
|
||||
#define MTIOCTOP _IOW('m', 1, struct mtop) /* Do a mag tape op. */
|
||||
#define MTIOCGET _IOR('m', 2, struct mtget) /* Get tape status. */
|
||||
#define MTIOCPOS _IOR('m', 3, struct mtpos) /* Get tape position.*/
|
||||
|
||||
/* The next two are used by the QIC-02 driver for runtime reconfiguration.
|
||||
See tpqic02.h for struct mtconfiginfo. */
|
||||
#define MTIOCGETCONFIG _IOR('m', 4, struct mtconfiginfo) /* Get tape config.*/
|
||||
#define MTIOCSETCONFIG _IOW('m', 5, struct mtconfiginfo) /* Set tape config.*/
|
||||
|
||||
/* Generic Mag Tape (device independent) status macros for examining
|
||||
mt_gstat -- HP-UX compatible.
|
||||
There is room for more generic status bits here, but I don't
|
||||
know which of them are reserved. At least three or so should
|
||||
be added to make this really useful. */
|
||||
#define GMT_EOF(x) ((x) & 0x80000000)
|
||||
#define GMT_BOT(x) ((x) & 0x40000000)
|
||||
#define GMT_EOT(x) ((x) & 0x20000000)
|
||||
#define GMT_SM(x) ((x) & 0x10000000) /* DDS setmark */
|
||||
#define GMT_EOD(x) ((x) & 0x08000000) /* DDS EOD */
|
||||
#define GMT_WR_PROT(x) ((x) & 0x04000000)
|
||||
/* #define GMT_ ? ((x) & 0x02000000) */
|
||||
#define GMT_ONLINE(x) ((x) & 0x01000000)
|
||||
#define GMT_D_6250(x) ((x) & 0x00800000)
|
||||
#define GMT_D_1600(x) ((x) & 0x00400000)
|
||||
#define GMT_D_800(x) ((x) & 0x00200000)
|
||||
/* #define GMT_ ? ((x) & 0x00100000) */
|
||||
/* #define GMT_ ? ((x) & 0x00080000) */
|
||||
#define GMT_DR_OPEN(x) ((x) & 0x00040000) /* Door open (no tape). */
|
||||
/* #define GMT_ ? ((x) & 0x00020000) */
|
||||
#define GMT_IM_REP_EN(x) ((x) & 0x00010000) /* Immediate report mode.*/
|
||||
/* 16 generic status bits unused. */
|
||||
|
||||
|
||||
/* SCSI-tape specific definitions. Bitfield shifts in the status */
|
||||
#define MT_ST_BLKSIZE_SHIFT 0
|
||||
#define MT_ST_BLKSIZE_MASK 0xffffff
|
||||
#define MT_ST_DENSITY_SHIFT 24
|
||||
#define MT_ST_DENSITY_MASK 0xff000000
|
||||
|
||||
#define MT_ST_SOFTERR_SHIFT 0
|
||||
#define MT_ST_SOFTERR_MASK 0xffff
|
||||
|
||||
/* Bitfields for the MTSETDRVBUFFER ioctl. */
|
||||
#define MT_ST_OPTIONS 0xf0000000
|
||||
#define MT_ST_BOOLEANS 0x10000000
|
||||
#define MT_ST_SETBOOLEANS 0x30000000
|
||||
#define MT_ST_CLEARBOOLEANS 0x40000000
|
||||
#define MT_ST_WRITE_THRESHOLD 0x20000000
|
||||
#define MT_ST_DEF_BLKSIZE 0x50000000
|
||||
#define MT_ST_DEF_OPTIONS 0x60000000
|
||||
|
||||
#define MT_ST_BUFFER_WRITES 0x1
|
||||
#define MT_ST_ASYNC_WRITES 0x2
|
||||
#define MT_ST_READ_AHEAD 0x4
|
||||
#define MT_ST_DEBUGGING 0x8
|
||||
#define MT_ST_TWO_FM 0x10
|
||||
#define MT_ST_FAST_MTEOM 0x20
|
||||
#define MT_ST_AUTO_LOCK 0x40
|
||||
#define MT_ST_DEF_WRITES 0x80
|
||||
#define MT_ST_CAN_BSR 0x100
|
||||
#define MT_ST_NO_BLKLIMS 0x200
|
||||
#define MT_ST_CAN_PARTITIONS 0x400
|
||||
#define MT_ST_SCSI2LOGICAL 0x800
|
||||
|
||||
/* The mode parameters to be controlled. Parameter chosen with bits 20-28. */
|
||||
#define MT_ST_CLEAR_DEFAULT 0xfffff
|
||||
#define MT_ST_DEF_DENSITY (MT_ST_DEF_OPTIONS | 0x100000)
|
||||
#define MT_ST_DEF_COMPRESSION (MT_ST_DEF_OPTIONS | 0x200000)
|
||||
#define MT_ST_DEF_DRVBUFFER (MT_ST_DEF_OPTIONS | 0x300000)
|
||||
|
||||
/* The offset for the arguments for the special HP changer load command. */
|
||||
#define MT_ST_HPLOADER_OFFSET 10000
|
||||
|
||||
|
||||
/* Specify default tape device. */
|
||||
#ifndef DEFTAPE
|
||||
# define DEFTAPE "/dev/tape"
|
||||
#endif
|
||||
|
||||
#endif /* mtio.h */
|
15
05/musl-final/include/sys/param.h
Normal file
15
05/musl-final/include/sys/param.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#undef MAXSYMLINKS
|
||||
#define MAXSYMLINKS 20
|
||||
|
||||
#undef MAXHOSTNAMELEN
|
||||
#define MAXHOSTNAMELEN 64
|
||||
|
||||
#undef MAXNAMLEN
|
||||
#define MAXNAMLEN NAME_MAX
|
||||
|
||||
#undef MAXPATHLEN
|
||||
#define MAXPATHLEN PATH_MAX
|
||||
|
||||
#include <sys/resource.h>
|
||||
#include <endian.h>
|
||||
#include <limits.h>
|
1
05/musl-final/include/sys/poll.h
Normal file
1
05/musl-final/include/sys/poll.h
Normal file
|
@ -0,0 +1 @@
|
|||
#include <poll.h>
|
64
05/musl-final/include/sys/prctl.h
Normal file
64
05/musl-final/include/sys/prctl.h
Normal file
|
@ -0,0 +1,64 @@
|
|||
#ifndef _SYS_PRCTL_H
|
||||
#define _SYS_PRCTL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#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_SIGBUS 2
|
||||
#define PR_GET_KEEPCAPS 7
|
||||
#define PR_SET_KEEPCAPS 8
|
||||
#define PR_GET_FPEMU 9
|
||||
#define PR_SET_FPEMU 10
|
||||
#define PR_FPEMU_NOPRINT 1
|
||||
#define PR_FPEMU_SIGFPE 2
|
||||
#define PR_GET_FPEXC 11
|
||||
#define PR_SET_FPEXC 12
|
||||
#define PR_FP_EXC_SW_ENABLE 0x80
|
||||
#define PR_FP_EXC_DIV 0x010000
|
||||
#define PR_FP_EXC_OVF 0x020000
|
||||
#define PR_FP_EXC_UND 0x040000
|
||||
#define PR_FP_EXC_RES 0x080000
|
||||
#define PR_FP_EXC_INV 0x100000
|
||||
#define PR_FP_EXC_DISABLED 0
|
||||
#define PR_FP_EXC_NONRECOV 1
|
||||
#define PR_FP_EXC_ASYNC 2
|
||||
#define PR_FP_EXC_PRECISE 3
|
||||
#define PR_GET_TIMING 13
|
||||
#define PR_SET_TIMING 14
|
||||
#define PR_TIMING_STATISTICAL 0
|
||||
#define PR_TIMING_TIMESTAMP 1
|
||||
#define PR_SET_NAME 15
|
||||
#define PR_GET_NAME 16
|
||||
#define PR_GET_ENDIAN 19
|
||||
#define PR_SET_ENDIAN 20
|
||||
#define PR_ENDIAN_BIG
|
||||
#define PR_ENDIAN_LITTLE
|
||||
#define PR_ENDIAN_PPC_LITTLE
|
||||
#define PR_GET_SECCOMP 21
|
||||
#define PR_SET_SECCOMP 22
|
||||
#define PR_CAPBSET_READ 23
|
||||
#define PR_CAPBSET_DROP 24
|
||||
#define PR_GET_TSC 25
|
||||
#define PR_SET_TSC 26
|
||||
#define PR_TSC_ENABLE 1
|
||||
#define PR_TSC_SIGSEGV 2
|
||||
#define PR_GET_SECUREBITS 27
|
||||
#define PR_SET_SECUREBITS 28
|
||||
#define PR_SET_TIMERSLACK 29
|
||||
#define PR_GET_TIMERSLACK 30
|
||||
|
||||
int prctl (int, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#endif
|
81
05/musl-final/include/sys/procfs.h
Normal file
81
05/musl-final/include/sys/procfs.h
Normal file
|
@ -0,0 +1,81 @@
|
|||
#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>
|
||||
|
||||
typedef unsigned long elf_greg_t;
|
||||
#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
|
||||
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
typedef struct user_fpregs_struct elf_fpregset_t;
|
||||
typedef struct user_fpxregs_struct elf_fpxregset_t;
|
||||
#else
|
||||
typedef struct user_fpregs_struct elf_fpregset_t;
|
||||
#endif
|
||||
|
||||
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_sigpend;
|
||||
unsigned long int pr_sighold;
|
||||
pid_t pr_pid;
|
||||
pid_t pr_ppid;
|
||||
pid_t pr_pgrp;
|
||||
pid_t pr_sid;
|
||||
struct timeval pr_utime;
|
||||
struct timeval pr_stime;
|
||||
struct timeval pr_cutime;
|
||||
struct timeval pr_cstime;
|
||||
elf_gregset_t pr_reg;
|
||||
int pr_fpvalid;
|
||||
};
|
||||
|
||||
|
||||
#define ELF_PRARGSZ 80
|
||||
|
||||
struct elf_prpsinfo
|
||||
{
|
||||
char pr_state;
|
||||
char pr_sname;
|
||||
char pr_zomb;
|
||||
char pr_nice;
|
||||
unsigned long int pr_flag;
|
||||
#if __WORDSIZE == 32
|
||||
unsigned short int pr_uid;
|
||||
unsigned short int pr_gid;
|
||||
#else
|
||||
unsigned int pr_uid;
|
||||
unsigned int pr_gid;
|
||||
#endif
|
||||
int pr_pid, pr_ppid, pr_pgrp, pr_sid;
|
||||
char pr_fname[16];
|
||||
char pr_psargs[ELF_PRARGSZ];
|
||||
};
|
||||
|
||||
|
||||
typedef void *psaddr_t;
|
||||
typedef elf_gregset_t prgregset_t;
|
||||
typedef elf_fpregset_t prfpregset_t;
|
||||
typedef pid_t lwpid_t;
|
||||
typedef struct elf_prstatus prstatus_t;
|
||||
typedef struct elf_prpsinfo prpsinfo_t;
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
77
05/musl-final/include/sys/ptrace.h
Normal file
77
05/musl-final/include/sys/ptrace.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
#ifndef _SYS_PTRACE_H
|
||||
#define _SYS_PTRACE_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#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 6
|
||||
#define PTRACE_CONT 7
|
||||
#define PTRACE_KILL 8
|
||||
#define PTRACE_SINGLESTEP 9
|
||||
#define PTRACE_GETREGS 12
|
||||
#define PTRACE_SETREGS 13
|
||||
#define PTRACE_GETFPREGS 14
|
||||
#define PTRACE_SETFPREGS 15
|
||||
#define PTRACE_ATTACH 16
|
||||
#define PTRACE_DETACH 17
|
||||
#define PTRACE_GETFPXREGS 18
|
||||
#define PTRACE_SETFPXREGS 19
|
||||
#define PTRACE_SYSCALL 24
|
||||
#define PTRACE_SETOPTIONS 0x4200
|
||||
#define PTRACE_GETEVENTMSG 0x4201
|
||||
#define PTRACE_GETSIGINFO 0x4202
|
||||
#define PTRACE_SETSIGINFO 0x4203
|
||||
|
||||
#define PT_READ_I PTRACE_PEEKTEXT
|
||||
#define PT_READ_D PTRACE_PEEKDATA
|
||||
#define PT_READ_U PTRACE_PEEKUSER
|
||||
#define PT_WRITE_I PTRACE_POKETEXT
|
||||
#define PT_WRITE_D PTRACE_POKEDATA
|
||||
#define PT_WRITE_U PTRACE_POKEUSER
|
||||
#define PT_CONTINUE PTRACE_CONT
|
||||
#define PT_KILL PTRACE_KILL
|
||||
#define PT_STEP PTRACE_SINGLESTEP
|
||||
#define PT_GETREGS PTRACE_GETREGS
|
||||
#define PT_SETREGS PTRACE_SETREGS
|
||||
#define PT_GETFPREGS PTRACE_GETFPREGS
|
||||
#define PT_SETFPREGS PTRACE_SETFPREGS
|
||||
#define PT_ATTACH PTRACE_ATTACH
|
||||
#define PT_DETACH PTRACE_DETACH
|
||||
#define PT_GETFPXREGS PTRACE_GETFPXREGS
|
||||
#define PT_SETFPXREGS PTRACE_SETFPXREGS
|
||||
#define PT_SYSCALL PTRACE_SYSCALL
|
||||
#define PT_SETOPTIONS PTRACE_SETOPTIONS
|
||||
#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
|
||||
#define PT_GETSIGINFO PTRACE_GETSIGINFO
|
||||
#define PT_SETSIGINFO PTRACE_SETSIGINFO
|
||||
|
||||
#define PTRACE_O_TRACESYSGOOD 0x00000001
|
||||
#define PTRACE_O_TRACEFORK 0x00000002
|
||||
#define PTRACE_O_TRACEVFORK 0x00000004
|
||||
#define PTRACE_O_TRACECLONE 0x00000008
|
||||
#define PTRACE_O_TRACEEXEC 0x00000010
|
||||
#define PTRACE_O_TRACEVFORKDONE 0x00000020
|
||||
#define PTRACE_O_TRACEEXIT 0x00000040
|
||||
#define PTRACE_O_MASK 0x0000007f
|
||||
|
||||
#define PTRACE_EVENT_FORK 1
|
||||
#define PTRACE_EVENT_VFORK 2
|
||||
#define PTRACE_EVENT_CLONE 3
|
||||
#define PTRACE_EVENT_EXEC 4
|
||||
#define PTRACE_EVENT_VFORK_DONE 5
|
||||
#define PTRACE_EVENT_EXIT 6
|
||||
|
||||
long int ptrace(int, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
18
05/musl-final/include/sys/reboot.h
Normal file
18
05/musl-final/include/sys/reboot.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#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
|
||||
|
||||
int reboot(int);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
9
05/musl-final/include/sys/reg.h
Normal file
9
05/musl-final/include/sys/reg.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef _SYS_USER_H
|
||||
#define _SYS_USER_H
|
||||
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <bits/reg.h>
|
||||
|
||||
#endif
|
74
05/musl-final/include/sys/resource.h
Normal file
74
05/musl-final/include/sys/resource.h
Normal file
|
@ -0,0 +1,74 @@
|
|||
#ifndef _SYS_RESOURCE_H
|
||||
#define _SYS_RESOURCE_H
|
||||
|
||||
#define __NEED_id_t
|
||||
#define __NEED_time_t
|
||||
#define __NEED_struct_timeval
|
||||
#define __NEED_struct_rusage
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
typedef unsigned long long rlim_t;
|
||||
|
||||
struct rlimit
|
||||
{
|
||||
rlim_t rlim_cur;
|
||||
rlim_t rlim_max;
|
||||
};
|
||||
|
||||
struct rusage
|
||||
{
|
||||
struct timeval ru_utime;
|
||||
struct timeval ru_stime;
|
||||
/* linux extentions, but useful */
|
||||
long ru_maxrss;
|
||||
long ru_ixrss;
|
||||
long ru_idrss;
|
||||
long ru_isrss;
|
||||
long ru_minflt;
|
||||
long ru_majflt;
|
||||
long ru_nswap;
|
||||
long ru_inblock;
|
||||
long ru_oublock;
|
||||
long ru_msgsnd;
|
||||
long ru_msgrcv;
|
||||
long ru_nsignals;
|
||||
long ru_nvcsw;
|
||||
long ru_nivcsw;
|
||||
/* room for more... */
|
||||
long __reserved[16];
|
||||
};
|
||||
|
||||
int getrlimit (int, struct rlimit *);
|
||||
int setrlimit (int, const struct rlimit *);
|
||||
int getrusage (int, struct rusage *);
|
||||
|
||||
int getpriority (int, id_t);
|
||||
int setpriority (int, id_t, int);
|
||||
|
||||
#define PRIO_PROCESS 0
|
||||
#define PRIO_PGRP 1
|
||||
#define PRIO_USER 2
|
||||
|
||||
#define RUSAGE_SELF 0
|
||||
#define RUSAGE_CHILDREN 1
|
||||
|
||||
#define RLIM_INFINITY (~0ULL)
|
||||
#define RLIM_SAVED_CUR RLIM_INFINITY
|
||||
#define RLIM_SAVED_MAX RLIM_INFINITY
|
||||
|
||||
#define RLIMIT_CPU 0
|
||||
#define RLIMIT_FSIZE 1
|
||||
#define RLIMIT_DATA 2
|
||||
#define RLIMIT_STACK 3
|
||||
#define RLIMIT_CORE 4
|
||||
#define RLIMIT_RSS 5
|
||||
#define RLIMIT_NOFILE 7
|
||||
#define RLIMIT_AS 9
|
||||
#define RLIMIT_NPROC 6
|
||||
#define RLIMIT_MEMLOCK 8
|
||||
#define RLIMIT_LOCKS 10
|
||||
|
||||
|
||||
|
||||
#endif
|
34
05/musl-final/include/sys/select.h
Normal file
34
05/musl-final/include/sys/select.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
#ifndef _SYS_SELECT_H
|
||||
#define _SYS_SELECT_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define __NEED_size_t
|
||||
#define __NEED_time_t
|
||||
#define __NEED_struct_timeval
|
||||
#define __NEED_struct_timespec
|
||||
#define __NEED_sigset_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#define FD_SETSIZE 1024
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned long fds_bits[FD_SETSIZE / 8 / sizeof(long)];
|
||||
} fd_set;
|
||||
|
||||
#define FD_ZERO(s) do { int __i; unsigned long *__b=(s)->fds_bits; for(__i=sizeof (fd_set)/sizeof (long); __i; __i--) *__b++=0; } while(0)
|
||||
#define FD_SET(d, s) ((s)->fds_bits[(d)/(8*sizeof(long))] |= (1<<((d)%(8*sizeof(long)))))
|
||||
#define FD_CLR(d, s) ((s)->fds_bits[(d)/(8*sizeof(long))] &= ~(1<<((d)%(8*sizeof(long)))))
|
||||
#define FD_ISSET(d, s) ((s)->fds_bits[(d)/(8*sizeof(long))] & (1<<((d)%(8*sizeof(long)))))
|
||||
|
||||
int select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
|
||||
int pselect (int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
69
05/musl-final/include/sys/sem.h
Normal file
69
05/musl-final/include/sys/sem.h
Normal file
|
@ -0,0 +1,69 @@
|
|||
#ifndef _SYS_SEM_H
|
||||
#define _SYS_SEM_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define __NEED_size_t
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#include <sys/ipc.h>
|
||||
|
||||
#define SEM_UNDO 0x1000
|
||||
#define GETPID 11
|
||||
#define GETVAL 12
|
||||
#define GETALL 13
|
||||
#define GETNCNT 14
|
||||
#define GETZCNT 15
|
||||
#define SETVAL 16
|
||||
#define SETALL 17
|
||||
|
||||
struct semid_ds {
|
||||
struct ipc_perm sem_perm;
|
||||
long sem_otime;
|
||||
unsigned long __unused1;
|
||||
long sem_ctime;
|
||||
unsigned long __unused2;
|
||||
unsigned long sem_nsems;
|
||||
unsigned long __unused3;
|
||||
unsigned long __unused4;
|
||||
};
|
||||
|
||||
#define _SEM_SEMUN_UNDEFINED 1
|
||||
|
||||
#define SEM_STAT 18
|
||||
#define SEM_INFO 19
|
||||
|
||||
struct seminfo {
|
||||
int semmap;
|
||||
int semmni;
|
||||
int semmns;
|
||||
int semmnu;
|
||||
int semmsl;
|
||||
int semopm;
|
||||
int semume;
|
||||
int semusz;
|
||||
int semvmx;
|
||||
int semaem;
|
||||
};
|
||||
|
||||
struct sembuf {
|
||||
unsigned short sem_num;
|
||||
short sem_op;
|
||||
short sem_flg;
|
||||
};
|
||||
|
||||
int semctl(int, int, int, ...);
|
||||
int semget(key_t, int, int);
|
||||
int semop(int, struct sembuf *, size_t);
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#define __NEED_struct_timespec
|
||||
#include <bits/alltypes.h>
|
||||
int semtimedop(int, struct sembuf *, size_t, const struct timespec *);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
18
05/musl-final/include/sys/shm.h
Normal file
18
05/musl-final/include/sys/shm.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef _SYS_SHM_H
|
||||
#define _SYS_SHM_H
|
||||
|
||||
#define __NEED_time_t
|
||||
#define __NEED_size_t
|
||||
#define __NEED_pid_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#include <sys/ipc.h>
|
||||
#include <bits/shm.h>
|
||||
|
||||
void *shmat(int, const void *, int);
|
||||
int shmctl(int, int, struct shmid_ds *);
|
||||
int shmdt(const void *);
|
||||
int shmget(key_t, size_t, int);
|
||||
|
||||
#endif
|
40
05/musl-final/include/sys/signalfd.h
Normal file
40
05/musl-final/include/sys/signalfd.h
Normal file
|
@ -0,0 +1,40 @@
|
|||
#ifndef _SYS_SIGNALFD_H
|
||||
#define _SYS_SIGNALFD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define __NEED_sigset_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
int signalfd(int, const sigset_t *, int);
|
||||
|
||||
struct signalfd_siginfo {
|
||||
uint32_t ssi_signo;
|
||||
int32_t ssi_errno;
|
||||
int32_t ssi_code;
|
||||
uint32_t ssi_pid;
|
||||
uint32_t ssi_uid;
|
||||
int32_t ssi_fd;
|
||||
uint32_t ssi_tid;
|
||||
uint32_t ssi_band;
|
||||
uint32_t ssi_overrun;
|
||||
uint32_t ssi_trapno;
|
||||
int32_t ssi_status;
|
||||
int32_t ssi_int;
|
||||
uintptr_t ssi_ptr;
|
||||
uint64_t ssi_utime;
|
||||
uint64_t ssi_stime;
|
||||
uint64_t ssi_addr;
|
||||
uint8_t pad[128-12*4-sizeof(void *)-3*8];
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
65
05/musl-final/include/sys/socket.h
Normal file
65
05/musl-final/include/sys/socket.h
Normal file
|
@ -0,0 +1,65 @@
|
|||
#ifndef _SYS_SOCKET_H
|
||||
#define _SYS_SOCKET_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#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.h>
|
||||
|
||||
#include <bits/socket.h>
|
||||
|
||||
struct sockaddr
|
||||
{
|
||||
sa_family_t sa_family;
|
||||
char sa_data[14];
|
||||
};
|
||||
|
||||
struct sockaddr_storage
|
||||
{
|
||||
sa_family_t ss_family;
|
||||
long long __ss_align;
|
||||
char __ss_padding[128 - sizeof(sa_family_t) - sizeof(long long)];
|
||||
};
|
||||
|
||||
int socket (int, int, int);
|
||||
int socketpair (int, int, int, int [2]);
|
||||
|
||||
int shutdown (int, int);
|
||||
|
||||
int bind (int, const struct sockaddr *, socklen_t);
|
||||
int connect (int, const struct sockaddr *, socklen_t);
|
||||
int listen (int, int);
|
||||
int accept (int, struct sockaddr *, socklen_t *);
|
||||
|
||||
int getsockname (int, struct sockaddr *, socklen_t *);
|
||||
int getpeername (int, struct sockaddr *, socklen_t *);
|
||||
|
||||
ssize_t send (int, const void *, size_t, int);
|
||||
ssize_t recv (int, void *, size_t, int);
|
||||
ssize_t sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
|
||||
ssize_t recvfrom (int, void *, size_t, int, struct sockaddr *, socklen_t *);
|
||||
ssize_t sendmsg (int, const struct msghdr *, int);
|
||||
ssize_t recvmsg (int, struct msghdr *, int);
|
||||
|
||||
int getsockopt (int, int, int, void *, socklen_t *);
|
||||
int setsockopt (int, int, int, const void *, socklen_t);
|
||||
|
||||
int sockatmark (int);
|
||||
|
||||
#define SHUT_RD 0
|
||||
#define SHUT_WR 1
|
||||
#define SHUT_RDWR 2
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
1
05/musl-final/include/sys/soundcard.h
Normal file
1
05/musl-final/include/sys/soundcard.h
Normal file
|
@ -0,0 +1 @@
|
|||
#include <linux/soundcard.h>
|
95
05/musl-final/include/sys/stat.h
Normal file
95
05/musl-final/include/sys/stat.h
Normal file
|
@ -0,0 +1,95 @@
|
|||
#ifndef _SYS_STAT_H
|
||||
#define _SYS_STAT_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#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_blkcnt_t
|
||||
#define __NEED_struct_timespec
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#include <bits/stat.h>
|
||||
|
||||
#define st_atime st_atim.tv_sec
|
||||
#define st_mtime st_mtim.tv_sec
|
||||
#define st_ctime st_ctim.tv_sec
|
||||
|
||||
#define S_IFMT 0170000
|
||||
|
||||
#define S_IFDIR 0040000
|
||||
#define S_IFCHR 0020000
|
||||
#define S_IFBLK 0060000
|
||||
#define S_IFREG 0100000
|
||||
#define S_IFIFO 0010000
|
||||
#define S_IFLNK 0120000
|
||||
#define S_IFSOCK 0140000
|
||||
|
||||
#define S_TYPEISMQ(buf) 0
|
||||
#define S_TYPEISSEM(buf) 0
|
||||
#define S_TYPEISSHM(buf) 0
|
||||
#define S_TYPEISTMO(buf) 0
|
||||
|
||||
#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
|
||||
#define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR)
|
||||
#define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK)
|
||||
#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
|
||||
#define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO)
|
||||
#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
|
||||
#define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK)
|
||||
|
||||
#define S_ISUID 04000
|
||||
#define S_ISGID 02000
|
||||
#define S_ISVTX 01000
|
||||
|
||||
#define S_IREAD 0400
|
||||
#define S_IWRITE 0200
|
||||
#define S_IEXEC 0100
|
||||
|
||||
#define S_IRUSR 0400
|
||||
#define S_IWUSR 0200
|
||||
#define S_IXUSR 0100
|
||||
#define S_IRWXU 0700
|
||||
|
||||
#define S_IRGRP 0040
|
||||
#define S_IWGRP 0020
|
||||
#define S_IXGRP 0010
|
||||
#define S_IRWXG 0070
|
||||
|
||||
#define S_IROTH 0004
|
||||
#define S_IWOTH 0002
|
||||
#define S_IXOTH 0001
|
||||
#define S_IRWXO 0007
|
||||
|
||||
|
||||
int stat(const char *, struct stat *);
|
||||
int fstat(int, struct stat *);
|
||||
int lstat(const char *, struct stat *);
|
||||
int fstatat(int, const char *, struct stat *, int);
|
||||
int chmod(const char *, mode_t);
|
||||
int fchmod(int, mode_t);
|
||||
int fchmodat(int, const char *, mode_t, int);
|
||||
mode_t umask(mode_t);
|
||||
int mkdir(const char *, mode_t);
|
||||
int mknod(const char *, mode_t, dev_t);
|
||||
int mkfifo(const char *, mode_t);
|
||||
int mkdirat(int, const char *, mode_t);
|
||||
int mknodat(int, const char *, mode_t, dev_t);
|
||||
int mkfifoat(int, const char *, mode_t);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
10
05/musl-final/include/sys/statfs.h
Normal file
10
05/musl-final/include/sys/statfs.h
Normal file
|
@ -0,0 +1,10 @@
|
|||
#ifndef _SYS_STATFS_H
|
||||
#define _SYS_STATFS_H
|
||||
|
||||
#include <sys/statvfs.h>
|
||||
|
||||
#define statfs statvfs
|
||||
#define fstatfs fstatvfs
|
||||
#define f_namelen f_namemax
|
||||
|
||||
#endif
|
30
05/musl-final/include/sys/statvfs.h
Normal file
30
05/musl-final/include/sys/statvfs.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
#ifndef _SYS_STATVFS_H
|
||||
#define _SYS_STATVFS_H
|
||||
|
||||
|
||||
#define __NEED_fsblkcnt_t
|
||||
#define __NEED_fsfilcnt_t
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#include <bits/statfs.h>
|
||||
|
||||
int statvfs (const char *, struct statvfs *);
|
||||
int fstatvfs (int, struct statvfs *);
|
||||
|
||||
#define ST_RDONLY 1
|
||||
#define ST_NOSUID 2
|
||||
|
||||
#if 0
|
||||
#define ST_NODEV 4
|
||||
#define ST_NOEXEC 8
|
||||
#define ST_SYNCHRONOUS 16
|
||||
#define ST_MANDLOCK 64
|
||||
#define ST_WRITE 128
|
||||
#define ST_APPEND 256
|
||||
#define ST_IMMUTABLE 512
|
||||
#define ST_NOATIME 1024
|
||||
#define ST_NODIRATIME 2048
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
1
05/musl-final/include/sys/stropts.h
Normal file
1
05/musl-final/include/sys/stropts.h
Normal file
|
@ -0,0 +1 @@
|
|||
#include <stropts.h>
|
11
05/musl-final/include/sys/swap.h
Normal file
11
05/musl-final/include/sys/swap.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#ifndef _SYS_SWAP_H
|
||||
#define _SYS_SWAP_H
|
||||
|
||||
#define SWAP_FLAG_PREFER 0x8000
|
||||
#define SWAP_FLAG_PRIO_MASK 0x7fff
|
||||
#define SWAP_FLAG_PRIO_SHIFT 0
|
||||
|
||||
int swapon (const char *, int);
|
||||
int swapoff (const char *);
|
||||
|
||||
#endif
|
9
05/musl-final/include/sys/sysctl.h
Normal file
9
05/musl-final/include/sys/sysctl.h
Normal file
|
@ -0,0 +1,9 @@
|
|||
#ifndef _SYS_SYSCTL_H
|
||||
#define _SYS_SYSCTL_H
|
||||
|
||||
#define __NEED_size_t
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
int sysctl (int *, int, void *, size_t *, void *, size_t);
|
||||
|
||||
#endif
|
29
05/musl-final/include/sys/sysinfo.h
Normal file
29
05/musl-final/include/sys/sysinfo.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#ifndef _SYS_SYSINFO_H
|
||||
#define _SYS_SYSINFO_H
|
||||
|
||||
/* ?? */
|
||||
#define SI_LOAD_SHIFT 16
|
||||
|
||||
struct sysinfo {
|
||||
unsigned long long uptime;
|
||||
unsigned long loads[3];
|
||||
unsigned long procs;
|
||||
unsigned long long totalram;
|
||||
unsigned long long freeram;
|
||||
unsigned long long sharedram;
|
||||
unsigned long long bufferram;
|
||||
unsigned long long totalswap;
|
||||
unsigned long long freeswap;
|
||||
unsigned long long totalhigh;
|
||||
unsigned long long freehigh;
|
||||
unsigned long mem_unit;
|
||||
char __reserved[256];
|
||||
};
|
||||
|
||||
int sysinfo (struct sysinfo *);
|
||||
int get_nprocs_conf (void);
|
||||
int get_nprocs (void);
|
||||
long long get_phys_pages (void);
|
||||
long long get_avphys_pages (void);
|
||||
|
||||
#endif
|
6
05/musl-final/include/sys/sysmacros.h
Normal file
6
05/musl-final/include/sys/sysmacros.h
Normal file
|
@ -0,0 +1,6 @@
|
|||
#ifndef _SYSMACROS_H
|
||||
#define _SYSMACROS_H
|
||||
|
||||
#include <bits/sysmacros.h>
|
||||
|
||||
#endif
|
49
05/musl-final/include/sys/time.h
Normal file
49
05/musl-final/include/sys/time.h
Normal file
|
@ -0,0 +1,49 @@
|
|||
#ifndef _SYS_TIME_H
|
||||
#define _SYS_TIME_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* All symbols from select.h except pselect are required anyway... */
|
||||
#include <sys/select.h>
|
||||
|
||||
#define __NEED_time_t
|
||||
#define __NEED_suseconds_t
|
||||
#define __NEED_struct_timeval
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
|
||||
|
||||
int gettimeofday (struct timeval *, void *);
|
||||
|
||||
/* extensions */
|
||||
int settimeofday (const struct timeval *, void *);
|
||||
int adjtime (const struct timeval *, struct timeval *);
|
||||
|
||||
|
||||
#define ITIMER_REAL 0
|
||||
#define ITIMER_VIRTUAL 1
|
||||
#define ITIMER_PROF 2
|
||||
|
||||
struct itimerval
|
||||
{
|
||||
struct timeval it_interval;
|
||||
struct timeval it_value;
|
||||
};
|
||||
|
||||
int getitimer (int, struct itimerval *);
|
||||
int setitimer (int, const struct itimerval *, struct itimerval *);
|
||||
int utimes (const char *, const struct timeval [2]);
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
struct timezone {
|
||||
int tz_minuteswest;
|
||||
int tz_dsttime;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
17
05/musl-final/include/sys/times.h
Normal file
17
05/musl-final/include/sys/times.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
#ifndef _SYS_TIMES_H
|
||||
#define _SYS_TIMES_H
|
||||
|
||||
#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 *);
|
||||
|
||||
#endif
|
70
05/musl-final/include/sys/types.h
Normal file
70
05/musl-final/include/sys/types.h
Normal file
|
@ -0,0 +1,70 @@
|
|||
#ifndef _SYS_TYPES_H
|
||||
#define _SYS_TYPES_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define __NEED_loff_t
|
||||
#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
|
||||
#define __NEED_time_t
|
||||
#define __NEED_timer_t
|
||||
#define __NEED_clockid_t
|
||||
|
||||
#define __NEED_int8_t
|
||||
#define __NEED_int16_t
|
||||
#define __NEED_int32_t
|
||||
#define __NEED_int64_t
|
||||
|
||||
#define __NEED_u_int8_t
|
||||
#define __NEED_u_int16_t
|
||||
#define __NEED_u_int32_t
|
||||
#define __NEED_u_int64_t
|
||||
|
||||
#define __NEED_register_t
|
||||
|
||||
#define __NEED_blkcnt_t
|
||||
#define __NEED_fsblkcnt_t
|
||||
#define __NEED_fsfilcnt_t
|
||||
|
||||
#define __NEED_id_t
|
||||
#define __NEED_key_t
|
||||
#define __NEED_clock_t
|
||||
#define __NEED_useconds_t
|
||||
#define __NEED_suseconds_t
|
||||
#define __NEED_blksize_t
|
||||
|
||||
#define __NEED_pthread_t
|
||||
#define __NEED_pthread_attr_t
|
||||
#define __NEED_pthread_mutexattr_t
|
||||
#define __NEED_pthread_condattr_t
|
||||
#define __NEED_pthread_rwlockattr_t
|
||||
#define __NEED_pthread_barrierattr_t
|
||||
#define __NEED_pthread_mutex_t
|
||||
#define __NEED_pthread_cond_t
|
||||
#define __NEED_pthread_rwlock_t
|
||||
#define __NEED_pthread_barrier_t
|
||||
#define __NEED_pthread_spinlock_t
|
||||
#define __NEED_pthread_key_t
|
||||
#define __NEED_pthread_once_t
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
typedef unsigned long caddr_t;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
1
05/musl-final/include/sys/ucontext.h
Normal file
1
05/musl-final/include/sys/ucontext.h
Normal file
|
@ -0,0 +1 @@
|
|||
#include <ucontext.h>
|
13
05/musl-final/include/sys/uio.h
Normal file
13
05/musl-final/include/sys/uio.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef _SYS_UIO_H
|
||||
#define _SYS_UIO_H
|
||||
|
||||
#define __NEED_size_t
|
||||
#define __NEED_ssize_t
|
||||
#define __NEED_struct_iovec
|
||||
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
ssize_t readv (int, const struct iovec *, int);
|
||||
ssize_t writev (int, const struct iovec *, int);
|
||||
|
||||
#endif
|
13
05/musl-final/include/sys/un.h
Normal file
13
05/musl-final/include/sys/un.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#ifndef _SYS_UN_H
|
||||
#define _SYS_UN_H
|
||||
|
||||
#define __NEED_sa_family_t
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
struct sockaddr_un
|
||||
{
|
||||
sa_family_t sun_family;
|
||||
char sun_path[108];
|
||||
};
|
||||
|
||||
#endif
|
15
05/musl-final/include/sys/user.h
Normal file
15
05/musl-final/include/sys/user.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef _SYS_USER_H
|
||||
#define _SYS_USER_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <bits/user.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
21
05/musl-final/include/sys/utsname.h
Normal file
21
05/musl-final/include/sys/utsname.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef _SYS_UTSNAME_H
|
||||
#define _SYS_UTSNAME_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 *);
|
||||
|
||||
|
||||
#endif
|
1
05/musl-final/include/sys/vfs.h
Normal file
1
05/musl-final/include/sys/vfs.h
Normal file
|
@ -0,0 +1 @@
|
|||
#include <sys/statfs.h>
|
1
05/musl-final/include/sys/vt.h
Normal file
1
05/musl-final/include/sys/vt.h
Normal file
|
@ -0,0 +1 @@
|
|||
#include <linux/vt.h>
|
28
05/musl-final/include/sys/wait.h
Normal file
28
05/musl-final/include/sys/wait.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef _SYS_WAIT_H
|
||||
#define _SYS_WAIT_H
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define __NEED_pid_t
|
||||
#define __NEED_id_t
|
||||
#define __NEED_time_t
|
||||
#define __NEED_struct_timeval
|
||||
#define __NEED_siginfo_t
|
||||
#include <bits/alltypes.h>
|
||||
|
||||
typedef int idtype_t;
|
||||
|
||||
pid_t wait (int *);
|
||||
int waitid (idtype_t, id_t, siginfo_t *, int);
|
||||
pid_t waitpid (pid_t, int *, int );
|
||||
//pid_t wait3 (int *, int, struct rusage *);
|
||||
//pid_t wait4 (pid_t, int *, int, struct rusage *);
|
||||
|
||||
#include <bits/wait.h>
|
||||
#include <bits/wexitstatus.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue