fix compilation on MacOS

Fixes https://github.com/fragglet/DietBoom/issues/3
Thanks @fragglet.
This commit is contained in:
Fabian Greffrath 2020-01-29 08:41:57 +01:00
parent cf1d1ea24d
commit ff1a64514a
6 changed files with 8 additions and 7 deletions

View File

@ -28,6 +28,8 @@
//
//--------------------------------------------------------------------
#include "d_io.h"
// killough 5/2/98: fixed headers, removed rendunant external declarations:
#include "doomdef.h"
#include "doomstat.h"
@ -39,7 +41,6 @@
#include "g_game.h"
#include "d_think.h"
#include "w_wad.h"
#include "d_io.h"
// killough 10/98: new functions, to allow processing DEH files in-memory

View File

@ -40,7 +40,7 @@
#ifndef PATH_MAX
#define PATH_MAX _MAX_PATH
#endif
#elif defined (__unix__)
#elif !defined (_WIN32)
#include <unistd.h>
#include <ctype.h> // tolower()
#ifndef O_BINARY

View File

@ -1581,7 +1581,7 @@ void D_DoomMain(void)
if (devparm)
printf(D_DEVSTR);
#ifndef __unix__
#ifdef _WIN32
if (M_CheckParm("-cdrom"))
{
printf(D_CDROM);

View File

@ -1346,7 +1346,7 @@ void G_SaveGameName(char *name, int slot)
// Ty 05/04/98 - use savegamename variable (see d_deh.c)
// killough 12/98: add .7 to truncate savegamename
#ifndef __unix__
#ifdef _WIN32
if (M_CheckParm("-cdrom"))
sprintf(name, "c:/doomdata/%.7s%d.dsg", savegamename, slot);
else

View File

@ -24,6 +24,8 @@
#include "config.h"
#endif
#include <stdlib.h>
#ifdef HAVE_DLOPEN
#include <dlfcn.h>
#elif _WIN32
@ -31,7 +33,6 @@
#include <windows.h>
#endif
#include "doomtype.h"
#include "i_savepng.h"
savepng_t SavePNG = NULL;
@ -58,7 +59,7 @@ void I_InitSavePNG (void)
FARPROC savepng_func = NULL;
#endif
for (i = 0; i < arrlen(sdl2_image_libs); i++)
for (i = 0; i < sizeof(sdl2_image_libs) / sizeof(*sdl2_image_libs); i++)
{
#ifdef HAVE_DLOPEN
sdl2_image_lib = dlopen(sdl2_image_libs[i], RTLD_LAZY);

View File

@ -26,7 +26,6 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <malloc.h>
#include "mmus2mid.h"
//#define STANDALONE /* uncomment this to make MMUS2MID.EXE */