From b043032a89f38e2b3191a65dab9ae4e8202d48f3 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Sun, 12 Nov 2017 07:32:11 +0300 Subject: libADLMIDI now is buildable under OpenWatcom except of some workarounds - Need a different way to create a static library, otherwise it don't wanna be built. - Needed a different custom STL containers (std::vector and std::set) implementation that will work and will don't glitch with a crashes --- utils/dumpbank/dumpbank.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'utils/dumpbank') diff --git a/utils/dumpbank/dumpbank.cpp b/utils/dumpbank/dumpbank.cpp index aad3e7b..84283e7 100644 --- a/utils/dumpbank/dumpbank.cpp +++ b/utils/dumpbank/dumpbank.cpp @@ -4,14 +4,15 @@ #include #include #include +#include -#ifndef _MSC_VER +#if !defined(_MSC_VER) && !defined(__WATCOMC__) #define PACKED_STRUCT __attribute__((packed)) #else #define PACKED_STRUCT #endif -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__WATCOMC__) #pragma pack(push,1) #endif @@ -83,7 +84,7 @@ struct BNK2_instrument unsigned char xxxxxxxx; } PACKED_STRUCT; // Ad Lib Gold instrument maker bankfile patch -#ifdef _MSC_VER +#if defined(_MSC_VER) || defined(__WATCOMC__) #pragma pack(pop) #endif @@ -157,7 +158,7 @@ static void LoadBNK2(const std::vector& data) static void LoadBNK(const char* fn) { - FILE* fp = fopen(fn, "rb"); + FILE* fp = std::fopen(fn, "rb"); if(!fp) { std::fprintf(stderr, "ERROR: Can't open %s file!", fn); -- cgit v1.2.3