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
101
105
111 // originally memalign, removed, so if add other API, put here first
114 // malloc_usable_size should be in malloc.h
128
132
145
148
151
154
158
166# ifndef __VSF_APPLET__
168# endif
169#endif
170
171#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_LIBC_STDLIB_LIB__))\
172 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_LIBC_STDLIB == ENABLED
173
174#ifndef VSF_LINUX_APPLET_LIBC_STDLIB_VPLT
175# if VSF_LINUX_USE_APPLET == ENABLED
176# define VSF_LINUX_APPLET_LIBC_STDLIB_VPLT \
177 ((vsf_linux_libc_stdlib_vplt_t *)(VSF_LINUX_APPLET_VPLT->libc_stdlib_vplt))
178# else
179# define VSF_LINUX_APPLET_LIBC_STDLIB_VPLT \
180 ((vsf_linux_libc_stdlib_vplt_t *)vsf_vplt((void *)0))
181# endif
182#endif
183
184#define VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(__NAME) \
185 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_LIBC_STDLIB_VPLT, __NAME)
186#define VSF_LINUX_APPLET_LIBC_STDLIB_IMP(...) \
187 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_LIBC_STDLIB_VPLT, __VA_ARGS__)
188
189#if VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR == ENABLED
190VSF_LINUX_APPLET_LIBC_STDLIB_IMP(____malloc_ex, void *, size_t size, const char *file, const char *func, int line) {
192 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(____malloc_ex)(size, file, func, line);
193}
194VSF_LINUX_APPLET_LIBC_STDLIB_IMP(____realloc_ex, void *, void *p, size_t size, const char *file, const char *func, int line) {
196 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(____realloc_ex)(p, size, file, func, line);
197}
198VSF_LINUX_APPLET_LIBC_STDLIB_IMP(____calloc_ex, void *, size_t n, size_t size, const char *file, const char *func, int line) {
200 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(____calloc_ex)(n, size, file, func, line);
201}
202#endif
203VSF_LINUX_APPLET_LIBC_STDLIB_IMP(malloc, void *, size_t size) {
205 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(malloc)(size);
206}
207VSF_LINUX_APPLET_LIBC_STDLIB_IMP(realloc, void *, void *p, size_t size) {
209 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(realloc)(p, size);
210}
211VSF_LINUX_APPLET_LIBC_STDLIB_IMP(calloc, void *, size_t n, size_t size) {
213 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(calloc)(n, size);
214}
215VSF_LINUX_APPLET_LIBC_STDLIB_IMP(free, void, void *p) {
217 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(free)(p);
218}
219VSF_LINUX_APPLET_LIBC_STDLIB_IMP(aligned_alloc, void *, size_t alignment, size_t size) {
221 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(aligned_alloc)(alignment, size);
222}
223VSF_LINUX_APPLET_LIBC_STDLIB_IMP(posix_memalign, int, void **memptr, size_t alignment, size_t size) {
225 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(posix_memalign)(memptr, alignment, size);
226}
227// malloc_usable_size should be in malloc.h
228VSF_LINUX_APPLET_LIBC_STDLIB_IMP(malloc_usable_size, size_t, void *p) {
230 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(malloc_usable_size)(p);
231}
232
233#if VSF_LINUX_LIBC_USE_ENVIRON
234VSF_LINUX_APPLET_LIBC_STDLIB_IMP(putenv, int, char *string) {
236 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(putenv)(string);
237}
238VSF_LINUX_APPLET_LIBC_STDLIB_IMP(getenv, char *, const char *name) {
240 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(getenv)(name);
241}
242VSF_LINUX_APPLET_LIBC_STDLIB_IMP(setenv, int, const char *name, const char *value, int replace) {
244 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(setenv)(name, value, replace);
245}
246VSF_LINUX_APPLET_LIBC_STDLIB_IMP(unsetenv, int, const char *name) {
248 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(unsetenv)(name);
249}
250VSF_LINUX_APPLET_LIBC_STDLIB_IMP(clearenv, int, void) {
252 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(clearenv)();
253}
254#endif
255VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mktemps, char *, char *template_str, int suffixlen) {
257 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mktemps)(template_str, suffixlen);
258}
259VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mktemp, char *, char *template_str) {
261 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mktemp)(template_str);
262}
263VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkstemp, int, char *template_str) {
265 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkstemp)(template_str);
266}
267VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkostemp, int, char *template_str, int flags) {
269 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkostemp)(template_str, flags);
270}
271VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkstemps, int, char *template_str, int suffixlen) {
273 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkstemps)(template_str, suffixlen);
274}
275VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkostemps, int, char *template_str, int suffixlen, int flags) {
277 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkostemps)(template_str, suffixlen, flags);
278}
279VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkdtemp, char *, char *template_str) {
281 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkdtemp)(template_str);
282}
283VSF_LINUX_APPLET_LIBC_STDLIB_IMP(div, div_t, int numer, int denom) {
285 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(div)(numer, denom);
286}
287VSF_LINUX_APPLET_LIBC_STDLIB_IMP(ldiv, ldiv_t, long int numer, long int denom) {
289 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(ldiv)(numer, denom);
290}
291VSF_LINUX_APPLET_LIBC_STDLIB_IMP(lldiv, lldiv_t, long long int numer, long long int denom) {
293 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(lldiv)(numer, denom);
294}
295#if VSF_LINUX_LIBC_HAS_ITOA
296VSF_LINUX_APPLET_LIBC_STDLIB_IMP(itoa, char *, int num, char *str, int radix) {
298 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(itoa)(num, str, radix);
299}
300#endif
301VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atoi, int, const char * str) {
303 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atoi)(str);
304}
305VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atol, long int, const char *str) {
307 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atol)(str);
308}
309VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atoll, long long int, const char *str) {
311 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atoll)(str);
312}
313VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atof, double, const char *str) {
315 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atof)(str);
316}
317VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtol, long, const char *str, char **endptr, int base) {
319 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtol)(str, endptr, base);
320}
321VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtoul, unsigned long, const char *str, char **endptr, int base) {
323 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtoul)(str, endptr, base);
324}
325VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtoll, long long, const char *str, char **endptr, int base) {
327 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtoll)(str, endptr, base);
328}
329VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtoull, unsigned long long, const char *str, char **endptr, int base) {
331 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtoull)(str, endptr, base);
332}
333VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtof, float, const char *str, char **endptr) {
335 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtof)(str, endptr);
336}
337VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtod, double, const char *str, char **endptr) {
339 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtod)(str, endptr);
340}
341//VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtold, long double, const char *str, char **endptr) {
342// VSF_APPLET_VPLT_ENTRY_FUNC_TRACE();
343// return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtold)(str, endptr);
344//}
345VSF_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 *)) {
347 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(bsearch)(key, base, nitems, size, compar);
348}
349VSF_LINUX_APPLET_LIBC_STDLIB_IMP(qsort, void, void *base, size_t nitems, size_t size, int (*compar)(const void *, const void*)) {
351 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(qsort)(base, nitems, size, compar);
352}
353VSF_LINUX_APPLET_LIBC_STDLIB_IMP(rand, int, void) {
355 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(rand)();
356}
357VSF_LINUX_APPLET_LIBC_STDLIB_IMP(srand, void, unsigned int seed) {
359 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(srand)(seed);
360}
361VSF_LINUX_APPLET_LIBC_STDLIB_IMP(srandom, void, unsigned int seed) {
363 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(srand)(seed);
364}
365VSF_LINUX_APPLET_LIBC_STDLIB_IMP(random, long int, void) {
367 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(rand)();
368}
369VSF_LINUX_APPLET_LIBC_STDLIB_IMP(abort, void, void) {
371 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(abort)();
372}
373VSF_LINUX_APPLET_LIBC_STDLIB_IMP(system, int, const char *command) {
375 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(system)(command);
376}
377VSF_LINUX_APPLET_LIBC_STDLIB_IMP(exit, void, int status) {
379 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(exit)(status);
380}
381VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atexit, int, void (*func)(void)) {
383 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atexit)(func);
384}
385VSF_LINUX_APPLET_LIBC_STDLIB_IMP(_Exit, void, int status) {
387 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(_Exit)(status);
388}
389VSF_LINUX_APPLET_LIBC_STDLIB_IMP(abs, int, int j) {
391 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(abs)(j);
392}
393VSF_LINUX_APPLET_LIBC_STDLIB_IMP(labs, long, long j) {
395 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(labs)(j);
396}
397VSF_LINUX_APPLET_LIBC_STDLIB_IMP(llabs, long long, long long j) {
399 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(llabs)(j);
400}
401VSF_LINUX_APPLET_LIBC_STDLIB_IMP(imaxabs, intmax_t, intmax_t j) {
403 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(imaxabs)(j);
404}
405VSF_LINUX_APPLET_LIBC_STDLIB_IMP(getloadavg, int, double loadavg[], int nelem) {
407 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(getloadavg)(loadavg, nelem);
408}
409VSF_LINUX_APPLET_LIBC_STDLIB_IMP(realpath, char *, const char *path, char *resolved_path) {
411 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(realpath)(path, resolved_path);
412}
413
414#else // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_LIBC_STDLIB
415
416#if VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR == ENABLED
418void * ____malloc_ex(vsf_linux_process_t *process, size_t size, const char *file, const char *func, int line);
419void * ____calloc_ex(vsf_linux_process_t *process, size_t n, size_t size, const char *file, const char *func, int line);
420void * ____realloc_ex(vsf_linux_process_t *process, void *p, size_t size, const char *file, const char *func, int line);
421#endif
422
423#if VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR == ENABLED \
424 && VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR_TRACE_CALLER == ENABLED
425# define malloc(__size) ____malloc_ex(NULL, (__size), __FILE__, __FUNCTION__, __LINE__)
426# define calloc(__n, __size) ____calloc_ex(NULL, (__n), (__size), __FILE__, __FUNCTION__, __LINE__)
427# define realloc(__ptr, __size) ____realloc_ex(NULL, (__ptr), (__size), __FILE__, __FUNCTION__, __LINE__)
428#else
429void * malloc(size_t size);
430void * realloc(void *p, size_t size);
431void * calloc(size_t n, size_t size);
432#endif
433
434void free(void *p);
435
436void * aligned_alloc(size_t alignment, size_t size);
437int posix_memalign(void **memptr, size_t alignment, size_t size);
438
439// malloc_usable_size should be in malloc.h
440size_t malloc_usable_size(void *p);
441
442#if VSF_LINUX_LIBC_USE_ENVIRON
443int putenv(char *string);
444char * getenv(const char *name);
445int setenv(const char *name, const char *value, int replace);
446int unsetenv(const char *name);
447int clearenv(void);
448#endif
449char * mktemps(char *template_str, int suffixlen);
450char * mktemp(char *template_str);
451int mkstemp(char *template_str);
452int mkostemp(char *template_str, int flags);
453int mkstemps(char *template_str, int suffixlen);
454int mkostemps(char *template_str, int suffixlen, int flags);
455char * mkdtemp(char *template_str);
456
457div_t div(int numer, int denom);
458ldiv_t ldiv(long int numer, long int denom);
459lldiv_t lldiv(long long int numer, long long int denom);
460
461#if VSF_LINUX_LIBC_HAS_ITOA
462char * itoa(int num, char *str, int radix);
463#endif
464int atoi(const char * str);
465long int atol(const char *str);
466long long int atoll(const char *str);
467double atof(const char *str);
468long strtol(const char *str, char **endptr, int base);
469unsigned long strtoul(const char *str, char **endptr, int base);
470long long strtoll(const char *str, char **endptr, int base);
471unsigned long long strtoull(const char *str, char **endptr, int base);
472float strtof(const char *str, char **endptr);
473double strtod(const char *str, char **endptr);
474//long double strtold(const char *str, char **endptr);
475
476void * bsearch(const void *key, const void *base, size_t nitems, size_t size, int (*compar)(const void *, const void *));
477
478int rand(void);
479void srand(unsigned int seed);
480void srandom(unsigned int seed);
481long int random(void);
482
483void qsort(void *base, size_t nitems, size_t size, int (*compar)(const void *, const void*));
484
485VSF_CAL_NO_RETURN void abort(void);
486int system(const char *command);
487
488VSF_CAL_NO_RETURN void exit(int status);
489int atexit(void (*func)(void));
490VSF_CAL_NO_RETURN void _Exit(int exit_code);
491
492int abs(int j);
493long labs(long j);
494long long llabs(long long j);
496
497int getloadavg(double loadavg[], int nelem);
498char *realpath(const char *path, char *resolved_path);
499
500#endif // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_LIBC_STDLIB
501
502static inline void * reallocarray(void *p, size_t nmemb, size_t size) {
503 return realloc(p, nmemb * size);
504}
505
506int at_quick_exit(void (*func)(void));
508
509int mblen(const char *str, size_t n);
510// TODO: it seems that IAR does not support wchar_t even if it's defined in stddef.h
511#if !__IS_COMPILER_IAR__
512size_t mbstowcs(wchar_t *dst, const char *src, size_t len);
513int mbtowc(wchar_t *pwc, const char *str, size_t n);
514size_t wcstombs(char *str, const wchar_t *pwcs, size_t n);
515int wctomb(char *str, wchar_t wchar);
516#endif
517
518#ifdef __cplusplus
519}
520#endif
521
522#endif
Definition vsf_linux.h:283
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_MOD_DEF(libc_stdlib)
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)
struct vsf_linux_libc_stdlib_vplt_t vsf_linux_libc_stdlib_vplt_t
#define realloc(__ptr, __size)
Definition stdlib.h:427
long long strtoll(const char *str, char **endptr, int base)
Definition vsf_linux_glibc_stdlib.c:505
size_t mbstowcs(wchar_t *dst, const char *src, size_t len)
int getloadavg(double loadavg[], int nelem)
Definition vsf_linux_glibc_stdlib.c:416
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:523
#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:541
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:661
#define realpath
Definition stdlib.h:44
long long int atoll(const char *str)
Definition vsf_linux_glibc_stdlib.c:656
#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:641
long labs(long j)
Definition vsf_linux_glibc_stdlib.c:400
#define malloc(__size)
Definition stdlib.h:425
#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:216
#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:1101
#define _Exit
Definition stdlib.h:35
double strtod(const char *str, char **endptr)
Definition vsf_linux_glibc_stdlib.c:559
#define mkstemps
Definition stdlib.h:49
long long llabs(long long j)
Definition vsf_linux_glibc_stdlib.c:405
#define calloc(__n, __size)
Definition stdlib.h:426
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:651
int mblen(const char *str, size_t n)
intmax_t imaxabs(intmax_t j)
Definition vsf_linux_glibc_stdlib.c:411
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:487
int abs(int j)
Definition vsf_linux_glibc_stdlib.c:395
#define system
Definition stdlib.h:36
int atoi(const char *str)
Definition vsf_linux_glibc_stdlib.c:646
void srandom(unsigned int seed)
VSF_CAL_NO_RETURN void abort(void)
Definition vsf_linux_glibc_stdlib.c:874
#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:172
int unsetenv(const char *name)
Definition vsf_linux_glibc_stdlib.c:863
int setenv(const char *name, const char *value, int replace)
Definition vsf_linux_glibc_stdlib.c:858
char * getenv(const char *name)
Definition vsf_linux_glibc_stdlib.c:853
int putenv(char *string)
Definition vsf_linux_glibc_stdlib.c:829
char * itoa(int num, char *str, int radix)
Definition vsf_linux_glibc_stdlib.c:667
int clearenv(void)
Definition vsf_linux_glibc_stdlib.c:868
uint32_t size
Definition vsf_memfs.h:50
uint8_t status
Definition vsf_tgui.h:144
Generated from commit: vsfteam/vsf@2a137b0