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#define EXIT_SUCCESS 0
75#define EXIT_FAILURE -1
76
77typedef struct {
78 int quot;
79 int rem;
80} div_t;
81typedef struct {
82 long quot;
83 long rem;
84} ldiv_t;
85typedef struct {
86 long long quot;
87 long long rem;
88} lldiv_t;
89
90#if VSF_LINUX_APPLET_USE_LIBC_STDLIB == ENABLED
93
97
103 // originally memalign, removed, so if add other API, put here first
106 // malloc_usable_size should be in malloc.h
120
124
137
140
143
146
150
158# ifndef __VSF_APPLET__
160# endif
161#endif
162
163#if defined(__VSF_APPLET__) && (defined(__VSF_APPLET_LIB__) || defined(__VSF_APPLET_LINUX_LIBC_STDLIB_LIB__))\
164 && VSF_APPLET_CFG_ABI_PATCH != ENABLED && VSF_LINUX_APPLET_USE_LIBC_STDLIB == ENABLED
165
166#ifndef VSF_LINUX_APPLET_LIBC_STDLIB_VPLT
167# if VSF_LINUX_USE_APPLET == ENABLED
168# define VSF_LINUX_APPLET_LIBC_STDLIB_VPLT \
169 ((vsf_linux_libc_stdlib_vplt_t *)(VSF_LINUX_APPLET_VPLT->libc_stdlib_vplt))
170# else
171# define VSF_LINUX_APPLET_LIBC_STDLIB_VPLT \
172 ((vsf_linux_libc_stdlib_vplt_t *)vsf_vplt((void *)0))
173# endif
174#endif
175
176#define VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(__NAME) \
177 VSF_APPLET_VPLT_ENTRY_FUNC_ENTRY(VSF_LINUX_APPLET_LIBC_STDLIB_VPLT, __NAME)
178#define VSF_LINUX_APPLET_LIBC_STDLIB_IMP(...) \
179 VSF_APPLET_VPLT_ENTRY_FUNC_IMP(VSF_LINUX_APPLET_LIBC_STDLIB_VPLT, __VA_ARGS__)
180
181#if VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR == ENABLED
182VSF_LINUX_APPLET_LIBC_STDLIB_IMP(____malloc_ex, void *, size_t size, const char *file, const char *func, int line) {
184 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(____malloc_ex)(size, file, func, line);
185}
186VSF_LINUX_APPLET_LIBC_STDLIB_IMP(____realloc_ex, void *, void *p, size_t size, const char *file, const char *func, int line) {
188 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(____realloc_ex)(p, size, file, func, line);
189}
190VSF_LINUX_APPLET_LIBC_STDLIB_IMP(____calloc_ex, void *, size_t n, size_t size, const char *file, const char *func, int line) {
192 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(____calloc_ex)(n, size, file, func, line);
193}
194#endif
195VSF_LINUX_APPLET_LIBC_STDLIB_IMP(malloc, void *, size_t size) {
197 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(malloc)(size);
198}
199VSF_LINUX_APPLET_LIBC_STDLIB_IMP(realloc, void *, void *p, size_t size) {
201 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(realloc)(p, size);
202}
203VSF_LINUX_APPLET_LIBC_STDLIB_IMP(calloc, void *, size_t n, size_t size) {
205 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(calloc)(n, size);
206}
207VSF_LINUX_APPLET_LIBC_STDLIB_IMP(free, void, void *p) {
209 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(free)(p);
210}
211VSF_LINUX_APPLET_LIBC_STDLIB_IMP(aligned_alloc, void *, size_t alignment, size_t size) {
213 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(aligned_alloc)(alignment, size);
214}
215VSF_LINUX_APPLET_LIBC_STDLIB_IMP(posix_memalign, int, void **memptr, size_t alignment, size_t size) {
217 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(posix_memalign)(memptr, alignment, size);
218}
219// malloc_usable_size should be in malloc.h
220VSF_LINUX_APPLET_LIBC_STDLIB_IMP(malloc_usable_size, size_t, void *p) {
222 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(malloc_usable_size)(p);
223}
224
225#if VSF_LINUX_LIBC_USE_ENVIRON
226VSF_LINUX_APPLET_LIBC_STDLIB_IMP(putenv, int, char *string) {
228 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(putenv)(string);
229}
230VSF_LINUX_APPLET_LIBC_STDLIB_IMP(getenv, char *, const char *name) {
232 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(getenv)(name);
233}
234VSF_LINUX_APPLET_LIBC_STDLIB_IMP(setenv, int, const char *name, const char *value, int replace) {
236 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(setenv)(name, value, replace);
237}
238VSF_LINUX_APPLET_LIBC_STDLIB_IMP(unsetenv, int, const char *name) {
240 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(unsetenv)(name);
241}
242VSF_LINUX_APPLET_LIBC_STDLIB_IMP(clearenv, int, void) {
244 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(clearenv)();
245}
246#endif
247VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mktemps, char *, char *template_str, int suffixlen) {
249 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mktemps)(template_str, suffixlen);
250}
251VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mktemp, char *, char *template_str) {
253 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mktemp)(template_str);
254}
255VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkstemp, int, char *template_str) {
257 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkstemp)(template_str);
258}
259VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkostemp, int, char *template_str, int flags) {
261 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkostemp)(template_str, flags);
262}
263VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkstemps, int, char *template_str, int suffixlen) {
265 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkstemps)(template_str, suffixlen);
266}
267VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkostemps, int, char *template_str, int suffixlen, int flags) {
269 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkostemps)(template_str, suffixlen, flags);
270}
271VSF_LINUX_APPLET_LIBC_STDLIB_IMP(mkdtemp, char *, char *template_str) {
273 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(mkdtemp)(template_str);
274}
275VSF_LINUX_APPLET_LIBC_STDLIB_IMP(div, div_t, int numer, int denom) {
277 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(div)(numer, denom);
278}
279VSF_LINUX_APPLET_LIBC_STDLIB_IMP(ldiv, ldiv_t, long int numer, long int denom) {
281 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(ldiv)(numer, denom);
282}
283VSF_LINUX_APPLET_LIBC_STDLIB_IMP(lldiv, lldiv_t, long long int numer, long long int denom) {
285 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(lldiv)(numer, denom);
286}
287#if VSF_LINUX_LIBC_HAS_ITOA
288VSF_LINUX_APPLET_LIBC_STDLIB_IMP(itoa, char *, int num, char *str, int radix) {
290 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(itoa)(num, str, radix);
291}
292#endif
293VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atoi, int, const char * str) {
295 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atoi)(str);
296}
297VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atol, long int, const char *str) {
299 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atol)(str);
300}
301VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atoll, long long int, const char *str) {
303 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atoll)(str);
304}
305VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atof, double, const char *str) {
307 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atof)(str);
308}
309VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtol, long, const char *str, char **endptr, int base) {
311 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtol)(str, endptr, base);
312}
313VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtoul, unsigned long, const char *str, char **endptr, int base) {
315 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtoul)(str, endptr, base);
316}
317VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtoll, long long, const char *str, char **endptr, int base) {
319 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtoll)(str, endptr, base);
320}
321VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtoull, unsigned long long, const char *str, char **endptr, int base) {
323 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtoull)(str, endptr, base);
324}
325VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtof, float, const char *str, char **endptr) {
327 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtof)(str, endptr);
328}
329VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtod, double, const char *str, char **endptr) {
331 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtod)(str, endptr);
332}
333//VSF_LINUX_APPLET_LIBC_STDLIB_IMP(strtold, long double, const char *str, char **endptr) {
334// VSF_APPLET_VPLT_ENTRY_FUNC_TRACE();
335// return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(strtold)(str, endptr);
336//}
337VSF_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 *)) {
339 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(bsearch)(key, base, nitems, size, compar);
340}
341VSF_LINUX_APPLET_LIBC_STDLIB_IMP(qsort, void, void *base, size_t nitems, size_t size, int (*compar)(const void *, const void*)) {
343 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(qsort)(base, nitems, size, compar);
344}
345VSF_LINUX_APPLET_LIBC_STDLIB_IMP(rand, int, void) {
347 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(rand)();
348}
349VSF_LINUX_APPLET_LIBC_STDLIB_IMP(srand, void, unsigned int seed) {
351 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(srand)(seed);
352}
353VSF_LINUX_APPLET_LIBC_STDLIB_IMP(srandom, void, unsigned int seed) {
355 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(srand)(seed);
356}
357VSF_LINUX_APPLET_LIBC_STDLIB_IMP(random, long int, void) {
359 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(rand)();
360}
361VSF_LINUX_APPLET_LIBC_STDLIB_IMP(abort, void, void) {
363 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(abort)();
364}
365VSF_LINUX_APPLET_LIBC_STDLIB_IMP(system, int, const char *command) {
367 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(system)(command);
368}
369VSF_LINUX_APPLET_LIBC_STDLIB_IMP(exit, void, int status) {
371 VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(exit)(status);
372}
373VSF_LINUX_APPLET_LIBC_STDLIB_IMP(atexit, int, void (*func)(void)) {
375 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(atexit)(func);
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(abs, int, int j) {
383 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(abs)(j);
384}
385VSF_LINUX_APPLET_LIBC_STDLIB_IMP(labs, long, long j) {
387 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(labs)(j);
388}
389VSF_LINUX_APPLET_LIBC_STDLIB_IMP(llabs, long long, long long j) {
391 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(llabs)(j);
392}
393VSF_LINUX_APPLET_LIBC_STDLIB_IMP(imaxabs, intmax_t, intmax_t j) {
395 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(imaxabs)(j);
396}
397VSF_LINUX_APPLET_LIBC_STDLIB_IMP(getloadavg, int, double loadavg[], int nelem) {
399 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(getloadavg)(loadavg, nelem);
400}
401VSF_LINUX_APPLET_LIBC_STDLIB_IMP(realpath, char *, const char *path, char *resolved_path) {
403 return VSF_LINUX_APPLET_LIBC_STDLIB_ENTRY(realpath)(path, resolved_path);
404}
405
406#else // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_LIBC_STDLIB
407
408#if VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR == ENABLED
410void * ____malloc_ex(vsf_linux_process_t *process, size_t size, const char *file, const char *func, int line);
411void * ____calloc_ex(vsf_linux_process_t *process, size_t n, size_t size, const char *file, const char *func, int line);
412void * ____realloc_ex(vsf_linux_process_t *process, void *p, size_t size, const char *file, const char *func, int line);
413#endif
414
415#if VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR == ENABLED \
416 && VSF_LINUX_SIMPLE_STDLIB_CFG_HEAP_MONITOR_TRACE_CALLER == ENABLED
417# define malloc(__size) ____malloc_ex(NULL, (__size), __FILE__, __FUNCTION__, __LINE__)
418# define calloc(__n, __size) ____calloc_ex(NULL, (__n), (__size), __FILE__, __FUNCTION__, __LINE__)
419# define realloc(__ptr, __size) ____realloc_ex(NULL, (__ptr), (__size), __FILE__, __FUNCTION__, __LINE__)
420#else
421void * malloc(size_t size);
422void * realloc(void *p, size_t size);
423void * calloc(size_t n, size_t size);
424#endif
425
426void free(void *p);
427
428void * aligned_alloc(size_t alignment, size_t size);
429int posix_memalign(void **memptr, size_t alignment, size_t size);
430
431// malloc_usable_size should be in malloc.h
432size_t malloc_usable_size(void *p);
433
434#if VSF_LINUX_LIBC_USE_ENVIRON
435int putenv(char *string);
436char * getenv(const char *name);
437int setenv(const char *name, const char *value, int replace);
438int unsetenv(const char *name);
439int clearenv(void);
440#endif
441char * mktemps(char *template_str, int suffixlen);
442char * mktemp(char *template_str);
443int mkstemp(char *template_str);
444int mkostemp(char *template_str, int flags);
445int mkstemps(char *template_str, int suffixlen);
446int mkostemps(char *template_str, int suffixlen, int flags);
447char * mkdtemp(char *template_str);
448
449div_t div(int numer, int denom);
450ldiv_t ldiv(long int numer, long int denom);
451lldiv_t lldiv(long long int numer, long long int denom);
452
453#if VSF_LINUX_LIBC_HAS_ITOA
454char * itoa(int num, char *str, int radix);
455#endif
456int atoi(const char * str);
457long int atol(const char *str);
458long long int atoll(const char *str);
459double atof(const char *str);
460long strtol(const char *str, char **endptr, int base);
461unsigned long strtoul(const char *str, char **endptr, int base);
462long long strtoll(const char *str, char **endptr, int base);
463unsigned long long strtoull(const char *str, char **endptr, int base);
464float strtof(const char *str, char **endptr);
465double strtod(const char *str, char **endptr);
466//long double strtold(const char *str, char **endptr);
467
468void * bsearch(const void *key, const void *base, size_t nitems, size_t size, int (*compar)(const void *, const void *));
469
470int rand(void);
471void srand(unsigned int seed);
472void srandom(unsigned int seed);
473long int random(void);
474
475void qsort(void *base, size_t nitems, size_t size, int (*compar)(const void *, const void*));
476
477VSF_CAL_NO_RETURN void abort(void);
478int system(const char *command);
479
480VSF_CAL_NO_RETURN void exit(int status);
481int atexit(void (*func)(void));
482VSF_CAL_NO_RETURN void _Exit(int exit_code);
483
484int abs(int j);
485long labs(long j);
486long long llabs(long long j);
488
489int getloadavg(double loadavg[], int nelem);
490char *realpath(const char *path, char *resolved_path);
491
492#endif // __VSF_APPLET__ && VSF_LINUX_APPLET_USE_LIBC_STDLIB
493
494static inline void * reallocarray(void *p, size_t nmemb, size_t size) {
495 return realloc(p, nmemb * size);
496}
497
498int at_quick_exit(void (*func)(void));
500
501int mblen(const char *str, size_t n);
502// TODO: it seems that IAR does not support wchar_t even if it's defined in stddef.h
503#if !__IS_COMPILER_IAR__
504size_t mbstowcs(wchar_t *dst, const char *src, size_t len);
505int mbtowc(wchar_t *pwc, const char *str, size_t n);
506size_t wcstombs(char *str, const wchar_t *pwcs, size_t n);
507int wctomb(char *str, wchar_t wchar);
508#endif
509
510#ifdef __cplusplus
511}
512#endif
513
514#endif
Definition vsf_linux.h:270
long long intmax_t
Definition stdint.h:31
#define realloc(__ptr, __size)
Definition stdlib.h:419
long long strtoll(const char *str, char **endptr, int base)
Definition vsf_linux_glibc_stdlib.c:453
size_t mbstowcs(wchar_t *dst, const char *src, size_t len)
int getloadavg(double loadavg[], int nelem)
Definition vsf_linux_glibc_stdlib.c:364
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:146
unsigned long strtoul(const char *str, char **endptr, int base)
Definition vsf_linux_glibc_stdlib.c:471
#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:131
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:489
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:595
#define realpath
Definition stdlib.h:44
long long int atoll(const char *str)
Definition vsf_linux_glibc_stdlib.c:590
#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:575
long labs(long j)
Definition vsf_linux_glibc_stdlib.c:348
#define malloc(__size)
Definition stdlib.h:417
#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:173
#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:983
#define _Exit
Definition stdlib.h:35
double strtod(const char *str, char **endptr)
Definition vsf_linux_glibc_stdlib.c:507
#define mkstemps
Definition stdlib.h:49
long long llabs(long long j)
Definition vsf_linux_glibc_stdlib.c:353
#define calloc(__n, __size)
Definition stdlib.h:418
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:585
int mblen(const char *str, size_t n)
intmax_t imaxabs(intmax_t j)
Definition vsf_linux_glibc_stdlib.c:359
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:435
int abs(int j)
Definition vsf_linux_glibc_stdlib.c:343
#define system
Definition stdlib.h:36
int atoi(const char *str)
Definition vsf_linux_glibc_stdlib.c:580
void srandom(unsigned int seed)
VSF_CAL_NO_RETURN void abort(void)
Definition vsf_linux_glibc_stdlib.c:808
#define aligned_alloc
Definition stdlib.h:29
Definition stdlib.h:77
int quot
Definition stdlib.h:78
int rem
Definition stdlib.h:79
Definition stdlib.h:81
long rem
Definition stdlib.h:83
long quot
Definition stdlib.h:82
Definition stdlib.h:85
long long rem
Definition stdlib.h:87
long long quot
Definition stdlib.h:86
Definition stdlib.h:91
VSF_APPLET_VPLT_ENTRY_FUNC_DEF(mkostemps)
vsf_vplt_info_t info
Definition stdlib.h:92
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)
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:135
int unsetenv(const char *name)
Definition vsf_linux_glibc_stdlib.c:797
int setenv(const char *name, const char *value, int replace)
Definition vsf_linux_glibc_stdlib.c:792
char * getenv(const char *name)
Definition vsf_linux_glibc_stdlib.c:787
int putenv(char *string)
Definition vsf_linux_glibc_stdlib.c:763
char * itoa(int num, char *str, int radix)
Definition vsf_linux_glibc_stdlib.c:601
int clearenv(void)
Definition vsf_linux_glibc_stdlib.c:802
uint32_t size
Definition vsf_memfs.h:50
uint8_t status
Definition vsf_tgui.h:122