* gc.c (aligned_malloc, aligned_free): covered missing defined

operators and fixes for cygwin.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-01-17 03:32:50 +00:00
Родитель e8590143a0
Коммит e87c0e6574
2 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -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.

8
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);