VSF Documented
unistd.h
Go to the documentation of this file.
1#ifndef __VSF_LINUX_UNISTD_H__
2#define __VSF_LINUX_UNISTD_H__
3
5
6#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
8//# include "./linux/limits.h"
9# include "./sys/types.h"
10# include "./sys/select.h"
11# include "./pwd.h"
12
13// avoid compiler.h in vsf.h include c headers
14# define __USE_LOCAL_LIBC__
15# define __USE_LOCAL_STDIO__
16#else
17# include <stddef.h>
18// avoid to include <linux/xxx.h>, because it will introduce kernel structures,
19// which will maybe conflict with user structures with the same name.
20// include <linux/limits.h> in source file for PATH_MAX
21//# include <linux/limits.h>
22# include <sys/types.h>
23# include <sys/select.h>
24# include <pwd.h>
25#endif
26
27#define __SIMPLE_LIBC_SETJMP_VPLT_ONLY__
28#include <setjmp/setjmp.h>
29
30// avoid to include vsf.h, include necessary headers only
31//#include "vsf.h"
32
33#include "../vsf_linux.h"
34#include "../port/busybox/busybox.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41#if defined(__WIN__) && defined(__CPU_X64__)
42# define exec_ret_t intptr_t
43#else
44# define exec_ret_t int
45#endif
46
47#if VSF_LINUX_CFG_WRAPPER == ENABLED
48#define confstr VSF_LINUX_WRAPPER(confstr)
49
50#define usleep VSF_LINUX_WRAPPER(usleep)
51#define sleep VSF_LINUX_WRAPPER(sleep)
52#define pause VSF_LINUX_WRAPPER(pause)
53
54#define getlogin VSF_LINUX_WRAPPER(getlogin)
55#define getlogin_r VSF_LINUX_WRAPPER(getlogin_r)
56
57#define setgid VSF_LINUX_WRAPPER(setgid)
58#define getgid VSF_LINUX_WRAPPER(getgid)
59#define setegid VSF_LINUX_WRAPPER(setegid)
60#define getegid VSF_LINUX_WRAPPER(getegid)
61#define setuid VSF_LINUX_WRAPPER(setuid)
62#define getuid VSF_LINUX_WRAPPER(getuid)
63#define seteuid VSF_LINUX_WRAPPER(seteuid)
64#define geteuid VSF_LINUX_WRAPPER(geteuid)
65#define getpid VSF_LINUX_WRAPPER(getpid)
66#define getppid VSF_LINUX_WRAPPER(getppid)
67#define gettid VSF_LINUX_WRAPPER(gettid)
68#define setsid VSF_LINUX_WRAPPER(setsid)
69#define getsid VSF_LINUX_WRAPPER(getsid)
70#define setpgid VSF_LINUX_WRAPPER(setpgid)
71#define getpgid VSF_LINUX_WRAPPER(getpgid)
72#define setpgrp VSF_LINUX_WRAPPER(setpgrp)
73#define getpgrp VSF_LINUX_WRAPPER(getpgrp)
74#define setresuid VSF_LINUX_WRAPPER(setresuid)
75#define setresgid VSF_LINUX_WRAPPER(setresgid)
76
77#define execl VSF_LINUX_WRAPPER(execl)
78#define execlp VSF_LINUX_WRAPPER(execlp)
79#define execv VSF_LINUX_WRAPPER(execv)
80#define execve VSF_LINUX_WRAPPER(execve)
81#define execvp VSF_LINUX_WRAPPER(execvp)
82#define execvpe VSF_LINUX_WRAPPER(execvpe)
83#define sysconf VSF_LINUX_WRAPPER(sysconf)
84#define pathconf VSF_LINUX_WRAPPER(pathconf)
85#define fpathconf VSF_LINUX_WRAPPER(fpathconf)
86#define pipe VSF_LINUX_WRAPPER(pipe)
87#define pipe2 VSF_LINUX_WRAPPER(pipe2)
88#define alarm VSF_LINUX_WRAPPER(alarm)
89#define ualarm VSF_LINUX_WRAPPER(ualarm)
90#define fork VSF_LINUX_WRAPPER(fork)
91#define _exit VSF_LINUX_WRAPPER(_exit)
92#define acct VSF_LINUX_WRAPPER(acct)
93
94#define isatty VSF_LINUX_WRAPPER(isatty)
95#define symlink VSF_LINUX_WRAPPER(symlink)
96#define getpagesize VSF_LINUX_WRAPPER(getpagesize)
97#define ftruncate VSF_LINUX_WRAPPER(ftruncate)
98#define truncate VSF_LINUX_WRAPPER(truncate)
99#define ftruncate64 VSF_LINUX_WRAPPER(ftruncate64)
100#define truncate64 VSF_LINUX_WRAPPER(truncate64)
101#define readlink VSF_LINUX_WRAPPER(readlink)
102#define tcgetpgrp VSF_LINUX_WRAPPER(tcgetpgrp)
103#define tcsetpgrp VSF_LINUX_WRAPPER(tcsetpgrp)
104#define getpass VSF_LINUX_WRAPPER(getpass)
105#define gethostname VSF_LINUX_WRAPPER(gethostname)
106#define sethostname VSF_LINUX_WRAPPER(sethostname)
107
108#define getentropy VSF_LINUX_WRAPPER(getentropy)
109
110#define gethostid VSF_LINUX_WRAPPER(gethostid)
111#define sethostid VSF_LINUX_WRAPPER(sethostid)
112
113#if __IS_COMPILER_IAR__
114#else
115# define access VSF_LINUX_WRAPPER(access)
116# define unlink VSF_LINUX_WRAPPER(unlink)
117# define unlinkat VSF_LINUX_WRAPPER(unlinkat)
118# define link VSF_LINUX_WRAPPER(link)
119# define mkdir VSF_LINUX_WRAPPER(mkdir)
120# define mkdirat VSF_LINUX_WRAPPER(mkdirat)
121# define rmdir VSF_LINUX_WRAPPER(rmdir)
122# define close VSF_LINUX_WRAPPER(close)
123# define lseek VSF_LINUX_WRAPPER(lseek)
124# define read VSF_LINUX_WRAPPER(read)
125# define write VSF_LINUX_WRAPPER(write)
126# define readv VSF_LINUX_WRAPPER(readv)
127# define writev VSF_LINUX_WRAPPER(writev)
128# define pread VSF_LINUX_WRAPPER(pread)
129# define pwrite VSF_LINUX_WRAPPER(pwrite)
130# define preadv VSF_LINUX_WRAPPER(preadv)
131# define pwritev VSF_LINUX_WRAPPER(pwritev)
132# define chdir VSF_LINUX_WRAPPER(chdir)
133# define fchdir VSF_LINUX_WRAPPER(fchdir)
134# define getcwd VSF_LINUX_WRAPPER(getcwd)
135# define fsync VSF_LINUX_WRAPPER(fsync)
136# define fdatasync VSF_LINUX_WRAPPER(fdatasync)
137#endif
138#elif defined(__WIN__) && !defined(__VSF_APPLET__)
139#define _exit VSF_LINUX_WRAPPER(_exit)
140#endif
141
142// syscalls
143
144#define __NR_close close
145#define __NR_dup dup
146#define __NR_dup2 dup2
147#define __NR_dup3 dup3
148#define __NR_access access
149#define __NR_write write
150#define __NR_writev writev
151#define __NR_read read
152#define __NR_readv readv
153#define __NR_truncate truncate
154#define __NR_rtruncate ftruncate
155#define __NR_faccessat faccessat
156#define __NR_unlink unlink
157#define __NR_unlinkat unlinkat
158#define __NR_sync sync
159#define __NR_fsync fsync
160#define __NR_chdir chdir
161#define __NR_fchdir fchdir
162#define __NR_chown chown
163#define __NR_fchown fchown
164#define __NR_fchownat fchownat
165#define __NR_chroot chroot
166#define __NR_pipe pipe
167#define __NR_pipe2 pipe2
168#define __NR_alarm alarm
169#define __NR_execve execve
170#define __NR_wait4 wait4
171#define __NR_gettid gettid
172#define SYS_gettid __NR_gettid
173
174#define __NR_preadv(__fd, __vec, __vlen, __pos_l, __pos_h) \
175 preadv64((__fd), (__vec), (__vlen), ((off64_t)(__pos_l) << 32) + (__pos_h))
176#define __NR_pwritev(__fd, __vec, __vlen, __pos_l, __pos_h) \
177 pwritev64((__fd), (__vec), (__vlen), ((off64_t)(__pos_l) << 32) + (__pos_h))
178
179#define _POSIX_VERSION 200112L
180
181#define STDIN_FILENO 0
182#define STDOUT_FILENO 1
183#define STDERR_FILENO 2
184
185#define environ (vsf_linux_get_cur_process()->__environ)
186
187// confstr
188
189enum {
191#define _CS_PATH _CS_PATH
193#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
195#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION
196};
197
198enum {
208};
209
210enum {
217
219};
220
221enum {
227};
228
229// workaround while using lwip, which will check iovec MACRO and define iovec if not defined
230#define iovec iovec
231struct iovec {
232 void *iov_base;
233 size_t iov_len;
234};
235
236#define F_OK (1 << 0)
237#define R_OK (1 << 1)
238#define W_OK (1 << 2)
239#define X_OK (1 << 3)
240
241#if VSF_LINUX_APPLET_USE_UNISTD == ENABLED
244
251
254
266
275
286
290 // realpath belongs to stdlib.h, but do not remove realpath here for compatibility
294
305
310
325
339
344
348
355
359# ifndef __VSF_APPLET__
361# endif
362#endif
363
364#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_UNISTD_LIB__))\
365 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_UNISTD == ENABLED
366
367#ifndef VSF_LINUX_APPLET_UNISTD_VPLT
368# if VSF_LINUX_USE_APPLET == ENABLED
369# define VSF_LINUX_APPLET_UNISTD_VPLT \
370 ((vsf_linux_unistd_vplt_t *)(VSF_LINUX_APPLET_VPLT->unistd_vplt))
371# else
372# define VSF_LINUX_APPLET_UNISTD_VPLT \
373 ((vsf_linux_unistd_vplt_t *)vsf_vplt((void *)0))
374# endif
375#endif
376
377#define VSF_LINUX_APPLET_UNISTD_ENTRY(__NAME) \
378 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_UNISTD_VPLT, __NAME)
379#define VSF_LINUX_APPLET_UNISTD_IMP(...) \
380 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_UNISTD_VPLT, __VA_ARGS__)
381
382VSF_LINUX_APPLET_UNISTD_IMP(__execl_va, exec_ret_t, const char *pathname, const char *arg, va_list ap, bool has_env) {
384 return VSF_LINUX_APPLET_UNISTD_ENTRY(__execl_va)(pathname, arg, ap, has_env);
385}
386VSF_LINUX_APPLET_UNISTD_IMP(__execlp_va, exec_ret_t, const char *pathname, const char *arg, va_list ap) {
388 return VSF_LINUX_APPLET_UNISTD_ENTRY(__execlp_va)(pathname, arg, ap);
389}
390VSF_LINUX_APPLET_UNISTD_IMP(confstr, size_t, int name, char *buf, size_t len) {
392 return VSF_LINUX_APPLET_UNISTD_ENTRY(confstr)(name, buf, len);
393}
394VSF_LINUX_APPLET_UNISTD_IMP(usleep, int, int micro_seconds) {
396 return VSF_LINUX_APPLET_UNISTD_ENTRY(usleep)(micro_seconds);
397}
398VSF_LINUX_APPLET_UNISTD_IMP(sleep, unsigned, unsigned seconds) {
400 return VSF_LINUX_APPLET_UNISTD_ENTRY(sleep)(seconds);
401}
402VSF_LINUX_APPLET_UNISTD_IMP(pause, int, void) {
404 return VSF_LINUX_APPLET_UNISTD_ENTRY(pause)();
405}
406VSF_LINUX_APPLET_UNISTD_IMP(alarm, unsigned int, unsigned int seconds) {
408 return VSF_LINUX_APPLET_UNISTD_ENTRY(alarm)(seconds);
409}
410VSF_LINUX_APPLET_UNISTD_IMP(ualarm, useconds_t, useconds_t usecs, useconds_t interval) {
412 return VSF_LINUX_APPLET_UNISTD_ENTRY(ualarm)(usecs, interval);
413}
414VSF_LINUX_APPLET_UNISTD_IMP(getlogin, char *, void) {
416 return VSF_LINUX_APPLET_UNISTD_ENTRY(getlogin)();
417}
418VSF_LINUX_APPLET_UNISTD_IMP(getlogin_r, int, char *buf, size_t bufsize) {
420 return VSF_LINUX_APPLET_UNISTD_ENTRY(getlogin_r)(buf, bufsize);
421}
422VSF_LINUX_APPLET_UNISTD_IMP(setuid, int, uid_t uid) {
424 return VSF_LINUX_APPLET_UNISTD_ENTRY(setuid)(uid);
425}
426VSF_LINUX_APPLET_UNISTD_IMP(getuid, uid_t, void) {
428 return VSF_LINUX_APPLET_UNISTD_ENTRY(getuid)();
429}
430VSF_LINUX_APPLET_UNISTD_IMP(seteuid, int, uid_t euid) {
432 return VSF_LINUX_APPLET_UNISTD_ENTRY(seteuid)(euid);
433}
434VSF_LINUX_APPLET_UNISTD_IMP(geteuid, uid_t, void) {
436 return VSF_LINUX_APPLET_UNISTD_ENTRY(geteuid)();
437}
438VSF_LINUX_APPLET_UNISTD_IMP(setgid, int, gid_t gid) {
440 return VSF_LINUX_APPLET_UNISTD_ENTRY(setgid)(gid);
441}
442VSF_LINUX_APPLET_UNISTD_IMP(getgid, gid_t, void) {
444 return VSF_LINUX_APPLET_UNISTD_ENTRY(getgid)();
445}
446VSF_LINUX_APPLET_UNISTD_IMP(setegid, int, gid_t egid) {
448 return VSF_LINUX_APPLET_UNISTD_ENTRY(setegid)(egid);
449}
450VSF_LINUX_APPLET_UNISTD_IMP(getegid, gid_t, void) {
452 return VSF_LINUX_APPLET_UNISTD_ENTRY(getegid)();
453}
454VSF_LINUX_APPLET_UNISTD_IMP(getpid, pid_t, void) {
456 return VSF_LINUX_APPLET_UNISTD_ENTRY(getpid)();
457}
458VSF_LINUX_APPLET_UNISTD_IMP(getppid, pid_t, void) {
460 return VSF_LINUX_APPLET_UNISTD_ENTRY(getppid)();
461}
462VSF_LINUX_APPLET_UNISTD_IMP(gettid, pid_t, void) {
464 return VSF_LINUX_APPLET_UNISTD_ENTRY(gettid)();
465}
466VSF_LINUX_APPLET_UNISTD_IMP(setsid, pid_t, void) {
468 return VSF_LINUX_APPLET_UNISTD_ENTRY(setsid)();
469}
470VSF_LINUX_APPLET_UNISTD_IMP(getsid, pid_t, pid_t pid) {
472 return VSF_LINUX_APPLET_UNISTD_ENTRY(getsid)(pid);
473}
474VSF_LINUX_APPLET_UNISTD_IMP(setpgid, int, pid_t pid, pid_t pgid) {
476 return VSF_LINUX_APPLET_UNISTD_ENTRY(setpgid)(pid, pgid);
477}
478VSF_LINUX_APPLET_UNISTD_IMP(getpgid, pid_t, pid_t pid) {
480 return VSF_LINUX_APPLET_UNISTD_ENTRY(getpgid)(pid);
481}
482VSF_LINUX_APPLET_UNISTD_IMP(setpgrp, int, void) {
484 return VSF_LINUX_APPLET_UNISTD_ENTRY(setpgrp)();
485}
486VSF_LINUX_APPLET_UNISTD_IMP(getpgrp, pid_t, void) {
488 return VSF_LINUX_APPLET_UNISTD_ENTRY(getpgrp)();
489}
490VSF_LINUX_APPLET_UNISTD_IMP(setresuid, int, uid_t ruid, uid_t euid, uid_t suid) {
492 return VSF_LINUX_APPLET_UNISTD_ENTRY(setresuid)(ruid, euid, suid);
493}
494VSF_LINUX_APPLET_UNISTD_IMP(setresgid, int, gid_t rgid, gid_t egid, gid_t sgid) {
496 return VSF_LINUX_APPLET_UNISTD_ENTRY(setresgid)(rgid, egid, sgid);
497}
498VSF_LINUX_APPLET_UNISTD_IMP(execv, exec_ret_t, const char *pathname, char * const * argv) {
500 return VSF_LINUX_APPLET_UNISTD_ENTRY(execv)(pathname, argv);
501}
502VSF_LINUX_APPLET_UNISTD_IMP(execve, exec_ret_t, const char *pathname, char * const * argv, char * const * envp) {
504 return VSF_LINUX_APPLET_UNISTD_ENTRY(execve)(pathname, argv, envp);
505}
506VSF_LINUX_APPLET_UNISTD_IMP(execvp, exec_ret_t, const char *file, char * const * argv) {
508 return VSF_LINUX_APPLET_UNISTD_ENTRY(execvp)(file, argv);
509}
510VSF_LINUX_APPLET_UNISTD_IMP(execvpe, exec_ret_t, const char *file, char * const * argv, char * const * envp) {
512 return VSF_LINUX_APPLET_UNISTD_ENTRY(execvpe)(file, argv, envp);
513}
514VSF_LINUX_APPLET_UNISTD_IMP(daemon, int, int nochdir, int noclose) {
516 return VSF_LINUX_APPLET_UNISTD_ENTRY(daemon)(nochdir, noclose);
517}
518VSF_LINUX_APPLET_UNISTD_IMP(sysconf, long, int name) {
520 return VSF_LINUX_APPLET_UNISTD_ENTRY(sysconf)(name);
521}
522VSF_LINUX_APPLET_UNISTD_IMP(pathconf, long, const char *path, int name) {
524 return VSF_LINUX_APPLET_UNISTD_ENTRY(pathconf)(path, name);
525}
526VSF_LINUX_APPLET_UNISTD_IMP(fpathconf, long, int fd, int name) {
528 return VSF_LINUX_APPLET_UNISTD_ENTRY(fpathconf)(fd, name);
529}
530VSF_LINUX_APPLET_UNISTD_IMP(pipe, int, int pipefd[2]) {
532 return VSF_LINUX_APPLET_UNISTD_ENTRY(pipe)(pipefd);
533}
534VSF_LINUX_APPLET_UNISTD_IMP(pipe2, int, int pipefd[2], int flags) {
536 return VSF_LINUX_APPLET_UNISTD_ENTRY(pipe2)(pipefd, flags);
537}
538VSF_LINUX_APPLET_UNISTD_IMP(access, int, const char *pathname, int mode) {
540 return VSF_LINUX_APPLET_UNISTD_ENTRY(access)(pathname, mode);
541}
542VSF_LINUX_APPLET_UNISTD_IMP(unlink, int, const char *pathname) {
544 return VSF_LINUX_APPLET_UNISTD_ENTRY(unlink)(pathname);
545}
546VSF_LINUX_APPLET_UNISTD_IMP(unlinkat, int, int dirfd, const char *pathname, int flags) {
548 return VSF_LINUX_APPLET_UNISTD_ENTRY(unlinkat)(dirfd, pathname, flags);
549}
550VSF_LINUX_APPLET_UNISTD_IMP(link, int, const char *oldpath, const char *newpath) {
552 return VSF_LINUX_APPLET_UNISTD_ENTRY(link)(oldpath, newpath);
553}
554VSF_LINUX_APPLET_UNISTD_IMP(mkdir, int, const char *pathname, mode_t mode) {
556 return VSF_LINUX_APPLET_UNISTD_ENTRY(mkdir)(pathname, mode);
557}
558VSF_LINUX_APPLET_UNISTD_IMP(mkdirat, int, int dirfd, const char *pathname, mode_t mode) {
560 return VSF_LINUX_APPLET_UNISTD_ENTRY(mkdirat)(dirfd, pathname, mode);
561}
562VSF_LINUX_APPLET_UNISTD_IMP(rmdir, int, const char *pathname) {
564 return VSF_LINUX_APPLET_UNISTD_ENTRY(rmdir)(pathname);
565}
566VSF_LINUX_APPLET_UNISTD_IMP(dup, int, int oldfd) {
568 return VSF_LINUX_APPLET_UNISTD_ENTRY(dup)(oldfd);
569}
570VSF_LINUX_APPLET_UNISTD_IMP(dup2, int, int oldfd, int newfd) {
572 return VSF_LINUX_APPLET_UNISTD_ENTRY(dup2)(oldfd, newfd);
573}
574VSF_LINUX_APPLET_UNISTD_IMP(dup3, int, int oldfd, int newfd, int flags) {
576 return VSF_LINUX_APPLET_UNISTD_ENTRY(dup3)(oldfd, newfd, flags);
577}
578VSF_LINUX_APPLET_UNISTD_IMP(chroot, int, const char *path) {
580 return VSF_LINUX_APPLET_UNISTD_ENTRY(chroot)(path);
581}
582VSF_LINUX_APPLET_UNISTD_IMP(chdir, int, const char *pathname) {
584 return VSF_LINUX_APPLET_UNISTD_ENTRY(chdir)(pathname);
585}
586VSF_LINUX_APPLET_UNISTD_IMP(fchdir, int, int fd) {
588 return VSF_LINUX_APPLET_UNISTD_ENTRY(fchdir)(fd);
589}
590VSF_LINUX_APPLET_UNISTD_IMP(getcwd, char *, char *buffer, size_t maxlen) {
592 return VSF_LINUX_APPLET_UNISTD_ENTRY(getcwd)(buffer, maxlen);
593}
594VSF_LINUX_APPLET_UNISTD_IMP(close, int, int fd) {
596 return VSF_LINUX_APPLET_UNISTD_ENTRY(close)(fd);
597}
598VSF_LINUX_APPLET_UNISTD_IMP(lseek, off_t, int fd, off_t offset, int whence) {
600 return VSF_LINUX_APPLET_UNISTD_ENTRY(lseek)(fd, offset, whence);
601}
602VSF_LINUX_APPLET_UNISTD_IMP(read, ssize_t, int fd, void *buf, size_t count) {
604 return VSF_LINUX_APPLET_UNISTD_ENTRY(read)(fd, buf, count);
605}
606VSF_LINUX_APPLET_UNISTD_IMP(write, ssize_t, int fd, const void *buf, size_t count) {
608 return VSF_LINUX_APPLET_UNISTD_ENTRY(write)(fd, buf, count);
609}
610VSF_LINUX_APPLET_UNISTD_IMP(readv, ssize_t, int fd, const struct iovec *iov, int iovcnt) {
612 return VSF_LINUX_APPLET_UNISTD_ENTRY(readv)(fd, iov, iovcnt);
613}
614VSF_LINUX_APPLET_UNISTD_IMP(writev, ssize_t, int fd, const struct iovec *iov, int iovcnt) {
616 return VSF_LINUX_APPLET_UNISTD_ENTRY(writev)(fd, iov, iovcnt);
617}
618VSF_LINUX_APPLET_UNISTD_IMP(pread, ssize_t, int fd, void *buf, size_t count, off_t offset) {
620 return VSF_LINUX_APPLET_UNISTD_ENTRY(pread)(fd, buf, count, offset);
621}
622VSF_LINUX_APPLET_UNISTD_IMP(pwrite, ssize_t, int fd, const void *buf, size_t count, off_t offset) {
624 return VSF_LINUX_APPLET_UNISTD_ENTRY(pwrite)(fd, buf, count, offset);
625}
626VSF_LINUX_APPLET_UNISTD_IMP(preadv, ssize_t, int fd, const struct iovec *iov, int iovcnt, off_t offset) {
628 return VSF_LINUX_APPLET_UNISTD_ENTRY(preadv)(fd, iov, iovcnt, offset);
629}
630VSF_LINUX_APPLET_UNISTD_IMP(pwritev, ssize_t, int fd, const struct iovec *iov, int iovcnt, off_t offset) {
632 return VSF_LINUX_APPLET_UNISTD_ENTRY(pwritev)(fd, iov, iovcnt, offset);
633}
634VSF_LINUX_APPLET_UNISTD_IMP(sync, void, void) {
636 VSF_LINUX_APPLET_UNISTD_ENTRY(sync)();
637}
638VSF_LINUX_APPLET_UNISTD_IMP(syncfs, int, int fd) {
640 return VSF_LINUX_APPLET_UNISTD_ENTRY(syncfs)(fd);
641}
642VSF_LINUX_APPLET_UNISTD_IMP(fsync, int, int fd) {
644 return VSF_LINUX_APPLET_UNISTD_ENTRY(fsync)(fd);
645}
646VSF_LINUX_APPLET_UNISTD_IMP(fdatasync, int, int fd) {
648 return VSF_LINUX_APPLET_UNISTD_ENTRY(fdatasync)(fd);
649}
650VSF_LINUX_APPLET_UNISTD_IMP(isatty, int, int fd) {
652 return VSF_LINUX_APPLET_UNISTD_ENTRY(isatty)(fd);
653}
654VSF_LINUX_APPLET_UNISTD_IMP(getpagesize, size_t, void) {
656 return VSF_LINUX_APPLET_UNISTD_ENTRY(getpagesize)();
657}
658VSF_LINUX_APPLET_UNISTD_IMP(symlink, int, const char *target, const char *linkpath) {
660 return VSF_LINUX_APPLET_UNISTD_ENTRY(symlink)(target, linkpath);
661}
662VSF_LINUX_APPLET_UNISTD_IMP(ftruncate, int, int fd, off_t length) {
664 return VSF_LINUX_APPLET_UNISTD_ENTRY(ftruncate)(fd, length);
665}
666VSF_LINUX_APPLET_UNISTD_IMP(truncate, int, const char *pathname, off_t length) {
668 return VSF_LINUX_APPLET_UNISTD_ENTRY(truncate)(pathname, length);
669}
670VSF_LINUX_APPLET_UNISTD_IMP(ftruncate64, int, int fd, off64_t length) {
672 return VSF_LINUX_APPLET_UNISTD_ENTRY(ftruncate64)(fd, length);
673}
674VSF_LINUX_APPLET_UNISTD_IMP(truncate64, int, const char *pathname, off64_t length) {
676 return VSF_LINUX_APPLET_UNISTD_ENTRY(truncate64)(pathname, length);
677}
678VSF_LINUX_APPLET_UNISTD_IMP(readlink, ssize_t, const char *pathname, char *buf, size_t bufsiz) {
680 return VSF_LINUX_APPLET_UNISTD_ENTRY(readlink)(pathname, buf, bufsiz);
681}
682VSF_LINUX_APPLET_UNISTD_IMP(tcgetpgrp, pid_t, int fd) {
684 return VSF_LINUX_APPLET_UNISTD_ENTRY(tcgetpgrp)(fd);
685}
686VSF_LINUX_APPLET_UNISTD_IMP(tcsetpgrp, int, int fd, pid_t pgrp) {
688 return VSF_LINUX_APPLET_UNISTD_ENTRY(tcsetpgrp)(fd, pgrp);
689}
690VSF_LINUX_APPLET_UNISTD_IMP(getpass, char *, const char *prompt) {
692 return VSF_LINUX_APPLET_UNISTD_ENTRY(getpass)(prompt);
693}
694VSF_LINUX_APPLET_UNISTD_IMP(gethostname, int, char *name, size_t len) {
696 return VSF_LINUX_APPLET_UNISTD_ENTRY(gethostname)(name, len);
697}
698VSF_LINUX_APPLET_UNISTD_IMP(sethostname, int, const char *name, size_t len) {
700 return VSF_LINUX_APPLET_UNISTD_ENTRY(sethostname)(name, len);
701}
702VSF_LINUX_APPLET_UNISTD_IMP(chown, int, const char *pathname, uid_t owner, gid_t group) {
704 return VSF_LINUX_APPLET_UNISTD_ENTRY(chown)(pathname, owner, group);
705}
706VSF_LINUX_APPLET_UNISTD_IMP(fchown, int, int fd, uid_t owner, gid_t group) {
708 return VSF_LINUX_APPLET_UNISTD_ENTRY(fchown)(fd, owner, group);
709}
710VSF_LINUX_APPLET_UNISTD_IMP(lchown, int, const char *pathname, uid_t owner, gid_t group) {
712 return VSF_LINUX_APPLET_UNISTD_ENTRY(lchown)(pathname, owner, group);
713}
714VSF_LINUX_APPLET_UNISTD_IMP(fchownat, int, int dirfd, const char *pathname, uid_t owner, gid_t group, int flags) {
716 return VSF_LINUX_APPLET_UNISTD_ENTRY(fchownat)(dirfd, pathname, owner, group, flags);
717}
718VSF_LINUX_APPLET_UNISTD_IMP(getentropy, int, void *buffer, size_t length) {
720 return VSF_LINUX_APPLET_UNISTD_ENTRY(getentropy)(buffer, length);
721}
722VSF_LINUX_APPLET_UNISTD_IMP(gethostid, long, void) {
724 return VSF_LINUX_APPLET_UNISTD_ENTRY(gethostid)();
725}
726VSF_LINUX_APPLET_UNISTD_IMP(sethostid, int, long hostid) {
728 return VSF_LINUX_APPLET_UNISTD_ENTRY(sethostid)(hostid);
729}
730VSF_LINUX_APPLET_UNISTD_IMP(lseek64, off64_t, int fd, off64_t offset, int whence) {
732 return VSF_LINUX_APPLET_UNISTD_ENTRY(lseek64)(fd, offset, whence);
733}
734VSF_LINUX_APPLET_UNISTD_IMP(ttyname, char *, int fd) {
736 return VSF_LINUX_APPLET_UNISTD_ENTRY(ttyname)(fd);
737}
738VSF_LINUX_APPLET_UNISTD_IMP(ttyname_r, int, int fd, char *buf, size_t buflen) {
740 return VSF_LINUX_APPLET_UNISTD_ENTRY(ttyname_r)(fd, buf, buflen);
741}
742VSF_LINUX_APPLET_UNISTD_IMP(_exit, void, int status) {
744 VSF_LINUX_APPLET_UNISTD_ENTRY(_exit)(status);
745}
746VSF_LINUX_APPLET_UNISTD_IMP(acct, int, const char *filename) {
748 return VSF_LINUX_APPLET_UNISTD_ENTRY(acct)(filename);
749}
750VSF_LINUX_APPLET_UNISTD_IMP(__vsf_linux_vfork_prepare, pid_t, vsf_linux_process_t *parent_process) {
752 return VSF_LINUX_APPLET_UNISTD_ENTRY(__vsf_linux_vfork_prepare)(parent_process);
753}
754VSF_LINUX_APPLET_UNISTD_IMP(mkdirs, int, const char *pathname, mode_t mode) {
756 return VSF_LINUX_APPLET_UNISTD_ENTRY(mkdirs)(pathname, mode);
757}
758VSF_LINUX_APPLET_UNISTD_IMP(getdtablesize, int, void) {
760 return VSF_LINUX_APPLET_UNISTD_ENTRY(getdtablesize)();
761}
762
763VSF_APPLET_VPLT_FUNC_DECORATOR(execl) exec_ret_t execl(const char *pathname, const char *arg, ...) {
764 exec_ret_t ret;
765
766 va_list ap;
767 va_start(ap, arg);
768 ret = VSF_LINUX_APPLET_UNISTD_ENTRY(__execl_va)(pathname, arg, ap, false);
769 va_end(ap);
770 return ret;
771}
772VSF_APPLET_VPLT_FUNC_DECORATOR(execle) exec_ret_t execle(const char *pathname, const char *arg, ...) {
773 exec_ret_t ret;
774
775 va_list ap;
776 va_start(ap, arg);
777 ret = VSF_LINUX_APPLET_UNISTD_ENTRY(__execl_va)(pathname, arg, ap, true);
778 va_end(ap);
779 return ret;
780}
781VSF_APPLET_VPLT_FUNC_DECORATOR(execlp) exec_ret_t execlp(const char *file, const char *arg, ...) {
782 int ret;
783
784 va_list ap;
785 va_start(ap, arg);
786 ret = VSF_LINUX_APPLET_UNISTD_ENTRY(__execlp_va)(file, arg, ap);
787 va_end(ap);
788 return ret;
789}
790
791#else // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_UNISTD
792
793size_t confstr(int name, char *buf, size_t len);
794
795int usleep(int micro_seconds);
796unsigned sleep(unsigned seconds);
797int pause(void);
798
799unsigned int alarm(unsigned int seconds);
800useconds_t ualarm(useconds_t usecs, useconds_t interval);
801
802char * getlogin(void);
803int getlogin_r(char *buf, size_t bufsize);
804
805pid_t gettid(void);
806pid_t getpid(void);
807pid_t getppid(void);
808
809int setuid(uid_t uid);
810uid_t getuid(void);
811int seteuid(uid_t euid);
812uid_t geteuid(void);
813int setegid(gid_t egid);
814gid_t getegid(void);
815int setgid(gid_t git);
816gid_t getgid(void);
817pid_t setsid(void);
818pid_t getsid(pid_t pid);
819int setpgid(pid_t pid, pid_t pgid);
820pid_t getpgid(pid_t pid);
821int setpgrp(void);
822pid_t getpgrp(void);
823int setresuid(uid_t ruid, uid_t euid, uid_t suid);
824int setresgid(gid_t rgid, gid_t egid, gid_t sgid);
825
826exec_ret_t execl(const char *pathname, const char *arg, ...);
827exec_ret_t execle(const char *pathname, const char *arg, ...);
828exec_ret_t execlp(const char *file, const char *arg, ...);
829exec_ret_t execv(const char *pathname, char * const * argv);
830exec_ret_t execve(const char *pathname, char * const * argv, char * const * envp);
831exec_ret_t execvp(const char *file, char * const * argv);
832exec_ret_t execvpe(const char *file, char * const * argv, char * const * envp);
833int daemon(int nochdir, int noclose);
834
835pid_t fork(void);
836void _exit(int status);
837long sysconf(int name);
838long pathconf(const char *path, int name);
839long fpathconf(int fd, int name);
840int pipe(int pipefd[2]);
841int pipe2(int pipefd[2], int flags);
842
843int access(const char *pathname, int mode);
844int unlink(const char *pathname);
845int unlinkat(int dirfd, const char *pathname, int flags);
846int link(const char *oldpath, const char *newpath);
847int mkdir(const char *pathname, mode_t mode);
848int mkdirat(int dirfd, const char *pathname, mode_t mode);
849int mkdirs(const char *pathname, mode_t mode);
850int rmdir(const char *pathname);
851int dup(int oldfd);
852int dup2(int oldfd, int newfd);
853int dup3(int oldfd, int newfd, int flags);
854
855int chroot(const char *path);
856int chdir(const char *pathname);
857int fchdir(int fd);
858char * getcwd(char *buffer, size_t maxlen);
859
860int close(int fd);
861off_t lseek(int fd, off_t offset, int whence);
862off64_t lseek64(int fd, off64_t offset, int whence);
863ssize_t read(int fd, void *buf, size_t count);
864ssize_t write(int fd, const void *buf, size_t count);
865ssize_t readv(int fd, const struct iovec *iov, int iovcnt);
866ssize_t writev(int fd, const struct iovec *iov, int iovcnt);
867ssize_t pread(int fd, void *buf, size_t count, off_t offset);
868ssize_t preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset);
869ssize_t preadv64 (int fd, const struct iovec *vector, int iovcnt, off64_t offset);
870ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
871ssize_t pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset);
872ssize_t pwritev64 (int fd, const struct iovec *vector, int iovcnt, off64_t offset);
873
874void sync(void);
875int syncfs(int fd);
876int fsync(int fd);
877int fdatasync(int fd);
878
879int isatty(int fd);
880char * ttyname(int fd);
881int ttyname_r(int fd, char *buf, size_t buflen);
882size_t getpagesize(void);
883int symlink(const char *target, const char *linkpath);
884int truncate(const char *pathname, off_t length);
885int ftruncate(int fd, off_t length);
886int truncate64(const char *pathname, off64_t length);
887int ftruncate64(int fd, off64_t length);
888ssize_t readlink(const char *pathname, char *buf, size_t bufsiz);
889pid_t tcgetpgrp(int fd);
890int tcsetpgrp(int fd, pid_t pgrp);
891char * getpass(const char *prompt);
892int gethostname(char *name, size_t len);
893int sethostname(const char *name, size_t len);
894
895int chown(const char *pathname, uid_t owner, gid_t group);
896int fchown(int fd, uid_t owner, gid_t group);
897int lchown(const char *pathname, uid_t owner, gid_t group);
898int fchownat(int dirfd, const char *pathname, uid_t owner, gid_t group, int flags);
899
900int getentropy(void *buffer, size_t length);
901
902long gethostid(void);
903int sethostid(long hostid);
904
905int getdtablesize(void);
906
907int acct(const char *filename);
908
909#if VSF_LINUX_USE_VFORK == ENABLED
911#endif
912
913#endif // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_UNISTD
914
915#if VSF_LINUX_USE_VFORK == ENABLED
916# define vfork() ({ \
917 vsf_linux_process_t *parent_process = vsf_linux_get_cur_process(); \
918 pid_t result = (pid_t)-1, child_pid = __vsf_linux_vfork_prepare(parent_process);\
919 if (child_pid >= 0) { \
920 result = !setjmp(parent_process->__vfork_jmpbuf) ? (pid_t)0 : child_pid;\
921 } \
922 result; \
923})
924#else
925# define vfork() -1
926#endif
927
928#ifdef __cplusplus
929}
930#endif
931
932#endif
Definition vsf_linux.h:278
int pid_t
Definition types.h:85
__USECONDS_T useconds_t
Definition types.h:136
unsigned int uid_t
Definition types.h:90
unsigned int gid_t
Definition types.h:91
long long off64_t
Definition types.h:97
unsigned int mode_t
Definition types.h:87
int ssize_t
Definition types.h:68
long off_t
Definition types.h:95
#define realpath
Definition stdlib.h:44
Definition grp.h:29
Definition unistd.h:231
void * iov_base
Definition unistd.h:232
size_t iov_len
Definition unistd.h:233
Definition unistd.h:242
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(fpathconf)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(ualarm)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(alarm)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(unlink)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(truncate)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getdtablesize)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(sleep)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(lseek)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(pathconf)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(setresuid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(pause)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(execlp)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(rmdir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(gettid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getpagesize)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(pwritev)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(setsid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(daemon)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(syncfs)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(unlinkat)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(setegid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(fchdir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(close)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getppid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(__vsf_linux_vfork_prepare)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(chroot)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(execl)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getpgid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(ttyname_r)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(tcsetpgrp)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(readlink)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(gethostid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(execv)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(setpgrp)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(setgid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(truncate64)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(preadv)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(ftruncate64)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(pread)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(pipe2)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(gethostname)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(chdir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(usleep)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(execle)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(realpath)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getcwd)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(writev)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(access)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(execvp)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(write)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(setpgid)
vsf_vplt_info_t info
Definition unistd.h:243
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(fchown)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(seteuid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(fsync)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(pwrite)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(mkdirs)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(symlink)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(mkdirat)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getpgrp)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(ttyname)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(fdatasync)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(_exit)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getgid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(mkdir)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getpid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(ftruncate)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getlogin)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(chown)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getpass)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getegid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(__execl_va)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(sethostname)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(setresgid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(__execlp_va)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getlogin_r)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(sysconf)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(lchown)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(geteuid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getsid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(tcgetpgrp)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(confstr)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(lseek64)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(sethostid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(execvpe)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(execve)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getentropy)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getuid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(setuid)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(isatty)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(fchownat)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(readv)
Definition vsf_cfg.h:95
#define fpathconf
Definition unistd.h:85
#define pathconf
Definition unistd.h:84
#define pause
Definition unistd.h:52
#define link
Definition unistd.h:118
int dup2(int oldfd, int newfd)
Definition vsf_linux_fs.c:1582
#define exec_ret_t
Definition unistd.h:44
__VSF_VPLT_DECORATOR__ vsf_linux_unistd_vplt_t vsf_linux_unistd_vplt
Definition vsf_linux.c:5013
int lchown(const char *pathname, uid_t owner, gid_t group)
Definition vsf_linux.c:3058
#define sethostid
Definition unistd.h:111
#define lseek
Definition unistd.h:123
#define unlink
Definition unistd.h:116
#define access
Definition unistd.h:115
#define setresuid
Definition unistd.h:74
int fchown(int fd, uid_t owner, gid_t group)
Definition vsf_linux.c:3053
int dup(int oldfd)
Definition vsf_linux_fs.c:1577
#define setgid
Definition unistd.h:57
int mkdirs(const char *pathname, mode_t mode)
Definition vsf_linux_fs.c:1559
#define mkdir
Definition unistd.h:119
#define execv
Definition unistd.h:79
#define getpagesize
Definition unistd.h:96
#define execlp
Definition unistd.h:78
#define alarm
Definition unistd.h:88
#define confstr
Definition unistd.h:48
#define setegid
Definition unistd.h:59
#define pwrite
Definition unistd.h:129
#define getpass
Definition unistd.h:104
#define writev
Definition unistd.h:127
#define _CS_PATH
Definition unistd.h:191
#define getpgid
Definition unistd.h:71
@ DT_REG
Definition unistd.h:200
@ DT_CHR
Definition unistd.h:204
@ DT_DIR
Definition unistd.h:201
@ DT_FIFO
Definition unistd.h:202
@ DT_LNK
Definition unistd.h:206
@ DT_SOCK
Definition unistd.h:203
@ DT_BLK
Definition unistd.h:205
@ DT_UNKNOWN
Definition unistd.h:199
@ DT_EXE
Definition unistd.h:207
#define ftruncate64
Definition unistd.h:99
#define pread
Definition unistd.h:128
#define fchdir
Definition unistd.h:133
#define execvpe
Definition unistd.h:82
#define gethostid
Definition unistd.h:110
@ _SC_PAGE_SIZE
Definition unistd.h:218
@ _SC_SYMLOOP_MAX
Definition unistd.h:215
@ _SC_OPEN_MAX
Definition unistd.h:212
@ _SC_GETGR_R_SIZE_MAX
Definition unistd.h:214
@ _SC_PAGESIZE
Definition unistd.h:211
@ _SC_CLK_TCK
Definition unistd.h:213
@ _SC_NPROCESSORS_ONLN
Definition unistd.h:216
#define getlogin
Definition unistd.h:54
int fchownat(int dirfd, const char *pathname, uid_t owner, gid_t group, int flags)
Definition vsf_linux.c:3063
#define getpgrp
Definition unistd.h:73
#define tcgetpgrp
Definition unistd.h:102
#define getcwd
Definition unistd.h:134
#define pipe2
Definition unistd.h:87
#define truncate
Definition unistd.h:98
exec_ret_t execle(const char *pathname, const char *arg,...)
Definition vsf_linux.c:2444
#define readv
Definition unistd.h:126
#define truncate64
Definition unistd.h:100
ssize_t preadv64(int fd, const struct iovec *vector, int iovcnt, off64_t offset)
Definition vsf_linux_fs.c:2028
#define ualarm
Definition unistd.h:89
#define pipe
Definition unistd.h:86
#define seteuid
Definition unistd.h:63
#define read
Definition unistd.h:124
#define rmdir
Definition unistd.h:121
#define execl
Definition unistd.h:77
#define acct
Definition unistd.h:92
#define execvp
Definition unistd.h:81
#define setsid
Definition unistd.h:68
#define fdatasync
Definition unistd.h:136
#define unlinkat
Definition unistd.h:117
#define setpgrp
Definition unistd.h:72
#define preadv
Definition unistd.h:130
int chown(const char *pathname, uid_t owner, gid_t group)
Definition vsf_linux.c:3048
#define getuid
Definition unistd.h:62
off64_t lseek64(int fd, off64_t offset, int whence)
Definition vsf_linux_fs.c:2110
char * ttyname(int fd)
Definition vsf_linux.c:1104
#define pwritev
Definition unistd.h:131
#define symlink
Definition unistd.h:95
#define ftruncate
Definition unistd.h:97
int ttyname_r(int fd, char *buf, size_t buflen)
Definition vsf_linux.c:1082
#define sysconf
Definition unistd.h:83
#define close
Definition unistd.h:122
#define chdir
Definition unistd.h:132
#define getgid
Definition unistd.h:58
#define usleep
Definition unistd.h:50
#define mkdirat
Definition unistd.h:120
#define gethostname
Definition unistd.h:105
#define fork
Definition unistd.h:90
#define getentropy
Definition unistd.h:108
#define _exit
Definition unistd.h:91
#define geteuid
Definition unistd.h:64
#define write
Definition unistd.h:125
void sync(void)
Definition vsf_linux_fs.c:2137
#define setresgid
Definition unistd.h:75
#define setuid
Definition unistd.h:61
#define sleep
Definition unistd.h:51
#define getlogin_r
Definition unistd.h:55
#define getegid
Definition unistd.h:60
pid_t __vsf_linux_vfork_prepare(vsf_linux_process_t *parent_process)
Definition vsf_linux.c:3892
int syncfs(int fd)
Definition vsf_linux_fs.c:2141
#define fsync
Definition unistd.h:135
#define sethostname
Definition unistd.h:106
#define getsid
Definition unistd.h:69
#define getpid
Definition unistd.h:65
#define setpgid
Definition unistd.h:70
#define gettid
Definition unistd.h:67
#define _CS_GNU_LIBC_VERSION
Definition unistd.h:193
#define execve
Definition unistd.h:80
ssize_t pwritev64(int fd, const struct iovec *vector, int iovcnt, off64_t offset)
Definition vsf_linux_fs.c:2064
#define getppid
Definition unistd.h:66
#define tcsetpgrp
Definition unistd.h:103
int getdtablesize(void)
Definition vsf_linux.c:3886
#define isatty
Definition unistd.h:94
int dup3(int oldfd, int newfd, int flags)
Definition vsf_linux_fs.c:1587
int daemon(int nochdir, int noclose)
Definition vsf_linux.c:1900
@ _PC_MAX_CANON
Definition unistd.h:223
@ _PC_LINK_MAX
Definition unistd.h:222
@ _PC_MAX_INPUT
Definition unistd.h:224
@ _PC_NAME_MAX
Definition unistd.h:225
@ _PC_PATH_MAX
Definition unistd.h:226
#define _CS_GNU_LIBPTHREAD_VERSION
Definition unistd.h:195
int chroot(const char *path)
Definition vsf_linux_fs.c:1633
#define readlink
Definition unistd.h:101
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93
#define VSF_APPLET_VPLT_ENTRY_FUNC_TRACE()
Definition vsf_cfg.h:165
exec_ret_t __execl_va(const char *pathname, const char *arg, va_list ap, bool has_env)
Definition vsf_linux.c:2407
exec_ret_t __execlp_va(const char *pathname, const char *arg, va_list ap)
Definition vsf_linux.c:2370
#define VSF_APPLET_VPLT_FUNC_DECORATOR(__NAME)
Definition vsf_linux_applet_lib.c:1
uint64_t offset
Definition vsf_memfs.h:49
uint_fast8_t length
Definition vsf_pbuf.c:38
uint8_t status
Definition vsf_tgui.h:139