msp430_common/include/unistd.h
Go to the documentation of this file.
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 
18 #ifndef UNISTD_H
19 #define UNISTD_H
20 
21 #include <stddef.h>
22 #include <stdint.h>
23 #include <sys/types.h>
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #define STDIN_FILENO 0 /* standard input file descriptor */
30 #define STDOUT_FILENO 1 /* standard output file descriptor */
31 #define STDERR_FILENO 2 /* standard error file descriptor */
32 
33 #define F_OK 0
34 #define R_OK 4
35 #define W_OK 2
36 #define X_OK 1
37 
38 #define SEEK_SET 0
39 #define SEEK_CUR 1
40 #define SEEK_END 2
41 
42 int access(const char *, int);
43 unsigned alarm(unsigned);
44 int chdir(const char *);
45 int chown(const char *, uid_t, gid_t);
46 int close(int);
47 size_t confstr(int, char *, size_t);
48 int dup(int);
49 int dup2(int, int);
50 void _exit(int);
51 int execl(const char *, const char *, ...);
52 int execle(const char *, const char *, ...);
53 int execlp(const char *, const char *, ...);
54 int execv(const char *, char *const []);
55 int execve(const char *, char *const [], char *const []);
56 int execvp(const char *, char *const []);
57 int faccessat(int, const char *, int, int);
58 int fchdir(int);
59 int fchown(int, uid_t, gid_t);
60 int fchownat(int, const char *, uid_t, gid_t, int);
61 int fexecve(int, char *const [], char *const []);
62 pid_t fork(void);
63 long fpathconf(int, int);
64 int ftruncate(int, off_t);
65 char *getcwd(char *, size_t);
66 gid_t getegid(void);
67 uid_t geteuid(void);
68 gid_t getgid(void);
69 int getgroups(int, gid_t []);
70 int gethostname(char *, size_t);
71 char *getlogin(void);
72 int getlogin_r(char *, size_t);
73 int getopt(int, char * const [], const char *);
74 pid_t getpgid(pid_t);
75 pid_t getpgrp(void);
76 pid_t getpid(void);
77 pid_t getppid(void);
78 pid_t getsid(pid_t);
79 uid_t getuid(void);
80 int isatty(int);
81 int lchown(const char *, uid_t, gid_t);
82 int link(const char *, const char *);
83 int linkat(int, const char *, int, const char *, int);
84 off_t lseek(int, off_t, int);
85 long pathconf(const char *, int);
86 int pause(void);
87 int pipe(int [2]);
88 ssize_t pread(int, void *, size_t, off_t);
89 ssize_t pwrite(int, const void *, size_t, off_t);
90 ssize_t read(int, void *, size_t);
91 ssize_t readlink(const char *restrict, char *restrict, size_t);
92 ssize_t readlinkat(int, const char *restrict, char *restrict, size_t);
93 int rmdir(const char *);
94 int setegid(gid_t);
95 int seteuid(uid_t);
96 int setgid(gid_t);
97 int setpgid(pid_t, pid_t);
98 pid_t setsid(void);
99 int setuid(uid_t);
100 unsigned sleep(unsigned);
101 int symlink(const char *, const char *);
102 int symlinkat(const char *, int, const char *);
103 long sysconf(int);
104 pid_t tcgetpgrp(int);
105 int tcsetpgrp(int, pid_t);
106 int truncate(const char *, off_t);
107 char *ttyname(int);
108 int ttyname_r(int, char *, size_t);
109 int unlink(const char *);
110 int unlinkat(int, const char *, int);
111 int usleep(useconds_t);
112 ssize_t write(int, const void *, size_t);
113 
114 #ifdef __cplusplus
115 }
116 #endif
117 
118 #endif /* UNISTD_H */
119 
int32_t off_t
Used for file sizes and offsets.
Definition: msp430_types.h:86
uint16_t uid_t
Used for user IDs.
Definition: msp430_types.h:92
uint32_t useconds_t
Used for time in microseconds.
Definition: msp430_types.h:93
signed int ssize_t
Used for a count of bytes or an error indication.
Definition: msp430_types.h:89
int pid_t
Used for process IDs and process group IDs.
Definition: msp430_types.h:87
uint16_t gid_t
Used for group IDs.
Definition: msp430_types.h:80