• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef	_UNISTD_H
2 #define	_UNISTD_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include <features.h>
9 
10 #define STDIN_FILENO  0
11 #define STDOUT_FILENO 1
12 #define STDERR_FILENO 2
13 
14 #define SEEK_SET 0
15 #define SEEK_CUR 1
16 #define SEEK_END 2
17 #ifndef __LITEOS_A__
18 #define SEEK_DATA 3
19 #define SEEK_HOLE 4
20 #endif
21 
22 #ifdef __LITEOS_A__
23 #ifdef __cplusplus
24 #define NULL 0L
25 #else
26 #define NULL ((void*)0)
27 #endif
28 #else
29 #if __cplusplus >= 201103L
30 #define NULL nullptr
31 #elif defined(__cplusplus)
32 #define NULL 0L
33 #else
34 #define NULL ((void*)0)
35 #endif
36 #endif
37 
38 #define __NEED_size_t
39 #define __NEED_ssize_t
40 #define __NEED_uid_t
41 #define __NEED_gid_t
42 #define __NEED_off_t
43 #define __NEED_pid_t
44 #define __NEED_intptr_t
45 #define __NEED_useconds_t
46 
47 #include <bits/alltypes.h>
48 
49 int pipe(int [2]);
50 int pipe2(int [2], int);
51 int close(int);
52 int posix_close(int, int);
53 int dup(int);
54 int dup2(int, int);
55 int dup3(int, int, int);
56 off_t lseek(int, off_t, int);
57 int fsync(int);
58 int fdatasync(int);
59 
60 ssize_t read(int, void *, size_t);
61 ssize_t write(int, const void *, size_t);
62 ssize_t pread(int, void *, size_t, off_t);
63 ssize_t pwrite(int, const void *, size_t, off_t);
64 
65 int chown(const char *, uid_t, gid_t);
66 int fchown(int, uid_t, gid_t);
67 int lchown(const char *, uid_t, gid_t);
68 int fchownat(int, const char *, uid_t, gid_t, int);
69 
70 int link(const char *, const char *);
71 int linkat(int, const char *, int, const char *, int);
72 int symlink(const char *, const char *);
73 int symlinkat(const char *, int, const char *);
74 ssize_t readlink(const char *__restrict, char *__restrict, size_t);
75 ssize_t readlinkat(int, const char *__restrict, char *__restrict, size_t);
76 int unlink(const char *);
77 int unlinkat(int, const char *, int);
78 int rmdir(const char *);
79 int truncate(const char *, off_t);
80 int ftruncate(int, off_t);
81 
82 #define F_OK 0
83 #define R_OK 4
84 #define W_OK 2
85 #define X_OK 1
86 
87 int access(const char *, int);
88 int faccessat(int, const char *, int, int);
89 
90 #ifdef __LITEOS_A__
91 /* Format options */
92 #define FMT_FAT      0x01
93 #define FMT_FAT32    0x02
94 #define FMT_ANY      0x07
95 #define FMT_ERASE    0x08
96 
97 /**
98   * @brief format FAT device (SD card, U disk, and MMC card), this function is OHOS-specific
99   * @param dev device name.
100   * @param sectors sectors per cluster, can be 0 OR power of 2. The sector size for standard FAT volumes is 512 bytes.
101   *    -- sector number is 0 OR >128: automatically choose the appropriate cluster size.
102   *    -- sector number is 1 ~ 128: cluster size = sectors per cluster * 512B.
103   * @param option file system type.
104   *    -- FMT_FAT
105   *    -- FMT_FAT32
106   *    -- FMT_ANY
107   *    -- FMT_ERASE (USB not supported)
108   * @return format result
109   * @retval -1 format error
110   * @retval 0 format successful
111   */
112 int format(const char *dev, int sectors, int option);
113 #endif
114 
115 int chdir(const char *);
116 int fchdir(int);
117 char *getcwd(char *, size_t);
118 
119 unsigned alarm(unsigned);
120 unsigned sleep(unsigned);
121 int pause(void);
122 
123 pid_t fork(void);
124 #ifndef __LITEOS_A__
125 pid_t _Fork(void);
126 #endif
127 int execve(const char *, char *const [], char *const []);
128 int execv(const char *, char *const []);
129 int execle(const char *, const char *, ...);
130 int execl(const char *, const char *, ...);
131 int execvp(const char *, char *const []);
132 int execlp(const char *, const char *, ...);
133 int fexecve(int, char *const [], char *const []);
134 _Noreturn void _exit(int);
135 
136 /**
137  * @brief Get the pid in the system namespace
138  *
139  * get the pid in the system namespace, used to globally mark processes in the pid sandbox.\n
140  *
141  * @param NA
142  * @return pid
143  * @since 4.1
144  */
145 pid_t getprocpid(void);
146 
147 /**
148  * @brief Get the tid in the system namespace
149  *
150  * get the tid in the system namespace, used to globally mark processes in the pid sandbox.\n
151  *
152  * @param NA
153  * @return pid
154  * @since 4.1
155  */
156 pid_t getproctid(void);
157 pid_t getpid(void);
158 pid_t getppid(void);
159 pid_t getpgrp(void);
160 pid_t getpgid(pid_t);
161 int setpgid(pid_t, pid_t);
162 pid_t setsid(void);
163 pid_t getsid(pid_t);
164 char *ttyname(int);
165 int ttyname_r(int, char *, size_t);
166 int isatty(int);
167 pid_t tcgetpgrp(int);
168 int tcsetpgrp(int, pid_t);
169 
170 uid_t getuid(void);
171 uid_t geteuid(void);
172 gid_t getgid(void);
173 gid_t getegid(void);
174 int getgroups(int, gid_t []);
175 int setuid(uid_t);
176 int seteuid(uid_t);
177 int setgid(gid_t);
178 int setegid(gid_t);
179 
180 char *getlogin(void);
181 int getlogin_r(char *, size_t);
182 int gethostname(char *, size_t);
183 char *ctermid(char *);
184 
185 int getopt(int, char * const [], const char *);
186 extern char *optarg;
187 extern int optind, opterr, optopt;
188 
189 long pathconf(const char *, int);
190 long fpathconf(int, int);
191 long sysconf(int);
192 size_t confstr(int, char *, size_t);
193 
194 #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
195 #define F_ULOCK 0
196 #define F_LOCK  1
197 #define F_TLOCK 2
198 #define F_TEST  3
199 int setreuid(uid_t, uid_t);
200 int setregid(gid_t, gid_t);
201 int lockf(int, int, off_t);
202 long gethostid(void);
203 int nice(int);
204 void sync(void);
205 pid_t setpgrp(void);
206 char *crypt(const char *, const char *);
207 void encrypt(char *, int);
208 void swab(const void *__restrict, void *__restrict, ssize_t);
209 #endif
210 
211 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) \
212  || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700)
213 int usleep(unsigned);
214 unsigned ualarm(unsigned, unsigned);
215 #endif
216 
217 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
218 #define L_SET 0
219 #define L_INCR 1
220 #define L_XTND 2
221 int brk(void *);
222 void *sbrk(intptr_t);
223 pid_t vfork(void);
224 int vhangup(void);
225 int chroot(const char *);
226 int getpagesize(void);
227 int getdtablesize(void);
228 int sethostname(const char *, size_t);
229 int getdomainname(char *, size_t);
230 int setdomainname(const char *, size_t);
231 int setgroups(size_t, const gid_t *);
232 char *getpass(const char *);
233 int daemon(int, int);
234 void setusershell(void);
235 void endusershell(void);
236 char *getusershell(void);
237 int acct(const char *);
238 long syscall(long, ...);
239 int execvpe(const char *, char *const [], char *const []);
240 int issetugid(void);
241 int getentropy(void *, size_t);
242 extern int optreset;
243 #endif
244 
245 #ifdef _GNU_SOURCE
246 extern char **environ;
247 int setresuid(uid_t, uid_t, uid_t);
248 int setresgid(gid_t, gid_t, gid_t);
249 int getresuid(uid_t *, uid_t *, uid_t *);
250 int getresgid(gid_t *, gid_t *, gid_t *);
251 char *get_current_dir_name(void);
252 int syncfs(int);
253 int euidaccess(const char *, int);
254 int eaccess(const char *, int);
255 ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
256 #ifndef __LITEOS_A__
257 pid_t gettid(void);
258 #endif
259 #endif
260 
261 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
262 #define lseek64 lseek
263 #define pread64 pread
264 #define pwrite64 pwrite
265 #define truncate64 truncate
266 #define ftruncate64 ftruncate
267 #define lockf64 lockf
268 #define off64_t off_t
269 #endif
270 
271 #define POSIX_CLOSE_RESTART     0
272 
273 #define _XOPEN_VERSION          700
274 #define _XOPEN_UNIX             1
275 #define _XOPEN_ENH_I18N         1
276 
277 #define _POSIX_VERSION          200809L
278 #define _POSIX2_VERSION         _POSIX_VERSION
279 
280 #define _POSIX_ADVISORY_INFO    _POSIX_VERSION
281 #define _POSIX_CHOWN_RESTRICTED 1
282 #define _POSIX_IPV6             _POSIX_VERSION
283 #define _POSIX_JOB_CONTROL      1
284 #define _POSIX_MAPPED_FILES     _POSIX_VERSION
285 #define _POSIX_MEMLOCK          _POSIX_VERSION
286 #define _POSIX_MEMLOCK_RANGE    _POSIX_VERSION
287 #define _POSIX_MEMORY_PROTECTION _POSIX_VERSION
288 #define _POSIX_MESSAGE_PASSING  _POSIX_VERSION
289 #define _POSIX_FSYNC            _POSIX_VERSION
290 #define _POSIX_NO_TRUNC         1
291 #define _POSIX_RAW_SOCKETS      _POSIX_VERSION
292 #define _POSIX_REALTIME_SIGNALS _POSIX_VERSION
293 #define _POSIX_REGEXP           1
294 #define _POSIX_SAVED_IDS        1
295 #define _POSIX_SHELL            1
296 #define _POSIX_SPAWN            _POSIX_VERSION
297 #define _POSIX_VDISABLE         0
298 
299 #define _POSIX_THREADS          _POSIX_VERSION
300 #define _POSIX_THREAD_PROCESS_SHARED _POSIX_VERSION
301 #define _POSIX_THREAD_SAFE_FUNCTIONS _POSIX_VERSION
302 #define _POSIX_THREAD_ATTR_STACKADDR _POSIX_VERSION
303 #define _POSIX_THREAD_ATTR_STACKSIZE _POSIX_VERSION
304 #define _POSIX_THREAD_PRIORITY_SCHEDULING _POSIX_VERSION
305 #define _POSIX_THREAD_CPUTIME   _POSIX_VERSION
306 #define _POSIX_TIMERS           _POSIX_VERSION
307 #define _POSIX_TIMEOUTS         _POSIX_VERSION
308 #define _POSIX_MONOTONIC_CLOCK  _POSIX_VERSION
309 #define _POSIX_CPUTIME          _POSIX_VERSION
310 #define _POSIX_CLOCK_SELECTION  _POSIX_VERSION
311 #define _POSIX_BARRIERS         _POSIX_VERSION
312 #define _POSIX_SPIN_LOCKS       _POSIX_VERSION
313 #define _POSIX_READER_WRITER_LOCKS _POSIX_VERSION
314 #define _POSIX_ASYNCHRONOUS_IO  _POSIX_VERSION
315 #define _POSIX_SEMAPHORES       _POSIX_VERSION
316 #define _POSIX_SHARED_MEMORY_OBJECTS _POSIX_VERSION
317 
318 #define _POSIX2_C_BIND          _POSIX_VERSION
319 
320 #include <bits/posix.h>
321 
322 
323 
324 #define _PC_LINK_MAX	0
325 #define _PC_MAX_CANON	1
326 #define _PC_MAX_INPUT	2
327 #define _PC_NAME_MAX	3
328 #define _PC_PATH_MAX	4
329 #define _PC_PIPE_BUF	5
330 #define _PC_CHOWN_RESTRICTED	6
331 #define _PC_NO_TRUNC	7
332 #define _PC_VDISABLE	8
333 #define _PC_SYNC_IO	9
334 #define _PC_ASYNC_IO	10
335 #define _PC_PRIO_IO	11
336 #define _PC_SOCK_MAXBUF	12
337 #define _PC_FILESIZEBITS	13
338 #define _PC_REC_INCR_XFER_SIZE	14
339 #define _PC_REC_MAX_XFER_SIZE	15
340 #define _PC_REC_MIN_XFER_SIZE	16
341 #define _PC_REC_XFER_ALIGN	17
342 #define _PC_ALLOC_SIZE_MIN	18
343 #define _PC_SYMLINK_MAX	19
344 #define _PC_2_SYMLINKS	20
345 
346 #define _SC_ARG_MAX	0
347 #define _SC_CHILD_MAX	1
348 #define _SC_CLK_TCK	2
349 #define _SC_NGROUPS_MAX	3
350 #define _SC_OPEN_MAX	4
351 #define _SC_STREAM_MAX	5
352 #define _SC_TZNAME_MAX	6
353 #define _SC_JOB_CONTROL	7
354 #define _SC_SAVED_IDS	8
355 #define _SC_REALTIME_SIGNALS	9
356 #define _SC_PRIORITY_SCHEDULING	10
357 #define _SC_TIMERS	11
358 #define _SC_ASYNCHRONOUS_IO	12
359 #define _SC_PRIORITIZED_IO	13
360 #define _SC_SYNCHRONIZED_IO	14
361 #define _SC_FSYNC	15
362 #define _SC_MAPPED_FILES	16
363 #define _SC_MEMLOCK	17
364 #define _SC_MEMLOCK_RANGE	18
365 #define _SC_MEMORY_PROTECTION	19
366 #define _SC_MESSAGE_PASSING	20
367 #define _SC_SEMAPHORES	21
368 #define _SC_SHARED_MEMORY_OBJECTS	22
369 #define _SC_AIO_LISTIO_MAX	23
370 #define _SC_AIO_MAX	24
371 #define _SC_AIO_PRIO_DELTA_MAX	25
372 #define _SC_DELAYTIMER_MAX	26
373 #define _SC_MQ_OPEN_MAX	27
374 #define _SC_MQ_PRIO_MAX	28
375 #define _SC_VERSION	29
376 #define _SC_PAGE_SIZE	30
377 #define _SC_PAGESIZE	30 /* !! */
378 #define _SC_RTSIG_MAX	31
379 #define _SC_SEM_NSEMS_MAX	32
380 #define _SC_SEM_VALUE_MAX	33
381 #define _SC_SIGQUEUE_MAX	34
382 #define _SC_TIMER_MAX	35
383 #define _SC_BC_BASE_MAX	36
384 #define _SC_BC_DIM_MAX	37
385 #define _SC_BC_SCALE_MAX	38
386 #define _SC_BC_STRING_MAX	39
387 #define _SC_COLL_WEIGHTS_MAX	40
388 #define _SC_EXPR_NEST_MAX	42
389 #define _SC_LINE_MAX	43
390 #define _SC_RE_DUP_MAX	44
391 #define _SC_2_VERSION	46
392 #define _SC_2_C_BIND	47
393 #define _SC_2_C_DEV	48
394 #define _SC_2_FORT_DEV	49
395 #define _SC_2_FORT_RUN	50
396 #define _SC_2_SW_DEV	51
397 #define _SC_2_LOCALEDEF	52
398 #define _SC_UIO_MAXIOV	60 /* !! */
399 #define _SC_IOV_MAX	60
400 #define _SC_THREADS	67
401 #define _SC_THREAD_SAFE_FUNCTIONS	68
402 #define _SC_GETGR_R_SIZE_MAX	69
403 #define _SC_GETPW_R_SIZE_MAX	70
404 #define _SC_LOGIN_NAME_MAX	71
405 #define _SC_TTY_NAME_MAX	72
406 #define _SC_THREAD_DESTRUCTOR_ITERATIONS	73
407 #define _SC_THREAD_KEYS_MAX	74
408 #define _SC_THREAD_STACK_MIN	75
409 #define _SC_THREAD_THREADS_MAX	76
410 #define _SC_THREAD_ATTR_STACKADDR	77
411 #define _SC_THREAD_ATTR_STACKSIZE	78
412 #define _SC_THREAD_PRIORITY_SCHEDULING	79
413 #define _SC_THREAD_PRIO_INHERIT	80
414 #define _SC_THREAD_PRIO_PROTECT	81
415 #define _SC_THREAD_PROCESS_SHARED	82
416 #define _SC_NPROCESSORS_CONF	83
417 #define _SC_NPROCESSORS_ONLN	84
418 #define _SC_PHYS_PAGES	85
419 #define _SC_AVPHYS_PAGES	86
420 #define _SC_ATEXIT_MAX	87
421 #define _SC_PASS_MAX	88
422 #define _SC_XOPEN_VERSION	89
423 #define _SC_XOPEN_XCU_VERSION	90
424 #define _SC_XOPEN_UNIX	91
425 #define _SC_XOPEN_CRYPT	92
426 #define _SC_XOPEN_ENH_I18N	93
427 #define _SC_XOPEN_SHM	94
428 #define _SC_2_CHAR_TERM	95
429 #define _SC_2_UPE	97
430 #define _SC_XOPEN_XPG2	98
431 #define _SC_XOPEN_XPG3	99
432 #define _SC_XOPEN_XPG4	100
433 #define _SC_NZERO	109
434 #define _SC_XBS5_ILP32_OFF32	125
435 #define _SC_XBS5_ILP32_OFFBIG	126
436 #define _SC_XBS5_LP64_OFF64	127
437 #define _SC_XBS5_LPBIG_OFFBIG	128
438 #define _SC_XOPEN_LEGACY	129
439 #define _SC_XOPEN_REALTIME	130
440 #define _SC_XOPEN_REALTIME_THREADS	131
441 #define _SC_ADVISORY_INFO	132
442 #define _SC_BARRIERS	133
443 #define _SC_CLOCK_SELECTION	137
444 #define _SC_CPUTIME	138
445 #define _SC_THREAD_CPUTIME	139
446 #define _SC_MONOTONIC_CLOCK	149
447 #define _SC_READER_WRITER_LOCKS	153
448 #define _SC_SPIN_LOCKS	154
449 #define _SC_REGEXP	155
450 #define _SC_SHELL	157
451 #define _SC_SPAWN	159
452 #define _SC_SPORADIC_SERVER	160
453 #define _SC_THREAD_SPORADIC_SERVER	161
454 #define _SC_TIMEOUTS	164
455 #define _SC_TYPED_MEMORY_OBJECTS	165
456 #define _SC_2_PBS	168
457 #define _SC_2_PBS_ACCOUNTING	169
458 #define _SC_2_PBS_LOCATE	170
459 #define _SC_2_PBS_MESSAGE	171
460 #define _SC_2_PBS_TRACK	172
461 #define _SC_SYMLOOP_MAX	173
462 #define _SC_STREAMS	174
463 #define _SC_2_PBS_CHECKPOINT	175
464 #define _SC_V6_ILP32_OFF32	176
465 #define _SC_V6_ILP32_OFFBIG	177
466 #define _SC_V6_LP64_OFF64	178
467 #define _SC_V6_LPBIG_OFFBIG	179
468 #define _SC_HOST_NAME_MAX	180
469 #define _SC_TRACE	181
470 #define _SC_TRACE_EVENT_FILTER	182
471 #define _SC_TRACE_INHERIT	183
472 #define _SC_TRACE_LOG	184
473 
474 #define _SC_IPV6	235
475 #define _SC_RAW_SOCKETS	236
476 #define _SC_V7_ILP32_OFF32	237
477 #define _SC_V7_ILP32_OFFBIG	238
478 #define _SC_V7_LP64_OFF64	239
479 #define _SC_V7_LPBIG_OFFBIG	240
480 #define _SC_SS_REPL_MAX	241
481 #define _SC_TRACE_EVENT_NAME_MAX	242
482 #define _SC_TRACE_NAME_MAX	243
483 #define _SC_TRACE_SYS_MAX	244
484 #define _SC_TRACE_USER_EVENT_MAX	245
485 #define _SC_XOPEN_STREAMS	246
486 #define _SC_THREAD_ROBUST_PRIO_INHERIT	247
487 #define _SC_THREAD_ROBUST_PRIO_PROTECT	248
488 #define _SC_MINSIGSTKSZ	249
489 #define _SC_SIGSTKSZ	250
490 
491 #define _CS_PATH	0
492 #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS	1
493 #define _CS_GNU_LIBC_VERSION	2
494 #define _CS_GNU_LIBPTHREAD_VERSION	3
495 #define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS	4
496 #define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS	5
497 
498 #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS	1116
499 #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS	1117
500 #define _CS_POSIX_V6_ILP32_OFF32_LIBS	1118
501 #define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS	1119
502 #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS	1120
503 #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS	1121
504 #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS	1122
505 #define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS	1123
506 #define _CS_POSIX_V6_LP64_OFF64_CFLAGS	1124
507 #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS	1125
508 #define _CS_POSIX_V6_LP64_OFF64_LIBS	1126
509 #define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS	1127
510 #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS	1128
511 #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS	1129
512 #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS	1130
513 #define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS	1131
514 #define _CS_POSIX_V7_ILP32_OFF32_CFLAGS	1132
515 #define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS	1133
516 #define _CS_POSIX_V7_ILP32_OFF32_LIBS	1134
517 #define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS	1135
518 #define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS	1136
519 #define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS	1137
520 #define _CS_POSIX_V7_ILP32_OFFBIG_LIBS	1138
521 #define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS	1139
522 #define _CS_POSIX_V7_LP64_OFF64_CFLAGS	1140
523 #define _CS_POSIX_V7_LP64_OFF64_LDFLAGS	1141
524 #define _CS_POSIX_V7_LP64_OFF64_LIBS	1142
525 #define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS	1143
526 #define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS	1144
527 #define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS	1145
528 #define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS	1146
529 #define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS	1147
530 #define _CS_V6_ENV	1148
531 #define _CS_V7_ENV	1149
532 #define _CS_POSIX_V7_THREADS_CFLAGS	1150
533 #define _CS_POSIX_V7_THREADS_LDFLAGS	1151
534 
535 #ifdef _GNU_SOURCE
536 #ifndef TEMP_FAILURE_RETRY
537 #define MUSL_TEMP_FAILURE_RETRY(expression) \
538     (__extension__ \
539         ({ long int __result; \
540             do __result = (long int)(expression); \
541             while(__result == -1L && errno == EINTR); \
542         __result;}))
543 
544 #define TEMP_FAILURE_RETRY(expression) MUSL_TEMP_FAILURE_RETRY(expression)
545 #endif
546 #endif
547 
548 #ifndef __LITEOS__
549 #include <fortify/unistd.h>
550 #endif
551 #ifdef __cplusplus
552 }
553 #endif
554 
555 #endif
556