Permalink
Browse files

support mingw32

  • Loading branch information...
1 parent 5b5750d commit 5b0b56c7e60b532ed732fa39ae682a8ed0396dfa @authorNari committed Jan 6, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 gc.c
View
8 gc.c
@@ -1075,7 +1075,9 @@ aligned_malloc(size_t aligned_size)
{
void *res;
-#if _WIN32 || defined __CYGWIN__
+#if __MINGW32__
+ res = __mingw_aligned_malloc(aligned_size, aligned_size);
+#elif _WIN32 || defined __CYGWIN__
res = _aligned_malloc(aligned_size, aligned_size);
#else
# if _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
@@ -1094,7 +1096,9 @@ aligned_malloc(size_t aligned_size)
static void
aligned_free(void *ptr)
{
-#if _WIN32 || defined __CYGWIN__
+#if __MINGW32__
+ __mingw_aligned_free(ptr);
+#elif _WIN32 || defined __CYGWIN__
_aligned_free(ptr);
#else
free(ptr);

0 comments on commit 5b0b56c

Please sign in to comment.