posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
posix_stdlib.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 The Zephyr Contributors
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
19#ifndef ZEPHYR_INCLUDE_POSIX_POSIX_STDLIB_H_
20#define ZEPHYR_INCLUDE_POSIX_POSIX_STDLIB_H_
21
22#include <stddef.h> /* NULL, size_t */
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
28/* TODO: additional POSIX signatures here */
29
30#if defined(_BSD_SOURCE) || defined(__DOXYGEN__)
44int getenv_r(const char *name, char *buf, size_t len);
45#endif
46
47#if defined(_POSIX_C_SOURCE) || defined(__DOXYGEN__)
60int getsubopt(char **optionp, char *const *keylistp, char **valuep);
61#endif
62
63#if defined(_XOPEN_SOURCE) || defined(__DOXYGEN__)
76int putenv(char *string);
77#endif
78
79#if defined(_POSIX_C_SOURCE) || defined(__DOXYGEN__)
89int setenv(const char *envname, const char *envval, int overwrite);
90
98int unsetenv(const char *name);
99#endif /* defined(_POSIX_C_SOURCE) || defined(__DOXYGEN__) */
100
101#ifdef __cplusplus
102}
103#endif
104
105#endif /* ZEPHYR_INCLUDE_POSIX_POSIX_STDLIB_H_ */
int getsubopt(char **optionp, char *const *keylistp, char **valuep)
Parse sub-options from a command-line argument string.
int unsetenv(const char *name)
Remove an environment variable.
int setenv(const char *envname, const char *envval, int overwrite)
Set the value of an environment variable.
int putenv(char *string)
Add or change an environment variable (XSI extension).
int getenv_r(const char *name, char *buf, size_t len)
Get an environment variable into a caller-supplied buffer (BSD extension).