Permalink
Browse files

added defines checking to make it compilable for wince

  • Loading branch information...
1 parent 083445b commit ed53885660324c319a1b78b62e27c5e2fdf27d54 denis111 committed Dec 3, 2007
Showing with 5 additions and 5 deletions.
  1. +5 −5 mmio/mmalloc.c
View
@@ -20,7 +20,7 @@
/*==============================================================================
- $Id: mmalloc.c,v 1.2 2005/03/30 19:10:37 realtech Exp $
+ $Id: mmalloc.c,v 1.3 2007/12/03 20:42:58 denis111 Exp $
Dynamic memory routines
@@ -66,7 +66,7 @@ void* MikMod_realloc(void *data, size_t size)
return d;
}
return 0;
-#elif defined _WIN32 || defined _WIN64
+#elif (defined _WIN32 || defined _WIN64) && !defined(_WIN32_WCE)
return _aligned_realloc(data, size, ALIGN_STRIDE);
#else
unsigned char *newPtr = (unsigned char *)realloc(get_pointer(data), size + ALIGN_STRIDE + sizeof(void*));
@@ -87,7 +87,7 @@ void* MikMod_malloc(size_t size)
return d;
}
return 0;
-#elif defined _WIN32 || defined _WIN64
+#elif (defined _WIN32 || defined _WIN64) && !defined(_WIN32_WCE)
void * d = _aligned_malloc(size, ALIGN_STRIDE);
if (d)
{
@@ -116,7 +116,7 @@ void* MikMod_calloc(size_t nitems,size_t size)
return d;
}
return 0;
-#elif defined _WIN32 || defined _WIN64
+#elif (defined _WIN32 || defined _WIN64) && !defined(_WIN32_WCE)
void * d = _aligned_malloc(size * nitems, ALIGN_STRIDE);
if (d)
{
@@ -141,7 +141,7 @@ void MikMod_free(void *data)
{
#if defined __MACH__
free(data);
-#elif defined _WIN32 || defined _WIN64
+#elif (defined _WIN32 || defined _WIN64) && !defined(_WIN32_WCE)
_aligned_free(data);
#else
free(get_pointer(data));

0 comments on commit ed53885

Please sign in to comment.