diff --git a/Athena.pri b/Athena.pri index 5e1b856..52f33df 100644 --- a/Athena.pri +++ b/Athena.pri @@ -104,7 +104,7 @@ HEADERS += \ $$PWD/include/Athena/ZQuestFileWriter.hpp win32:HEADERS += \ - $$PWD/Athena/include/win32_largefilewrapper.h + $$PWD/include/win32_largefilewrapper.h OTHER_FILES += \ .travis.yml diff --git a/include/Athena/ALTTPFileReader.hpp b/include/Athena/ALTTPFileReader.hpp index 0d4b406..293b467 100644 --- a/include/Athena/ALTTPFileReader.hpp +++ b/include/Athena/ALTTPFileReader.hpp @@ -36,7 +36,7 @@ namespace io */ class ALTTPFileReader : protected BinaryReader { - BINARYREADER_BASE + BINARYREADER_BASE(); public: /*! \brief This constructor takes an existing buffer to read from. diff --git a/include/Athena/BinaryReader.hpp b/include/Athena/BinaryReader.hpp index b47b540..abeba5f 100644 --- a/include/Athena/BinaryReader.hpp +++ b/include/Athena/BinaryReader.hpp @@ -292,9 +292,9 @@ protected: } // Athena #ifndef BINARYREADER_BASE -#define BINARYREADER_BASE \ +#define BINARYREADER_BASE() \ private: \ - typedef Athena::io::BinaryReader base; + typedef Athena::io::BinaryReader base #endif // BINARYREADER_BASE diff --git a/include/Athena/Global.hpp b/include/Athena/Global.hpp index ba19e5b..da3d5e8 100644 --- a/include/Athena/Global.hpp +++ b/include/Athena/Global.hpp @@ -20,8 +20,18 @@ #include "Athena/Utility.hpp" #include -#if !defined(__PRETTY_FUNCTION__) && defined(_WIN32) -#define __PRETTY_FUNCTION__ __FUNCSIG__ +#ifndef __PRETTY_FUNCTION__ +# ifdef __FUNCSIG__ +# define __PRETTY_FUNCTION__ __FUNCSIG__ +# elif defined(__FUNCTION__) +# define __PRETTY_FUNCTION__ __FUNCTION__ +# elif defined(__FUNC__) +# define __PRETTY_FUNCTION__ __FUNCTION__ +# elif defined(__func__) +# define __PRETTY_FUNCTION__ __FUNCTION__ +# else +# define __PRETTY_FUNCTION__ "" +# endif #endif #ifndef aDebug diff --git a/include/Athena/MCFileReader.hpp b/include/Athena/MCFileReader.hpp index 02b86b7..619988d 100644 --- a/include/Athena/MCFileReader.hpp +++ b/include/Athena/MCFileReader.hpp @@ -35,7 +35,7 @@ namespace io */ class MCFileReader : protected BinaryReader { - BINARYREADER_BASE + BINARYREADER_BASE(); public: /*! * \brief This constructor takes an existing buffer to read from. diff --git a/include/Athena/SkywardSwordFileReader.hpp b/include/Athena/SkywardSwordFileReader.hpp index 643d873..adc213b 100644 --- a/include/Athena/SkywardSwordFileReader.hpp +++ b/include/Athena/SkywardSwordFileReader.hpp @@ -25,7 +25,7 @@ namespace io { class SkywardSwordFileReader : public BinaryReader { - BINARYREADER_BASE + BINARYREADER_BASE(); public: SkywardSwordFileReader(Uint8* data, Uint64 length); diff --git a/include/Athena/SpriteFileReader.hpp b/include/Athena/SpriteFileReader.hpp index 937245e..cca6a08 100644 --- a/include/Athena/SpriteFileReader.hpp +++ b/include/Athena/SpriteFileReader.hpp @@ -30,7 +30,7 @@ namespace io class SpriteFileReader : public BinaryReader { - BINARYREADER_BASE; + BINARYREADER_BASE(); public: SpriteFileReader(Uint8* data, Uint64 length); SpriteFileReader(const std::string& filepath); diff --git a/include/Athena/WiiSaveReader.hpp b/include/Athena/WiiSaveReader.hpp index 2342fc8..257f12b 100644 --- a/include/Athena/WiiSaveReader.hpp +++ b/include/Athena/WiiSaveReader.hpp @@ -38,7 +38,7 @@ namespace io */ class WiiSaveReader : protected BinaryReader { - BINARYREADER_BASE + BINARYREADER_BASE(); public: /*! \brief This constructor takes an existing buffer to read from. * diff --git a/include/Athena/ZQuestFileReader.hpp b/include/Athena/ZQuestFileReader.hpp index 7b57b4d..b5fe2d4 100644 --- a/include/Athena/ZQuestFileReader.hpp +++ b/include/Athena/ZQuestFileReader.hpp @@ -30,7 +30,7 @@ namespace io */ class ZQuestFileReader : protected BinaryReader { - BINARYREADER_BASE + BINARYREADER_BASE(); public: /*! diff --git a/include/win32_largefilewrapper.h b/include/win32_largefilewrapper.h index 0211813..75f81a8 100644 --- a/include/win32_largefilewrapper.h +++ b/include/win32_largefilewrapper.h @@ -1,7 +1,7 @@ #ifndef WIN32_LARGEFILEWRAPPER_H #define WIN32_LARGEFILEWRAPPER_H -#ifdef _WIN32 +#if defined(_WIN32) && defined(_MSC_VER) #include #ifdef __cplusplus extern "C" { diff --git a/src/win32_largefilewrapper.c b/src/win32_largefilewrapper.c index 6d13829..b18e306 100644 --- a/src/win32_largefilewrapper.c +++ b/src/win32_largefilewrapper.c @@ -1,7 +1,7 @@ #include "win32_largefilewrapper.h" #include -#ifdef _WIN32 +#if defined(_WIN32) && defined(_MSC_VER) int fseeko64(FILE* fp, off64_t offset, int whence) { return _fseeki64(fp, offset, whence);