mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2024-12-01 16:31:45 +00:00
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:
parent
41b26e586c
commit
da31237ed0
4 changed files with 4 additions and 5 deletions
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
||||
/*
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue