17777dab0Sopenharmony_ci#ifndef	_UNISTD_H
27777dab0Sopenharmony_ci#define	_UNISTD_H
37777dab0Sopenharmony_ci
47777dab0Sopenharmony_ci#ifdef __cplusplus
57777dab0Sopenharmony_ciextern "C" {
67777dab0Sopenharmony_ci#endif
77777dab0Sopenharmony_ci
87777dab0Sopenharmony_ci#include <features.h>
97777dab0Sopenharmony_ci
107777dab0Sopenharmony_ci#define STDIN_FILENO  0
117777dab0Sopenharmony_ci#define STDOUT_FILENO 1
127777dab0Sopenharmony_ci#define STDERR_FILENO 2
137777dab0Sopenharmony_ci
147777dab0Sopenharmony_ci#define SEEK_SET 0
157777dab0Sopenharmony_ci#define SEEK_CUR 1
167777dab0Sopenharmony_ci#define SEEK_END 2
177777dab0Sopenharmony_ci
187777dab0Sopenharmony_ci#ifdef __cplusplus
197777dab0Sopenharmony_ci#define NULL 0L
207777dab0Sopenharmony_ci#else
217777dab0Sopenharmony_ci#define NULL ((void*)0)
227777dab0Sopenharmony_ci#endif
237777dab0Sopenharmony_ci
247777dab0Sopenharmony_ci#define __NEED_size_t
257777dab0Sopenharmony_ci#define __NEED_ssize_t
267777dab0Sopenharmony_ci#define __NEED_uid_t
277777dab0Sopenharmony_ci#define __NEED_gid_t
287777dab0Sopenharmony_ci#define __NEED_off_t
297777dab0Sopenharmony_ci#define __NEED_pid_t
307777dab0Sopenharmony_ci#define __NEED_intptr_t
317777dab0Sopenharmony_ci#define __NEED_useconds_t
327777dab0Sopenharmony_ci
337777dab0Sopenharmony_ci#include <bits/alltypes.h>
347777dab0Sopenharmony_ci
357777dab0Sopenharmony_ciint pipe(int [2]);
367777dab0Sopenharmony_ciint pipe2(int [2], int);
377777dab0Sopenharmony_ciint close(int);
387777dab0Sopenharmony_ciint dup(int);
397777dab0Sopenharmony_ciint dup2(int, int);
407777dab0Sopenharmony_ciint dup3(int, int, int);
417777dab0Sopenharmony_cioff_t lseek(int, off_t, int);
427777dab0Sopenharmony_ciint fsync(int);
437777dab0Sopenharmony_ciint fdatasync(int);
447777dab0Sopenharmony_ci
457777dab0Sopenharmony_cissize_t read(int, void *, size_t);
467777dab0Sopenharmony_cissize_t write(int, const void *, size_t);
477777dab0Sopenharmony_cissize_t pread(int, void *, size_t, off_t);
487777dab0Sopenharmony_cissize_t pwrite(int, const void *, size_t, off_t);
497777dab0Sopenharmony_ci
507777dab0Sopenharmony_ciint chown(const char *, uid_t, gid_t);
517777dab0Sopenharmony_ciint fchown(int, uid_t, gid_t);
527777dab0Sopenharmony_ciint lchown(const char *, uid_t, gid_t);
537777dab0Sopenharmony_ciint fchownat(int, const char *, uid_t, gid_t, int);
547777dab0Sopenharmony_ci
557777dab0Sopenharmony_ciint link(const char *, const char *);
567777dab0Sopenharmony_ciint linkat(int, const char *, int, const char *, int);
577777dab0Sopenharmony_ciint symlink(const char *, const char *);
587777dab0Sopenharmony_ciint symlinkat(const char *, int, const char *);
597777dab0Sopenharmony_cissize_t readlink(const char *__restrict, char *__restrict, size_t);
607777dab0Sopenharmony_cissize_t readlinkat(int, const char *__restrict, char *__restrict, size_t);
617777dab0Sopenharmony_ciint unlink(const char *);
627777dab0Sopenharmony_ciint unlinkat(int, const char *, int);
637777dab0Sopenharmony_ciint rmdir(const char *);
647777dab0Sopenharmony_ciint truncate(const char *, off_t);
657777dab0Sopenharmony_ciint ftruncate(int, off_t);
667777dab0Sopenharmony_ci
677777dab0Sopenharmony_ci#define F_OK 0
687777dab0Sopenharmony_ci#define R_OK 4
697777dab0Sopenharmony_ci#define W_OK 2
707777dab0Sopenharmony_ci#define X_OK 1
717777dab0Sopenharmony_ci
727777dab0Sopenharmony_ciint access(const char *, int);
737777dab0Sopenharmony_ciint faccessat(int, const char *, int, int);
747777dab0Sopenharmony_ci
757777dab0Sopenharmony_ciint chdir(const char *);
767777dab0Sopenharmony_ciint fchdir(int);
777777dab0Sopenharmony_cichar *getcwd(char *, size_t);
787777dab0Sopenharmony_ci
797777dab0Sopenharmony_ciunsigned alarm(unsigned);
807777dab0Sopenharmony_ciunsigned sleep(unsigned);
817777dab0Sopenharmony_ciint pause(void);
827777dab0Sopenharmony_ci
837777dab0Sopenharmony_cipid_t fork(void);
847777dab0Sopenharmony_ciint execve(const char *, char *const [], char *const []);
857777dab0Sopenharmony_ciint execv(const char *, char *const []);
867777dab0Sopenharmony_ciint execle(const char *, const char *, ...);
877777dab0Sopenharmony_ciint execl(const char *, const char *, ...);
887777dab0Sopenharmony_ciint execvp(const char *, char *const []);
897777dab0Sopenharmony_ciint execlp(const char *, const char *, ...);
907777dab0Sopenharmony_ciint fexecve(int, char *const [], char *const []);
917777dab0Sopenharmony_ci_Noreturn void _exit(int);
927777dab0Sopenharmony_ci
937777dab0Sopenharmony_cipid_t getpid(void);
947777dab0Sopenharmony_cipid_t getppid(void);
957777dab0Sopenharmony_cipid_t getpgrp(void);
967777dab0Sopenharmony_cipid_t getpgid(pid_t);
977777dab0Sopenharmony_ciint setpgid(pid_t, pid_t);
987777dab0Sopenharmony_cipid_t setsid(void);
997777dab0Sopenharmony_cipid_t getsid(pid_t);
1007777dab0Sopenharmony_cichar *ttyname(int);
1017777dab0Sopenharmony_ciint ttyname_r(int, char *, size_t);
1027777dab0Sopenharmony_ciint isatty(int);
1037777dab0Sopenharmony_cipid_t tcgetpgrp(int);
1047777dab0Sopenharmony_ciint tcsetpgrp(int, pid_t);
1057777dab0Sopenharmony_ci
1067777dab0Sopenharmony_ciuid_t getuid(void);
1077777dab0Sopenharmony_ciuid_t geteuid(void);
1087777dab0Sopenharmony_cigid_t getgid(void);
1097777dab0Sopenharmony_cigid_t getegid(void);
1107777dab0Sopenharmony_ciint getgroups(int, gid_t []);
1117777dab0Sopenharmony_ciint setuid(uid_t);
1127777dab0Sopenharmony_ciint seteuid(uid_t);
1137777dab0Sopenharmony_ciint setgid(gid_t);
1147777dab0Sopenharmony_ciint setegid(gid_t);
1157777dab0Sopenharmony_ci
1167777dab0Sopenharmony_cichar *getlogin(void);
1177777dab0Sopenharmony_ciint getlogin_r(char *, size_t);
1187777dab0Sopenharmony_ciint gethostname(char *, size_t);
1197777dab0Sopenharmony_cichar *ctermid(char *);
1207777dab0Sopenharmony_ci
1217777dab0Sopenharmony_ciint getopt(int, char * const [], const char *);
1227777dab0Sopenharmony_ciextern char *optarg;
1237777dab0Sopenharmony_ciextern int optind, opterr, optopt;
1247777dab0Sopenharmony_ci
1257777dab0Sopenharmony_cilong pathconf(const char *, int);
1267777dab0Sopenharmony_cilong fpathconf(int, int);
1277777dab0Sopenharmony_cilong sysconf(int);
1287777dab0Sopenharmony_cisize_t confstr(int, char *, size_t);
1297777dab0Sopenharmony_ci
1307777dab0Sopenharmony_ci#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
1317777dab0Sopenharmony_ci#define F_ULOCK 0
1327777dab0Sopenharmony_ci#define F_LOCK  1
1337777dab0Sopenharmony_ci#define F_TLOCK 2
1347777dab0Sopenharmony_ci#define F_TEST  3
1357777dab0Sopenharmony_ciint setreuid(uid_t, uid_t);
1367777dab0Sopenharmony_ciint setregid(gid_t, gid_t);
1377777dab0Sopenharmony_ciint lockf(int, int, off_t);
1387777dab0Sopenharmony_ciint nice(int);
1397777dab0Sopenharmony_civoid sync(void);
1407777dab0Sopenharmony_cipid_t setpgrp(void);
1417777dab0Sopenharmony_ci
1427777dab0Sopenharmony_ci/**
1437777dab0Sopenharmony_ci * @brief Encrypts a password using the DES algorithm
1447777dab0Sopenharmony_ci *
1457777dab0Sopenharmony_ci * The `crypt` function encrypts the given password string using the DES algorithm
1467777dab0Sopenharmony_ci * and returns the encrypted string. It is commonly used for storing and verifying user passwords
1477777dab0Sopenharmony_ci *
1487777dab0Sopenharmony_ci * @param (const char *) The password string to be encrypted.
1497777dab0Sopenharmony_ci * @param (const char *) The salt value string used to increase the randomness of encryption
1507777dab0Sopenharmony_ci *
1517777dab0Sopenharmony_ci * @return Return the encrypted string or NULL in case of an error.
1527777dab0Sopenharmony_ci * @since 12
1537777dab0Sopenharmony_ci*/
1547777dab0Sopenharmony_cichar *crypt(const char *, const char *);
1557777dab0Sopenharmony_civoid swab(const void *__restrict, void *__restrict, ssize_t);
1567777dab0Sopenharmony_ci#endif
1577777dab0Sopenharmony_ci
1587777dab0Sopenharmony_ci#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \
1597777dab0Sopenharmony_ci || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
1607777dab0Sopenharmony_ciint usleep(unsigned);
1617777dab0Sopenharmony_ci#endif
1627777dab0Sopenharmony_ci
1637777dab0Sopenharmony_ci#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
1647777dab0Sopenharmony_ci#define L_SET 0
1657777dab0Sopenharmony_ci#define L_INCR 1
1667777dab0Sopenharmony_ci#define L_XTND 2
1677777dab0Sopenharmony_ciint brk(void *);
1687777dab0Sopenharmony_civoid *sbrk(intptr_t);
1697777dab0Sopenharmony_cipid_t vfork(void);
1707777dab0Sopenharmony_ciint chroot(const char *);
1717777dab0Sopenharmony_ciint getpagesize(void);
1727777dab0Sopenharmony_ciint getdtablesize(void);
1737777dab0Sopenharmony_ciint sethostname(const char *, size_t);
1747777dab0Sopenharmony_ciint getdomainname(char *, size_t);
1757777dab0Sopenharmony_ciint setdomainname(const char *, size_t);
1767777dab0Sopenharmony_ciint setgroups(size_t, const gid_t *);
1777777dab0Sopenharmony_ciint daemon(int, int);
1787777dab0Sopenharmony_ciint acct(const char *);
1797777dab0Sopenharmony_cilong syscall(long, ...);
1807777dab0Sopenharmony_ciint execvpe(const char *, char *const [], char *const []);
1817777dab0Sopenharmony_ciint issetugid(void);
1827777dab0Sopenharmony_ciint getentropy(void *, size_t);
1837777dab0Sopenharmony_ciextern int optreset;
1847777dab0Sopenharmony_ci#endif
1857777dab0Sopenharmony_ci
1867777dab0Sopenharmony_ci#ifdef _GNU_SOURCE
1877777dab0Sopenharmony_ciextern char **environ;
1887777dab0Sopenharmony_ciint setresuid(uid_t, uid_t, uid_t);
1897777dab0Sopenharmony_ciint setresgid(gid_t, gid_t, gid_t);
1907777dab0Sopenharmony_ciint getresuid(uid_t *, uid_t *, uid_t *);
1917777dab0Sopenharmony_ciint getresgid(gid_t *, gid_t *, gid_t *);
1927777dab0Sopenharmony_ciint syncfs(int);
1937777dab0Sopenharmony_ci
1947777dab0Sopenharmony_ci/**
1957777dab0Sopenharmony_ci * @brief Check permissions and existence of the file identified by pathname.
1967777dab0Sopenharmony_ci *
1977777dab0Sopenharmony_ci * @param (const char *) Path to the file.
1987777dab0Sopenharmony_ci * @param (int) The access permissions to be tested.
1997777dab0Sopenharmony_ci *
2007777dab0Sopenharmony_ci * @return On success, zero is returned. On error, -1 is returned
2017777dab0Sopenharmony_ci *
2027777dab0Sopenharmony_ci * @since 12
2037777dab0Sopenharmony_ci*/
2047777dab0Sopenharmony_ciint eaccess(const char *, int);
2057777dab0Sopenharmony_cissize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
2067777dab0Sopenharmony_cipid_t gettid(void);
2077777dab0Sopenharmony_ci#endif
2087777dab0Sopenharmony_ci
2097777dab0Sopenharmony_ci#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
2107777dab0Sopenharmony_ci#define lseek64 lseek
2117777dab0Sopenharmony_ci#define pread64 pread
2127777dab0Sopenharmony_ci#define pwrite64 pwrite
2137777dab0Sopenharmony_ci#define truncate64 truncate
2147777dab0Sopenharmony_ci#define ftruncate64 ftruncate
2157777dab0Sopenharmony_ci#define lockf64 lockf
2167777dab0Sopenharmony_ci#define off64_t off_t
2177777dab0Sopenharmony_ci#endif
2187777dab0Sopenharmony_ci
2197777dab0Sopenharmony_ci#define POSIX_CLOSE_RESTART     0
2207777dab0Sopenharmony_ci
2217777dab0Sopenharmony_ci#define _XOPEN_VERSION          700
2227777dab0Sopenharmony_ci#define _XOPEN_UNIX             1
2237777dab0Sopenharmony_ci#define _XOPEN_ENH_I18N         1
2247777dab0Sopenharmony_ci
2257777dab0Sopenharmony_ci#define _POSIX_VERSION          200809L
2267777dab0Sopenharmony_ci#define _POSIX2_VERSION         _POSIX_VERSION
2277777dab0Sopenharmony_ci
2287777dab0Sopenharmony_ci#define _POSIX_ADVISORY_INFO    _POSIX_VERSION
2297777dab0Sopenharmony_ci#define _POSIX_CHOWN_RESTRICTED 1
2307777dab0Sopenharmony_ci#define _POSIX_IPV6             _POSIX_VERSION
2317777dab0Sopenharmony_ci#define _POSIX_JOB_CONTROL      1
2327777dab0Sopenharmony_ci#define _POSIX_MAPPED_FILES     _POSIX_VERSION
2337777dab0Sopenharmony_ci#define _POSIX_MEMLOCK          _POSIX_VERSION
2347777dab0Sopenharmony_ci#define _POSIX_MEMLOCK_RANGE    _POSIX_VERSION
2357777dab0Sopenharmony_ci#define _POSIX_MEMORY_PROTECTION _POSIX_VERSION
2367777dab0Sopenharmony_ci#define _POSIX_MESSAGE_PASSING  _POSIX_VERSION
2377777dab0Sopenharmony_ci#define _POSIX_FSYNC            _POSIX_VERSION
2387777dab0Sopenharmony_ci#define _POSIX_NO_TRUNC         1
2397777dab0Sopenharmony_ci#define _POSIX_RAW_SOCKETS      _POSIX_VERSION
2407777dab0Sopenharmony_ci#define _POSIX_REALTIME_SIGNALS _POSIX_VERSION
2417777dab0Sopenharmony_ci#define _POSIX_REGEXP           1
2427777dab0Sopenharmony_ci#define _POSIX_SAVED_IDS        1
2437777dab0Sopenharmony_ci#define _POSIX_SHELL            1
2447777dab0Sopenharmony_ci#define _POSIX_SPAWN            _POSIX_VERSION
2457777dab0Sopenharmony_ci#define _POSIX_VDISABLE         0
2467777dab0Sopenharmony_ci
2477777dab0Sopenharmony_ci#define _POSIX_THREADS          _POSIX_VERSION
2487777dab0Sopenharmony_ci#define _POSIX_THREAD_PROCESS_SHARED _POSIX_VERSION
2497777dab0Sopenharmony_ci#define _POSIX_THREAD_SAFE_FUNCTIONS _POSIX_VERSION
2507777dab0Sopenharmony_ci#define _POSIX_THREAD_ATTR_STACKADDR _POSIX_VERSION
2517777dab0Sopenharmony_ci#define _POSIX_THREAD_ATTR_STACKSIZE _POSIX_VERSION
2527777dab0Sopenharmony_ci#define _POSIX_THREAD_PRIORITY_SCHEDULING _POSIX_VERSION
2537777dab0Sopenharmony_ci#define _POSIX_THREAD_CPUTIME   _POSIX_VERSION
2547777dab0Sopenharmony_ci#define _POSIX_TIMERS           _POSIX_VERSION
2557777dab0Sopenharmony_ci#define _POSIX_TIMEOUTS         _POSIX_VERSION
2567777dab0Sopenharmony_ci#define _POSIX_MONOTONIC_CLOCK  _POSIX_VERSION
2577777dab0Sopenharmony_ci#define _POSIX_CPUTIME          _POSIX_VERSION
2587777dab0Sopenharmony_ci#define _POSIX_CLOCK_SELECTION  _POSIX_VERSION
2597777dab0Sopenharmony_ci#define _POSIX_BARRIERS         _POSIX_VERSION
2607777dab0Sopenharmony_ci#define _POSIX_SPIN_LOCKS       _POSIX_VERSION
2617777dab0Sopenharmony_ci#define _POSIX_READER_WRITER_LOCKS _POSIX_VERSION
2627777dab0Sopenharmony_ci#define _POSIX_ASYNCHRONOUS_IO  _POSIX_VERSION
2637777dab0Sopenharmony_ci#define _POSIX_SEMAPHORES       _POSIX_VERSION
2647777dab0Sopenharmony_ci#define _POSIX_SHARED_MEMORY_OBJECTS _POSIX_VERSION
2657777dab0Sopenharmony_ci
2667777dab0Sopenharmony_ci#define _POSIX2_C_BIND          _POSIX_VERSION
2677777dab0Sopenharmony_ci
2687777dab0Sopenharmony_ci#include <bits/posix.h>
2697777dab0Sopenharmony_ci
2707777dab0Sopenharmony_ci
2717777dab0Sopenharmony_ci
2727777dab0Sopenharmony_ci#define _PC_LINK_MAX	0
2737777dab0Sopenharmony_ci#define _PC_MAX_CANON	1
2747777dab0Sopenharmony_ci#define _PC_MAX_INPUT	2
2757777dab0Sopenharmony_ci#define _PC_NAME_MAX	3
2767777dab0Sopenharmony_ci#define _PC_PATH_MAX	4
2777777dab0Sopenharmony_ci#define _PC_PIPE_BUF	5
2787777dab0Sopenharmony_ci#define _PC_CHOWN_RESTRICTED	6
2797777dab0Sopenharmony_ci#define _PC_NO_TRUNC	7
2807777dab0Sopenharmony_ci#define _PC_VDISABLE	8
2817777dab0Sopenharmony_ci#define _PC_SYNC_IO	9
2827777dab0Sopenharmony_ci#define _PC_ASYNC_IO	10
2837777dab0Sopenharmony_ci#define _PC_PRIO_IO	11
2847777dab0Sopenharmony_ci#define _PC_SOCK_MAXBUF	12
2857777dab0Sopenharmony_ci#define _PC_FILESIZEBITS	13
2867777dab0Sopenharmony_ci#define _PC_REC_INCR_XFER_SIZE	14
2877777dab0Sopenharmony_ci#define _PC_REC_MAX_XFER_SIZE	15
2887777dab0Sopenharmony_ci#define _PC_REC_MIN_XFER_SIZE	16
2897777dab0Sopenharmony_ci#define _PC_REC_XFER_ALIGN	17
2907777dab0Sopenharmony_ci#define _PC_ALLOC_SIZE_MIN	18
2917777dab0Sopenharmony_ci#define _PC_SYMLINK_MAX	19
2927777dab0Sopenharmony_ci#define _PC_2_SYMLINKS	20
2937777dab0Sopenharmony_ci
2947777dab0Sopenharmony_ci#define _SC_ARG_MAX	0
2957777dab0Sopenharmony_ci#define _SC_CHILD_MAX	1
2967777dab0Sopenharmony_ci#define _SC_CLK_TCK	2
2977777dab0Sopenharmony_ci#define _SC_NGROUPS_MAX	3
2987777dab0Sopenharmony_ci#define _SC_OPEN_MAX	4
2997777dab0Sopenharmony_ci#define _SC_STREAM_MAX	5
3007777dab0Sopenharmony_ci#define _SC_TZNAME_MAX	6
3017777dab0Sopenharmony_ci#define _SC_JOB_CONTROL	7
3027777dab0Sopenharmony_ci#define _SC_SAVED_IDS	8
3037777dab0Sopenharmony_ci#define _SC_REALTIME_SIGNALS	9
3047777dab0Sopenharmony_ci#define _SC_PRIORITY_SCHEDULING	10
3057777dab0Sopenharmony_ci#define _SC_TIMERS	11
3067777dab0Sopenharmony_ci#define _SC_ASYNCHRONOUS_IO	12
3077777dab0Sopenharmony_ci#define _SC_PRIORITIZED_IO	13
3087777dab0Sopenharmony_ci#define _SC_SYNCHRONIZED_IO	14
3097777dab0Sopenharmony_ci#define _SC_FSYNC	15
3107777dab0Sopenharmony_ci#define _SC_MAPPED_FILES	16
3117777dab0Sopenharmony_ci#define _SC_MEMLOCK	17
3127777dab0Sopenharmony_ci#define _SC_MEMLOCK_RANGE	18
3137777dab0Sopenharmony_ci#define _SC_MEMORY_PROTECTION	19
3147777dab0Sopenharmony_ci#define _SC_MESSAGE_PASSING	20
3157777dab0Sopenharmony_ci#define _SC_SEMAPHORES	21
3167777dab0Sopenharmony_ci#define _SC_SHARED_MEMORY_OBJECTS	22
3177777dab0Sopenharmony_ci#define _SC_AIO_LISTIO_MAX	23
3187777dab0Sopenharmony_ci#define _SC_AIO_MAX	24
3197777dab0Sopenharmony_ci#define _SC_AIO_PRIO_DELTA_MAX	25
3207777dab0Sopenharmony_ci#define _SC_DELAYTIMER_MAX	26
3217777dab0Sopenharmony_ci#define _SC_MQ_OPEN_MAX	27
3227777dab0Sopenharmony_ci#define _SC_MQ_PRIO_MAX	28
3237777dab0Sopenharmony_ci#define _SC_VERSION	29
3247777dab0Sopenharmony_ci#define _SC_PAGE_SIZE	30
3257777dab0Sopenharmony_ci#define _SC_PAGESIZE	30 /* !! */
3267777dab0Sopenharmony_ci#define _SC_RTSIG_MAX	31
3277777dab0Sopenharmony_ci#define _SC_SEM_NSEMS_MAX	32
3287777dab0Sopenharmony_ci#define _SC_SEM_VALUE_MAX	33
3297777dab0Sopenharmony_ci#define _SC_SIGQUEUE_MAX	34
3307777dab0Sopenharmony_ci#define _SC_TIMER_MAX	35
3317777dab0Sopenharmony_ci#define _SC_BC_BASE_MAX	36
3327777dab0Sopenharmony_ci#define _SC_BC_DIM_MAX	37
3337777dab0Sopenharmony_ci#define _SC_BC_SCALE_MAX	38
3347777dab0Sopenharmony_ci#define _SC_BC_STRING_MAX	39
3357777dab0Sopenharmony_ci#define _SC_COLL_WEIGHTS_MAX	40
3367777dab0Sopenharmony_ci#define _SC_EXPR_NEST_MAX	42
3377777dab0Sopenharmony_ci#define _SC_LINE_MAX	43
3387777dab0Sopenharmony_ci#define _SC_RE_DUP_MAX	44
3397777dab0Sopenharmony_ci#define _SC_2_VERSION	46
3407777dab0Sopenharmony_ci#define _SC_2_C_BIND	47
3417777dab0Sopenharmony_ci#define _SC_2_C_DEV	48
3427777dab0Sopenharmony_ci#define _SC_2_FORT_DEV	49
3437777dab0Sopenharmony_ci#define _SC_2_FORT_RUN	50
3447777dab0Sopenharmony_ci#define _SC_2_SW_DEV	51
3457777dab0Sopenharmony_ci#define _SC_2_LOCALEDEF	52
3467777dab0Sopenharmony_ci#define _SC_UIO_MAXIOV	60 /* !! */
3477777dab0Sopenharmony_ci#define _SC_IOV_MAX	60
3487777dab0Sopenharmony_ci#define _SC_THREADS	67
3497777dab0Sopenharmony_ci#define _SC_THREAD_SAFE_FUNCTIONS	68
3507777dab0Sopenharmony_ci#define _SC_GETGR_R_SIZE_MAX	69
3517777dab0Sopenharmony_ci#define _SC_GETPW_R_SIZE_MAX	70
3527777dab0Sopenharmony_ci#define _SC_LOGIN_NAME_MAX	71
3537777dab0Sopenharmony_ci#define _SC_TTY_NAME_MAX	72
3547777dab0Sopenharmony_ci#define _SC_THREAD_DESTRUCTOR_ITERATIONS	73
3557777dab0Sopenharmony_ci#define _SC_THREAD_KEYS_MAX	74
3567777dab0Sopenharmony_ci#define _SC_THREAD_STACK_MIN	75
3577777dab0Sopenharmony_ci#define _SC_THREAD_THREADS_MAX	76
3587777dab0Sopenharmony_ci#define _SC_THREAD_ATTR_STACKADDR	77
3597777dab0Sopenharmony_ci#define _SC_THREAD_ATTR_STACKSIZE	78
3607777dab0Sopenharmony_ci#define _SC_THREAD_PRIORITY_SCHEDULING	79
3617777dab0Sopenharmony_ci#define _SC_THREAD_PRIO_INHERIT	80
3627777dab0Sopenharmony_ci#define _SC_THREAD_PRIO_PROTECT	81
3637777dab0Sopenharmony_ci#define _SC_THREAD_PROCESS_SHARED	82
3647777dab0Sopenharmony_ci#define _SC_NPROCESSORS_CONF	83
3657777dab0Sopenharmony_ci#define _SC_NPROCESSORS_ONLN	84
3667777dab0Sopenharmony_ci#define _SC_PHYS_PAGES	85
3677777dab0Sopenharmony_ci#define _SC_AVPHYS_PAGES	86
3687777dab0Sopenharmony_ci#define _SC_ATEXIT_MAX	87
3697777dab0Sopenharmony_ci#define _SC_PASS_MAX	88
3707777dab0Sopenharmony_ci#define _SC_XOPEN_VERSION	89
3717777dab0Sopenharmony_ci#define _SC_XOPEN_XCU_VERSION	90
3727777dab0Sopenharmony_ci#define _SC_XOPEN_UNIX	91
3737777dab0Sopenharmony_ci#define _SC_XOPEN_CRYPT	92
3747777dab0Sopenharmony_ci#define _SC_XOPEN_ENH_I18N	93
3757777dab0Sopenharmony_ci#define _SC_XOPEN_SHM	94
3767777dab0Sopenharmony_ci#define _SC_2_CHAR_TERM	95
3777777dab0Sopenharmony_ci#define _SC_2_UPE	97
3787777dab0Sopenharmony_ci#define _SC_XOPEN_XPG2	98
3797777dab0Sopenharmony_ci#define _SC_XOPEN_XPG3	99
3807777dab0Sopenharmony_ci#define _SC_XOPEN_XPG4	100
3817777dab0Sopenharmony_ci#define _SC_NZERO	109
3827777dab0Sopenharmony_ci#define _SC_XBS5_ILP32_OFF32	125
3837777dab0Sopenharmony_ci#define _SC_XBS5_ILP32_OFFBIG	126
3847777dab0Sopenharmony_ci#define _SC_XBS5_LP64_OFF64	127
3857777dab0Sopenharmony_ci#define _SC_XBS5_LPBIG_OFFBIG	128
3867777dab0Sopenharmony_ci#define _SC_XOPEN_LEGACY	129
3877777dab0Sopenharmony_ci#define _SC_XOPEN_REALTIME	130
3887777dab0Sopenharmony_ci#define _SC_XOPEN_REALTIME_THREADS	131
3897777dab0Sopenharmony_ci#define _SC_ADVISORY_INFO	132
3907777dab0Sopenharmony_ci#define _SC_BARRIERS	133
3917777dab0Sopenharmony_ci#define _SC_CLOCK_SELECTION	137
3927777dab0Sopenharmony_ci#define _SC_CPUTIME	138
3937777dab0Sopenharmony_ci#define _SC_THREAD_CPUTIME	139
3947777dab0Sopenharmony_ci#define _SC_MONOTONIC_CLOCK	149
3957777dab0Sopenharmony_ci#define _SC_READER_WRITER_LOCKS	153
3967777dab0Sopenharmony_ci#define _SC_SPIN_LOCKS	154
3977777dab0Sopenharmony_ci#define _SC_REGEXP	155
3987777dab0Sopenharmony_ci#define _SC_SHELL	157
3997777dab0Sopenharmony_ci#define _SC_SPAWN	159
4007777dab0Sopenharmony_ci#define _SC_SPORADIC_SERVER	160
4017777dab0Sopenharmony_ci#define _SC_THREAD_SPORADIC_SERVER	161
4027777dab0Sopenharmony_ci#define _SC_TIMEOUTS	164
4037777dab0Sopenharmony_ci#define _SC_TYPED_MEMORY_OBJECTS	165
4047777dab0Sopenharmony_ci#define _SC_2_PBS	168
4057777dab0Sopenharmony_ci#define _SC_2_PBS_ACCOUNTING	169
4067777dab0Sopenharmony_ci#define _SC_2_PBS_LOCATE	170
4077777dab0Sopenharmony_ci#define _SC_2_PBS_MESSAGE	171
4087777dab0Sopenharmony_ci#define _SC_2_PBS_TRACK	172
4097777dab0Sopenharmony_ci#define _SC_SYMLOOP_MAX	173
4107777dab0Sopenharmony_ci#define _SC_STREAMS	174
4117777dab0Sopenharmony_ci#define _SC_2_PBS_CHECKPOINT	175
4127777dab0Sopenharmony_ci#define _SC_V6_ILP32_OFF32	176
4137777dab0Sopenharmony_ci#define _SC_V6_ILP32_OFFBIG	177
4147777dab0Sopenharmony_ci#define _SC_V6_LP64_OFF64	178
4157777dab0Sopenharmony_ci#define _SC_V6_LPBIG_OFFBIG	179
4167777dab0Sopenharmony_ci#define _SC_HOST_NAME_MAX	180
4177777dab0Sopenharmony_ci#define _SC_TRACE	181
4187777dab0Sopenharmony_ci#define _SC_TRACE_EVENT_FILTER	182
4197777dab0Sopenharmony_ci#define _SC_TRACE_INHERIT	183
4207777dab0Sopenharmony_ci#define _SC_TRACE_LOG	184
4217777dab0Sopenharmony_ci
4227777dab0Sopenharmony_ci#define _SC_IPV6	235
4237777dab0Sopenharmony_ci#define _SC_RAW_SOCKETS	236
4247777dab0Sopenharmony_ci#define _SC_V7_ILP32_OFF32	237
4257777dab0Sopenharmony_ci#define _SC_V7_ILP32_OFFBIG	238
4267777dab0Sopenharmony_ci#define _SC_V7_LP64_OFF64	239
4277777dab0Sopenharmony_ci#define _SC_V7_LPBIG_OFFBIG	240
4287777dab0Sopenharmony_ci#define _SC_SS_REPL_MAX	241
4297777dab0Sopenharmony_ci#define _SC_TRACE_EVENT_NAME_MAX	242
4307777dab0Sopenharmony_ci#define _SC_TRACE_NAME_MAX	243
4317777dab0Sopenharmony_ci#define _SC_TRACE_SYS_MAX	244
4327777dab0Sopenharmony_ci#define _SC_TRACE_USER_EVENT_MAX	245
4337777dab0Sopenharmony_ci#define _SC_XOPEN_STREAMS	246
4347777dab0Sopenharmony_ci#define _SC_THREAD_ROBUST_PRIO_INHERIT	247
4357777dab0Sopenharmony_ci#define _SC_THREAD_ROBUST_PRIO_PROTECT	248
4367777dab0Sopenharmony_ci
4377777dab0Sopenharmony_ci#define _CS_PATH	0
4387777dab0Sopenharmony_ci#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS	1
4397777dab0Sopenharmony_ci#define _CS_GNU_LIBC_VERSION	2
4407777dab0Sopenharmony_ci#define _CS_GNU_LIBPTHREAD_VERSION	3
4417777dab0Sopenharmony_ci#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS	4
4427777dab0Sopenharmony_ci#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS	5
4437777dab0Sopenharmony_ci
4447777dab0Sopenharmony_ci#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS	1116
4457777dab0Sopenharmony_ci#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS	1117
4467777dab0Sopenharmony_ci#define _CS_POSIX_V6_ILP32_OFF32_LIBS	1118
4477777dab0Sopenharmony_ci#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS	1119
4487777dab0Sopenharmony_ci#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS	1120
4497777dab0Sopenharmony_ci#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS	1121
4507777dab0Sopenharmony_ci#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS	1122
4517777dab0Sopenharmony_ci#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS	1123
4527777dab0Sopenharmony_ci#define _CS_POSIX_V6_LP64_OFF64_CFLAGS	1124
4537777dab0Sopenharmony_ci#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS	1125
4547777dab0Sopenharmony_ci#define _CS_POSIX_V6_LP64_OFF64_LIBS	1126
4557777dab0Sopenharmony_ci#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS	1127
4567777dab0Sopenharmony_ci#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS	1128
4577777dab0Sopenharmony_ci#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS	1129
4587777dab0Sopenharmony_ci#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS	1130
4597777dab0Sopenharmony_ci#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS	1131
4607777dab0Sopenharmony_ci#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS	1132
4617777dab0Sopenharmony_ci#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS	1133
4627777dab0Sopenharmony_ci#define _CS_POSIX_V7_ILP32_OFF32_LIBS	1134
4637777dab0Sopenharmony_ci#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS	1135
4647777dab0Sopenharmony_ci#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS	1136
4657777dab0Sopenharmony_ci#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS	1137
4667777dab0Sopenharmony_ci#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS	1138
4677777dab0Sopenharmony_ci#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS	1139
4687777dab0Sopenharmony_ci#define _CS_POSIX_V7_LP64_OFF64_CFLAGS	1140
4697777dab0Sopenharmony_ci#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS	1141
4707777dab0Sopenharmony_ci#define _CS_POSIX_V7_LP64_OFF64_LIBS	1142
4717777dab0Sopenharmony_ci#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS	1143
4727777dab0Sopenharmony_ci#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS	1144
4737777dab0Sopenharmony_ci#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS	1145
4747777dab0Sopenharmony_ci#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS	1146
4757777dab0Sopenharmony_ci#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS	1147
4767777dab0Sopenharmony_ci#define _CS_V6_ENV	1148
4777777dab0Sopenharmony_ci#define _CS_V7_ENV	1149
4787777dab0Sopenharmony_ci
4797777dab0Sopenharmony_ci#ifdef _GNU_SOURCE
4807777dab0Sopenharmony_ci#ifndef TEMP_FAILURE_RETRY
4817777dab0Sopenharmony_ci#define MUSL_TEMP_FAILURE_RETRY(expression) \
4827777dab0Sopenharmony_ci    (__extension__ \
4837777dab0Sopenharmony_ci        ({ long int __result; \
4847777dab0Sopenharmony_ci            do __result = (long int)(expression); \
4857777dab0Sopenharmony_ci            while(__result == -1L&& errno == EINTR); \
4867777dab0Sopenharmony_ci        __result;}))
4877777dab0Sopenharmony_ci
4887777dab0Sopenharmony_ci#define TEMP_FAILURE_RETRY(expression) MUSL_TEMP_FAILURE_RETRY(expression)
4897777dab0Sopenharmony_ci#endif
4907777dab0Sopenharmony_ci#endif
4917777dab0Sopenharmony_ci
4927777dab0Sopenharmony_ci#include <fortify/unistd.h>
4937777dab0Sopenharmony_ci
4947777dab0Sopenharmony_ci#ifdef __cplusplus
4957777dab0Sopenharmony_ci}
4967777dab0Sopenharmony_ci#endif
4977777dab0Sopenharmony_ci
4987777dab0Sopenharmony_ci#endif
499