refactor, libc made optional
This commit is contained in:
+19
-3
@@ -1,4 +1,20 @@
|
||||
/*
|
||||
Minimal subset of stdlib, none of which have to be actually implemented,
|
||||
even memory mnagement.
|
||||
*/
|
||||
|
||||
/* TODO: Actually implement. */
|
||||
#define realloc(m_p, m_b) (NULL)
|
||||
#define free(m_p) ((void)0)
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
extern void *com_std_realloc(void *ptr, size_t size);
|
||||
extern void com_std_free(void *ptr);
|
||||
|
||||
/* Note: Functions listed below are only available for test builds. */
|
||||
/* Trigonometry functions are for reference testing of our own fixed point
|
||||
* implementations. Do not use otherwise. */
|
||||
extern void com_std_assert(bool holds);
|
||||
extern void com_std_printf(char const *fmt, ...);
|
||||
extern double com_std_sqrt(double v);
|
||||
extern double com_std_fabs(double v);
|
||||
extern double com_std_sin(double v);
|
||||
extern double com_std_cos(double v);
|
||||
|
||||
Reference in New Issue
Block a user