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);
39int rename(
const char *old,
const char *newp);
40int unlink(
const char *path);
41int stat(
const char *path,
struct stat *buf);
44FUNC_NORETURN
void _exit(
int status);
46#ifdef CONFIG_NETWORKING
55#ifdef CONFIG_POSIX_C_LIB_EXT
56int getopt(
int argc,
char *
const argv[],
const char *optstring);
58extern int opterr, optind, optopt;
63unsigned sleep(
unsigned int seconds);
65#if _POSIX_C_SOURCE >= 2
66size_t confstr(
int name,
char *buf,
size_t len);
69#ifdef CONFIG_POSIX_SYSCONF_IMPL_MACRO
70#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:1022
static int close(int sock)
POSIX wrapper for zsock_close.
Definition: socket.h:879
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:29
int pid_t
Definition: posix_types.h:25
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)