zig/lib/libc/include/wasm-wasi-musl/malloc.h
Jakub Konka 7b74de7d71 wasi,cc: fix naming and add stubs for building
Rename include dir to match the convention:
  from `wasm32-wasi` to `wasm-wasi-musl`

Add building stubs which will be used to build and cache WASI
libc sysroot.
2021-05-20 16:54:00 +02:00

33 lines
662 B
C
Vendored

#ifndef _MALLOC_H
#define _MALLOC_H
#ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */
#else
#include <__functions_malloc.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define __NEED_size_t
#include <bits/alltypes.h>
#ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */
void *malloc (size_t);
void *calloc (size_t, size_t);
void *realloc (void *, size_t);
void free (void *);
#endif
#ifdef __wasilibc_unmodified_upstream /* WASI libc doesn't build the legacy functions */
void *valloc (size_t);
void *memalign(size_t, size_t);
#endif
size_t malloc_usable_size(void *);
#ifdef __cplusplus
}
#endif
#endif