ack/h/missing_proto.h
Manoel Trapier 5f00cd2e53 Make a brk/sbrk emulation.
Mac OS X seems to have some difficulties with brk/sbrk (maybe with the
4MB heap limit), and replace all the allocation logic will be prone to
errors, I'll add a new define and lib to emulate brk/sbrk using more
standard allocation methods. By default the heap is 64MB, it should be
enough.
2015-06-24 23:41:49 +01:00

29 lines
402 B
C

#ifndef H_MISSING_PROTO_H
#define H_MISSING_PROTO_H
#ifdef NOSBRK
void *sbrk(__intptr_t increment);
int brk(void * addr);
#endif
#ifdef NOMKTEMP
char *mktemp(char *template);
#endif
#ifdef EMULATE_BRK
void *sbrk_emu(int increment);
int brk_emu(void * addr);
#ifdef sbrk
#undef sbrk
#endif
#ifdef brk
#undef brk
#endif
#define sbrk sbrk_emu
#define brk brk_emu
#endif
#endif /* H_MISSING_H */