Fix compiling on OSX
This commit is contained in:
parent
b9a2351f0a
commit
2f014f55b6
|
@ -2,10 +2,17 @@
|
||||||
#define ALIGNED_VECTOR_H
|
#define ALIGNED_VECTOR_H
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <malloc.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
|
#include <malloc.h>
|
||||||
|
#else
|
||||||
|
/* Linux + Kos define this, OSX does not, so just use malloc there */
|
||||||
|
#define memalign(x, size) malloc((size))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define ALIGNED_VECTOR_INITIAL_CAPACITY 256u
|
#define ALIGNED_VECTOR_INITIAL_CAPACITY 256u
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -1,9 +1,16 @@
|
||||||
#ifndef STACK_H
|
#ifndef STACK_H
|
||||||
#define STACK_H
|
#define STACK_H
|
||||||
|
|
||||||
#include <malloc.h>
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
|
#include <malloc.h>
|
||||||
|
#else
|
||||||
|
/* Linux + Kos define this, OSX does not, so just use malloc there */
|
||||||
|
#define memalign(x, size) malloc((size))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned char* data;
|
unsigned char* data;
|
||||||
unsigned int capacity;
|
unsigned int capacity;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user