More portability changes and cleanups. 86Box now also compiles (and runs) on FreeBSD 10.4-RELEASE.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
# settings, so we can avoid changing the main one for all of
|
||||
# our local setups.
|
||||
#
|
||||
# Version: @(#)Makefile.local 1.0.5 2017/10/19
|
||||
# Version: @(#)Makefile.local 1.0.6 2017/10/26
|
||||
#
|
||||
# Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
#
|
||||
@@ -73,6 +73,7 @@ DEV_BRANCH := n
|
||||
CIRRUS := n
|
||||
NE1000 := n
|
||||
NV_RIVA := n
|
||||
OPENAL := y
|
||||
FLUIDSYNTH := y
|
||||
MUNT := y
|
||||
PAS16 := n
|
||||
|
@@ -18,6 +18,11 @@
|
||||
|
||||
/* Modified for use with PCem by bit */
|
||||
|
||||
//#ifdef FREEBSD
|
||||
//# define fopen64 fopen
|
||||
//# define fseeko64 fseeko
|
||||
//# define ftello64 ftello
|
||||
//#endif
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#ifdef WIN32
|
||||
@@ -36,6 +41,7 @@
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <sys/stat.h>
|
||||
#include "../plat.h"
|
||||
#include "cdrom_dosbox.h"
|
||||
|
||||
#if !defined(WIN32)
|
||||
|
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Driver for the ESDI controller (WD1007-vse1) for PC/AT.
|
||||
*
|
||||
* Version: @(#)hdc_esdi_at.c 1.0.5 2017/10/16
|
||||
* Version: @(#)hdc_esdi_at.c 1.0.6 2017/10/26
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "../pic.h"
|
||||
#include "../rom.h"
|
||||
#include "../timer.h"
|
||||
#include "../plat.h"
|
||||
#include "../ui.h"
|
||||
#include "hdc.h"
|
||||
#include "hdd.h"
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* Implementation of the IDE emulation for hard disks and ATAPI
|
||||
* CD-ROM devices.
|
||||
*
|
||||
* Version: @(#)hdc_ide.c 1.0.15 2017/10/26
|
||||
* Version: @(#)hdc_ide.c 1.0.16 2017/10/26
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Miran Grca, <mgrca8@gmail.com>
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "../device.h"
|
||||
#include "../cdrom/cdrom.h"
|
||||
#include "../scsi/scsi.h"
|
||||
#include "../plat.h"
|
||||
#include "../ui.h"
|
||||
#include "hdc.h"
|
||||
#include "hdc_ide.h"
|
||||
|
@@ -12,7 +12,7 @@
|
||||
* based design. Most cards were WD1003-WA2 or -WAH, where the
|
||||
* -WA2 cards had a floppy controller as well (to save space.)
|
||||
*
|
||||
* Version: @(#)hdd_mfm_at.c 1.0.9 2017/10/16
|
||||
* Version: @(#)hdd_mfm_at.c 1.0.10 2017/10/26
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "../io.h"
|
||||
#include "../pic.h"
|
||||
#include "../timer.h"
|
||||
#include "../plat.h"
|
||||
#include "../ui.h"
|
||||
#include "hdc.h"
|
||||
#include "hdd.h"
|
||||
|
@@ -41,7 +41,7 @@
|
||||
* Since all controllers (including the ones made by DTC) use
|
||||
* (mostly) the same API, we keep them all in this module.
|
||||
*
|
||||
* Version: @(#)hdd_mfm_xt.c 1.0.10 2017/10/16
|
||||
* Version: @(#)hdd_mfm_xt.c 1.0.11 2017/10/26
|
||||
*
|
||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
@@ -66,6 +66,7 @@
|
||||
#include "../pic.h"
|
||||
#include "../rom.h"
|
||||
#include "../timer.h"
|
||||
#include "../plat.h"
|
||||
#include "../ui.h"
|
||||
#include "hdc.h"
|
||||
#include "hdd.h"
|
||||
|
@@ -60,6 +60,10 @@ typedef unsigned long ioctlsockopt_t;
|
||||
# define final_udp slirp_final_udp
|
||||
#else
|
||||
# include <inttypes.h>
|
||||
# define HAVE_STDINT_H
|
||||
# define HAVE_STDLIB_H
|
||||
# define HAVE_STRING_H
|
||||
# define HAVE_UNISTD_H
|
||||
typedef uint8_t u_int8_t;
|
||||
typedef uint16_t u_int16_t;
|
||||
typedef uint32_t u_int32_t;
|
||||
|
@@ -24,6 +24,15 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef FREEBSD
|
||||
/* FreeBSD has largefile by default. */
|
||||
# define fopen64 fopen
|
||||
# define fseeko64 fseeko
|
||||
# define ftello64 ftello
|
||||
# define off64_t off_t
|
||||
#endif
|
||||
|
||||
|
||||
/* A hack (GCC-specific) to allow us to ignore unused parameters. */
|
||||
#define UNUSED(arg) __attribute__((unused))arg
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
#define USE_OPENAL
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
@@ -39,6 +38,7 @@ void al_set_midi(int freq, int buf_size)
|
||||
midi_buf_size = buf_size;
|
||||
}
|
||||
|
||||
#ifdef USE_OPENAL
|
||||
void closeal(void);
|
||||
ALvoid alutInit(ALint *argc,ALbyte **argv)
|
||||
{
|
||||
@@ -80,6 +80,7 @@ ALvoid alutExit(ALvoid)
|
||||
alcDestroyContext(Context);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void closeal(void)
|
||||
|
4
src/ui.h
4
src/ui.h
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* Define the various UI functions.
|
||||
*
|
||||
* Version: @(#)ui.h 1.0.6 2017/10/24
|
||||
* Version: @(#)ui.h 1.0.7 2017/10/26
|
||||
*
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
* Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
@@ -28,7 +28,7 @@ extern "C" {
|
||||
#ifdef WIN32
|
||||
# include "win/resource.h"
|
||||
#else
|
||||
# include "lnx/strings.h"
|
||||
# include "unix/resource.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# Makefile for Win32 (MinGW32) environment.
|
||||
#
|
||||
# Version: @(#)Makefile.mingw 1.0.68 2017/10/26
|
||||
# Version: @(#)Makefile.mingw 1.0.69 2017/10/26
|
||||
#
|
||||
# Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
# Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
@@ -66,6 +66,9 @@ endif
|
||||
ifndef NV_RIVA
|
||||
NV_RIVA := n
|
||||
endif
|
||||
ifndef OPENAL
|
||||
OPENAL := y
|
||||
endif
|
||||
ifndef FLUIDSYNTH
|
||||
FLUIDSYNTH := y
|
||||
endif
|
||||
@@ -187,6 +190,9 @@ DYNARECOBJ := 386_dynarec_ops.o \
|
||||
codegen_timing_winchip.o $(PLATCG)
|
||||
endif
|
||||
|
||||
ifeq ($(OPENAL), y)
|
||||
CFLAGS += -DUSE_OPENAL
|
||||
endif
|
||||
ifeq ($(FLUIDSYNTH), y)
|
||||
CFLAGS += -DUSE_FLUIDSYNTH
|
||||
FSYNTHOBJ := midi_fluidsynth.o
|
||||
|
Reference in New Issue
Block a user