Replace malloc.h by stdlib.h

On true unices malloc.h was never available and on Linux one should
include stdlib.h instead. While this change is necessary to build
rbdoom3 on FreeBSD and other true unices, the big question is what
it means to Windows.
This commit is contained in:
Yamagi Burmeister 2013-01-14 18:51:18 +01:00 committed by Daniel Gibson
parent 41b26e586c
commit da31237ed0
4 changed files with 4 additions and 5 deletions

View file

@ -27,7 +27,6 @@ If you have questions concerning this license or the applicable additional terms
*/
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>

View file

@ -36,7 +36,7 @@ If you have questions concerning this license or the applicable additional terms
// memory allocation all in one place
//
//===============================================================
#include <malloc.h>
#include <stdlib.h>
#undef new
/*

View file

@ -51,14 +51,14 @@ If you have questions concerning this license or the applicable additional terms
// RB begin
#if defined(__MINGW32__)
//#include <sal.h> // RB: missing __analysis_assume
#include <malloc.h> // DG: _alloca16 needs that
#ifndef __analysis_assume
#define __analysis_assume( x )
#endif
#include <malloc.h> // DG: _alloca16 needs that
#elif defined(__linux__)
#include <malloc.h> // DG: _alloca16 needs that
#include <signal.h>
#endif
// RB end

View file

@ -117,7 +117,7 @@ If you have questions concerning this license or the applicable additional terms
#endif // #if defined(_WIN32)
// RB end
#include <malloc.h> // no malloc.h on mac or unix
#include <stdlib.h> // no malloc.h on mac or unix
#undef FindText // fix namespace pollution