* 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:
parent
e8590143a0
commit
e87c0e6574
@ -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>
|
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.
|
* st.c (do_hash): it's the time to remove cast to unsigned int.
|
||||||
|
8
gc.c
8
gc.c
@ -1088,9 +1088,9 @@ aligned_malloc(size_t alignment, size_t size)
|
|||||||
{
|
{
|
||||||
void *res;
|
void *res;
|
||||||
|
|
||||||
#if __MINGW32__
|
#if defined __MINGW32__
|
||||||
res = __mingw_aligned_malloc(size, alignment);
|
res = __mingw_aligned_malloc(size, alignment);
|
||||||
#elif _WIN32 || defined __CYGWIN__
|
#elif defined _WIN32 && !defined __CYGWIN__
|
||||||
res = _aligned_malloc(size, alignment);
|
res = _aligned_malloc(size, alignment);
|
||||||
#elif defined(HAVE_POSIX_MEMALIGN)
|
#elif defined(HAVE_POSIX_MEMALIGN)
|
||||||
if (posix_memalign(&res, alignment, size) == 0) {
|
if (posix_memalign(&res, alignment, size) == 0) {
|
||||||
@ -1109,9 +1109,9 @@ aligned_malloc(size_t alignment, size_t size)
|
|||||||
static void
|
static void
|
||||||
aligned_free(void *ptr)
|
aligned_free(void *ptr)
|
||||||
{
|
{
|
||||||
#if __MINGW32__
|
#if defined __MINGW32__
|
||||||
__mingw_aligned_free(ptr);
|
__mingw_aligned_free(ptr);
|
||||||
#elif _WIN32 || defined __CYGWIN__
|
#elif defined _WIN32 && !defined __CYGWIN__
|
||||||
_aligned_free(ptr);
|
_aligned_free(ptr);
|
||||||
#else
|
#else
|
||||||
free(ptr);
|
free(ptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user