- fixed compilation of POSIX targets

source/common/objects/dobject.h:276:21: error: use of undeclared identifier 'malloc_size'
source/common/utility/m_alloc.h:45:22: error: ‘malloc_usable_size’ was not declared in this scope
source/common/engine/m_random.h:40:10: fatal error: SFMT/SFMTObj.h: No such file or directory
source/common/objects/__autostart.cpp:94:10: fatal error: 'doomtype.h' file not found
source/common/objects/zzautozend.cpp:58:10: fatal error: 'doomtype.h' file not found
This commit is contained in:
alexey.lysiuk 2020-05-24 10:11:40 +03:00
parent ab6e87b5f8
commit 804a2964a0
4 changed files with 5 additions and 3 deletions

View file

@ -37,7 +37,7 @@
#include <stdio.h> #include <stdio.h>
#include "basics.h" #include "basics.h"
#include "SFMT/SFMTObj.h" #include "sfmt/SFMTObj.h"
class FSerializer; class FSerializer;

View file

@ -91,7 +91,7 @@ __declspec(allocate(".yreg$a")) void *const YRegHead = 0;
#elif defined(__GNUC__) #elif defined(__GNUC__)
#include "doomtype.h" #include "basics.h"
// I don't know of an easy way to merge sections together with the GNU linker, // I don't know of an easy way to merge sections together with the GNU linker,
// so GCC users will see all of these sections appear in the final executable. // so GCC users will see all of these sections appear in the final executable.

View file

@ -55,7 +55,7 @@ __declspec(allocate(".yreg$z")) void *const YRegTail = 0;
#elif defined(__GNUC__) #elif defined(__GNUC__)
#include "doomtype.h" #include "basics.h"
void *const ARegTail __attribute__((section(SECTION_AREG))) = 0; void *const ARegTail __attribute__((section(SECTION_AREG))) = 0;
void *const CRegTail __attribute__((section(SECTION_CREG))) = 0; void *const CRegTail __attribute__((section(SECTION_CREG))) = 0;

View file

@ -38,10 +38,12 @@
#include <string.h> #include <string.h>
#if defined(__APPLE__) #if defined(__APPLE__)
#include <malloc/malloc.h>
#define _msize(p) malloc_size(p) #define _msize(p) malloc_size(p)
#elif defined(__solaris__) || defined(__OpenBSD__) #elif defined(__solaris__) || defined(__OpenBSD__)
#define _msize(p) (*((size_t*)(p)-1)) #define _msize(p) (*((size_t*)(p)-1))
#elif !defined(_WIN32) #elif !defined(_WIN32)
#include <malloc.h>
#define _msize(p) malloc_usable_size(p) // from glibc/FreeBSD #define _msize(p) malloc_usable_size(p) // from glibc/FreeBSD
#endif #endif