- fixed compilation for Linux and macOS

This commit is contained in:
alexey.lysiuk 2020-04-11 20:36:36 +03:00
parent 76db26ee0b
commit 0d420a75b7
9 changed files with 17 additions and 10 deletions

View file

@ -3,6 +3,8 @@
#ifndef __RESFILE_H
#define __RESFILE_H
#include <limits.h>
#include "files.h"
struct LumpFilterInfo

View file

@ -43,6 +43,11 @@
#include <sys/stat.h>
#include <time.h>
#ifndef _WIN32
#include <pwd.h>
#include <unistd.h>
#endif
/*
progdir will hold the path up to the game directory, including the slash

View file

@ -40,13 +40,11 @@
#include <fnmatch.h>
#include "cmdlib.h"
static const char *pattern;
#if defined(__APPLE__) && MAC_OS_X_VERSION_MAX_ALLOWED < 1080
static int matchfile(struct dirent *ent)
#else
static int matchfile(const struct dirent *ent)
#endif
{
return fnmatch(pattern, ent->d_name, FNM_NOESCAPE) == 0;
}

View file

@ -6,6 +6,7 @@
#ifndef _WIN32
#include <dirent.h>
struct findstate_t
{

View file

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

View file

@ -37,7 +37,7 @@
#include <stdlib.h>
#include <type_traits>
#include "doomtype.h"
#include "m_alloc.h"
#include "vectors.h"
class PClass;

View file

@ -69,7 +69,7 @@ class USDFParser : public UDMFParserBase
PClassActor *cls = PClass::FindActor(CheckString(key));
if (cls == nullptr)
{
sc.ScriptMessage("Unknown actor class '%s'", key);
sc.ScriptMessage("Unknown actor class '%s'", key.GetChars());
return nullptr;
}
type = cls;

View file

@ -2061,6 +2061,7 @@ FSoundChan *OpenALSoundRenderer::FindLowestChannel()
return lowest;
}
#endif // NO_OPENAL
#include "menu/menu.h"
@ -2116,5 +2117,3 @@ void I_BuildALResamplersList(FOptionValues* opt)
#endif
}
#endif // NO_OPENAL

View file

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