mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 14:51:51 +00:00
- fixed compilation for Linux and macOS
This commit is contained in:
parent
76db26ee0b
commit
0d420a75b7
9 changed files with 17 additions and 10 deletions
|
@ -3,6 +3,8 @@
|
|||
#ifndef __RESFILE_H
|
||||
#define __RESFILE_H
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include "files.h"
|
||||
|
||||
struct LumpFilterInfo
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
@ -187,4 +185,4 @@ const char *I_FindName(findstate_t *fileinfo)
|
|||
return fileinfo->UTF8Name.GetChars();
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#ifndef _WIN32
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
struct findstate_t
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <type_traits>
|
||||
#include "doomtype.h"
|
||||
|
||||
#include "m_alloc.h"
|
||||
#include "vectors.h"
|
||||
|
||||
class PClass;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include "basics.h"
|
||||
#include "SFMT/SFMTObj.h"
|
||||
#include "sfmt/SFMTObj.h"
|
||||
|
||||
class FSerializer;
|
||||
|
||||
|
|
Loading…
Reference in a new issue