aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--gc.c8
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d12e536b50..2a14677b7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Jan 17 12:32:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * gc.c (aligned_malloc, aligned_free): covered missing defined
+ operators and fixes for cygwin.
+
Tue Jan 17 10:54:46 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* st.c (do_hash): it's the time to remove cast to unsigned int.
diff --git a/gc.c b/gc.c
index 5aac9738e3..4c906e7ab2 100644
--- a/gc.c
+++ b/gc.c
@@ -1088,9 +1088,9 @@ aligned_malloc(size_t alignment, size_t size)
{
void *res;
-#if __MINGW32__
+#if defined __MINGW32__
res = __mingw_aligned_malloc(size, alignment);
-#elif _WIN32 || defined __CYGWIN__
+#elif defined _WIN32 && !defined __CYGWIN__
res = _aligned_malloc(size, alignment);
#elif defined(HAVE_POSIX_MEMALIGN)
if (posix_memalign(&res, alignment, size) == 0) {
@@ -1109,9 +1109,9 @@ aligned_malloc(size_t alignment, size_t size)
static void
aligned_free(void *ptr)
{
-#if __MINGW32__
+#if defined __MINGW32__
__mingw_aligned_free(ptr);
-#elif _WIN32 || defined __CYGWIN__
+#elif defined _WIN32 && !defined __CYGWIN__
_aligned_free(ptr);
#else
free(ptr);