6#ifndef ZEPHYR_INCLUDE_POSIX_UNISTD_H_
7#define ZEPHYR_INCLUDE_POSIX_UNISTD_H_
11#ifdef CONFIG_POSIX_API
14#ifdef CONFIG_NETWORKING
29#ifdef CONFIG_POSIX_API
32ssize_t write(
int file,
const void *buffer,
size_t count);
33ssize_t read(
int file,
void *buffer,
size_t count);
34off_t lseek(
int file,
off_t offset,
int whence);
36int ftruncate(
int fd,
off_t length);
38#ifdef CONFIG_POSIX_SYNCHRONIZED_IO
43int rename(
const char *old,
const char *newp);
44int unlink(
const char *path);
45int stat(
const char *path,
struct stat *buf);
47int rmdir(
const char *path);
49FUNC_NORETURN
void _exit(
int status);
51#ifdef CONFIG_NETWORKING
60#ifdef CONFIG_POSIX_C_LIB_EXT
61int getopt(
int argc,
char *
const argv[],
const char *optstring);
63extern int opterr, optind, optopt;
68unsigned sleep(
unsigned int seconds);
70#if _POSIX_C_SOURCE >= 2
71size_t confstr(
int name,
char *buf,
size_t len);
74#ifdef CONFIG_POSIX_SYSCONF_IMPL_MACRO
75#define sysconf(x) (long)CONCAT(__z_posix_sysconf, x)
static int gethostname(char *buf, size_t len)
POSIX wrapper for zsock_gethostname.
Definition socket.h:973
static int close(int sock)
POSIX wrapper for zsock_close.
Definition socket.h:830
int zsock_gethostname(char *buf, size_t len)
Get local host name.
Hostname configuration definitions.
__SIZE_TYPE__ ssize_t
Definition types.h:28
__INTPTR_TYPE__ off_t
Definition types.h:36
unsigned int mode_t
Definition types.h:14
BSD Sockets compatible API definitions.
unsigned long useconds_t
Definition posix_types.h:83
int pid_t
Definition posix_types.h:79
int stat(const char *__restrict __path, struct stat *__restrict __sbuf)
int mkdir(const char *_path, mode_t __mode)
int usleep(useconds_t useconds)
int getentropy(void *buffer, size_t length)
unsigned sleep(unsigned int seconds)