2022-12-25 10:14:39 +00:00
|
|
|
#ifndef _LIBCLAYER_H
|
|
|
|
#define _LIBCLAYER_H 1
|
2022-12-25 08:58:00 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stddef.h>
|
|
|
|
|
2022-12-27 09:05:30 +00:00
|
|
|
#ifdef LIBCLAYER_NOPREFIX
|
2022-12-25 11:23:09 +00:00
|
|
|
#define LIBCLAYER(name) name
|
|
|
|
#else
|
2022-12-27 09:05:30 +00:00
|
|
|
#define LIBCLAYER(name) libclayer_ ## name
|
2022-12-25 11:23:09 +00:00
|
|
|
#endif
|
|
|
|
|
2022-12-25 10:14:39 +00:00
|
|
|
struct Libclayer {
|
2022-12-25 10:39:30 +00:00
|
|
|
__attribute__((noreturn)) void (*abort)();
|
|
|
|
__attribute__((noreturn)) void (*exit)(int status);
|
2022-12-25 08:58:00 +00:00
|
|
|
|
|
|
|
void *(*calloc)(size_t nmemb, size_t size);
|
|
|
|
void (*free)(void *ptr);
|
|
|
|
void *(*malloc)(size_t size);
|
|
|
|
void *(*realloc)(void *ptr, size_t size);
|
|
|
|
};
|
|
|
|
|
2022-12-25 10:14:39 +00:00
|
|
|
extern struct Libclayer libclayer;
|
2022-12-25 08:58:00 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|