Clean up the memalign switching a bit
This commit is contained in:
parent
78f5fc698a
commit
b9f8fe4a4d
|
@ -2,15 +2,13 @@
|
|||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifndef __APPLE__
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__APPLE__) || defined(__WIN32__)
|
||||
/* Linux + Kos define this, OSX does not, so just use malloc there */
|
||||
#define memalign(x, size) malloc((size))
|
||||
static inline void* memalign(size_t alignment, size_t size) {
|
||||
return malloc(size);
|
||||
}
|
||||
#else
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
/* Linux + Kos define this, OSX does not, so just use malloc there */
|
||||
#define memalign(x, size) malloc((size))
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "aligned_vector.h"
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef __APPLE__
|
||||
#if defined(__WIN32__)
|
||||
#if defined(__APPLE__) || defined(__WIN32__)
|
||||
/* Linux + Kos define this, OSX does not, so just use malloc there */
|
||||
#define memalign(x, size) malloc((size))
|
||||
static inline void* memalign(size_t alignment, size_t size) {
|
||||
return malloc(size);
|
||||
}
|
||||
#else
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
/* Linux + Kos define this, OSX does not, so just use malloc there */
|
||||
#define memalign(x, size) malloc((size))
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include "stack.h"
|
||||
|
|
Loading…
Reference in New Issue
Block a user