                  while ((*pImageCharacter != 0) && (*pImageCharacter != '\r') && (*pImageCharacter != '\n'))
                      cImageFile[nIndex++] = *pImageCharacter++;
                  cImageFile[nIndex] = 0;
+diff --git a/src/Shared/All.h b/src/Shared/All.h
+index 328addc..7730e89 100644
+--- a/src/Shared/All.h
++++ b/src/Shared/All.h
+@@ -21,6 +21,8 @@ Global includes
+     #include <windows.h>
+ #endif
+ 
++#include <stdlib.h>
++
+ #ifdef _WIN32
+     #include <mmsystem.h>
+     #include <tchar.h>
+@@ -34,7 +36,6 @@ Global includes
+     #include "NoWindows.h"
+ #endif
+ 
+-#include <stdlib.h>
+ #include <memory.h>
+ #include <stdio.h>
+ #include <math.h>

 
         if (pHeader && pImageFile && pStartBlock && pFinishBlock)
         {
@@ -81,7 +81,7 @@
                 
                 // get the path
                 char cImageFile[MAX_PATH + 1]; int nIndex = 0;

diff --git a/src/MACLib/APELink.cpp b/src/MACLib/APELink.cpp
index d349f4b..b00ec83 100644
--- a/src/MACLib/APELink.cpp
+++ b/src/MACLib/APELink.cpp
@@ -63,10 +63,10 @@ void CAPELink::ParseData(const char * pData, const str_utf16 * pFilename)
     if (pData != NULL)
     {
         // parse out the information
