diff --git a/src/Makefile.local b/src/Makefile.local index f33613ab6..ef2a7e2e4 100644 --- a/src/Makefile.local +++ b/src/Makefile.local @@ -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, # @@ -73,6 +73,7 @@ DEV_BRANCH := n CIRRUS := n NE1000 := n NV_RIVA := n +OPENAL := y FLUIDSYNTH := y MUNT := y PAS16 := n diff --git a/src/cdrom/cdrom_dosbox.cpp b/src/cdrom/cdrom_dosbox.cpp index 0ccf4973a..a729f1cdb 100644 --- a/src/cdrom/cdrom_dosbox.cpp +++ b/src/cdrom/cdrom_dosbox.cpp @@ -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 #include #include +#include "../plat.h" #include "cdrom_dosbox.h" #if !defined(WIN32) diff --git a/src/disk/hdc_esdi_at.c b/src/disk/hdc_esdi_at.c index 183bc5b16..481d8d084 100644 --- a/src/disk/hdc_esdi_at.c +++ b/src/disk/hdc_esdi_at.c @@ -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, * Miran Grca, @@ -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" diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 80867641c..d06e0a647 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -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, * Miran Grca, @@ -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" diff --git a/src/disk/hdc_mfm_at.c b/src/disk/hdc_mfm_at.c index 473999dcb..07fa20fb5 100644 --- a/src/disk/hdc_mfm_at.c +++ b/src/disk/hdc_mfm_at.c @@ -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, * Fred N. van Kempen, @@ -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" diff --git a/src/disk/hdc_mfm_xt.c b/src/disk/hdc_mfm_xt.c index 7deae868b..c660a8a51 100644 --- a/src/disk/hdc_mfm_xt.c +++ b/src/disk/hdc_mfm_xt.c @@ -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, * Fred N. van Kempen, @@ -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" diff --git a/src/network/slirp/slirp.h b/src/network/slirp/slirp.h index 0cacdb8ca..e0af9414d 100644 --- a/src/network/slirp/slirp.h +++ b/src/network/slirp/slirp.h @@ -60,6 +60,10 @@ typedef unsigned long ioctlsockopt_t; # define final_udp slirp_final_udp #else # include +# 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; diff --git a/src/plat.h b/src/plat.h index c2a38291f..3e9c5a482 100644 --- a/src/plat.h +++ b/src/plat.h @@ -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 diff --git a/src/sound/openal.c b/src/sound/openal.c index 1a0c1a311..7b5f935ed 100644 --- a/src/sound/openal.c +++ b/src/sound/openal.c @@ -1,4 +1,3 @@ -#define USE_OPENAL #include #include #include @@ -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) diff --git a/src/ui.h b/src/ui.h index 28dd9d5fc..dca1dd585 100644 --- a/src/ui.h +++ b/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, * Fred N. van Kempen, @@ -28,7 +28,7 @@ extern "C" { #ifdef WIN32 # include "win/resource.h" #else -# include "lnx/strings.h" +# include "unix/resource.h" #endif diff --git a/src/win/Makefile.mingw b/src/win/Makefile.mingw index 6f33d64e8..76d8def60 100644 --- a/src/win/Makefile.mingw +++ b/src/win/Makefile.mingw @@ -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, # Fred N. van Kempen, @@ -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