msp430_common/include/unistd.h
1 /*
2  * Copyright (C) 2016 Eistec AB
3  * Copyright (C) 2015 Kaspar Schleiser <kaspar@schleiser.de>
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
10 #ifndef UNISTD_H
11 #define UNISTD_H
12 
13 #include <stddef.h>
14 #include <stdint.h>
15 #include <sys/types.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #define STDIN_FILENO 0 /* standard input file descriptor */
22 #define STDOUT_FILENO 1 /* standard output file descriptor */
23 #define STDERR_FILENO 2 /* standard error file descriptor */
24 
25 #define F_OK 0
26 #define R_OK 4
27 #define W_OK 2
28 #define X_OK 1
29 
30 #define SEEK_SET 0
31 #define SEEK_CUR 1
32 #define SEEK_END 2
33 
34 int access(const char *, int);
35 unsigned alarm(unsigned);
36 int chdir(const char *);
37 int chown(const char *, uid_t, gid_t);
38 int close(int);
39 size_t confstr(int, char *, size_t);
40 int dup(int);
41 int dup2(int, int);
42 void _exit(int);
43 int execl(const char *, const char *, ...);
44 int execle(const char *, const char *, ...);
45 int execlp(const char *, const char *, ...);
46 int execv(const char *, char *const []);
47 int execve(const char *, char *const [], char *const []);
48 int execvp(const char *, char *const []);
49 int faccessat(int, const char *, int, int);
50 int fchdir(int);
51 int fchown(int, uid_t, gid_t);
52 int fchownat(int, const char *, uid_t, gid_t, int);
53 int fexecve(int, char *const [], char *const []);
54 pid_t fork(void);
55 long fpathconf(int, int);
56 int ftruncate(int, off_t);
57 char *getcwd(char *, size_t);
58 gid_t getegid(void);
59 uid_t geteuid(void);
60 gid_t getgid(void);
61 int getgroups(int, gid_t []);
62 int gethostname(char *, size_t);
63 char *getlogin(void);
64 int getlogin_r(char *, size_t);
65 int getopt(int, char * const [], const char *);
66 pid_t getpgid(pid_t);
67 pid_t getpgrp(void);
68 pid_t getpid(void);
69 pid_t getppid(void);
70 pid_t getsid(pid_t);
71 uid_t getuid(void);
72 int isatty(int);
73 int lchown(const char *, uid_t, gid_t);
74 int link(const char *, const char *);
75 int linkat(int, const char *, int, const char *, int);
76 off_t lseek(int, off_t, int);
77 long pathconf(const char *, int);
78 int pause(void);
79 int pipe(int [2]);
80 ssize_t pread(int, void *, size_t, off_t);
81 ssize_t pwrite(int, const void *, size_t, off_t);
82 ssize_t read(int, void *, size_t);
83 ssize_t readlink(const char *restrict, char *restrict, size_t);
84 ssize_t readlinkat(int, const char *restrict, char *restrict, size_t);
85 int rmdir(const char *);
86 int setegid(gid_t);
87 int seteuid(uid_t);
88 int setgid(gid_t);
89 int setpgid(pid_t, pid_t);
90 pid_t setsid(void);
91 int setuid(uid_t);
92 unsigned sleep(unsigned);
93 int symlink(const char *, const char *);
94 int symlinkat(const char *, int, const char *);
95 long sysconf(int);
96 pid_t tcgetpgrp(int);
97 int tcsetpgrp(int, pid_t);
98 int truncate(const char *, off_t);
99 char *ttyname(int);
100 int ttyname_r(int, char *, size_t);
101 int unlink(const char *);
102 int unlinkat(int, const char *, int);
103 int usleep(useconds_t);
104 ssize_t write(int, const void *, size_t);
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 #endif /* UNISTD_H */