diff --git a/src/diwa.cpp b/src/diwa.cpp index 611f0e9..205f57b 100644 --- a/src/diwa.cpp +++ b/src/diwa.cpp @@ -25,14 +25,14 @@ # include #endif -#if !defined(ARDUINO) +#if defined(__GNUC__) || defined(__GNUG__) || defined(__clang__) || defined(_MSC_VER) # include #endif #include #include -#ifndef ARDUINO +#if (defined(__GNUC__) || defined(__GNUG__) || defined(__clang__) || defined(_MSC_VER)) && !defined(PSP) static inline void writeToStream(std::ofstream& stream, const uint8_t* data, size_t size) { for(size_t i = 0; i < size; i++) @@ -375,7 +375,7 @@ DiwaError Diwa::saveToFile(File annFile) { return NO_ERROR; } -#else +#elif (defined(__GNUC__) || defined(__GNUG__) || defined(__clang__) || defined(_MSC_VER)) && !defined(PSP) DiwaError Diwa::loadFromFile(std::ifstream& annFile) { if(!annFile.is_open()) diff --git a/src/diwa.h b/src/diwa.h index fb6e17c..f601e61 100644 --- a/src/diwa.h +++ b/src/diwa.h @@ -48,13 +48,15 @@ # else # include # endif -#else +#elif (defined(__GNUC__) || defined(__GNUG__) || defined(__clang__) || defined(_MSC_VER)) && !defined(PSP) # include -# include +# include +#elif defined(PSP) +# include #endif #include -#include +#include /** * @enum DiwaError @@ -243,7 +245,7 @@ class Diwa final { */ DiwaError saveToFile(File annFile); - #else + #elif (defined(__GNUC__) || defined(__GNUG__) || defined(__clang__) || defined(_MSC_VER)) && !defined(PSP) /** * @brief Load neural network model from file in non-Arduino environment. diff --git a/src/diwa_conv.h b/src/diwa_conv.h index 89310f7..3327282 100644 --- a/src/diwa_conv.h +++ b/src/diwa_conv.h @@ -34,6 +34,8 @@ #ifndef DIWA_UTIL_H #define DIWA_UTIL_H +#include + /** @cond */ typedef union { double d;