Don't #include <malloc.h> on Linux, only on Windows

Linux, FreeBSD and OSX should use stdlib.h instead.
This commit is contained in:
Daniel Gibson 2016-04-17 01:06:39 +02:00
parent dc2c869cfc
commit 24dcb9cc4f
3 changed files with 3 additions and 9 deletions

View File

@ -21,7 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <stdarg.h> #include <stdarg.h>
#include <math.h> #include <math.h>
#if !defined(PLATFORM_MACOSX) && !defined(PLATFORM_FREEBSD) #ifdef PLATFORM_WIN32
#include <malloc.h> #include <malloc.h>
#endif #endif

View File

@ -38,12 +38,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <search.h> // for qsort #include <search.h> // for qsort
#include <float.h> // for FPU control #include <float.h> // for FPU control
#if !defined(PLATFORM_MACOSX) && !defined(PLATFORM_FREEBSD)
#include <malloc.h>
#endif
/* rcg10042001 !!! FIXME: Move these somewhere. */ /* rcg10042001 !!! FIXME: Move these somewhere. */
#if (defined PLATFORM_WIN32) #if (defined PLATFORM_WIN32)
#include <malloc.h>
#include <conio.h> #include <conio.h>
#include <crtdbg.h> #include <crtdbg.h>
#include <winsock2.h> #include <winsock2.h>

View File

@ -27,11 +27,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <search.h> // for qsort #include <search.h> // for qsort
#include <float.h> // for FPU control #include <float.h> // for FPU control
#if !defined(PLATFORM_MACOSX) && !defined(PLATFORM_FREEBSD)
#include <malloc.h>
#endif
#ifdef PLATFORM_WIN32 #ifdef PLATFORM_WIN32
#include <malloc.h>
#include <conio.h> #include <conio.h>
#include <crtdbg.h> #include <crtdbg.h>
#include <winsock2.h> #include <winsock2.h>