VSF Documented
stdlib.h
Go to the documentation of this file.
1#ifndef __SIMPLE_LIBC_STDLIB_H__
2#define __SIMPLE_LIBC_STDLIB_H__
3
5
6#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED && VSF_LINUX_USE_SIMPLE_LIBC == ENABLED
7# include "./stddef.h"
8#else
9# include <stddef.h>
10#endif
11#include <stdint.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17// itoa is non-standard APIs in stdlib, define VSF_LINUX_LIBC_HAS_ITOA to 0 if any confliction
18#ifndef VSF_LINUX_LIBC_HAS_ITOA
19# define VSF_LINUX_LIBC_HAS_ITOA 1
20#endif
21
22#if VSF_LINUX_LIBC_CFG_WRAPPER == ENABLED
23# if VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR != ENABLED \
24 || VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR_TRACE_CALLER != ENABLED
25#define malloc VSF_LINUX_LIBC_WRAPPER(malloc)
26#define calloc VSF_LINUX_LIBC_WRAPPER(calloc)
27#define realloc VSF_LINUX_LIBC_WRAPPER(realloc)
28# endif
29#define aligned_alloc VSF_LINUX_LIBC_WRAPPER(aligned_alloc)
30#define free VSF_LINUX_LIBC_WRAPPER(free)
31#define posix_memalign VSF_LINUX_LIBC_WRAPPER(posix_memalign)
32#define malloc_usable_size VSF_LINUX_LIBC_WRAPPER(malloc_usable_size)
33#define exit VSF_LINUX_LIBC_WRAPPER(exit)
34#define atexit VSF_LINUX_LIBC_WRAPPER(atexit)
35#define _Exit VSF_LINUX_LIBC_WRAPPER(_Exit)
36#define system VSF_LINUX_LIBC_WRAPPER(system)
37# if VSF_LINUX_LIBC_USE_ENVIRON
38#define getenv VSF_LINUX_LIBC_WRAPPER(getenv)
39#define putenv VSF_LINUX_LIBC_WRAPPER(putenv)
40#define setenv VSF_LINUX_LIBC_WRAPPER(setenv)
41#define unsetenv VSF_LINUX_LIBC_WRAPPER(unsetenv)
42#define clearenv VSF_LINUX_LIBC_WRAPPER(clearenv)
43# endif
44#define realpath VSF_LINUX_LIBC_WRAPPER(realpath)
45#define mktemps VSF_LINUX_LIBC_WRAPPER(mktemps)
46#define mktemp VSF_LINUX_LIBC_WRAPPER(mktemp)
47#define mkstemp VSF_LINUX_LIBC_WRAPPER(mkstemp)
48#define mkostemp VSF_LINUX_LIBC_WRAPPER(mkostemp)
49#define mkstemps VSF_LINUX_LIBC_WRAPPER(mkstemps)
50#define mkostemps VSF_LINUX_LIBC_WRAPPER(mkostemps)
51#define mkdtemp VSF_LINUX_LIBC_WRAPPER(mkdtemp)
52#elif defined(__WIN__) && !defined(__VSF_APPLET__)
53// avoid conflicts with APIs in ucrt
54#define exit VSF_LINUX_LIBC_WRAPPER(exit)
55#define atexit VSF_LINUX_LIBC_WRAPPER(atexit)
56#define _Exit VSF_LINUX_LIBC_WRAPPER(_Exit)
57#define getenv VSF_LINUX_LIBC_WRAPPER(getenv)
58// system("chcp 65001"); will be called in debug_stream driver, wrapper here
59#define system VSF_LINUX_LIBC_WRAPPER(system)
60#endif
61
62// syscalls
63
64#define __NR_exit exit
65
66#ifndef RAND_MAX
67# ifdef __WIN__
68# define RAND_MAX 0x7FFF
69# else
70# define RAND_MAX 0x7FFF
71# endif
72#endif
73
74#ifdef __WIN__
75extern int ___mb_cur_max_func(void);
76# define MB_CUR_MAX ___mb_cur_max_func()
77#else
78# define MB_CUR_MAX 4 // for UTF8
79#endif
80
81#define EXIT_SUCCESS 0
82#define EXIT_FAILURE -1
83
84typedef struct {
85 int quot;
86 int rem;
87} div_t;
88typedef struct {
89 long quot;
90 long rem;
91} ldiv_t;
92typedef struct {
93 long long quot;
94 long long rem;
95} lldiv_t;
96
97#if VSF_LINUX_APPLET_USE_LIBC_STDLIB == ENABLED
100
104
110 // originally memalign, removed, so if add other API, put here first
113 // malloc_usable_size should be in malloc.h
127
131
144
147
150
153
157
165# ifndef __VSF_APPLET__
167# endif
168#endif
169
170#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_LIBC_STDLIB_LIB__))\
171 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_LIBC_STDLIB == ENABLED
172
173#ifndef VSF_LINUX_APPLET_LIBC_STDLIB_VPLT
174# if VSF_LINUX_USE_APPLET == ENABLED
175# define VSF_LINUX_APPLET_LIBC_STDLIB_VPLT \
176 ((vsf_linux_libc_stdlib_vplt_t *)(VSF_LINUX_APPLET_VPLT->libc_stdlib_vplt))
177# else
178# define VSF_LINUX_APPLET_LIBC_STDLIB_VPLT \
179 ((vsf_linux_libc_stdlib_vplt_t *)vsf_vplt((void *)0))
180# endif
181#endif
182
183#define VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(__NAME) \
184 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_LIBC_STDLIB_VPLT, __NAME)
185#define VSF_LINUX_APPLET_LIBC_STDLIB_IMP(...) \
186 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_LIBC_STDLIB_VPLT, __VA_ARGS__)
187
188#if VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR == ENABLED
189VSF_LINUX_APPLET_LIBC_STDLIB_IMP(____malloc_ex, void *, size_t size, const char *file, const char *func, int line) {
191 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(____malloc_ex)(size, file, func, line);
192}
193VSF_LINUX_APPLET_LIBC_STDLIB_IMP(____realloc_ex, void *, void *p, size_t size, const char *file, const char *func, int line) {
195 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(____realloc_ex)(p, size, file, func, line);
196}
197VSF_LINUX_APPLET_LIBC_STDLIB_IMP(____calloc_ex, void *, size_t n, size_t size, const char *file, const char *func, int line) {
199 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(____calloc_ex)(n, size, file, func, line);
200}
201#endif
202VSF_LINUX_APPLET_LIBC_STDLIB_IMP(malloc, void *, size_t size) {
204 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(malloc)(size);
205}
206VSF_LINUX_APPLET_LIBC_STDLIB_IMP(realloc, void *, void *p, size_t size) {
208 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(realloc)(p, size);
209}
210VSF_LINUX_APPLET_LIBC_STDLIB_IMP(calloc, void *, size_t n, size_t size) {
212 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(calloc)(n, size);
213}
214VSF_LINUX_APPLET_LIBC_STDLIB_IMP(free, void, void *p) {
216 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(free)(p);
217}
218VSF_LINUX_APPLET_LIBC_STDLIB_IMP(aligned_alloc, void *, size_t alignment, size_t size) {
220 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(aligned_alloc)(alignment, size);
221}
222VSF_LINUX_APPLET_LIBC_STDLIB_IMP(posix_memalign, int, void **memptr, size_t alignment, size_t size) {
224 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(posix_memalign)(memptr, alignment, size);
225}
226// malloc_usable_size should be in malloc.h
227VSF_LINUX_APPLET_LIBC_STDLIB_IMP(malloc_usable_size, size_t, void *p) {
229 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(malloc_usable_size)(p);
230}
231
232#if VSF_LINUX_LIBC_USE_ENVIRON
233VSF_LINUX_APPLET_LIBC_STDLIB_IMP(putenv, int, char *string) {
235 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(putenv)(string);
236}
237VSF_LINUX_APPLET_LIBC_STDLIB_IMP(getenv, char *, const char *name) {
239 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(getenv)(name);
240}
241VSF_LINUX_APPLET_LIBC_STDLIB_IMP(setenv, int, const char *name, const char *value, int replace) {
243 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(setenv)(name, value, replace);
244}
245VSF_LINUX_APPLET_LIBC_STDLIB_IMP(unsetenv, int, const char *name) {
247 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(unsetenv)(name);
248}
249VSF_LINUX_APPLET_LIBC_STDLIB_IMP(clearenv, int, void) {
251 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(clearenv)();
252}
253#endif
254VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mktemps, char *, char *template_str, int suffixlen) {
256 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mktemps)(template_str, suffixlen);
257}
258VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mktemp, char *, char *template_str) {
260 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mktemp)(template_str);
261}
262VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkstemp, int, char *template_str) {
264 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkstemp)(template_str);
265}
266VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkostemp, int, char *template_str, int flags) {
268 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkostemp)(template_str, flags);
269}
270VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkstemps, int, char *template_str, int suffixlen) {
272 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkstemps)(template_str, suffixlen);
273}
274VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkostemps, int, char *template_str, int suffixlen, int flags) {
276 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkostemps)(template_str, suffixlen, flags);
277}
278VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkdtemp, char *, char *template_str) {
280 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkdtemp)(template_str);
281}
282VSF_LINUX_APPLET_LIBC_STDLIB_IMP(div, div_t, int numer, int denom) {
284 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(div)(numer, denom);
285}
286VSF_LINUX_APPLET_LIBC_STDLIB_IMP(ldiv, ldiv_t, long int numer, long int denom) {
288 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(ldiv)(numer, denom);
289}
290VSF_LINUX_APPLET_LIBC_STDLIB_IMP(lldiv, lldiv_t, long long int numer, long long int denom) {
292 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(lldiv)(numer, denom);
293}
294#if VSF_LINUX_LIBC_HAS_ITOA
295VSF_LINUX_APPLET_LIBC_STDLIB_IMP(itoa, char *, int num, char *str, int radix) {
297 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(itoa)(num, str, radix);
298}
299#endif
300VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atoi, int, const char * str) {
302 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atoi)(str);
303}
304VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atol, long int, const char *str) {
306 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atol)(str);
307}
308VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atoll, long long int, const char *str) {
310 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atoll)(str);
311}
312VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atof, double, const char *str) {
314 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atof)(str);
315}
316VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtol, long, const char *str, char **endptr, int base) {
318 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtol)(str, endptr, base);
319}
320VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtoul, unsigned long, const char *str, char **endptr, int base) {
322 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtoul)(str, endptr, base);
323}
324VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtoll, long long, const char *str, char **endptr, int base) {
326 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtoll)(str, endptr, base);
327}
328VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtoull, unsigned long long, const char *str, char **endptr, int base) {
330 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtoull)(str, endptr, base);
331}
332VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtof, float, const char *str, char **endptr) {
334 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtof)(str, endptr);
335}
336VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtod, double, const char *str, char **endptr) {
338 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtod)(str, endptr);
339}
340//VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtold, long double, const char *str, char **endptr) {
341// VSF_APPLET_VPLT_ENTRY_FUNC_TRACE();
342// return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtold)(str, endptr);
343//}
344VSF_LINUX_APPLET_LIBC_STDLIB_IMP(bsearch, void *, const void *key, const void *base, size_t nitems, size_t size, int (*compar)(const void *, const void *)) {
346 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(bsearch)(key, base, nitems, size, compar);
347}
348VSF_LINUX_APPLET_LIBC_STDLIB_IMP(qsort, void, void *base, size_t nitems, size_t size, int (*compar)(const void *, const void*)) {
350 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(qsort)(base, nitems, size, compar);
351}
352VSF_LINUX_APPLET_LIBC_STDLIB_IMP(rand, int, void) {
354 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(rand)();
355}
356VSF_LINUX_APPLET_LIBC_STDLIB_IMP(srand, void, unsigned int seed) {
358 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(srand)(seed);
359}
360VSF_LINUX_APPLET_LIBC_STDLIB_IMP(srandom, void, unsigned int seed) {
362 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(srand)(seed);
363}
364VSF_LINUX_APPLET_LIBC_STDLIB_IMP(random, long int, void) {
366 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(rand)();
367}
368VSF_LINUX_APPLET_LIBC_STDLIB_IMP(abort, void, void) {
370 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(abort)();
371}
372VSF_LINUX_APPLET_LIBC_STDLIB_IMP(system, int, const char *command) {
374 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(system)(command);
375}
376VSF_LINUX_APPLET_LIBC_STDLIB_IMP(exit, void, int status) {
378 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(exit)(status);
379}
380VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atexit, int, void (*func)(void)) {
382 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atexit)(func);
383}
384VSF_LINUX_APPLET_LIBC_STDLIB_IMP(_Exit, void, int status) {
386 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(_Exit)(status);
387}
388VSF_LINUX_APPLET_LIBC_STDLIB_IMP(abs, int, int j) {
390 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(abs)(j);
391}
392VSF_LINUX_APPLET_LIBC_STDLIB_IMP(labs, long, long j) {
394 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(labs)(j);
395}
396VSF_LINUX_APPLET_LIBC_STDLIB_IMP(llabs, long long, long long j) {
398 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(llabs)(j);
399}
400VSF_LINUX_APPLET_LIBC_STDLIB_IMP(imaxabs, intmax_t, intmax_t j) {
402 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(imaxabs)(j);
403}
404VSF_LINUX_APPLET_LIBC_STDLIB_IMP(getloadavg, int, double loadavg[], int nelem) {
406 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(getloadavg)(loadavg, nelem);
407}
408VSF_LINUX_APPLET_LIBC_STDLIB_IMP(realpath, char *, const char *path, char *resolved_path) {
410 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(realpath)(path, resolved_path);
411}
412
413#else // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_LIBC_STDLIB
414
415#if VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR == ENABLED
417void * ____malloc_ex(vsf_linux_process_t *process, size_t size, const char *file, const char *func, int line);
418void * ____calloc_ex(vsf_linux_process_t *process, size_t n, size_t size, const char *file, const char *func, int line);
419void * ____realloc_ex(vsf_linux_process_t *process, void *p, size_t size, const char *file, const char *func, int line);
420#endif
421
422#if VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR == ENABLED \
423 && VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR_TRACE_CALLER == ENABLED
424# define malloc(__size) ____malloc_ex(NULL, (__size), __FILE__, __FUNCTION__, __LINE__)
425# define calloc(__n, __size) ____calloc_ex(NULL, (__n), (__size), __FILE__, __FUNCTION__, __LINE__)
426# define realloc(__ptr, __size) ____realloc_ex(NULL, (__ptr), (__size), __FILE__, __FUNCTION__, __LINE__)
427#else
428void * malloc(size_t size);
429void * realloc(void *p, size_t size);
430void * calloc(size_t n, size_t size);
431#endif
432
433void free(void *p);
434
435void * aligned_alloc(size_t alignment, size_t size);
436int posix_memalign(void **memptr, size_t alignment, size_t size);
437
438// malloc_usable_size should be in malloc.h
439size_t malloc_usable_size(void *p);
440
441#if VSF_LINUX_LIBC_USE_ENVIRON
442int putenv(char *string);
443char * getenv(const char *name);
444int setenv(const char *name, const char *value, int replace);
445int unsetenv(const char *name);
446int clearenv(void);
447#endif
448char * mktemps(char *template_str, int suffixlen);
449char * mktemp(char *template_str);
450int mkstemp(char *template_str);
451int mkostemp(char *template_str, int flags);
452int mkstemps(char *template_str, int suffixlen);
453int mkostemps(char *template_str, int suffixlen, int flags);
454char * mkdtemp(char *template_str);
455
456div_t div(int numer, int denom);
457ldiv_t ldiv(long int numer, long int denom);
458lldiv_t lldiv(long long int numer, long long int denom);
459
460#if VSF_LINUX_LIBC_HAS_ITOA
461char * itoa(int num, char *str, int radix);
462#endif
463int atoi(const char * str);
464long int atol(const char *str);
465long long int atoll(const char *str);
466double atof(const char *str);
467long strtol(const char *str, char **endptr, int base);
468unsigned long strtoul(const char *str, char **endptr, int base);
469long long strtoll(const char *str, char **endptr, int base);
470unsigned long long strtoull(const char *str, char **endptr, int base);
471float strtof(const char *str, char **endptr);
472double strtod(const char *str, char **endptr);
473//long double strtold(const char *str, char **endptr);
474
475void * bsearch(const void *key, const void *base, size_t nitems, size_t size, int (*compar)(const void *, const void *));
476
477int rand(void);
478void srand(unsigned int seed);
479void srandom(unsigned int seed);
480long int random(void);
481
482void qsort(void *base, size_t nitems, size_t size, int (*compar)(const void *, const void*));
483
484VSF_CAL_NO_RETURN void abort(void);
485int system(const char *command);
486
487VSF_CAL_NO_RETURN void exit(int status);
488int atexit(void (*func)(void));
489VSF_CAL_NO_RETURN void _Exit(int exit_code);
490
491int abs(int j);
492long labs(long j);
493long long llabs(long long j);
495
496int getloadavg(double loadavg[], int nelem);
497char *realpath(const char *path, char *resolved_path);
498
499#endif // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_LIBC_STDLIB
500
501static inline void * reallocarray(void *p, size_t nmemb, size_t size) {
502 return realloc(p, nmemb * size);
503}
504
505int at_quick_exit(void (*func)(void));
507
508int mblen(const char *str, size_t n);
509// TODO: it seems that IAR does not support wchar_t even if it's defined in stddef.h
510#if !__IS_COMPILER_IAR__
511size_t mbstowcs(wchar_t *dst, const char *src, size_t len);
512int mbtowc(wchar_t *pwc, const char *str, size_t n);
513size_t wcstombs(char *str, const wchar_t *pwcs, size_t n);
514int wctomb(char *str, wchar_t wchar);
515#endif
516
517#ifdef __cplusplus
518}
519#endif
520
521#endif
Definition vsf_linux.h:281
long long intmax_t
Definition stdint.h:31
Definition stdlib.h:84
int quot
Definition stdlib.h:85
int rem
Definition stdlib.h:86
Definition stdlib.h:88
long rem
Definition stdlib.h:90
long quot
Definition stdlib.h:89
Definition stdlib.h:92
long long rem
Definition stdlib.h:94
long long quot
Definition stdlib.h:93
Definition stdlib.h:98
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(mkostemps)
vsf_vplt_info_t info
Definition stdlib.h:99
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(clearenv)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(getloadavg)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(aligned_alloc)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(empty_slot)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(mkostemp)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(____malloc_ex)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(mkstemps)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(posix_memalign)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(malloc_usable_size)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(realpath)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(____calloc_ex)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(____realloc_ex)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(unsetenv)
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(strtoull)
#define realloc(__ptr, __size)
Definition stdlib.h:426
long long strtoll(const char *str, char **endptr, int base)
Definition vsf_linux_glibc_stdlib.c:493
size_t mbstowcs(wchar_t *dst, const char *src, size_t len)
int getloadavg(double loadavg[], int nelem)
Definition vsf_linux_glibc_stdlib.c:404
void * ____realloc_ex(vsf_linux_process_t *process, void *p, size_t size, const char *file, const char *func, int line)
Definition vsf_linux_glibc_stdlib.c:155
unsigned long strtoul(const char *str, char **endptr, int base)
Definition vsf_linux_glibc_stdlib.c:511
#define free
Definition stdlib.h:30
void * ____malloc_ex(vsf_linux_process_t *process, size_t size, const char *file, const char *func, int line)
Definition vsf_linux_glibc_stdlib.c:137
long int random(void)
#define mktemp
Definition stdlib.h:46
#define posix_memalign
Definition stdlib.h:31
int mbtowc(wchar_t *pwc, const char *str, size_t n)
unsigned long long strtoull(const char *str, char **endptr, int base)
Definition vsf_linux_glibc_stdlib.c:529
div_t div(int numer, int denom)
int wctomb(char *str, wchar_t wchar)
#define malloc_usable_size
Definition stdlib.h:32
#define exit
Definition stdlib.h:33
double atof(const char *str)
Definition vsf_linux_glibc_stdlib.c:635
#define realpath
Definition stdlib.h:44
long long int atoll(const char *str)
Definition vsf_linux_glibc_stdlib.c:630
#define atexit
Definition stdlib.h:34
void qsort(void *base, size_t nitems, size_t size, int(*compar)(const void *, const void *))
#define mkstemp
Definition stdlib.h:47
void srand(unsigned int seed)
float strtof(const char *str, char **endptr)
Definition vsf_linux_glibc_stdlib.c:615
long labs(long j)
Definition vsf_linux_glibc_stdlib.c:388
#define malloc(__size)
Definition stdlib.h:424
#define mkdtemp
Definition stdlib.h:51
void * ____calloc_ex(vsf_linux_process_t *process, size_t n, size_t size, const char *file, const char *func, int line)
Definition vsf_linux_glibc_stdlib.c:213
#define mkostemp
Definition stdlib.h:48
size_t wcstombs(char *str, const wchar_t *pwcs, size_t n)
void quick_exit(int status)
ldiv_t ldiv(long int numer, long int denom)
__VSF_VPLT_DECORATOR__ vsf_linux_libc_stdlib_vplt_t vsf_linux_libc_stdlib_vplt
Definition vsf_linux_glibc_stdlib.c:1057
#define _Exit
Definition stdlib.h:35
double strtod(const char *str, char **endptr)
Definition vsf_linux_glibc_stdlib.c:547
#define mkstemps
Definition stdlib.h:49
long long llabs(long long j)
Definition vsf_linux_glibc_stdlib.c:393
#define calloc(__n, __size)
Definition stdlib.h:425
lldiv_t lldiv(long long int numer, long long int denom)
#define mkostemps
Definition stdlib.h:50
long int atol(const char *str)
Definition vsf_linux_glibc_stdlib.c:625
int mblen(const char *str, size_t n)
intmax_t imaxabs(intmax_t j)
Definition vsf_linux_glibc_stdlib.c:399
int at_quick_exit(void(*func)(void))
#define mktemps
Definition stdlib.h:45
int rand(void)
void * bsearch(const void *key, const void *base, size_t nitems, size_t size, int(*compar)(const void *, const void *))
long strtol(const char *str, char **endptr, int base)
Definition vsf_linux_glibc_stdlib.c:475
int abs(int j)
Definition vsf_linux_glibc_stdlib.c:383
#define system
Definition stdlib.h:36
int atoi(const char *str)
Definition vsf_linux_glibc_stdlib.c:620
void srandom(unsigned int seed)
VSF_CAL_NO_RETURN void abort(void)
Definition vsf_linux_glibc_stdlib.c:848
#define aligned_alloc
Definition stdlib.h:29
Definition vsf_cfg.h:95
vk_av_control_value_t value
Definition vsf_audio.h:171
#define __VSF_VPLT_DECORATOR__
Definition vsf_cfg.h:93
#define VSF_APPLET_VPLT_ENTRY_FUNC_TRACE()
Definition vsf_cfg.h:165
uint_fast32_t alignment
Definition vsf_heap.h:163
int unsetenv(const char *name)
Definition vsf_linux_glibc_stdlib.c:837
int setenv(const char *name, const char *value, int replace)
Definition vsf_linux_glibc_stdlib.c:832
char * getenv(const char *name)
Definition vsf_linux_glibc_stdlib.c:827
int putenv(char *string)
Definition vsf_linux_glibc_stdlib.c:803
char * itoa(int num, char *str, int radix)
Definition vsf_linux_glibc_stdlib.c:641
int clearenv(void)
Definition vsf_linux_glibc_stdlib.c:842
uint32_t size
Definition vsf_memfs.h:50
uint8_t status
Definition vsf_tgui.h:144
Generated from commit: vsfteam/vsf@85be636