zig/lib/libc/include/wasm-wasi-musl/__functions_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

26 lines
690 B
C
Vendored

#ifndef __wasilibc___functions_malloc_h
#define __wasilibc___functions_malloc_h
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
void *malloc(size_t __size) __attribute__((__malloc__, __warn_unused_result__));
void free(void *__ptr);
void *calloc(size_t __nmemb, size_t __size) __attribute__((__malloc__, __warn_unused_result__));
void *realloc(void *__ptr, size_t __size) __attribute__((__warn_unused_result__));
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
void *reallocarray(void *__ptr, size_t __nmemb, size_t __size) __attribute__((__warn_unused_result__));
#endif
#ifdef __cplusplus
}
#endif
#endif